From 4bbef34f4ac36c9f9554610724209a9f454791cb Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 13 Jun 2025 10:36:00 -0400 Subject: [PATCH 1/7] init-lint --- .golangci.yml | 148 ++++++++++-------- Makefile | 18 +-- blockdb/query_test.go | 6 +- blockdb/tui/help.go | 6 +- blockdb/tui/presenter/tx_test.go | 2 +- blockdb/tui/update_test.go | 2 +- chain/cosmos/cosmos_chain.go | 2 +- chain/cosmos/module_auth.go | 2 +- chain/ethereum/ethererum_chain.go | 2 +- chain/namada/namada_chain.go | 2 +- chain/namada/namada_node.go | 2 +- chain/penumbra/penumbra_chain.go | 2 +- chain/thorchain/thorchain.go | 2 +- chain/utxo/utxo_chain.go | 2 +- chainspec.go | 17 +- chainspec_test.go | 4 +- cmd/interchaintest/flags.go | 2 +- contract/cosmwasm/compile.go | 2 +- dockerutil/image.go | 4 +- dockerutil/image_test.go | 2 +- dockerutil/kill.go | 2 +- dockerutil/setup.go | 2 +- examples/cosmos/bad_genesis_params_test.go | 5 +- examples/cosmos/chain_core_test.go | 106 +++++++------ examples/cosmos/chain_export_test.go | 5 +- examples/cosmos/chain_genesis_stake_test.go | 7 +- examples/cosmos/chain_miscellaneous_test.go | 54 +++---- examples/cosmos/chain_param_change_test.go | 8 +- examples/cosmos/chain_upgrade_ibc_test.go | 7 +- examples/cosmos/code_coverage_test.go | 7 +- examples/cosmos/cometmock_test.go | 8 +- examples/cosmos/ethermint_test.go | 6 +- examples/cosmos/sdk_boundary_test.go | 11 +- .../rust-optimizer/rust_optimizer_test.go | 8 +- .../workspace_optimizer_test.go | 8 +- examples/ethereum/foundry_test.go | 7 +- examples/ethereum/geth_test.go | 6 +- examples/ibc/client_creation_test.go | 10 +- examples/ibc/ics_test.go | 15 +- examples/ibc/learn_ibc_test.go | 10 +- examples/ibc/wasm/wasm_ibc_test.go | 8 +- examples/ibc/wasm/wasm_icq_test.go | 10 +- examples/namada/namada_chain_test.go | 8 +- examples/penumbra/penumbra_chain_test.go | 18 ++- examples/penumbra/penumbra_ibc_test.go | 61 ++++---- .../thorchain/chainspec_thorchain_test.go | 1 + examples/thorchain/features/arb.go | 4 +- examples/thorchain/features/helpers.go | 21 +-- examples/thorchain/features/ragnarok.go | 1 + examples/thorchain/features/saver_eject.go | 1 + examples/thorchain/features/savers.go | 1 + examples/thorchain/features/swap.go | 3 +- examples/thorchain/setup_test.go | 16 +- examples/thorchain/thorchain_hardfork_test.go | 13 +- examples/thorchain/thorchain_test.go | 14 +- examples/utxo/start_test.go | 10 +- relayer/docker.go | 4 +- relayerfactory.go | 1 + testutil/poll_for_state.go | 2 +- 59 files changed, 384 insertions(+), 334 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 8d098368..1e0c44e9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,74 +1,84 @@ +version: "2" run: - timeout: 10m tests: true - -# These linter checks can be modified on a per project basis. -# Simply remove them from the enable list to disable them. linters: - disable-all: true + default: none enable: - - asciicheck - - bidichk - - bodyclose - - copyloopvar - - decorder - - dupl - - dupword - - errcheck - - errchkjson - - errname - - exhaustive - - forbidigo - - gci - - goconst - - gocritic - - godot - - gofumpt - - gosec - - gosimple - - gosmopolitan - - govet - - grouper - - ineffassign - - loggercheck - - misspell - # - nilerr disabled because we return nil when there are errors in places that need to keep running e.g. polling/waiting for a condition - # - nilnil disabled because we return nil, nil when polling but waiting for a conditional - - noctx - - staticcheck - - stylecheck - - testifylint - - thelper - - tparallel - - typecheck - - unconvert - - unparam - - unused - - usestdlibvars - - wastedassign - - whitespace - -linters-settings: - gci: - custom-order: true - sections: - - standard # Standard section: captures all standard packages. - - default # Default section: contains all imports that could not be matched to another section type. - - blank # blank imports - - dot # dot imports - - prefix(cosmossdk.io) - - prefix(github.com/cosmos) - - prefix(github.com/cosmos/cosmos-sdk) - - prefix(github.com/cometbft/cometbft) - - prefix(github.com/cosmos/interchaintest) - gosec: - excludes: - - G404 # disables checks on insecure random number source - - G115 # disables checks on type conversions between signed and unsigned integers - - G306 # disables checks on WriteFile perms. Not an issue since we are writing configs/logs in a local test env - gocritic: - disabled-checks: - - appendAssign # we use append to build cmds from a config and always assign to a new slice to not overwrite cfg - + - asciicheck + - bidichk + - bodyclose + - copyloopvar + - decorder + - dupl + - dupword + - errcheck + - errchkjson + - errname + - exhaustive + - forbidigo + - goconst + - gocritic + - godot + - gosec + - gosmopolitan + - govet + - grouper + - ineffassign + - loggercheck + - misspell + - noctx + - staticcheck + - testifylint + - thelper + - tparallel + - unconvert + - unparam + - unused + - usestdlibvars + - wastedassign + - whitespace + settings: + gocritic: + disabled-checks: + - appendAssign + gosec: + excludes: + - G404 + - G115 + - G306 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ issues: - max-issues-per-linter: 0 \ No newline at end of file + max-issues-per-linter: 0 +formatters: + enable: + - gci + - gofumpt + settings: + gci: + sections: + - standard + - default + - blank + - dot + - prefix(cosmossdk.io) + - prefix(github.com/cosmos) + - prefix(github.com/cosmos/cosmos-sdk) + - prefix(github.com/cometbft/cometbft) + - prefix(github.com/cosmos/interchaintest) + custom-order: true + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index 385c098c..919a430f 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ DOCKER := $(shell which docker) -protoVer=0.13.2 +protoVer=0.17.1 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) golangci_lint_cmd=golangci-lint -golangci_version=v1.61.0 +golangci_version=v2.1.6 gofumpt_cmd=gofumpt gofumpt_version=v0.7.0 @@ -60,7 +60,7 @@ proto-gen: ## Generate code from protos lint: ## Lint the repository @echo "--> Running linter" @if ! $(golangci_lint_cmd) --version 2>/dev/null | grep -q $(golangci_version); then \ - go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version); \ + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version); \ fi @$(golangci_lint_cmd) run ./... --timeout 15m @@ -68,14 +68,6 @@ lint: ## Lint the repository lint-fix: ## Lint the repository and fix warnings (if applicable) @echo "--> Running linter and fixing issues" @if ! $(golangci_lint_cmd) --version 2>/dev/null | grep -q $(golangci_version); then \ - go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version); \ + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version); \ fi - @$(golangci_lint_cmd) run ./... --fix --timeout 15m - -.PHONY: gofumpt -gofumpt: ## Format the code with gofumpt - @echo "--> Running gofumpt" - @if ! $(gofumpt_cmd) -version 2>/dev/null | grep -q $(gofumpt_version); then \ - go install mvdan.cc/gofumpt@$(gofumpt_version); \ - fi - @gofumpt -l -w . \ No newline at end of file + @$(golangci_lint_cmd) run ./... --fix --timeout 15m \ No newline at end of file diff --git a/blockdb/query_test.go b/blockdb/query_test.go index d6ed9b8a..82a3d4e3 100644 --- a/blockdb/query_test.go +++ b/blockdb/query_test.go @@ -148,17 +148,17 @@ func TestQuery_CosmosMessages(t *testing.T) { first := results[0] require.EqualValues(t, 1, first.Height) - require.EqualValues(t, 0, first.Index) + require.Equal(t, 0, first.Index) require.Equal(t, "/ibc.core.client.v1.MsgCreateClient", first.Type) second := results[1] require.EqualValues(t, 2, second.Height) - require.EqualValues(t, 0, second.Index) + require.Equal(t, 0, second.Index) require.Equal(t, "/ibc.core.client.v1.MsgUpdateClient", second.Type) third := results[2] require.EqualValues(t, 2, third.Height) - require.EqualValues(t, 1, third.Index) + require.Equal(t, 1, third.Index) require.Equal(t, "/ibc.core.connection.v1.MsgConnectionOpenInit", third.Type) for _, res := range results { diff --git a/blockdb/tui/help.go b/blockdb/tui/help.go index 25e07303..3fb780d4 100644 --- a/blockdb/tui/help.go +++ b/blockdb/tui/help.go @@ -64,7 +64,7 @@ func newHelpView() *helpView { // Replace serves as a hook to clear all keys and update the help table view with new keys. func (view *helpView) Replace(keys []keyBinding) *helpView { - view.Table.Clear() + view.Clear() keyCell := func(s string) *tview.TableCell { return tview.NewTableCell("<" + s + ">"). SetTextColor(tcell.ColorBlue) @@ -83,8 +83,8 @@ func (view *helpView) Replace(keys []keyBinding) *helpView { row = 0 col += 2 } - view.Table.SetCell(row, col, keyCell(binding.Key)) - view.Table.SetCell(row, col+1, textCell(binding.Help)) + view.SetCell(row, col, keyCell(binding.Key)) + view.SetCell(row, col+1, textCell(binding.Help)) row++ } return view diff --git a/blockdb/tui/presenter/tx_test.go b/blockdb/tui/presenter/tx_test.go index 1af5e5e6..66b532b4 100644 --- a/blockdb/tui/presenter/tx_test.go +++ b/blockdb/tui/presenter/tx_test.go @@ -29,7 +29,7 @@ func TestTx(t *testing.T) { "foo": true } }` - require.Equal(t, want, pres.Data()) + require.JSONEq(t, want, pres.Data()) }) t.Run("non-json", func(t *testing.T) { diff --git a/blockdb/tui/update_test.go b/blockdb/tui/update_test.go index 5241c9a6..de6843eb 100644 --- a/blockdb/tui/update_test.go +++ b/blockdb/tui/update_test.go @@ -122,7 +122,7 @@ func TestModel_Update(t *testing.T) { txDetail := model.txDetailView() // Search and text view - require.Equal(t, 2, txDetail.Flex.GetItemCount()) + require.Equal(t, 2, txDetail.GetItemCount()) require.Equal(t, 3, txDetail.Pages.GetPageCount()) diff --git a/chain/cosmos/cosmos_chain.go b/chain/cosmos/cosmos_chain.go index 7404472f..95dd8e97 100644 --- a/chain/cosmos/cosmos_chain.go +++ b/chain/cosmos/cosmos_chain.go @@ -6,7 +6,6 @@ import ( "crypto/sha256" "encoding/hex" "fmt" - dockerimage "github.com/docker/docker/api/types/image" "io" "math" "os" @@ -14,6 +13,7 @@ import ( "strings" "sync" + dockerimage "github.com/docker/docker/api/types/image" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" "go.uber.org/zap" diff --git a/chain/cosmos/module_auth.go b/chain/cosmos/module_auth.go index c47aacb3..4c247d1a 100644 --- a/chain/cosmos/module_auth.go +++ b/chain/cosmos/module_auth.go @@ -63,7 +63,7 @@ func (c *CosmosChain) AuthQueryModuleAddress(ctx context.Context, moduleName str if err != nil { return "", err } - return queryRes.BaseAccount.Address, nil + return queryRes.Address, nil } // Deprecated: use AuthQueryModuleAddress instead. diff --git a/chain/ethereum/ethererum_chain.go b/chain/ethereum/ethererum_chain.go index 2277b993..724a0e7e 100644 --- a/chain/ethereum/ethererum_chain.go +++ b/chain/ethereum/ethererum_chain.go @@ -3,10 +3,10 @@ package ethereum import ( "context" "fmt" - dockerimage "github.com/docker/docker/api/types/image" "io" "time" + dockerimage "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/volume" dockerclient "github.com/docker/docker/client" diff --git a/chain/namada/namada_chain.go b/chain/namada/namada_chain.go index 6e6fbb1f..c8f55e1e 100644 --- a/chain/namada/namada_chain.go +++ b/chain/namada/namada_chain.go @@ -8,7 +8,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - dockerimage "github.com/docker/docker/api/types/image" "io" stdmath "math" "net/http" @@ -19,6 +18,7 @@ import ( "strings" "time" + dockerimage "github.com/docker/docker/api/types/image" "github.com/docker/docker/client" "go.uber.org/zap" "golang.org/x/sync/errgroup" diff --git a/chain/namada/namada_node.go b/chain/namada/namada_node.go index 1fc887a9..bfbf8fc7 100644 --- a/chain/namada/namada_node.go +++ b/chain/namada/namada_node.go @@ -3,13 +3,13 @@ package namada import ( "context" "fmt" - dockernetwork "github.com/docker/docker/api/types/network" "net" "path/filepath" "strings" "time" "github.com/avast/retry-go/v4" + dockernetwork "github.com/docker/docker/api/types/network" volumetypes "github.com/docker/docker/api/types/volume" dockerclient "github.com/docker/docker/client" "github.com/docker/go-connections/nat" diff --git a/chain/penumbra/penumbra_chain.go b/chain/penumbra/penumbra_chain.go index 5eed7a63..f4768ce9 100644 --- a/chain/penumbra/penumbra_chain.go +++ b/chain/penumbra/penumbra_chain.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - dockerimage "github.com/docker/docker/api/types/image" "io" "path/filepath" "strconv" @@ -12,6 +11,7 @@ import ( "sync" "github.com/BurntSushi/toml" + dockerimage "github.com/docker/docker/api/types/image" "github.com/docker/docker/client" "go.uber.org/zap" "golang.org/x/sync/errgroup" diff --git a/chain/thorchain/thorchain.go b/chain/thorchain/thorchain.go index fd30037c..83a28fa8 100644 --- a/chain/thorchain/thorchain.go +++ b/chain/thorchain/thorchain.go @@ -6,7 +6,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - dockerimage "github.com/docker/docker/api/types/image" "io" "math" "os" @@ -15,6 +14,7 @@ import ( "strings" "sync" + dockerimage "github.com/docker/docker/api/types/image" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" "go.uber.org/zap" diff --git a/chain/utxo/utxo_chain.go b/chain/utxo/utxo_chain.go index 3b855a1e..66f4e128 100644 --- a/chain/utxo/utxo_chain.go +++ b/chain/utxo/utxo_chain.go @@ -3,7 +3,6 @@ package utxo import ( "context" "fmt" - dockerimage "github.com/docker/docker/api/types/image" "io" "math" "strconv" @@ -11,6 +10,7 @@ import ( "sync" "time" + dockerimage "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/volume" dockerclient "github.com/docker/docker/client" diff --git a/chainspec.go b/chainspec.go index 905bb5e4..f3fef520 100644 --- a/chainspec.go +++ b/chainspec.go @@ -8,8 +8,9 @@ import ( "sync" "sync/atomic" - "github.com/cosmos/interchaintest/v10/ibc" "go.uber.org/zap" + + "github.com/cosmos/interchaintest/v10/ibc" ) // ChainSpec is a wrapper around an ibc.ChainConfig @@ -49,13 +50,13 @@ type ChainSpec struct { func (s *ChainSpec) Config(log *zap.Logger) (*ibc.ChainConfig, error) { if s.Version == "" { // Version must be set at top-level if not set in inlined config. - if len(s.ChainConfig.Images) == 0 || s.ChainConfig.Images[0].Version == "" { + if len(s.Images) == 0 || s.ChainConfig.Images[0].Version == "" { return nil, errors.New("ChainSpec.Version must not be empty") } } - if len(s.ChainConfig.Images) > 0 { - for i, image := range s.ChainConfig.Images { + if len(s.Images) > 0 { + for i, image := range s.Images { if err := image.Validate(); err != nil { return nil, fmt.Errorf("ChainConfig.Images[%d] is invalid: %s", i, err) } @@ -63,7 +64,7 @@ func (s *ChainSpec) Config(log *zap.Logger) (*ibc.ChainConfig, error) { } if len(s.ExposeAdditionalPorts) > 0 { - s.ChainConfig.ExposeAdditionalPorts = append(s.ChainConfig.ExposeAdditionalPorts, s.ExposeAdditionalPorts...) + s.ExposeAdditionalPorts = append(s.ExposeAdditionalPorts, s.ExposeAdditionalPorts...) } // s.Name and chainConfig.Name are interchangeable @@ -79,7 +80,7 @@ func (s *ChainSpec) Config(log *zap.Logger) (*ibc.ChainConfig, error) { if s.ChainConfig.Name == "" && s.ChainName != "" { s.ChainConfig.Name = s.ChainName } - if !s.ChainConfig.IsFullyConfigured() { + if !s.IsFullyConfigured() { return nil, errors.New("ChainSpec.Name required when not all config fields are set") } @@ -95,7 +96,7 @@ func (s *ChainSpec) Config(log *zap.Logger) (*ibc.ChainConfig, error) { // If chain doesn't have built in config, but is fully configured, register chain label. cfg, ok := builtinChainConfigs[s.Name] if !ok { - if !s.ChainConfig.IsFullyConfigured() { + if !s.IsFullyConfigured() { availableChains := make([]string, 0, len(builtinChainConfigs)) for k := range builtinChainConfigs { availableChains = append(availableChains, k) @@ -232,7 +233,7 @@ func (s *ChainSpec) applyConfigOverrides(cfg ibc.ChainConfig) (*ibc.ChainConfig, default: return nil, fmt.Errorf("unexpected parachain: %s", s.Name) } - } else if len(s.ChainConfig.Images) < 2 || s.ChainConfig.Images[1].Version == "" { + } else if len(s.Images) < 2 || s.ChainConfig.Images[1].Version == "" { // Ensure there are at least two images and check the 2nd version is populated return nil, fmt.Errorf("ChainCongfig.Images must be >1 and ChainConfig.Images[1].Version must not be empty") } diff --git a/chainspec_test.go b/chainspec_test.go index 98a37c02..45216de3 100644 --- a/chainspec_test.go +++ b/chainspec_test.go @@ -101,7 +101,7 @@ func TestChainSpec_Config(t *testing.T) { cfg, err := s.Config(zaptest.NewLogger(t)) require.NoError(t, err) - require.Regexp(t, regexp.MustCompile(`^gaia-\d+$`), cfg.Name) + require.Regexp(t, `^gaia-\d+$`, cfg.Name) require.Equal(t, cfg.Name, cfg.ChainID) }) @@ -117,7 +117,7 @@ func TestChainSpec_Config(t *testing.T) { require.NoError(t, err) require.Equal(t, "mychain", cfg.Name) - require.Regexp(t, regexp.MustCompile(`^mychain-\d+$`), cfg.ChainID) + require.Regexp(t, `^mychain-\d+$`, cfg.ChainID) }) }) diff --git a/cmd/interchaintest/flags.go b/cmd/interchaintest/flags.go index 0970f728..6236f74c 100644 --- a/cmd/interchaintest/flags.go +++ b/cmd/interchaintest/flags.go @@ -71,7 +71,7 @@ type LoggerCloser struct { func (lc LoggerCloser) Close() error { // ignore error because of https://github.com/uber-go/zap/issues/880 with stderr/stdout - _ = lc.Logger.Sync() + _ = lc.Sync() if lc.Closer == nil { return nil } diff --git a/contract/cosmwasm/compile.go b/contract/cosmwasm/compile.go index 2dccc20d..534e6a8b 100644 --- a/contract/cosmwasm/compile.go +++ b/contract/cosmwasm/compile.go @@ -117,7 +117,7 @@ func compile(image string, optVersion string, repoPath string) (string, error) { err = cli.ContainerStop(ctx, resp.ID, containertypes.StopOptions{}) if err != nil { // Only return the error if it didn't match an already stopped, or a missing container. - if !(errdefs.IsNotModified(err) || errdefs.IsNotFound(err)) { + if !errdefs.IsNotModified(err) && !errdefs.IsNotFound(err) { return "", fmt.Errorf("stop container %s: %w", imageFull, err) } } diff --git a/dockerutil/image.go b/dockerutil/image.go index 746e25d9..cf61c437 100644 --- a/dockerutil/image.go +++ b/dockerutil/image.go @@ -5,7 +5,6 @@ import ( "context" "errors" "fmt" - dockerimage "github.com/docker/docker/api/types/image" "io" "strconv" "strings" @@ -13,6 +12,7 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" + dockerimage "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" @@ -360,7 +360,7 @@ func (c *Container) Stop(timeout time.Duration) error { err := c.image.client.ContainerStop(ctx, c.containerID, stopOptions) if err != nil { // Only return the error if it didn't match an already stopped, or a missing container. - if !(errdefs.IsNotModified(err) || errdefs.IsNotFound(err)) { + if !errdefs.IsNotModified(err) && !errdefs.IsNotFound(err) { return c.image.WrapErr(fmt.Errorf("stop container %s: %w", c.Name, err)) } } diff --git a/dockerutil/image_test.go b/dockerutil/image_test.go index 276c5563..21ad8bb7 100644 --- a/dockerutil/image_test.go +++ b/dockerutil/image_test.go @@ -2,13 +2,13 @@ package dockerutil import ( "context" - "github.com/docker/docker/api/types/container" "os" "path/filepath" "strings" "testing" "time" + "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" "github.com/stretchr/testify/require" diff --git a/dockerutil/kill.go b/dockerutil/kill.go index bd4d1291..696c789d 100644 --- a/dockerutil/kill.go +++ b/dockerutil/kill.go @@ -2,10 +2,10 @@ package dockerutil import ( "context" - "github.com/docker/docker/api/types/container" "os" "strings" + "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" ) diff --git a/dockerutil/setup.go b/dockerutil/setup.go index 7bddfbb7..7a2fabf4 100644 --- a/dockerutil/setup.go +++ b/dockerutil/setup.go @@ -335,5 +335,5 @@ func IsLoggableStopError(err error) bool { if err == nil { return false } - return !(errdefs.IsNotModified(err) || errdefs.IsNotFound(err)) + return !errdefs.IsNotModified(err) && !errdefs.IsNotFound(err) } diff --git a/examples/cosmos/bad_genesis_params_test.go b/examples/cosmos/bad_genesis_params_test.go index e7beb92d..a77f0a87 100644 --- a/examples/cosmos/bad_genesis_params_test.go +++ b/examples/cosmos/bad_genesis_params_test.go @@ -4,11 +4,12 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) var badGenesis = []cosmos.GenesisKV{ diff --git a/examples/cosmos/chain_core_test.go b/examples/cosmos/chain_core_test.go index 1e906925..0a97a295 100644 --- a/examples/cosmos/chain_core_test.go +++ b/examples/cosmos/chain_core_test.go @@ -7,21 +7,23 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/chain/cosmos" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" + sdkmath "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/crypto/keyring" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/cosmos/interchaintest/v10" + "github.com/cosmos/interchaintest/v10/chain/cosmos" + "github.com/cosmos/interchaintest/v10/ibc" + "github.com/cosmos/interchaintest/v10/testutil" ) var ( @@ -171,7 +173,7 @@ func testAuth(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { // convert gov bytes back to string address strAddr, err := chain.AuthAddressBytesToString(ctx, govBz) require.NoError(t, err) - require.EqualValues(t, govAddr, strAddr) + require.Equal(t, govAddr, strAddr) // convert gov string address back to bytes bz, err := chain.AuthAddressStringToBytes(ctx, strAddr) @@ -182,7 +184,7 @@ func testAuth(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { p, err := chain.AuthQueryParams(ctx) require.NoError(t, err) require.NotNil(t, p) - require.True(t, p.MaxMemoCharacters > 0) + require.Positive(t, p.MaxMemoCharacters) // get all module accounts accs, err := chain.AuthQueryModuleAccounts(ctx) @@ -192,12 +194,12 @@ func testAuth(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { // get the global bech32 prefix bech32, err := chain.AuthQueryBech32Prefix(ctx) require.NoError(t, err) - require.EqualValues(t, baseBech32, bech32) + require.Equal(t, baseBech32, bech32) // get base info about an account accInfo, err := chain.AuthQueryAccountInfo(ctx, govAddr) require.NoError(t, err) - require.EqualValues(t, govAddr, accInfo.Address) + require.Equal(t, govAddr, accInfo.Address) } // testUpgrade test the queries for upgrade information. Actual upgrades take place in other test. @@ -231,20 +233,20 @@ func testAuthz(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, use grants, err := chain.AuthzQueryGrants(ctx, granter, grantee, "") require.NoError(t, err) require.Len(t, grants, 1) - require.EqualValues(t, grants[0].Authorization.TypeUrl, "/cosmos.authz.v1beta1.GenericAuthorization") + require.EqualValues(t, "/cosmos.authz.v1beta1.GenericAuthorization", grants[0].Authorization.TypeUrl) require.Contains(t, string(grants[0].Authorization.Value), "/cosmos.bank.v1beta1.MsgSend") byGrantee, err := chain.AuthzQueryGrantsByGrantee(ctx, grantee, "") require.NoError(t, err) require.Len(t, byGrantee, 1) - require.EqualValues(t, byGrantee[0].Granter, granter) - require.EqualValues(t, byGrantee[0].Grantee, grantee) + require.Equal(t, byGrantee[0].Granter, granter) + require.Equal(t, byGrantee[0].Grantee, grantee) byGranter, err := chain.AuthzQueryGrantsByGranter(ctx, granter, "") require.NoError(t, err) require.Len(t, byGranter, 1) - require.EqualValues(t, byGranter[0].Granter, granter) - require.EqualValues(t, byGranter[0].Grantee, grantee) + require.Equal(t, byGranter[0].Granter, granter) + require.Equal(t, byGranter[0].Grantee, grantee) fmt.Printf("grants: %+v %+v %+v\n", grants, byGrantee, byGranter) @@ -274,7 +276,7 @@ func testAuthz(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, use require.NoError(t, err) fmt.Printf("balanceAfter: %+v\n", balanceAfter) - require.EqualValues(t, balanceBefore.SubRaw(int64(sendAmt)), balanceAfter) + require.Equal(t, balanceBefore.SubRaw(int64(sendAmt)), balanceAfter) } func testBank(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { @@ -318,12 +320,12 @@ func testBank(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, user meta2, err := chain.BankQueryDenomMetadataByQueryString(ctx, chain.Config().Denom) require.NoError(t, err) - require.EqualValues(t, meta, meta2) + require.Equal(t, meta, meta2) allMeta, err := chain.BankQueryDenomsMetadata(ctx) require.NoError(t, err) require.Len(t, allMeta, 1) - require.EqualValues(t, allMeta[0].Display, meta.Display) + require.Equal(t, allMeta[0].Display, meta.Display) // == params == params, err := chain.BankQueryParams(ctx) @@ -332,7 +334,7 @@ func testBank(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, user sendEnabled, err := chain.BankQuerySendEnabled(ctx, []string{chain.Config().Denom}) require.NoError(t, err) - require.Len(t, sendEnabled, 0) + require.Empty(t, sendEnabled) // == supply == supply, err := chain.BankQueryTotalSupply(ctx) @@ -377,16 +379,16 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha t.Run("misc queries", func(t *testing.T) { slashes, err := chain.DistributionQueryValidatorSlashes(ctx, valAddr) require.NoError(err) - require.EqualValues(0, len(slashes)) + require.Empty(slashes) valDistInfo, err := chain.DistributionQueryValidatorDistributionInfo(ctx, valAddr) require.NoError(err) fmt.Printf("valDistInfo: %+v\n", valDistInfo) - require.EqualValues(1, valDistInfo.Commission.Len()) + require.Equal(1, valDistInfo.Commission.Len()) valOutRewards, err := chain.DistributionQueryValidatorOutstandingRewards(ctx, valAddr) require.NoError(err) - require.EqualValues(1, valOutRewards.Rewards.Len()) + require.Equal(1, valOutRewards.Rewards.Len()) params, err := chain.DistributionQueryParams(ctx) require.NoError(err) @@ -394,7 +396,7 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha comm, err := chain.DistributionQueryCommission(ctx, valAddr) require.NoError(err) - require.EqualValues(chain.Config().Denom, comm.Commission[0].Denom) + require.Equal(chain.Config().Denom, comm.Commission[0].Denom) }) t.Run("withdraw-all-rewards", func(t *testing.T) { @@ -445,23 +447,23 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha withdrawAddr, err := chain.DistributionQueryDelegatorWithdrawAddress(ctx, users[0].FormattedAddress()) require.NoError(err) - require.EqualValues(withdrawAddr, newWithdrawAddr) + require.Equal(withdrawAddr, newWithdrawAddr) }) t.Run("delegator", func(t *testing.T) { delRewards, err := chain.DistributionQueryDelegationTotalRewards(ctx, delAddr) require.NoError(err) r := delRewards.Rewards[0] - require.EqualValues(valAddr, r.ValidatorAddress) - require.EqualValues(chain.Config().Denom, r.Reward[0].Denom) + require.Equal(valAddr, r.ValidatorAddress) + require.Equal(chain.Config().Denom, r.Reward[0].Denom) delegatorVals, err := chain.DistributionQueryDelegatorValidators(ctx, delAddr) require.NoError(err) - require.EqualValues(valAddr, delegatorVals.Validators[0]) + require.Equal(valAddr, delegatorVals.Validators[0]) rewards, err := chain.DistributionQueryRewards(ctx, delAddr, valAddr) require.NoError(err) - require.EqualValues(1, rewards.Len()) + require.Equal(1, rewards.Len()) }) } @@ -481,20 +483,20 @@ func testFeeGrant(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, g, err := chain.FeeGrantQueryAllowance(ctx, granter.FormattedAddress(), grantee.FormattedAddress()) require.NoError(t, err) fmt.Printf("g: %+v\n", g) - require.EqualValues(t, granter.FormattedAddress(), g.Granter) - require.EqualValues(t, grantee.FormattedAddress(), g.Grantee) - require.EqualValues(t, "/cosmos.feegrant.v1beta1.AllowedMsgAllowance", g.Allowance.TypeUrl) + require.Equal(t, granter.FormattedAddress(), g.Granter) + require.Equal(t, grantee.FormattedAddress(), g.Grantee) + require.Equal(t, "/cosmos.feegrant.v1beta1.AllowedMsgAllowance", g.Allowance.TypeUrl) require.Contains(t, string(g.Allowance.Value), "/cosmos.bank.v1beta1.MsgSend") all, err := chain.FeeGrantQueryAllowances(ctx, grantee.FormattedAddress()) require.NoError(t, err) require.Len(t, all, 1) - require.EqualValues(t, granter.FormattedAddress(), all[0].Granter) + require.Equal(t, granter.FormattedAddress(), all[0].Granter) all2, err := chain.FeeGrantQueryAllowancesByGranter(ctx, granter.FormattedAddress()) require.NoError(t, err) require.Len(t, all2, 1) - require.EqualValues(t, grantee.FormattedAddress(), all2[0].Grantee) + require.Equal(t, grantee.FormattedAddress(), all2[0].Grantee) }) t.Run("successful execution", func(t *testing.T) { @@ -520,7 +522,7 @@ func testFeeGrant(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, newBal, err := chain.BankQueryBalance(ctx, granter2.FormattedAddress(), denom) require.NoError(t, err) - require.EqualValues(t, bal.AddRaw(int64(sendAmt-fee)), newBal) + require.Equal(t, bal.AddRaw(int64(sendAmt-fee)), newBal) }) } @@ -546,7 +548,7 @@ func testGov(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users proposal, err := chain.GovQueryProposalV1(ctx, 1) require.NoError(t, err) - require.EqualValues(t, proposal.Title, title) + require.Equal(t, proposal.Title, title) // vote on the proposal err = node.VoteOnProposal(ctx, users[0].KeyName(), 1, "yes") @@ -554,7 +556,7 @@ func testGov(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users v, err := chain.GovQueryVote(ctx, 1, users[0].FormattedAddress()) require.NoError(t, err) - require.EqualValues(t, v.Options[0].Option, govv1.VoteOption_VOTE_OPTION_YES) + require.EqualValues(t, govv1.VoteOption_VOTE_OPTION_YES, v.Options[0].Option) // pass vote with all validators err = chain.VoteOnProposalAllValidators(ctx, 1, "yes") @@ -598,8 +600,8 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u t.Run("query validators", func(t *testing.T) { valInfo, err := chain.StakingQueryValidator(ctx, val) require.NoError(t, err) - require.EqualValues(t, val, valInfo.OperatorAddress) - require.EqualValues(t, stakingtypes.Bonded.String(), valInfo.Status.String()) + require.Equal(t, val, valInfo.OperatorAddress) + require.Equal(t, stakingtypes.Bonded.String(), valInfo.Status.String()) del, err := chain.StakingQueryDelegationsTo(ctx, val) require.NoError(t, err) @@ -613,23 +615,23 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u singleDel, err := chain.StakingQueryDelegation(ctx, val, del0) require.NoError(t, err) - require.EqualValues(t, del0, singleDel.Delegation.DelegatorAddress) + require.Equal(t, del0, singleDel.Delegation.DelegatorAddress) // StakingQueryDelegatorValidator delVal, err := chain.StakingQueryDelegatorValidator(ctx, del0, val) require.NoError(t, err) - require.True(t, delVal.OperatorAddress == val) + require.Equal(t, delVal.OperatorAddress, val) delVals, err := chain.StakingQueryDelegatorValidators(ctx, del0) require.NoError(t, err) require.NotEmpty(t, delVals) - require.True(t, delVals[0].OperatorAddress == val) + require.Equal(t, delVals[0].OperatorAddress, val) }) t.Run("misc", func(t *testing.T) { params, err := chain.StakingQueryParams(ctx) require.NoError(t, err) - require.EqualValues(t, "token", params.BondDenom) + require.Equal(t, "token", params.BondDenom) pool, err := chain.StakingQueryPool(ctx) require.NoError(t, err) @@ -642,7 +644,7 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u hi, err := chain.StakingQueryHistoricalInfo(ctx, searchHeight) require.NoError(t, err) - require.EqualValues(t, searchHeight, hi.Header.Height) + require.Equal(t, searchHeight, hi.Header.Height) }) t.Run("delegations", func(t *testing.T) { @@ -668,21 +670,21 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u unbonding, err := chain.StakingQueryUnbondingDelegation(ctx, user, val) require.NoError(t, err) - require.EqualValues(t, user, unbonding.DelegatorAddress) - require.EqualValues(t, val, unbonding.ValidatorAddress) + require.Equal(t, user, unbonding.DelegatorAddress) + require.Equal(t, val, unbonding.ValidatorAddress) height := unbonding.Entries[0].CreationHeight unbondings, err := chain.StakingQueryUnbondingDelegations(ctx, user) require.NoError(t, err) require.NotEmpty(t, unbondings) - require.EqualValues(t, user, unbondings[0].DelegatorAddress) + require.Equal(t, user, unbondings[0].DelegatorAddress) // StakingQueryUnbondingDelegationsFrom unbondingsFrom, err := chain.StakingQueryUnbondingDelegationsFrom(ctx, val) require.NoError(t, err) require.NotEmpty(t, unbondingsFrom) - require.EqualValues(t, user, unbondingsFrom[0].DelegatorAddress) + require.Equal(t, user, unbondingsFrom[0].DelegatorAddress) // StakingCancelUnbond err = node.StakingCancelUnbond(ctx, user, val, "25"+chain.Config().Denom, height) @@ -713,7 +715,7 @@ func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, a res, err := chain.AuthQueryAccount(ctx, acc) require.NoError(t, err) - require.EqualValues(t, "/cosmos.vesting.v1beta1.ContinuousVestingAccount", res.TypeUrl) + require.Equal(t, "/cosmos.vesting.v1beta1.ContinuousVestingAccount", res.TypeUrl) chain.AuthPrintAccountInfo(chain, res) }) @@ -725,7 +727,7 @@ func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, a res, err := chain.AuthQueryAccount(ctx, acc) require.NoError(t, err) - require.EqualValues(t, "/cosmos.vesting.v1beta1.PermanentLockedAccount", res.TypeUrl) + require.Equal(t, "/cosmos.vesting.v1beta1.PermanentLockedAccount", res.TypeUrl) chain.AuthPrintAccountInfo(chain, res) }) @@ -753,14 +755,14 @@ func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, a res, err := chain.AuthQueryAccount(ctx, acc) require.NoError(t, err) - require.EqualValues(t, "/cosmos.vesting.v1beta1.PeriodicVestingAccount", res.TypeUrl) + require.Equal(t, "/cosmos.vesting.v1beta1.PeriodicVestingAccount", res.TypeUrl) chain.AuthPrintAccountInfo(chain, res) }) t.Run("Base Account", func(t *testing.T) { res, err := chain.AuthQueryAccount(ctx, admin.FormattedAddress()) require.NoError(t, err) - require.EqualValues(t, "/cosmos.auth.v1beta1.BaseAccount", res.TypeUrl) + require.Equal(t, "/cosmos.auth.v1beta1.BaseAccount", res.TypeUrl) chain.AuthPrintAccountInfo(chain, res) }) } diff --git a/examples/cosmos/chain_export_test.go b/examples/cosmos/chain_export_test.go index 03ae9443..8d125ed6 100644 --- a/examples/cosmos/chain_export_test.go +++ b/examples/cosmos/chain_export_test.go @@ -5,12 +5,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap" ) func TestJunoStateExport(t *testing.T) { diff --git a/examples/cosmos/chain_genesis_stake_test.go b/examples/cosmos/chain_genesis_stake_test.go index 5ca7544c..4b282e2f 100644 --- a/examples/cosmos/chain_genesis_stake_test.go +++ b/examples/cosmos/chain_genesis_stake_test.go @@ -6,14 +6,17 @@ import ( "strconv" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + sdkmath "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) func TestChainGenesisUnequalStake(t *testing.T) { diff --git a/examples/cosmos/chain_miscellaneous_test.go b/examples/cosmos/chain_miscellaneous_test.go index 68b5c1ff..6551e064 100644 --- a/examples/cosmos/chain_miscellaneous_test.go +++ b/examples/cosmos/chain_miscellaneous_test.go @@ -5,18 +5,19 @@ import ( "fmt" "testing" - "cosmossdk.io/math" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" testutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) var ( @@ -105,31 +106,30 @@ func wasmEncoding() *testutil.TestEncodingConfig { func testBuildDependencies(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { deps := chain.Validators[0].GetBuildInformation(ctx) - require.Equal(t, deps.Name, "juno") - require.Equal(t, deps.ServerName, "junod") - require.Equal(t, deps.BuildTags, "netgo muslc,") + require.Equal(t, "juno", deps.Name) + require.Equal(t, "junod", deps.ServerName) + require.Equal(t, "netgo muslc,", deps.BuildTags) for _, dep := range deps.BuildDeps { - dep := dep // Verify specific examples - if dep.Parent == "github.com/cosmos/cosmos-sdk" { - require.Equal(t, dep.IsReplacement, false) - } else if dep.Parent == "github.com/99designs/keyring" { - require.Equal(t, dep.Version, "v1.2.2") - require.Equal(t, dep.IsReplacement, true) - require.Equal(t, dep.Replacement, "github.com/cosmos/keyring") - require.Equal(t, dep.ReplacementVersion, "v1.2.0") - + switch dep.Parent { + case "github.com/cosmos/cosmos-sdk": + require.False(t, dep.IsReplacement) + case "github.com/99designs/keyring": + require.Equal(t, "v1.2.2", dep.Version) + require.True(t, dep.IsReplacement) + require.Equal(t, "github.com/cosmos/keyring", dep.Replacement) + require.Equal(t, "v1.2.0", dep.ReplacementVersion) } // Verify all replacement logic if dep.IsReplacement { require.GreaterOrEqual(t, len(dep.ReplacementVersion), 6, "ReplacementVersion: %s must be >=6 length (ex: vA.B.C)", dep.ReplacementVersion) - require.Greater(t, len(dep.Replacement), 0, "Replacement: %s must be >0 length.", dep.Replacement) + require.NotEmpty(t, dep.Replacement, "Replacement: %s must be >0 length.", dep.Replacement) } else { - require.Equal(t, len(dep.Replacement), 0, "Replacement: %s is not 0.", dep.Replacement) - require.Equal(t, len(dep.ReplacementVersion), 0, "ReplacementVersion: %s is not 0.", dep.ReplacementVersion) + require.Empty(t, dep.Replacement, "Replacement: %s is not 0.", dep.Replacement) + require.Empty(t, dep.ReplacementVersion, "ReplacementVersion: %s is not 0.", dep.ReplacementVersion) } } } @@ -181,7 +181,7 @@ func testWalletKeys(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain tn := chain.Validators[0] a, err := tn.KeyBech32(ctx, "key-abc", "val") require.NoError(t, err) - require.Equal(t, a, "junovaloper1hj5fveer5cjtn4wd6wstzugjfdxzl0xp0r8xsx") + require.Equal(t, "junovaloper1hj5fveer5cjtn4wd6wstzugjfdxzl0xp0r8xsx", a) a, err = tn.KeyBech32(ctx, "key-abc", "acc") require.NoError(t, err) @@ -217,7 +217,7 @@ func testFindTxs(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u txs, err := chain.FindTxs(ctx, height+1) require.NoError(t, err) require.NotEmpty(t, txs) - require.Equal(t, txs[0].Events[0].Type, "coin_spent") + require.Equal(t, "coin_spent", txs[0].Events[0].Type) } func testPollForBalance(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { @@ -265,7 +265,7 @@ func testAddingNode(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain // This should be tested last or else Txs will fail on the new full node. nodesAmt := len(chain.Nodes()) chain.AddFullNodes(ctx, nil, 1) - require.Equal(t, nodesAmt+1, len(chain.Nodes())) + require.Len(t, chain.Nodes(), nodesAmt+1) } func testBroadcaster(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { @@ -372,9 +372,9 @@ func testTokenFactory(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha // verify metadata md, err := chain.QueryBankMetadata(ctx, tfDenom) require.NoError(t, err) - require.Equal(t, md.Metadata.Description, "description here") - require.Equal(t, md.Metadata.Symbol, "SYMBOL") - require.Equal(t, md.Metadata.DenomUnits[1].Exponent, 6) + require.Equal(t, "description here", md.Metadata.Description) + require.Equal(t, "SYMBOL", md.Metadata.Symbol) + require.Equal(t, 6, md.Metadata.DenomUnits[1].Exponent) // mint tokens _, err = node.TokenFactoryMintDenom(ctx, user.KeyName(), tfDenom, 1) @@ -463,7 +463,7 @@ func testTXEncodeDecode(ctx context.Context, t *testing.T, chain *cosmos.CosmosC require.NoError(t, err) } -// helpers +// helpers. func sendTokens(ctx context.Context, chain *cosmos.CosmosChain, from, to ibc.Wallet, token string, amount int64) (ibc.WalletAmount, error) { if token == "" { token = chain.Config().Denom diff --git a/examples/cosmos/chain_param_change_test.go b/examples/cosmos/chain_param_change_test.go index 738b06a1..940f22d8 100644 --- a/examples/cosmos/chain_param_change_test.go +++ b/examples/cosmos/chain_param_change_test.go @@ -5,14 +5,16 @@ import ( "strconv" "testing" + "github.com/stretchr/testify/require" + "cosmossdk.io/math" + + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/stretchr/testify/require" - - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func TestJunoParamChange(t *testing.T) { diff --git a/examples/cosmos/chain_upgrade_ibc_test.go b/examples/cosmos/chain_upgrade_ibc_test.go index d2844ef3..cef54a19 100644 --- a/examples/cosmos/chain_upgrade_ibc_test.go +++ b/examples/cosmos/chain_upgrade_ibc_test.go @@ -6,8 +6,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + interchaintest "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/conformance" @@ -15,8 +20,6 @@ import ( "github.com/cosmos/interchaintest/v10/relayer" "github.com/cosmos/interchaintest/v10/testreporter" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) const ( diff --git a/examples/cosmos/code_coverage_test.go b/examples/cosmos/code_coverage_test.go index 34ba05c9..1c0b5bdd 100644 --- a/examples/cosmos/code_coverage_test.go +++ b/examples/cosmos/code_coverage_test.go @@ -5,14 +5,15 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/dockerutil" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zaptest" ) func TestCodeCoverage(t *testing.T) { diff --git a/examples/cosmos/cometmock_test.go b/examples/cosmos/cometmock_test.go index 3b10ff8c..08cf7424 100644 --- a/examples/cosmos/cometmock_test.go +++ b/examples/cosmos/cometmock_test.go @@ -4,12 +4,14 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) var ( @@ -97,5 +99,5 @@ func TestCometMock(t *testing.T) { endBal, err := chain.GetBalance(ctx, user.FormattedAddress(), "ujuno") require.NoError(t, err) - require.EqualValues(t, initBal, endBal) + require.Equal(t, initBal, endBal) } diff --git a/examples/cosmos/ethermint_test.go b/examples/cosmos/ethermint_test.go index b19e1777..dde4fcc1 100644 --- a/examples/cosmos/ethermint_test.go +++ b/examples/cosmos/ethermint_test.go @@ -9,15 +9,17 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + sdkmath "cosmossdk.io/math" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) const ( diff --git a/examples/cosmos/sdk_boundary_test.go b/examples/cosmos/sdk_boundary_test.go index e9fdd466..61cb9afa 100644 --- a/examples/cosmos/sdk_boundary_test.go +++ b/examples/cosmos/sdk_boundary_test.go @@ -4,6 +4,9 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/conformance" @@ -11,8 +14,6 @@ import ( "github.com/cosmos/interchaintest/v10/relayer" "github.com/cosmos/interchaintest/v10/relayer/rly" "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) type boundarySpecs struct { @@ -33,7 +34,7 @@ func TestSDKBoundaries(t *testing.T) { name: "sdk 45 <-> 50", chainSpecs: []*interchaintest.ChainSpec{ { - Name: "gaia", ChainName: "gaia", Version: "v7.0.3", //sdk 0.45.6 + Name: "gaia", ChainName: "gaia", Version: "v7.0.3", // sdk 0.45.6 NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero, }, { @@ -47,7 +48,7 @@ func TestSDKBoundaries(t *testing.T) { name: "sdk 47 <-> 50", chainSpecs: []*interchaintest.ChainSpec{ { - Name: "ibc-go-simd", ChainName: "simd-47", Version: "v7.2.0", //sdk 0.47.3 + Name: "ibc-go-simd", ChainName: "simd-47", Version: "v7.2.0", // sdk 0.47.3 NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero, }, { @@ -60,7 +61,7 @@ func TestSDKBoundaries(t *testing.T) { } for _, tt := range tests { - tt := tt + testname := tt.name t.Run(testname, func(t *testing.T) { t.Parallel() diff --git a/examples/cosmwasm/rust-optimizer/rust_optimizer_test.go b/examples/cosmwasm/rust-optimizer/rust_optimizer_test.go index 42ebdb50..9db20376 100644 --- a/examples/cosmwasm/rust-optimizer/rust_optimizer_test.go +++ b/examples/cosmwasm/rust-optimizer/rust_optimizer_test.go @@ -5,7 +5,11 @@ import ( "encoding/json" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/chain/cosmos/wasm" @@ -13,12 +17,10 @@ import ( "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) // TestRustOptimizerContract compiles a cosmwasm contract using cosmwasm/rust-optimizer -// It then spins up a juno chain and executes tests +// It then spins up a juno chain and executes tests. func TestRustOptimizerContract(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") diff --git a/examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go b/examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go index a0a4a2fa..63016c6d 100644 --- a/examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go +++ b/examples/cosmwasm/workspace-optimizer/workspace_optimizer_test.go @@ -5,7 +5,11 @@ import ( "encoding/json" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/chain/cosmos/wasm" @@ -13,12 +17,10 @@ import ( "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) // TestWorkspaceOptimizerContracts compiles a workspace's contracts using cosmwasm/workspace-optimizer -// It then spins up a juno chain and executes tests +// It then spins up a juno chain and executes tests. func TestWorkspaceOptimizerContracts(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") diff --git a/examples/ethereum/foundry_test.go b/examples/ethereum/foundry_test.go index f38c46e6..e289d33a 100644 --- a/examples/ethereum/foundry_test.go +++ b/examples/ethereum/foundry_test.go @@ -6,15 +6,16 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/ethereum" "github.com/cosmos/interchaintest/v10/chain/ethereum/foundry" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) func TestFoundry(t *testing.T) { diff --git a/examples/ethereum/geth_test.go b/examples/ethereum/geth_test.go index 7f6756b5..4993839a 100644 --- a/examples/ethereum/geth_test.go +++ b/examples/ethereum/geth_test.go @@ -7,14 +7,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/ethereum" "github.com/cosmos/interchaintest/v10/chain/ethereum/geth" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) func TestGeth(t *testing.T) { diff --git a/examples/ibc/client_creation_test.go b/examples/ibc/client_creation_test.go index a77ea273..97f5709a 100644 --- a/examples/ibc/client_creation_test.go +++ b/examples/ibc/client_creation_test.go @@ -4,12 +4,13 @@ import ( "context" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) var ( @@ -41,7 +42,7 @@ func TestCreatClient(t *testing.T) { } for _, tt := range tests { - tt := tt + testname := tt.name t.Run(testname, func(t *testing.T) { t.Parallel() @@ -134,8 +135,7 @@ func TestCreatClient(t *testing.T) { require.Equal(t, len(srcClientInfoBefore), (len(srcClientInfoAfter) - 1), "there is not exactly 1 more client on the source chain after running createClient") // createClients should only create a client on source, NOT destination chain - require.Equal(t, len(destClientInfoBefore), len(destClientInfoAfter), "a client was created on the destination chain") + require.Len(t, destClientInfoAfter, len(destClientInfoBefore), "a client was created on the destination chain") }) - } } diff --git a/examples/ibc/ics_test.go b/examples/ibc/ics_test.go index f09c2cfb..dab340aa 100644 --- a/examples/ibc/ics_test.go +++ b/examples/ibc/ics_test.go @@ -6,16 +6,19 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" ibcconntypes "github.com/cosmos/ibc-go/v10/modules/core/03-connection/types" + interchaintest "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/relayer" "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) var ( @@ -24,7 +27,7 @@ var ( ) // This tests Cosmos Interchain Security, spinning up a provider and a single consumer chain. -// go test -timeout 3000s -run ^TestICS$ github.com/cosmos/interchaintest/v10/examples/ibc -v -test.short +// go test -timeout 3000s -run ^TestICS$ github.com/cosmos/interchaintest/v10/examples/ibc -v -test.short. func TestICS(t *testing.T) { if testing.Short() { ver := icsVersions[0] @@ -39,7 +42,7 @@ func TestICS(t *testing.T) { relayers := []relayerTypes{{rly: ibc.CosmosRly, name: "rly"}} for _, version := range icsVersions { - version := version + testName := "ics_" + strings.ReplaceAll(version, ".", "_") for _, rly := range relayers { @@ -138,7 +141,7 @@ func icsTest(t *testing.T, version string, rly ibc.RelayerImplementation) { t.Run("validate consumer action executed", func(t *testing.T) { bal, err := consumer.BankQueryBalance(ctx, consumerUser.FormattedAddress(), consumer.Config().Denom) require.NoError(t, err) - require.EqualValues(t, amt, bal) + require.Equal(t, amt, bal) }) t.Run("validate consumer keys copied", func(t *testing.T) { @@ -187,7 +190,7 @@ func icsTest(t *testing.T, version string, rly ibc.RelayerImplementation) { consumerBal, err := consumer.BankQueryBalance(ctx, consumerUser.FormattedAddress(), dstIbcDenom) require.NoError(t, err) - require.EqualValues(t, sendAmt, consumerBal) + require.Equal(t, sendAmt, consumerBal) }) } diff --git a/examples/ibc/learn_ibc_test.go b/examples/ibc/learn_ibc_test.go index dbd401e9..ea2d805f 100644 --- a/examples/ibc/learn_ibc_test.go +++ b/examples/ibc/learn_ibc_test.go @@ -6,20 +6,22 @@ import ( "testing" "time" - transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" "cosmossdk.io/math" + + transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) // This test is meant to be used as a basic interchaintest tutorial. -// Code snippets are broken down in ./docs/upAndRunning.md +// Code snippets are broken down in ./docs/upAndRunning.md. func TestLearn(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") diff --git a/examples/ibc/wasm/wasm_ibc_test.go b/examples/ibc/wasm/wasm_ibc_test.go index c700297e..bde07154 100644 --- a/examples/ibc/wasm/wasm_ibc_test.go +++ b/examples/ibc/wasm/wasm_ibc_test.go @@ -6,15 +6,17 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/chain/cosmos/wasm" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) func TestWasmIbc(t *testing.T) { @@ -231,7 +233,7 @@ func TestWasmIbc(t *testing.T) { require.Equal(t, 1, juno2PreIncrementedCountResponse.Data.Count) } -// cw_ibc_example response data +// cw_ibc_example response data. type CwIbcCountResponse struct { Data struct { Count int `json:"count"` diff --git a/examples/ibc/wasm/wasm_icq_test.go b/examples/ibc/wasm/wasm_icq_test.go index de19f5ce..d7182fc8 100644 --- a/examples/ibc/wasm/wasm_icq_test.go +++ b/examples/ibc/wasm/wasm_icq_test.go @@ -10,7 +10,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" cosmosChain "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/chain/cosmos/wasm" @@ -19,9 +24,6 @@ import ( "github.com/cosmos/interchaintest/v10/relayer" "github.com/cosmos/interchaintest/v10/testreporter" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "go.uber.org/zap/zaptest" ) // TestInterchainQueriesWASM is a test case that performs a round trip query from an ICQ wasm contract <> ICQ module. @@ -319,7 +321,7 @@ func TestInterchainQueriesWASM(t *testing.T) { } } } - require.Equal(t, hasIcqQuery, true) + require.True(t, hasIcqQuery) } func FirstWithPort(channels []ibc.ChannelOutput, port string) *ibc.ChannelOutput { diff --git a/examples/namada/namada_chain_test.go b/examples/namada/namada_chain_test.go index dca4e1da..ecdee303 100644 --- a/examples/namada/namada_chain_test.go +++ b/examples/namada/namada_chain_test.go @@ -8,16 +8,18 @@ import ( "testing" "time" - transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" "cosmossdk.io/math" + + transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" + "github.com/cosmos/interchaintest/v10" namadachain "github.com/cosmos/interchaintest/v10/chain/namada" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/relayer" "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) func TestNamadaNetwork(t *testing.T) { diff --git a/examples/penumbra/penumbra_chain_test.go b/examples/penumbra/penumbra_chain_test.go index 73c22fff..9a472edb 100644 --- a/examples/penumbra/penumbra_chain_test.go +++ b/examples/penumbra/penumbra_chain_test.go @@ -6,14 +6,16 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/penumbra" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testreporter" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) // TestPenumbraNetworkIntegration exercises various facilities of pclientd and is used as a basic integration test @@ -70,7 +72,7 @@ func TestPenumbraNetworkIntegration(t *testing.T) { initBalance := math.NewInt(1_000_000) users := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chain) - require.Equal(t, 1, len(users)) + require.Len(t, users, 1) alice := users[0] @@ -79,10 +81,10 @@ func TestPenumbraNetworkIntegration(t *testing.T) { aliceBal, err := chain.GetBalance(ctx, alice.KeyName(), chain.Config().Denom) require.NoError(t, err) - require.True(t, aliceBal.Equal(initBalance), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, initBalance)) + require.True(t, aliceBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) users = interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chain) - require.Equal(t, 1, len(users)) + require.Len(t, users, 1) bob := users[0] @@ -91,7 +93,7 @@ func TestPenumbraNetworkIntegration(t *testing.T) { bobBal, err := chain.GetBalance(ctx, bob.KeyName(), chain.Config().Denom) require.NoError(t, err) - require.True(t, bobBal.Equal(initBalance), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, initBalance)) + require.True(t, bobBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", bobBal, initBalance) bobAddr, err := chain.GetAddress(ctx, bob.KeyName()) require.NoError(t, err) @@ -123,6 +125,6 @@ func TestPenumbraNetworkIntegration(t *testing.T) { aliceExpected := aliceBal.Sub(transfer.Amount) bobExpected := bobBal.Add(transfer.Amount) - require.True(t, aliceNewBal.Equal(aliceExpected), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceNewBal, aliceExpected)) - require.True(t, bobNewBal.Equal(bobExpected), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobNewBal, bobExpected)) + require.True(t, aliceNewBal.Equal(aliceExpected), "incorrect balance, got (%s) expected (%s)", aliceNewBal, aliceExpected) + require.True(t, bobNewBal.Equal(bobExpected), "incorrect balance, got (%s) expected (%s)", bobNewBal, bobExpected) } diff --git a/examples/penumbra/penumbra_ibc_test.go b/examples/penumbra/penumbra_ibc_test.go index 05b24ecf..82f4dec6 100644 --- a/examples/penumbra/penumbra_ibc_test.go +++ b/examples/penumbra/penumbra_ibc_test.go @@ -6,16 +6,19 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "cosmossdk.io/math" + transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/penumbra" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/relayer" "github.com/cosmos/interchaintest/v10/testreporter" "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) // TestPenumbraToPenumbraIBC asserts that basic IBC functionality works between two Penumbra testnet networks. @@ -121,7 +124,7 @@ func TestPenumbraToPenumbraIBC(t *testing.T) { // Fund users and check init balances initBalance := math.NewInt(1_000_000_000) users := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainA) - require.Equal(t, 1, len(users)) + require.Len(t, users, 1) alice := users[0] @@ -130,10 +133,10 @@ func TestPenumbraToPenumbraIBC(t *testing.T) { aliceBal, err := chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, aliceBal.Equal(initBalance), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, initBalance)) + require.True(t, aliceBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) users = interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainB) - require.Equal(t, 1, len(users)) + require.Len(t, users, 1) bob := users[0] @@ -142,7 +145,7 @@ func TestPenumbraToPenumbraIBC(t *testing.T) { bobBal, err := chainB.GetBalance(ctx, bob.KeyName(), chainB.Config().Denom) require.NoError(t, err) - require.True(t, bobBal.Equal(initBalance), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, initBalance)) + require.True(t, bobBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", bobBal, initBalance) // Compose ics-20 transfer details and initialize transfer bobAddr, err := chainB.GetAddress(ctx, bob.KeyName()) @@ -176,14 +179,14 @@ func TestPenumbraToPenumbraIBC(t *testing.T) { expectedBal := initBalance.Sub(transferAmount) aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, aliceBal.Equal(expectedBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal)) + require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) // Compose IBC token denom information for Chain A's native token denom represented on Chain B ibcDenom := transfertypes.NewDenom(chainA.Config().Denom, transfertypes.NewHop(abChan.Counterparty.PortID, abChan.Counterparty.ChannelID)) bobBal, err = chainB.GetBalance(ctx, bob.KeyName(), ibcDenom.IBCDenom()) require.NoError(t, err) - require.True(t, bobBal.Equal(transferAmount), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, transferAmount)) + require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) // send ics-20 transfer from chainA -> chainB that will time out due to the timeout timestamp being reached transfer = ibc.WalletAmount{ @@ -219,12 +222,12 @@ func TestPenumbraToPenumbraIBC(t *testing.T) { bobBal, err = chainB.GetBalance(ctx, bob.KeyName(), ibcDenom.IBCDenom()) require.NoError(t, err) - require.True(t, bobBal.Equal(transferAmount), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, transferAmount)) + require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, aliceBal.Equal(expectedBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal)) + require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) // send ics-20 transfer from chainA -> chainB that will time out due to the timeout height being reached h, err = chainB.Height(ctx) @@ -255,12 +258,12 @@ func TestPenumbraToPenumbraIBC(t *testing.T) { bobBal, err = chainB.GetBalance(ctx, bob.KeyName(), ibcDenom.IBCDenom()) require.NoError(t, err) - require.True(t, bobBal.Equal(transferAmount), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, transferAmount)) + require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, aliceBal.Equal(expectedBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal)) + require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) } // TestPenumbraToPenumbraIBC asserts that basic IBC functionality works between Penumbra and Cosmos testnet networks. @@ -381,7 +384,7 @@ func TestPenumbraToCosmosIBC(t *testing.T) { // Fund users and check init balances initBalance := math.NewInt(1_000_000_000) pUsers := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainA) - require.Equal(t, 1, len(pUsers)) + require.Len(t, pUsers, 1) alice := pUsers[0] @@ -390,10 +393,10 @@ func TestPenumbraToCosmosIBC(t *testing.T) { aliceBal, err := chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, aliceBal.Equal(initBalance), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, initBalance)) + require.True(t, aliceBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) cUsers := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainB) - require.Equal(t, 1, len(cUsers)) + require.Len(t, cUsers, 1) bob := cUsers[0] @@ -402,7 +405,7 @@ func TestPenumbraToCosmosIBC(t *testing.T) { bobBal, err := chainB.GetBalance(ctx, bob.FormattedAddress(), chainB.Config().Denom) require.NoError(t, err) - require.True(t, bobBal.Equal(initBalance), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, initBalance)) + require.True(t, bobBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", bobBal, initBalance) // Compose ics-20 transfer details and initialize transfer transferAmount := math.NewInt(1_000_000) @@ -433,7 +436,7 @@ func TestPenumbraToCosmosIBC(t *testing.T) { expectedBal := initBalance.Sub(transferAmount) aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, aliceBal.Equal(expectedBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal)) + require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) // Compose IBC token denom information for Chain A's native token denom represented on Chain B ibcDenom := transfertypes.NewDenom(chainA.Config().Denom, transfertypes.NewHop(abChan.Counterparty.PortID, abChan.Counterparty.ChannelID)) @@ -441,7 +444,7 @@ func TestPenumbraToCosmosIBC(t *testing.T) { bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) require.NoError(t, err) - require.True(t, bobBal.Equal(transferAmount), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, transferAmount)) + require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) aliceAddr, err := chainA.GetAddress(ctx, alice.KeyName()) require.NoError(t, err) @@ -468,11 +471,11 @@ func TestPenumbraToCosmosIBC(t *testing.T) { aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, initBalance.Equal(aliceBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, initBalance)) + require.True(t, initBalance.Equal(aliceBal), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) require.NoError(t, err) - require.True(t, bobBal.Equal(math.ZeroInt()), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt())) + require.True(t, bobBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt()) transfer = ibc.WalletAmount{ Address: bob.FormattedAddress(), @@ -510,11 +513,11 @@ func TestPenumbraToCosmosIBC(t *testing.T) { aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, initBalance.Equal(aliceBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, initBalance)) + require.True(t, initBalance.Equal(aliceBal), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) require.NoError(t, err) - require.True(t, bobBal.Equal(math.ZeroInt()), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt())) + require.True(t, bobBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt()) h, err = chainB.Height(ctx) require.NoError(t, err) @@ -543,11 +546,11 @@ func TestPenumbraToCosmosIBC(t *testing.T) { aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) require.NoError(t, err) - require.True(t, initBalance.Equal(aliceBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, initBalance)) + require.True(t, initBalance.Equal(aliceBal), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) require.NoError(t, err) - require.True(t, bobBal.Equal(math.ZeroInt()), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt())) + require.True(t, bobBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt()) // Timeout test in the other direction h, err = chainA.Height(ctx) @@ -591,11 +594,11 @@ func TestPenumbraToCosmosIBC(t *testing.T) { bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainB.Config().Denom) require.NoError(t, err) - require.True(t, preTransferBobBal.Equal(bobBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, preTransferBobBal)) + require.True(t, preTransferBobBal.Equal(bobBal), "incorrect balance, got (%s) expected (%s)", bobBal, preTransferBobBal) aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainBDenomOnChainA) require.NoError(t, err) - require.True(t, aliceBal.Equal(math.ZeroInt()), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, math.ZeroInt())) + require.True(t, aliceBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", aliceBal, math.ZeroInt()) h, err = chainA.Height(ctx) require.NoError(t, err) @@ -629,14 +632,14 @@ func TestPenumbraToCosmosIBC(t *testing.T) { bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainB.Config().Denom) require.NoError(t, err) - require.True(t, preTransferBobBal.Equal(bobBal), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", bobBal, preTransferBobBal)) + require.True(t, preTransferBobBal.Equal(bobBal), "incorrect balance, got (%s) expected (%s)", bobBal, preTransferBobBal) aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainBDenomOnChainA) require.NoError(t, err) - require.True(t, aliceBal.Equal(math.ZeroInt()), fmt.Sprintf("incorrect balance, got (%s) expected (%s)", aliceBal, math.ZeroInt())) + require.True(t, aliceBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", aliceBal, math.ZeroInt()) } -// penumbra requires rounding up timeout timestamps to the next minute +// penumbra requires rounding up timeout timestamps to the next minute. func MinuteRoundedTimeNanos(t time.Time) uint64 { return uint64(t.Add(time.Minute - time.Nanosecond).Truncate(time.Minute).UnixNano()) } diff --git a/examples/thorchain/chainspec_thorchain_test.go b/examples/thorchain/chainspec_thorchain_test.go index 546b5094..76ca6df8 100644 --- a/examples/thorchain/chainspec_thorchain_test.go +++ b/examples/thorchain/chainspec_thorchain_test.go @@ -5,6 +5,7 @@ import ( "strings" "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/thorchain/common" diff --git a/examples/thorchain/features/arb.go b/examples/thorchain/features/arb.go index fa79fbb5..a97b797f 100644 --- a/examples/thorchain/features/arb.go +++ b/examples/thorchain/features/arb.go @@ -8,11 +8,13 @@ import ( "testing" "time" + "golang.org/x/sync/errgroup" + sdkmath "cosmossdk.io/math" + tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/thorchain/common" "github.com/cosmos/interchaintest/v10/ibc" - "golang.org/x/sync/errgroup" ) func Arb( diff --git a/examples/thorchain/features/helpers.go b/examples/thorchain/features/helpers.go index 2ae10e70..f477a70d 100644 --- a/examples/thorchain/features/helpers.go +++ b/examples/thorchain/features/helpers.go @@ -8,13 +8,15 @@ import ( "testing" "time" + "golang.org/x/sync/errgroup" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/thorchain/common" "github.com/cosmos/interchaintest/v10/ibc" "github.com/cosmos/interchaintest/v10/testutil" - "golang.org/x/sync/errgroup" ) func GetAndFundTestUsers( @@ -26,8 +28,7 @@ func GetAndFundTestUsers( users := make([]ibc.Wallet, len(chains)) eg, egCtx := errgroup.WithContext(ctx) for i, chain := range chains { - i := i - chain := chain + oneCoin := sdkmath.NewInt(int64(math.Pow10(int(*chain.Config().CoinDecimals)))) amount := oneCoin.MulRaw(1000) // thor, gaia switch chain.Config().CoinType { @@ -59,7 +60,7 @@ func GetAndFundTestUsers( return users, err } -// PollForPool polls until the pool is found and funded +// PollForPool polls until the pool is found and funded. func PollForPool(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, asset common.Asset) error { h, err := thorchain.Height(ctx) if err != nil { @@ -84,7 +85,7 @@ func PollForPool(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64 return err } -// PollForSaver polls until the saver is found +// PollForSaver polls until the saver is found. func PollForSaver(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, asset common.Asset, exoUser ibc.Wallet) (tc.Saver, error) { h, err := thorchain.Height(ctx) if err != nil { @@ -110,7 +111,7 @@ func PollForSaver(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int6 return saver, err } -// PollForEjectedSaver polls until the saver no longer found +// PollForEjectedSaver polls until the saver no longer found. func PollForEjectedSaver(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, asset common.Asset, exoUser ibc.Wallet) (tc.Saver, error) { h, err := thorchain.Height(ctx) if err != nil { @@ -136,7 +137,7 @@ func PollForEjectedSaver(ctx context.Context, thorchain *tc.Thorchain, deltaBloc return saver, err } -// PollSwapCompleted polls until the swap is completed +// PollSwapCompleted polls until the swap is completed. func PollSwapCompleted(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, txHash string) (any, error) { h, err := thorchain.Height(ctx) if err != nil { @@ -160,7 +161,7 @@ func PollSwapCompleted(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks return saver, err } -// PollOutboundSigned polls until the swap is completed and outbound has been signed +// PollOutboundSigned polls until the swap is completed and outbound has been signed. func PollOutboundSigned(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, txHash string) (any, error) { h, err := thorchain.Height(ctx) if err != nil { @@ -184,7 +185,7 @@ func PollOutboundSigned(ctx context.Context, thorchain *tc.Thorchain, deltaBlock return saver, err } -// PollForBalanceChaqnge polls until the balance changes +// PollForBalanceChaqnge polls until the balance changes. func PollForBalanceChange(ctx context.Context, chain ibc.Chain, deltaBlocks int64, balance ibc.WalletAmount) error { h, err := chain.Height(ctx) if err != nil { @@ -208,7 +209,7 @@ func PollForBalanceChange(ctx context.Context, chain ibc.Chain, deltaBlocks int6 return err } -// PollForPoolSuspended polls until the pool is gone or suspended +// PollForPoolSuspended polls until the pool is gone or suspended. func PollForPoolSuspended(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, exoAsset common.Asset) error { h, err := thorchain.Height(ctx) if err != nil { diff --git a/examples/thorchain/features/ragnarok.go b/examples/thorchain/features/ragnarok.go index 2d3d9a0c..fa598ee6 100644 --- a/examples/thorchain/features/ragnarok.go +++ b/examples/thorchain/features/ragnarok.go @@ -6,6 +6,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" + tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/thorchain/common" "github.com/cosmos/interchaintest/v10/ibc" diff --git a/examples/thorchain/features/saver_eject.go b/examples/thorchain/features/saver_eject.go index 82b5fb19..0984aba2 100644 --- a/examples/thorchain/features/saver_eject.go +++ b/examples/thorchain/features/saver_eject.go @@ -10,6 +10,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" + tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/thorchain/common" "github.com/cosmos/interchaintest/v10/ibc" diff --git a/examples/thorchain/features/savers.go b/examples/thorchain/features/savers.go index 89266cc1..b3a1c9bf 100644 --- a/examples/thorchain/features/savers.go +++ b/examples/thorchain/features/savers.go @@ -8,6 +8,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" + tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/thorchain/common" "github.com/cosmos/interchaintest/v10/ibc" diff --git a/examples/thorchain/features/swap.go b/examples/thorchain/features/swap.go index 0fbb2e23..df911656 100644 --- a/examples/thorchain/features/swap.go +++ b/examples/thorchain/features/swap.go @@ -7,6 +7,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" + tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/thorchain/common" "github.com/cosmos/interchaintest/v10/ibc" @@ -51,7 +52,7 @@ func DualSwap( return singleSwap(ctx, thorchain, destChain, destUser, srcChain, srcUser) } -// swap 0.5% of pool depth +// swap 0.5% of pool depth. func singleSwap( ctx context.Context, thorchain *tc.Thorchain, diff --git a/examples/thorchain/setup_test.go b/examples/thorchain/setup_test.go index 079dcfb2..fd4973c6 100644 --- a/examples/thorchain/setup_test.go +++ b/examples/thorchain/setup_test.go @@ -2,22 +2,27 @@ package thorchain_test import ( "context" - _ "embed" "fmt" "strings" "testing" "time" + "github.com/docker/docker/client" + ethcommon "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "golang.org/x/sync/errgroup" + + _ "embed" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/docker/docker/client" - ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/chain/ethereum" @@ -26,9 +31,6 @@ import ( tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/chain/utxo" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" - "golang.org/x/sync/errgroup" ) func StartExoChains(t *testing.T, ctx context.Context, client *client.Client, network string) ExoChains { diff --git a/examples/thorchain/thorchain_hardfork_test.go b/examples/thorchain/thorchain_hardfork_test.go index 34a7c03a..ba02700f 100644 --- a/examples/thorchain/thorchain_hardfork_test.go +++ b/examples/thorchain/thorchain_hardfork_test.go @@ -2,20 +2,21 @@ package thorchain_test import ( "context" - _ "embed" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + + _ "embed" + "github.com/cosmos/interchaintest/v10" tc "github.com/cosmos/interchaintest/v10/chain/thorchain" "github.com/cosmos/interchaintest/v10/ibc" - - //"github.com/cosmos/interchaintest/v10/ibc" + //"github.com/cosmos/interchaintest/v10/ibc". "github.com/cosmos/interchaintest/v10/testutil" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) -// //go:embed mainnet-genesis.json +// //go:embed mainnet-genesis.json. var genesisBz []byte func TestThorchainHardFork(t *testing.T) { diff --git a/examples/thorchain/thorchain_test.go b/examples/thorchain/thorchain_test.go index b95615b3..81d5b329 100644 --- a/examples/thorchain/thorchain_test.go +++ b/examples/thorchain/thorchain_test.go @@ -7,14 +7,14 @@ import ( "sync" "testing" - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/examples/thorchain/features" - "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" + + "github.com/cosmos/interchaintest/v10" + "github.com/cosmos/interchaintest/v10/examples/thorchain/features" ) -// go test -timeout 20m -v -run TestThorchain examples/thorchain/*.go -count 1 +// go test -timeout 20m -v -run TestThorchain examples/thorchain/*.go -count 1. func TestThorchainSim(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") @@ -39,7 +39,6 @@ func TestThorchainSim(t *testing.T) { // -------------------------------------------------------- eg, egCtx := errgroup.WithContext(ctx) for _, exoChain := range exoChains { - exoChain := exoChain eg.Go(func() error { _, lper, err := features.DualLp(t, egCtx, thorchain, exoChain.chain) if err != nil { @@ -56,7 +55,6 @@ func TestThorchainSim(t *testing.T) { // -------------------------------------------------------- eg, egCtx = errgroup.WithContext(ctx) for _, exoChain := range exoChains { - exoChain := exoChain eg.Go(func() error { saver, err := features.Saver(t, egCtx, thorchain, exoChain.chain) if err != nil { @@ -80,7 +78,7 @@ func TestThorchainSim(t *testing.T) { eg, egCtx = errgroup.WithContext(ctx) exoChainList := exoChains.GetChains() for i := range exoChainList { - i := i + fmt.Println("Chain:", i, "Name:", exoChainList[i].Config().Name) randomChain := rand.Intn(len(exoChainList)) if i == randomChain && i == 0 { @@ -100,7 +98,6 @@ func TestThorchainSim(t *testing.T) { mimirLock := sync.Mutex{} eg, egCtx = errgroup.WithContext(ctx) for _, exoChain := range exoChains { - exoChain := exoChain eg.Go(func() error { _, err = features.SaverEject(t, egCtx, &mimirLock, thorchain, exoChain.chain, exoChain.savers...) if err != nil { @@ -116,7 +113,6 @@ func TestThorchainSim(t *testing.T) { // -------------------------------------------------------- eg, egCtx = errgroup.WithContext(ctx) for _, exoChain := range exoChains { - exoChain := exoChain eg.Go(func() error { refundWallets := append(exoChain.lpers, exoChain.savers...) return features.Ragnarok(t, egCtx, thorchain, exoChain.chain, refundWallets...) diff --git a/examples/utxo/start_test.go b/examples/utxo/start_test.go index 81662d85..52b2615e 100644 --- a/examples/utxo/start_test.go +++ b/examples/utxo/start_test.go @@ -7,14 +7,15 @@ import ( "strconv" "testing" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "golang.org/x/sync/errgroup" + sdkmath "cosmossdk.io/math" + "github.com/cosmos/interchaintest/v10" "github.com/cosmos/interchaintest/v10/chain/utxo" "github.com/cosmos/interchaintest/v10/ibc" - "golang.org/x/sync/errgroup" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) func TestUtxo(t *testing.T) { @@ -67,7 +68,6 @@ func TestUtxo(t *testing.T) { // Create and fund a user using GetAndFundTestUsers eg, egCtx := errgroup.WithContext(ctx) for _, chain := range chains { - chain := chain eg.Go(func() error { // Fund 2 coins to user1 and user2 fundAmount := sdkmath.NewInt(200_000_000) diff --git a/relayer/docker.go b/relayer/docker.go index 27ef35ff..8a9277f6 100644 --- a/relayer/docker.go +++ b/relayer/docker.go @@ -4,13 +4,13 @@ import ( "bytes" "context" "fmt" - "github.com/docker/docker/api/types/container" - dockerimage "github.com/docker/docker/api/types/image" "io" "path" "strings" "time" + "github.com/docker/docker/api/types/container" + dockerimage "github.com/docker/docker/api/types/image" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" diff --git a/relayerfactory.go b/relayerfactory.go index 8494825f..256b3099 100644 --- a/relayerfactory.go +++ b/relayerfactory.go @@ -2,6 +2,7 @@ package interchaintest import ( "fmt" + "github.com/docker/docker/client" "go.uber.org/zap" diff --git a/testutil/poll_for_state.go b/testutil/poll_for_state.go index 708258d1..9c821d60 100644 --- a/testutil/poll_for_state.go +++ b/testutil/poll_for_state.go @@ -142,7 +142,7 @@ func (pe *packetPollError) Unwrap() error { // Format is expected to be used by testify/require which prints errors via %+v. func (pe *packetPollError) Format(s fmt.State, verb rune) { if verb != 'v' && !s.Flag('+') { - fmt.Fprint(s, pe.error.Error()) + fmt.Fprint(s, pe.Error()) return } From 63e0241394bd13c797a97d241bc72617c6ddce6c Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 13 Jun 2025 10:36:59 -0400 Subject: [PATCH 2/7] init-lint --- chain/cosmos/ics_v6_query_types.go | 2 +- examples/cosmos/chain_export_test.go | 2 +- examples/cosmos/chain_miscellaneous_test.go | 4 ++-- examples/ibc/ics_test.go | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chain/cosmos/ics_v6_query_types.go b/chain/cosmos/ics_v6_query_types.go index 2102ea50..8e2db2d2 100644 --- a/chain/cosmos/ics_v6_query_types.go +++ b/chain/cosmos/ics_v6_query_types.go @@ -29,7 +29,7 @@ func (node *ChainNode) ListConsumerChains(ctx context.Context) (ListConsumerChai } var queryResponse ListConsumerChainsResponse - err = json.Unmarshal([]byte(queryRes), &queryResponse) + err = json.Unmarshal(queryRes, &queryResponse) if err != nil { return ListConsumerChainsResponse{}, err } diff --git a/examples/cosmos/chain_export_test.go b/examples/cosmos/chain_export_test.go index 8d125ed6..b96bd196 100644 --- a/examples/cosmos/chain_export_test.go +++ b/examples/cosmos/chain_export_test.go @@ -73,5 +73,5 @@ func HaltChainAndExportGenesis(ctx context.Context, t *testing.T, chain *cosmos. height, err := chain.Height(ctx) require.NoError(t, err, "error getting height after halt") - require.Greater(t, int64(height), haltHeight, "height did not increment after halt") + require.Greater(t, height, haltHeight, "height did not increment after halt") } diff --git a/examples/cosmos/chain_miscellaneous_test.go b/examples/cosmos/chain_miscellaneous_test.go index 6551e064..06d8f495 100644 --- a/examples/cosmos/chain_miscellaneous_test.go +++ b/examples/cosmos/chain_miscellaneous_test.go @@ -311,7 +311,7 @@ func testBroadcaster(ctx context.Context, t *testing.T, chain *cosmos.CosmosChai require.NoError(t, err) require.Equal(t, math.NewInt(2), updatedBal2) - txResp, err = cosmos.BroadcastTx( + _, err = cosmos.BroadcastTx( ctx, b, users[0], @@ -465,7 +465,7 @@ func testTXEncodeDecode(ctx context.Context, t *testing.T, chain *cosmos.CosmosC // helpers. func sendTokens(ctx context.Context, chain *cosmos.CosmosChain, from, to ibc.Wallet, token string, amount int64) (ibc.WalletAmount, error) { - if token == "" { + if token == "" { // nolint:unparam token = chain.Config().Denom } diff --git a/examples/ibc/ics_test.go b/examples/ibc/ics_test.go index dab340aa..466faf86 100644 --- a/examples/ibc/ics_test.go +++ b/examples/ibc/ics_test.go @@ -29,6 +29,8 @@ var ( // This tests Cosmos Interchain Security, spinning up a provider and a single consumer chain. // go test -timeout 3000s -run ^TestICS$ github.com/cosmos/interchaintest/v10/examples/ibc -v -test.short. func TestICS(t *testing.T) { + t.Parallel() + if testing.Short() { ver := icsVersions[0] t.Logf("Running in short mode, only testing the latest ICS version: %s", ver) From 6d87f77627bd5c87ae18aefa981413cb2f34fd18 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 13 Jun 2025 10:52:03 -0400 Subject: [PATCH 3/7] lint-all --- chain/namada/namada_chain.go | 1316 - chain/namada/namada_node.go | 333 - chain/namada/wallet.go | 59 - chain/penumbra/cnidarium/v1/cnidarium.pb.go | 3297 --- chain/penumbra/core/app/v1/app.pb.go | 3013 --- chain/penumbra/core/asset/v1/asset.pb.go | 4017 --- .../core/component/auction/v1/auction.pb.go | 6360 ----- .../community_pool/v1/community_pool.pb.go | 989 - .../compact_block/v1/compact_block.pb.go | 2881 -- .../penumbra/core/component/dex/v1/dex.pb.go | 22026 ---------------- .../distributions/v1/distributions.pb.go | 496 - .../penumbra/core/component/fee/v1/fee.pb.go | 1827 -- .../core/component/funding/v1/funding.pb.go | 737 - .../component/governance/v1/governance.pb.go | 16802 ------------ .../penumbra/core/component/ibc/v1/ibc.pb.go | 2851 -- .../penumbra/core/component/sct/v1/sct.pb.go | 4597 ---- .../shielded_pool/v1/shielded_pool.pb.go | 9043 ------- .../core/component/stake/v1/stake.pb.go | 12285 --------- chain/penumbra/core/keys/v1/keys.pb.go | 2788 -- chain/penumbra/core/num/v1/num.pb.go | 346 - .../core/transaction/v1/transaction.pb.go | 13819 ---------- chain/penumbra/core/txhash/v1/txhash.pb.go | 504 - .../crypto/decaf377_fmd/v1/decaf377_fmd.pb.go | 327 - .../decaf377_frost/v1/decaf377_frost.pb.go | 1525 -- .../decaf377_rdsa/v1/decaf377_rdsa.pb.go | 673 - chain/penumbra/crypto/tct/v1/tct.pb.go | 1061 - .../custody/threshold/v1/threshold.pb.go | 3619 --- chain/penumbra/custody/v1/custody.pb.go | 2860 -- chain/penumbra/doc.go | 2 - chain/penumbra/penumbra_app_node.go | 435 - chain/penumbra/penumbra_chain.go | 650 - chain/penumbra/penumbra_client_node.go | 654 - chain/penumbra/penumbra_client_node_test.go | 100 - chain/penumbra/penumbra_node.go | 111 - .../tools/summoning/v1/summoning.pb.go | 3694 --- .../v1/tendermint_proxy.pb.go | 4706 ---- chain/penumbra/view/v1/view.pb.go | 21290 --------------- chain/penumbra/wallet.go | 52 - chain/thorchain/account_retriever.go | 88 - chain/thorchain/address.go | 33 - chain/thorchain/api_query.go | 268 - chain/thorchain/broadcaster.go | 254 - chain/thorchain/codec.go | 51 - chain/thorchain/common/asset.go | 164 - chain/thorchain/common/chain.go | 89 - chain/thorchain/common/coin.go | 25 - chain/thorchain/config.go | 23 - chain/thorchain/doc.go | 2 - chain/thorchain/genesis.go | 56 - chain/thorchain/module_bank.go | 127 - chain/thorchain/module_thorchain.go | 77 - chain/thorchain/poll.go | 66 - chain/thorchain/query.go | 37 - chain/thorchain/sidecar.go | 202 - chain/thorchain/thorchain.go | 1403 - chain/thorchain/thornode.go | 1731 -- chain/thorchain/types.go | 507 - chain/thorchain/wallet.go | 51 - chain/utxo/cli.go | 410 - chain/utxo/default_configs.go | 141 - chain/utxo/types.go | 62 - chain/utxo/unimplemented.go | 63 - chain/utxo/utxo_chain.go | 560 - chain/utxo/wallet.go | 114 - chainfactory.go | 12 - chainspec_test.go | 1 - dockerutil/image.go | 2 +- dockerutil/strings.go | 2 +- dockerutil/strings_test.go | 18 +- examples/cosmos/chain_core_test.go | 55 +- examples/cosmos/chain_export_test.go | 6 +- examples/cosmos/chain_miscellaneous_test.go | 46 +- examples/cosmos/chain_param_change_test.go | 2 + examples/cosmos/chain_upgrade_ibc_test.go | 2 + examples/cosmos/ethermint_test.go | 2 +- examples/cosmos/sdk_boundary_test.go | 5 +- examples/ethereum/foundry_test.go | 2 +- examples/ethereum/geth_test.go | 3 +- examples/ibc/client_creation_test.go | 3 +- examples/ibc/ics_test.go | 3 +- examples/namada/namada_chain_test.go | 291 - examples/penumbra/penumbra_chain_test.go | 130 - examples/penumbra/penumbra_ibc_test.go | 645 - .../thorchain/chainspec_exochains_test.go | 124 - .../thorchain/chainspec_thorchain_test.go | 178 - examples/thorchain/contracts/.gitignore | 15 - examples/thorchain/contracts/README.md | 66 - .../thorchain/contracts/eth-router-abi.json | 308 - .../contracts/eth-router-bytecode.txt | 1 - examples/thorchain/contracts/foundry.toml | 6 - .../contracts/lib/forge-std/.gitattributes | 1 - .../lib/forge-std/.github/workflows/ci.yml | 128 - .../lib/forge-std/.github/workflows/sync.yml | 31 - .../contracts/lib/forge-std/.gitignore | 4 - .../contracts/lib/forge-std/LICENSE-APACHE | 203 - .../contracts/lib/forge-std/LICENSE-MIT | 25 - .../contracts/lib/forge-std/README.md | 250 - .../contracts/lib/forge-std/foundry.toml | 21 - .../contracts/lib/forge-std/package.json | 16 - .../contracts/lib/forge-std/scripts/vm.py | 635 - .../contracts/lib/forge-std/src/Base.sol | 35 - .../contracts/lib/forge-std/src/Script.sol | 27 - .../lib/forge-std/src/StdAssertions.sol | 669 - .../contracts/lib/forge-std/src/StdChains.sol | 259 - .../contracts/lib/forge-std/src/StdCheats.sol | 817 - .../contracts/lib/forge-std/src/StdError.sol | 15 - .../lib/forge-std/src/StdInvariant.sol | 122 - .../contracts/lib/forge-std/src/StdJson.sol | 179 - .../contracts/lib/forge-std/src/StdMath.sol | 43 - .../lib/forge-std/src/StdStorage.sol | 473 - .../contracts/lib/forge-std/src/StdStyle.sol | 333 - .../contracts/lib/forge-std/src/StdToml.sol | 179 - .../contracts/lib/forge-std/src/StdUtils.sol | 226 - .../contracts/lib/forge-std/src/Test.sol | 33 - .../contracts/lib/forge-std/src/Vm.sol | 1842 -- .../contracts/lib/forge-std/src/console.sol | 1552 -- .../contracts/lib/forge-std/src/console2.sol | 4 - .../lib/forge-std/src/interfaces/IERC1155.sol | 105 - .../lib/forge-std/src/interfaces/IERC165.sol | 12 - .../lib/forge-std/src/interfaces/IERC20.sol | 43 - .../lib/forge-std/src/interfaces/IERC4626.sol | 190 - .../lib/forge-std/src/interfaces/IERC721.sol | 164 - .../forge-std/src/interfaces/IMulticall3.sol | 73 - .../lib/forge-std/src/mocks/MockERC20.sol | 234 - .../lib/forge-std/src/mocks/MockERC721.sol | 231 - .../lib/forge-std/src/safeconsole.sol | 13937 ---------- .../lib/forge-std/test/StdAssertions.t.sol | 145 - .../lib/forge-std/test/StdChains.t.sol | 226 - .../lib/forge-std/test/StdCheats.t.sol | 618 - .../lib/forge-std/test/StdError.t.sol | 120 - .../lib/forge-std/test/StdJson.t.sol | 49 - .../lib/forge-std/test/StdMath.t.sol | 212 - .../lib/forge-std/test/StdStorage.t.sol | 471 - .../lib/forge-std/test/StdStyle.t.sol | 110 - .../lib/forge-std/test/StdToml.t.sol | 49 - .../lib/forge-std/test/StdUtils.t.sol | 342 - .../contracts/lib/forge-std/test/Vm.t.sol | 15 - .../test/compilation/CompilationScript.sol | 10 - .../compilation/CompilationScriptBase.sol | 10 - .../test/compilation/CompilationTest.sol | 10 - .../test/compilation/CompilationTestBase.sol | 10 - .../test/fixtures/broadcast.log.json | 187 - .../lib/forge-std/test/fixtures/test.json | 8 - .../lib/forge-std/test/fixtures/test.toml | 6 - .../lib/forge-std/test/mocks/MockERC20.t.sol | 441 - .../lib/forge-std/test/mocks/MockERC721.t.sol | 721 - examples/thorchain/contracts/router-abi.json | 423 - .../thorchain/contracts/router-bytecode.txt | 1 - .../thorchain/contracts/script/Router.s.sol | 17 - .../thorchain/contracts/script/Token.s.sol | 23 - .../contracts/src/THORChain_Router.sol | 187 - examples/thorchain/contracts/src/Token.sol | 130 - examples/thorchain/contracts/token-abi.json | 229 - .../thorchain/contracts/token-bytecode.txt | 1 - examples/thorchain/features/arb.go | 193 - examples/thorchain/features/dual_lper.go | 66 - examples/thorchain/features/helpers.go | 246 - examples/thorchain/features/ragnarok.go | 73 - examples/thorchain/features/saver_eject.go | 208 - examples/thorchain/features/savers.go | 102 - examples/thorchain/features/swap.go | 185 - examples/thorchain/helper_test.go | 43 - examples/thorchain/setup_test.go | 350 - examples/thorchain/thorchain_hardfork_test.go | 80 - examples/thorchain/thorchain_test.go | 125 - examples/utxo/start_test.go | 137 - ibc/types.go | 2 +- interchain.go | 25 - penumbra.go | 32 - relayerfactory.go | 4 + test_user.go | 7 - 171 files changed, 110 insertions(+), 190327 deletions(-) delete mode 100644 chain/namada/namada_chain.go delete mode 100644 chain/namada/namada_node.go delete mode 100644 chain/namada/wallet.go delete mode 100644 chain/penumbra/cnidarium/v1/cnidarium.pb.go delete mode 100644 chain/penumbra/core/app/v1/app.pb.go delete mode 100644 chain/penumbra/core/asset/v1/asset.pb.go delete mode 100644 chain/penumbra/core/component/auction/v1/auction.pb.go delete mode 100644 chain/penumbra/core/component/community_pool/v1/community_pool.pb.go delete mode 100644 chain/penumbra/core/component/compact_block/v1/compact_block.pb.go delete mode 100644 chain/penumbra/core/component/dex/v1/dex.pb.go delete mode 100644 chain/penumbra/core/component/distributions/v1/distributions.pb.go delete mode 100644 chain/penumbra/core/component/fee/v1/fee.pb.go delete mode 100644 chain/penumbra/core/component/funding/v1/funding.pb.go delete mode 100644 chain/penumbra/core/component/governance/v1/governance.pb.go delete mode 100644 chain/penumbra/core/component/ibc/v1/ibc.pb.go delete mode 100644 chain/penumbra/core/component/sct/v1/sct.pb.go delete mode 100644 chain/penumbra/core/component/shielded_pool/v1/shielded_pool.pb.go delete mode 100644 chain/penumbra/core/component/stake/v1/stake.pb.go delete mode 100644 chain/penumbra/core/keys/v1/keys.pb.go delete mode 100644 chain/penumbra/core/num/v1/num.pb.go delete mode 100644 chain/penumbra/core/transaction/v1/transaction.pb.go delete mode 100644 chain/penumbra/core/txhash/v1/txhash.pb.go delete mode 100644 chain/penumbra/crypto/decaf377_fmd/v1/decaf377_fmd.pb.go delete mode 100644 chain/penumbra/crypto/decaf377_frost/v1/decaf377_frost.pb.go delete mode 100644 chain/penumbra/crypto/decaf377_rdsa/v1/decaf377_rdsa.pb.go delete mode 100644 chain/penumbra/crypto/tct/v1/tct.pb.go delete mode 100644 chain/penumbra/custody/threshold/v1/threshold.pb.go delete mode 100644 chain/penumbra/custody/v1/custody.pb.go delete mode 100644 chain/penumbra/doc.go delete mode 100644 chain/penumbra/penumbra_app_node.go delete mode 100644 chain/penumbra/penumbra_chain.go delete mode 100644 chain/penumbra/penumbra_client_node.go delete mode 100644 chain/penumbra/penumbra_client_node_test.go delete mode 100644 chain/penumbra/penumbra_node.go delete mode 100644 chain/penumbra/tools/summoning/v1/summoning.pb.go delete mode 100644 chain/penumbra/util/tendermint_proxy/v1/tendermint_proxy.pb.go delete mode 100644 chain/penumbra/view/v1/view.pb.go delete mode 100644 chain/penumbra/wallet.go delete mode 100644 chain/thorchain/account_retriever.go delete mode 100644 chain/thorchain/address.go delete mode 100644 chain/thorchain/api_query.go delete mode 100644 chain/thorchain/broadcaster.go delete mode 100644 chain/thorchain/codec.go delete mode 100644 chain/thorchain/common/asset.go delete mode 100644 chain/thorchain/common/chain.go delete mode 100644 chain/thorchain/common/coin.go delete mode 100644 chain/thorchain/config.go delete mode 100644 chain/thorchain/doc.go delete mode 100644 chain/thorchain/genesis.go delete mode 100644 chain/thorchain/module_bank.go delete mode 100644 chain/thorchain/module_thorchain.go delete mode 100644 chain/thorchain/poll.go delete mode 100644 chain/thorchain/query.go delete mode 100644 chain/thorchain/sidecar.go delete mode 100644 chain/thorchain/thorchain.go delete mode 100644 chain/thorchain/thornode.go delete mode 100644 chain/thorchain/types.go delete mode 100644 chain/thorchain/wallet.go delete mode 100644 chain/utxo/cli.go delete mode 100644 chain/utxo/default_configs.go delete mode 100644 chain/utxo/types.go delete mode 100644 chain/utxo/unimplemented.go delete mode 100644 chain/utxo/utxo_chain.go delete mode 100644 chain/utxo/wallet.go delete mode 100644 examples/namada/namada_chain_test.go delete mode 100644 examples/penumbra/penumbra_chain_test.go delete mode 100644 examples/penumbra/penumbra_ibc_test.go delete mode 100644 examples/thorchain/chainspec_exochains_test.go delete mode 100644 examples/thorchain/chainspec_thorchain_test.go delete mode 100644 examples/thorchain/contracts/.gitignore delete mode 100644 examples/thorchain/contracts/README.md delete mode 100644 examples/thorchain/contracts/eth-router-abi.json delete mode 100644 examples/thorchain/contracts/eth-router-bytecode.txt delete mode 100644 examples/thorchain/contracts/foundry.toml delete mode 100644 examples/thorchain/contracts/lib/forge-std/.gitattributes delete mode 100644 examples/thorchain/contracts/lib/forge-std/.github/workflows/ci.yml delete mode 100644 examples/thorchain/contracts/lib/forge-std/.github/workflows/sync.yml delete mode 100644 examples/thorchain/contracts/lib/forge-std/.gitignore delete mode 100644 examples/thorchain/contracts/lib/forge-std/LICENSE-APACHE delete mode 100644 examples/thorchain/contracts/lib/forge-std/LICENSE-MIT delete mode 100644 examples/thorchain/contracts/lib/forge-std/README.md delete mode 100644 examples/thorchain/contracts/lib/forge-std/foundry.toml delete mode 100644 examples/thorchain/contracts/lib/forge-std/package.json delete mode 100755 examples/thorchain/contracts/lib/forge-std/scripts/vm.py delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/Base.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/Script.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdAssertions.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdChains.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdCheats.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdError.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdInvariant.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdJson.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdMath.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdStorage.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdStyle.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdToml.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/StdUtils.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/Test.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/Vm.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/console.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/console2.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC1155.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC165.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC20.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC4626.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC721.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/interfaces/IMulticall3.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC20.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC721.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/src/safeconsole.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdAssertions.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdChains.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdCheats.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdError.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdJson.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdMath.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdStorage.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdStyle.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdToml.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/StdUtils.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/Vm.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScript.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTest.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTestBase.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/fixtures/broadcast.log.json delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/fixtures/test.json delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/fixtures/test.toml delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC20.t.sol delete mode 100644 examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC721.t.sol delete mode 100644 examples/thorchain/contracts/router-abi.json delete mode 100644 examples/thorchain/contracts/router-bytecode.txt delete mode 100644 examples/thorchain/contracts/script/Router.s.sol delete mode 100644 examples/thorchain/contracts/script/Token.s.sol delete mode 100644 examples/thorchain/contracts/src/THORChain_Router.sol delete mode 100644 examples/thorchain/contracts/src/Token.sol delete mode 100644 examples/thorchain/contracts/token-abi.json delete mode 100644 examples/thorchain/contracts/token-bytecode.txt delete mode 100644 examples/thorchain/features/arb.go delete mode 100644 examples/thorchain/features/dual_lper.go delete mode 100644 examples/thorchain/features/helpers.go delete mode 100644 examples/thorchain/features/ragnarok.go delete mode 100644 examples/thorchain/features/saver_eject.go delete mode 100644 examples/thorchain/features/savers.go delete mode 100644 examples/thorchain/features/swap.go delete mode 100644 examples/thorchain/helper_test.go delete mode 100644 examples/thorchain/setup_test.go delete mode 100644 examples/thorchain/thorchain_hardfork_test.go delete mode 100644 examples/thorchain/thorchain_test.go delete mode 100644 examples/utxo/start_test.go delete mode 100644 penumbra.go diff --git a/chain/namada/namada_chain.go b/chain/namada/namada_chain.go deleted file mode 100644 index c8f55e1e..00000000 --- a/chain/namada/namada_chain.go +++ /dev/null @@ -1,1316 +0,0 @@ -package namada - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "context" - "encoding/hex" - "encoding/json" - "fmt" - "io" - stdmath "math" - "net/http" - "os" - "path/filepath" - "regexp" - "strconv" - "strings" - "time" - - dockerimage "github.com/docker/docker/api/types/image" - "github.com/docker/docker/client" - "go.uber.org/zap" - "golang.org/x/sync/errgroup" - - "cosmossdk.io/math" - - cometbft "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/interchaintest/v10/chain/internal/tendermint" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -const ( - NamAddress = "tnam1qxgfw7myv4dh0qna4hq0xdg6lx77fzl7dcem8h7e" - NamTokenDenom = int64(6) - MaspAddress = "tnam1pcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzmefah" - gasPayerAlias = "gas-payer" -) - -type NamadaChain struct { - log *zap.Logger - testName string - cfg ibc.ChainConfig - NumValidators int - numFullNodes int - Validators NamadaNodes - FullNodes NamadaNodes - - isRunning bool -} - -// New instance of NamadaChain. -func NewNamadaChain(testName string, chainConfig ibc.ChainConfig, numValidators int, numFullNodes int, log *zap.Logger) *NamadaChain { - return &NamadaChain{ - log: log, - testName: testName, - cfg: chainConfig, - NumValidators: numValidators, - numFullNodes: numFullNodes, - } -} - -// Chain config. -func (c *NamadaChain) Config() ibc.ChainConfig { - return c.cfg -} - -// Initialize the chain. -func (c *NamadaChain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error { - chainCfg := c.Config() - for _, image := range chainCfg.Images { - rc, err := cli.ImagePull( - ctx, - image.Repository+":"+image.Version, - dockerimage.PullOptions{ - Platform: "amd64", - }) - if err != nil { - c.log.Error("Failed to pull image", - zap.Error(err), - zap.String("repository", image.Repository), - zap.String("tag", image.Version), - ) - } else { - _, _ = io.Copy(io.Discard, rc) - _ = rc.Close() - } - } - - for i := 0; i < c.NumValidators; i++ { - nn, err := NewNamadaNode(ctx, c.log, c, i, true, testName, cli, networkID, chainCfg.Images[0]) - if err != nil { - return err - } - c.Validators = append(c.Validators, nn) - } - - for i := 0; i < c.numFullNodes; i++ { - nn, err := NewNamadaNode(ctx, c.log, c, i, false, testName, cli, networkID, chainCfg.Images[0]) - if err != nil { - return err - } - c.FullNodes = append(c.FullNodes, nn) - } - - tempBaseDir, err := os.MkdirTemp("", "namada") - if err != nil { - return err - } - defer os.RemoveAll(tempBaseDir) - - c.log.Debug("Temporary base directory", - zap.String("path", tempBaseDir), - ) - c.isRunning = false - - return nil -} - -// Start to set up. -func (c *NamadaChain) Start(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error { - err := c.downloadTemplates(ctx) - if err != nil { - return fmt.Errorf("downloading template files failed: %v", err) - } - err = c.downloadWasms(ctx) - if err != nil { - return fmt.Errorf("downloading wasm files failed: %v", err) - } - - err = c.setValidators(ctx) - if err != nil { - return fmt.Errorf("setting validators failed: %v", err) - } - - err = c.initAccounts(ctx, additionalGenesisWallets...) - if err != nil { - return fmt.Errorf("initializing accounts failed: %v", err) - } - - err = c.updateParameters(ctx) - if err != nil { - return fmt.Errorf("updating parameters failed: %v", err) - } - - err = c.initNetwork(ctx) - if err != nil { - return fmt.Errorf("init-network failed: %v", err) - } - - eg, egCtx := errgroup.WithContext(ctx) - for _, n := range c.Validators { - eg.Go(func() error { - if err := c.copyGenesisFiles(egCtx, n); err != nil { - return err - } - return n.CreateContainer(egCtx) - }) - } - - for _, n := range c.FullNodes { - eg.Go(func() error { - if err := c.copyGenesisFiles(egCtx, n); err != nil { - return err - } - return n.CreateContainer(egCtx) - }) - } - if err := eg.Wait(); err != nil { - return err - } - - eg, egCtx = errgroup.WithContext(ctx) - for _, n := range c.Validators { - eg.Go(func() error { - return n.StartContainer(egCtx) - }) - } - - for _, n := range c.FullNodes { - eg.Go(func() error { - return n.StartContainer(egCtx) - }) - } - if err := eg.Wait(); err != nil { - return err - } - - if err := testutil.WaitForBlocks(ctx, 2, c.getNode()); err != nil { - return err - } - - c.isRunning = true - - return nil -} - -func (c *NamadaChain) getNode() *NamadaNode { - return c.Validators[0] -} - -// Execute a command. -func (c *NamadaChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error) { - return c.getNode().Exec(ctx, cmd, env) -} - -// Exports the chain state at the specific height. -func (c *NamadaChain) ExportState(ctx context.Context, height int64) (string, error) { - panic("implement me") -} - -// Get the RPC address. -func (c *NamadaChain) GetRPCAddress() string { - return fmt.Sprintf("http://%s:26657", c.getNode().HostName()) -} - -// Get the gRPC address. This isn't used for Namada. -func (c *NamadaChain) GetGRPCAddress() string { - // Returns a dummy address because Namada doesn't support gRPC - return fmt.Sprintf("http://%s:9090", c.getNode().HostName()) -} - -// Get the host RPC address. -func (c *NamadaChain) GetHostRPCAddress() string { - return "http://" + c.getNode().hostRPCPort -} - -// Get the host peer address. -func (c *NamadaChain) GetHostPeerAddress() string { - return c.getNode().hostP2PPort -} - -// Get the host gRPC address. -func (c *NamadaChain) GetHostGRPCAddress() string { - panic("No gRPC address for Namada") -} - -// Get Namada home directory. -func (c *NamadaChain) HomeDir() string { - return c.getNode().HomeDir() -} - -// Create a test key. -func (c *NamadaChain) CreateKey(ctx context.Context, keyName string) error { - var err error - cmd := []string{ - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "gen", - "--alias", - keyName, - "--unsafe-dont-encrypt", - } - if !c.isRunning { - cmd = append(cmd, "--pre-genesis") - } - _, _, err = c.Exec(ctx, cmd, c.Config().Env) - - return err -} - -// Recovery a test key. -func (c *NamadaChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error { - cmd := []string{ - "echo", - mnemonic, - "|", - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "derive", - "--alias", - keyName, - "--unsafe-dont-encrypt", - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - - return err -} - -// Get the Namada address. -func (c *NamadaChain) GetAddress(ctx context.Context, keyName string) ([]byte, error) { - cmd := []string{ - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "find", - "--alias", - keyName, - } - if !c.isRunning { - cmd = append(cmd, "--pre-genesis") - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return nil, fmt.Errorf("getting an address failed with name %q: %w", keyName, err) - } - outputStr := string(output) - re := regexp.MustCompile(`(tnam|znam|zvknam)[0-9a-z]+`) - address := re.FindString(outputStr) - - if address == "" { - return nil, fmt.Errorf("no address with name %q: %w", keyName, err) - } - - return []byte(address), nil -} - -// Get the key alias. -func (c *NamadaChain) getAlias(ctx context.Context, address string) (string, error) { - cmd := []string{ - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "find", - "--address", - address, - } - if !c.isRunning { - cmd = append(cmd, "--pre-genesis") - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return "", fmt.Errorf("getting the alias failed with address %s: %w", address, err) - } - outputStr := string(output) - re := regexp.MustCompile(`Found alias (\S+)`) - matches := re.FindStringSubmatch(outputStr) - if len(matches) < 2 { - return "", fmt.Errorf("no alias found: %s", outputStr) - } - alias := matches[1] - - return alias, nil -} - -// Send funds to a wallet from a user account. -func (c *NamadaChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - var transferCmd string - if strings.HasPrefix(amount.Address, "znam") { - transferCmd = "shield" - } else { - transferCmd = "transparent-transfer" - } - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - transferCmd, - "--source", - keyName, - "--target", - amount.Address, - "--token", - amount.Denom, - "--amount", - amount.Amount.String(), - "--node", - c.GetRPCAddress(), - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - - return err -} - -// Send funds to a wallet from a user account with a memo. -func (c *NamadaChain) SendFundsWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error) { - var transferCmd string - if strings.HasPrefix(amount.Address, "znam") { - transferCmd = "shield" - } else { - transferCmd = "transparent-transfer" - } - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - transferCmd, - "--source", - keyName, - "--target", - amount.Address, - "--token", - amount.Denom, - "--amount", - amount.Amount.String(), - "--memo", - note, - "--node", - c.GetRPCAddress(), - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - - return note, err -} - -// Send on IBC transfer. -func (c *NamadaChain) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, options ibc.TransferOptions) (ibc.Tx, error) { - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "ibc-transfer", - "--source", - keyName, - "--receiver", - amount.Address, - "--token", - amount.Denom, - "--amount", - amount.Amount.String(), - "--channel-id", - channelID, - "--node", - c.GetRPCAddress(), - } - - if c.Config().Gas != "" { - _, err := strconv.ParseInt(c.Config().Gas, 10, 64) - if err != nil { - return ibc.Tx{}, fmt.Errorf("invalid gas limit: %s", c.Config().Gas) - } - cmd = append(cmd, "--gas-limit", c.Config().Gas) - } - - if options.Port != "" { - cmd = append(cmd, "--port-id", options.Port) - } - - if options.Memo != "" { - cmd = append(cmd, "--ibc-memo", options.Memo) - } - - if options.Timeout != nil { - if options.Timeout.NanoSeconds > 0 { - timestamp := time.Unix(0, int64(options.Timeout.NanoSeconds)) - currentTime := time.Now() - if currentTime.After(timestamp) { - return ibc.Tx{}, fmt.Errorf("invalid timeout timestamp: %d", options.Timeout.NanoSeconds) - } - offset := int64(timestamp.Sub(currentTime).Seconds()) - cmd = append(cmd, "--timeout-sec-offset", strconv.FormatInt(offset, 10)) - } - - if options.Timeout.Height > 0 { - cmd = append(cmd, "--timeout-height", strconv.FormatInt(options.Timeout.Height, 10)) - } - } - - if strings.HasPrefix(keyName, "shielded") { - cmd = append(cmd, "--gas-payer", gasPayerAlias) - } - - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return ibc.Tx{}, fmt.Errorf("the transaction failed: %s, %v", output, err) - } - outputStr := string(output) - c.log.Log(zap.InfoLevel, outputStr) - - re := regexp.MustCompile(`Transaction hash: ([0-9A-F]+)`) - matches := re.FindStringSubmatch(outputStr) - var txHash string - if len(matches) > 1 { - txHash = matches[1] - } else { - return ibc.Tx{}, fmt.Errorf("the transaction failed: %s", outputStr) - } - - re = regexp.MustCompile(`Transaction batch ([0-9A-F]+) was applied at height (\d+), consuming (\d+) gas units`) - matchesAll := re.FindAllStringSubmatch(outputStr, -1) - if len(matches) == 0 { - return ibc.Tx{}, fmt.Errorf("the transaction failed: %s", outputStr) - } - - var height int64 - var gas int64 - for _, match := range matchesAll { - if len(match) == 4 { - // it is ok to overwrite them of the last transaction - height, _ = strconv.ParseInt(match[2], 10, 64) - gas, _ = strconv.ParseInt(match[3], 10, 64) - } - } - - tx := ibc.Tx{ - TxHash: txHash, - Height: height, - GasSpent: gas, - } - - results, err := c.getNode().Client.BlockResults(ctx, &height) - if err != nil { - return ibc.Tx{}, fmt.Errorf("checking the events failed: %v", err) - } - const evType = "send_packet" - tendermintEvents := results.EndBlockEvents - var events []cometbft.Event - for _, event := range tendermintEvents { - if event.Type != evType { - continue - } - jsonEvent, err := json.Marshal(event) - if err != nil { - return ibc.Tx{}, fmt.Errorf("converting an events failed: %v", err) - } - var event cometbft.Event - err = json.Unmarshal(jsonEvent, &event) - if err != nil { - return ibc.Tx{}, fmt.Errorf("converting an event failed: %v", err) - } - events = append(events, event) - } - - var ( - seq, _ = tendermint.AttributeValue(events, evType, "packet_sequence") - srcPort, _ = tendermint.AttributeValue(events, evType, "packet_src_port") - srcChan, _ = tendermint.AttributeValue(events, evType, "packet_src_channel") - dstPort, _ = tendermint.AttributeValue(events, evType, "packet_dst_port") - dstChan, _ = tendermint.AttributeValue(events, evType, "packet_dst_channel") - timeoutHeight, _ = tendermint.AttributeValue(events, evType, "packet_timeout_height") - timeoutTS, _ = tendermint.AttributeValue(events, evType, "packet_timeout_timestamp") - dataHex, _ = tendermint.AttributeValue(events, evType, "packet_data_hex") - ) - tx.Packet.SourcePort = srcPort - tx.Packet.SourceChannel = srcChan - tx.Packet.DestPort = dstPort - tx.Packet.DestChannel = dstChan - tx.Packet.TimeoutHeight = timeoutHeight - - data, err := hex.DecodeString(dataHex) - if err != nil { - return tx, fmt.Errorf("malformed data hex %s: %w", dataHex, err) - } - tx.Packet.Data = data - - seqNum, err := strconv.ParseUint(seq, 10, 64) - if err != nil { - return tx, fmt.Errorf("invalid packet sequence from events %s: %w", seq, err) - } - tx.Packet.Sequence = seqNum - - timeoutNano, err := strconv.ParseUint(timeoutTS, 10, 64) - if err != nil { - return tx, fmt.Errorf("invalid packet timestamp timeout %s: %w", timeoutTS, err) - } - tx.Packet.TimeoutTimestamp = ibc.Nanoseconds(timeoutNano) - - return tx, err -} - -// Shielded transfer (shielded account to shielded account) on Namada. -func (c *NamadaChain) ShieldedTransfer(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "transfer", - "--source", - keyName, - "--target", - amount.Address, - "--token", - amount.Denom, - "--amount", - amount.Amount.String(), - "--gas-payer", - gasPayerAlias, - "--node", - c.GetRPCAddress(), - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - - return err -} - -// Generate an IBC shielding transfer for the following shielding transfer via IBC. -func (c *NamadaChain) GenIbcShieldingTransfer(ctx context.Context, channelID string, amount ibc.WalletAmount, options ibc.TransferOptions) (string, error) { - var portID string - if options.Port == "" { - portID = "transfer" - } else { - portID = options.Port - } - - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "ibc-gen-shielding", - "--output-folder-path", - c.HomeDir(), - "--target", - amount.Address, - "--token", - amount.Denom, - "--amount", - amount.Amount.String(), - "--port-id", - portID, - "--channel-id", - channelID, - "--node", - c.GetRPCAddress(), - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return "", fmt.Errorf("failed to generate the IBC shielding transfer: %v", err) - } - outputStr := string(output) - - re := regexp.MustCompile(`Output IBC shielding transfer for ([^\s]+) to (.+)`) - matches := re.FindStringSubmatch(outputStr) - var path string - if len(matches) > 2 { - path = matches[2] - } else { - return "", fmt.Errorf("failed to get the file path of the IBC shielding transfer") - } - relPath, _ := filepath.Rel(c.HomeDir(), path) - shieldingTransfer, err := c.getNode().ReadFile(ctx, relPath) - if err != nil { - return "", fmt.Errorf("failed to read the IBC shielding transfer file: %v", err) - } - - return string(shieldingTransfer), nil -} - -// Get the current block height. -func (c *NamadaChain) Height(ctx context.Context) (int64, error) { - return c.getNode().Height(ctx) -} - -// Get the balance with the key alias, not the address. -func (c *NamadaChain) GetBalance(ctx context.Context, keyName string, denom string) (math.Int, error) { - if strings.HasPrefix(keyName, "shielded") { - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "shielded-sync", - "--viewing-keys", - keyName, - "--node", - c.GetRPCAddress(), - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return math.NewInt(0), fmt.Errorf("shielded-sync failed: error %s, output %s", err, output) - } - } - - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "balance", - "--token", - denom, - "--owner", - keyName, - "--node", - c.GetRPCAddress(), - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return math.NewInt(0), fmt.Errorf("getting the balance failed: error %s, output %s", err, output) - } - outputStr := string(output) - lines := strings.Split(outputStr, "\n") - // Parse the balance from the output like `nam: 1000.000000` - re := regexp.MustCompile(`:\s*(\d+(\.\d+)?)$`) - - ret := math.NewInt(0) - for _, line := range lines { - if strings.Contains(line, "Last committed masp epoch") { - continue - } - - matches := re.FindStringSubmatch(line) - if len(matches) > 1 { - amount, err := strconv.ParseFloat(matches[1], 64) - if err != nil { - return math.NewInt(0), fmt.Errorf("parsing the amount failed: %s", outputStr) - } - var multiplier float64 - if denom == c.Config().Denom { - multiplier = stdmath.Pow(10, float64(*c.Config().CoinDecimals)) - } else { - // IBC token denom is always zero - multiplier = 1.0 - } - // the result should be an integer - ret = math.NewInt(int64(amount * multiplier)) - } - } - - return ret, err -} - -// Get the gas fees. -func (c *NamadaChain) GetGasFeesInNativeDenom(gasPaid int64) int64 { - panic("implement me") -} - -// All acks at the height. -func (c *NamadaChain) Acknowledgements(ctx context.Context, height int64) ([]ibc.PacketAcknowledgement, error) { - panic("implement me") -} - -// All timeouts at the height. -func (c *NamadaChain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketTimeout, error) { - panic("implement me") -} - -// Build a Namada wallet. Generates a spending key when the keyName prefixed with "shielded". -func (c *NamadaChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error) { - if mnemonic != "" { - if err := c.RecoverKey(ctx, keyName, mnemonic); err != nil { - return nil, fmt.Errorf("failed to recover key with name %q on chain %s: %w", keyName, c.cfg.Name, err) - } - - addrBytes, err := c.GetAddress(ctx, keyName) - if err != nil { - return nil, fmt.Errorf("failed to get account address for key %q on chain %s: %w", keyName, c.cfg.Name, err) - } - - return NewWallet(keyName, addrBytes, mnemonic, c.cfg), nil - } - - if !c.isRunning { - return c.createGenesisKey(ctx, keyName) - } else { - return c.createKeyAndMnemonic(ctx, keyName, strings.HasPrefix(keyName, "shielded")) - } -} - -// Build a Namada wallet for a relayer. -func (c *NamadaChain) BuildRelayerWallet(ctx context.Context, keyName string) (ibc.Wallet, error) { - return c.createKeyAndMnemonic(ctx, keyName, false) -} - -// Create an established account key for genesis. -func (c *NamadaChain) createGenesisKey(ctx context.Context, keyName string) (ibc.Wallet, error) { - alias := fmt.Sprintf("%s-key", keyName) - _, err := c.createKeyAndMnemonic(ctx, alias, false) - if err != nil { - return &NamadaWallet{}, err - } - - transactionPath := filepath.Join(c.HomeDir(), fmt.Sprintf("established-account-tx-%s.toml", keyName)) - address, err := c.initGenesisEstablishedAccount(ctx, alias, transactionPath) - if err != nil { - return &NamadaWallet{}, err - } - - if err := c.addAddress(ctx, keyName, address); err != nil { - return &NamadaWallet{}, err - } - - return NewWallet(keyName, []byte(address), "", c.cfg), nil -} - -func (c *NamadaChain) createKeyAndMnemonic(ctx context.Context, keyName string, isShielded bool) (ibc.Wallet, error) { - cmd := []string{ - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "gen", - "--alias", - keyName, - "--unsafe-dont-encrypt", - } - if isShielded && !c.isRunning { - return nil, fmt.Errorf("generating a shielded account in pre-genesis is not allowed in this test") - } - if isShielded { - cmd = append(cmd, "--shielded") - } - if !c.isRunning { - cmd = append(cmd, "--pre-genesis") - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return nil, fmt.Errorf("failed to generate an account for key %q on chain %s: %w", keyName, c.cfg.Name, err) - } - outputStr := string(output) - re := regexp.MustCompile(`[a-z]+(?:\s+[a-z]+){23}`) - mnemonic := re.FindString(outputStr) - - addrBytes, err := c.GetAddress(ctx, keyName) - if err != nil { - return nil, fmt.Errorf("failed to get account address for key %q on chain %s: %w", keyName, c.cfg.Name, err) - } - - wallet := NewWallet(keyName, addrBytes, mnemonic, c.Config()) - - // Generate a payment address - if isShielded { - cmd = []string{ - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "gen-payment-addr", - "--alias", - wallet.PaymentAddressKeyName(), - "--key", - keyName, - } - if !c.isRunning { - cmd = append(cmd, "--pre-genesis") - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return nil, fmt.Errorf("failed to generate a payment address for key %q on chain %s: %w", keyName, c.Config().Name, err) - } - - addrBytes, err := c.GetAddress(ctx, wallet.PaymentAddressKeyName()) - if err != nil { - return nil, fmt.Errorf("failed to get account address for key %q on chain %s: %w", keyName, c.cfg.Name, err) - } - // replace the address with the payment address - wallet = NewWallet(keyName, addrBytes, mnemonic, c.Config()) - } - - return wallet, nil -} - -func (c *NamadaChain) addAddress(ctx context.Context, keyName, address string) error { - cmd := []string{ - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "add", - "--alias", - keyName, - "--value", - address, - } - if !c.isRunning { - cmd = append(cmd, "--pre-genesis") - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("address couldn't be added: %v", err) - } - - return nil -} - -func (c *NamadaChain) downloadTemplates(ctx context.Context) error { - baseURL := fmt.Sprintf("https://raw.githubusercontent.com/anoma/namada/%s/genesis/localnet", c.Config().Images[0].Version) - files := []string{ - "parameters.toml", - "tokens.toml", - "validity-predicates.toml", - } - destDir := "templates" - - for _, file := range files { - url := fmt.Sprintf("%s/%s", baseURL, file) - req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) - if err != nil { - return fmt.Errorf("failed to download the file %s: %w", file, err) - } - resp, err := (&http.Client{}).Do(req) - if err != nil { - return fmt.Errorf("failed to download the file %s: %w", file, err) - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return fmt.Errorf("failed to download the file %s: %d", file, resp.StatusCode) - } - - var buf bytes.Buffer - if _, err := io.Copy(&buf, resp.Body); err != nil { - return fmt.Errorf("failed to read the file: %w", err) - } - err = c.getNode().writeFile(ctx, filepath.Join(destDir, file), buf.Bytes()) - if err != nil { - return fmt.Errorf("failed to write the file %s: %w", file, err) - } - } - - return nil -} - -func (c *NamadaChain) downloadWasms(ctx context.Context) error { - url := fmt.Sprintf("https://github.com/anoma/namada/releases/download/%s/namada-%s-Linux-x86_64.tar.gz", c.Config().Images[0].Version, c.Config().Images[0].Version) - - req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) - if err != nil { - return fmt.Errorf("failed to download the release file: %w", err) - } - resp, err := (&http.Client{}).Do(req) - if err != nil { - return fmt.Errorf("failed to download the release file: %w", err) - } - defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - return fmt.Errorf("failed to download the release file: %d", resp.StatusCode) - } - filePath := "release.tar.gz" - file, err := os.Create(filePath) - if err != nil { - return fmt.Errorf("failed to open the release file: %w", err) - } - defer file.Close() - _, err = io.Copy(file, resp.Body) - if err != nil { - return fmt.Errorf("failed to write the release file: %w", err) - } - - file, err = os.Open(filePath) - if err != nil { - return fmt.Errorf("failed to open the release file: %w", err) - } - defer file.Close() - gzr, err := gzip.NewReader(file) - if err != nil { - return fmt.Errorf("failed to create gzip reader: %w", err) - } - defer gzr.Close() - - tr := tar.NewReader(gzr) - - destDir := "wasm" - for { - header, err := tr.Next() - if err == io.EOF { - break - } - if err != nil { - return fmt.Errorf("failed to read tar file: %w", err) - } - - if header.Typeflag == tar.TypeReg { - if strings.HasSuffix(header.Name, ".wasm") || strings.HasSuffix(header.Name, ".json") { - var buf bytes.Buffer - limitedReader := io.LimitReader(tr, 10*1024*1024) - if _, err := io.Copy(&buf, limitedReader); err != nil { - return fmt.Errorf("failed to read the file: %w", err) - } - fileName := filepath.Base(header.Name) - err = c.getNode().writeFile(ctx, filepath.Join(destDir, fileName), buf.Bytes()) - if err != nil { - return fmt.Errorf("failed to write the file: %w", err) - } - } - } - } - - err = os.Remove(filePath) - if err != nil { - return fmt.Errorf("failed to delete the release file: %v", err) - } - - return nil -} - -func (c *NamadaChain) setValidators(ctx context.Context) error { - transactionPath := filepath.Join(c.HomeDir(), "transactions.toml") - destTransactionsPath := filepath.Join(c.HomeDir(), "templates", "transactions.toml") - cmd := []string{ - "touch", - destTransactionsPath, - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("making transactions.toml failed: %v", err) - } - - for i := 0; i < c.NumValidators; i++ { - alias := fmt.Sprintf("validator-%d-balance-key", i) - validatorAlias := fmt.Sprintf("validator-%d", i) - - // Generate a validator key - cmd := []string{ - c.cfg.Bin, - "wallet", - "--base-dir", - c.HomeDir(), - "--pre-genesis", - "gen", - "--alias", - alias, - "--unsafe-dont-encrypt", - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("validator key couldn't be generated: %v", err) - } - - // Initialize an established account of the validator - validatorAddress, err := c.initGenesisEstablishedAccount(ctx, alias, transactionPath) - if err != nil { - return err - } - - // Add the validator address - if err := c.addAddress(ctx, validatorAlias, validatorAddress); err != nil { - return fmt.Errorf("validator address couldn't be added: %v", err) - } - - netAddress, err := c.Validators[i].netAddress(ctx) - if err != nil { - return err - } - - // Initialize a genesis validator - cmd = []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "utils", - "init-genesis-validator", - "--alias", - validatorAlias, - "--address", - validatorAddress, - "--path", - transactionPath, - "--net-address", - netAddress, - "--commission-rate", - "0.05", - "--max-commission-rate-change", - "0.01", - "--email", - "null@null.net", - "--self-bond-amount", - "100000", - "--unsafe-dont-encrypt", - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("initializing a genesis validator failed: %v, %s", err, output) - } - - cmd = []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "utils", - "sign-genesis-txs", - "--alias", - validatorAlias, - "--path", - transactionPath, - "--output", - transactionPath, - } - _, _, err = c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("signing genesis transactions failed: %v", err) - } - - cmd = []string{ - "sh", - "-c", - fmt.Sprintf(`cat %s >> %s`, transactionPath, destTransactionsPath), - } - _, _, err = c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("appending the transaction failed: %v", err) - } - } - - return nil -} - -func (c *NamadaChain) initAccounts(ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error { - templateDir := filepath.Join(c.HomeDir(), "templates") - balancePath := filepath.Join(templateDir, "balances.toml") - - // Initialize balances.toml - cmd := []string{ - "sh", - "-c", - fmt.Sprintf(`echo [token.NAM] > %s`, balancePath), - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("initializing balances.toml failed: %v", err) - } - - // for validators - for i := 0; i < c.NumValidators; i++ { - addr, err := c.GetAddress(ctx, fmt.Sprintf("validator-%d", i)) - if err != nil { - return err - } - line := fmt.Sprintf(`%s = "2000000"`, string(addr)) - cmd := []string{ - "sh", - "-c", - fmt.Sprintf(`echo '%s' >> %s`, line, balancePath), - } - _, _, err = c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("appending the balance to balances.toml failed: %v", err) - } - } - - // for a gas payer - gasPayer, err := c.createKeyAndMnemonic(ctx, gasPayerAlias, false) - if err != nil { - return err - } - gasPayerAmount := ibc.WalletAmount{ - Address: gasPayer.FormattedAddress(), - Denom: c.Config().Denom, - Amount: math.NewInt(1000000000), - } - additionalGenesisWallets = append(additionalGenesisWallets, gasPayerAmount) - - for _, wallet := range additionalGenesisWallets { - line := fmt.Sprintf(`%s = "%s"`, wallet.Address, wallet.Amount) - cmd := []string{ - "sh", - "-c", - fmt.Sprintf(`echo '%s' >> %s`, line, balancePath), - } - _, _, err = c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("appending the balance to balances.toml failed: %v", err) - } - // Add the key balance - alias, err := c.getAlias(ctx, wallet.Address) - if err != nil { - return err - } - keyAddress, err := c.GetAddress(ctx, fmt.Sprintf("%s-key", alias)) - if err != nil { - // skip when the account is implicit - continue - } - line = fmt.Sprintf(`%s = "%s"`, keyAddress, wallet.Amount) - cmd = []string{ - "sh", - "-c", - fmt.Sprintf(`echo '%s' >> %s`, line, balancePath), - } - _, _, err = c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("appending the balance to balances.toml failed: %v", err) - } - } - destTransactionsPath := filepath.Join(templateDir, "transactions.toml") - cmd = []string{ - "sh", - "-c", - fmt.Sprintf("find %s -name 'established-account-tx-*.toml' -exec cat {} + >> %s", c.HomeDir(), destTransactionsPath), - } - _, _, err = c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("appending establish account tx: %w", err) - } - - return nil -} - -func (c *NamadaChain) initGenesisEstablishedAccount(ctx context.Context, keyName, transactionPath string) (string, error) { - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "utils", - "init-genesis-established-account", - "--aliases", - keyName, - "--path", - transactionPath, - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return "", fmt.Errorf("initializing a validator account failed: %v", err) - } - outputStr := string(output) - // Trim ANSI escape sequence - ansiRegex := regexp.MustCompile(`\x1b\[[0-9;]*m`) - outputStr = ansiRegex.ReplaceAllString(outputStr, "") - re := regexp.MustCompile(`Derived established account address: (\S+)`) - matches := re.FindStringSubmatch(outputStr) - if len(matches) < 2 { - return "", fmt.Errorf("no established account address found: %s", outputStr) - } - addr := matches[1] - - return addr, nil -} - -func (c *NamadaChain) updateParameters(ctx context.Context) error { - templateDir := filepath.Join(c.HomeDir(), "templates") - paramPath := filepath.Join(templateDir, "parameters.toml") - - cmd := []string{ - "sed", - "-i", - // for enough trusting period - "-e", - "s/epochs_per_year = [0-9_]\\+/epochs_per_year = 365/", - // delete steward addresses - "-e", - "s/\"tnam.*//", - // IBC mint limit - "-e", - "s/default_mint_limit = \"[0-9]\\+\"/default_mint_limit = \"1000000000000\"/", - // IBC throughput limit - "-e", - "s/default_per_epoch_throughput_limit = \"[0-9]\\+\"/default_per_epoch_throughput_limit = \"1000000000000\"/", - paramPath, - } - _, _, err := c.Exec(ctx, cmd, c.Config().Env) - return err -} - -func (c *NamadaChain) initNetwork(ctx context.Context) error { - templatesDir := filepath.Join(c.HomeDir(), "templates") - wasmDir := filepath.Join(c.HomeDir(), "wasm") - checksumsPath := filepath.Join(wasmDir, "checksums.json") - genesisTime := time.Now().UTC().Format("2006-01-02T15:04:05.000000000-07:00") - cmd := []string{ - c.cfg.Bin, - "client", - "--base-dir", - c.HomeDir(), - "utils", - "init-network", - "--templates-path", - templatesDir, - "--chain-prefix", - "namada-test", - "--wasm-checksums-path", - checksumsPath, - "--wasm-dir", - wasmDir, - "--genesis-time", - genesisTime, - "--archive-dir", - c.HomeDir(), - } - output, _, err := c.Exec(ctx, cmd, c.Config().Env) - if err != nil { - return fmt.Errorf("init-network failed: %v", err) - } - outputStr := string(output) - - re := regexp.MustCompile(`Derived chain ID: (\S+)`) - matches := re.FindStringSubmatch(outputStr) - if len(matches) < 2 { - return fmt.Errorf("no chain ID: %s", outputStr) - } - c.cfg.ChainID = matches[1] - - return nil -} - -func (c *NamadaChain) copyGenesisFiles(ctx context.Context, n *NamadaNode) error { - archivePath := fmt.Sprintf("%s.tar.gz", c.Config().ChainID) - content, err := c.getNode().ReadFile(ctx, archivePath) - if err != nil { - return fmt.Errorf("failed to read the archive file: %w", err) - } - - err = n.writeFile(ctx, archivePath, content) - if err != nil { - return fmt.Errorf("failed to write the archive file: %w", err) - } - - walletPath := filepath.Join("pre-genesis", "wallet.toml") - content, err = c.getNode().ReadFile(ctx, walletPath) - if err != nil { - return fmt.Errorf("failed to read the wallet file: %w", err) - } - err = n.writeFile(ctx, "wallet.toml", content) - if err != nil { - return fmt.Errorf("failed to write the wallet file: %w", err) - } - - if n.Validator { - validatorAlias := fmt.Sprintf("validator-%d", n.Index) - validatorWalletPath := filepath.Join("pre-genesis", validatorAlias, "validator-wallet.toml") - content, err = c.getNode().ReadFile(ctx, validatorWalletPath) - if err != nil { - return fmt.Errorf("failed to read the validator wallet file: %w", err) - } - err = n.writeFile(ctx, validatorWalletPath, content) - if err != nil { - return fmt.Errorf("failed to write the validator wallet file: %w", err) - } - } - - return nil -} diff --git a/chain/namada/namada_node.go b/chain/namada/namada_node.go deleted file mode 100644 index bfbf8fc7..00000000 --- a/chain/namada/namada_node.go +++ /dev/null @@ -1,333 +0,0 @@ -package namada - -import ( - "context" - "fmt" - "net" - "path/filepath" - "strings" - "time" - - "github.com/avast/retry-go/v4" - dockernetwork "github.com/docker/docker/api/types/network" - volumetypes "github.com/docker/docker/api/types/volume" - dockerclient "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - // To use a legacy tendermint client. - rpcclient "github.com/tendermint/tendermint/rpc/client" - rpchttp "github.com/tendermint/tendermint/rpc/client/http" - libclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" - "go.uber.org/zap" - - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" -) - -type NamadaNode struct { - Index int - Validator bool - TestName string - Chain ibc.Chain - DockerClient *dockerclient.Client - Client rpcclient.Client - Image ibc.DockerImage - VolumeName string - NetworkID string - - log *zap.Logger - - containerLifecycle *dockerutil.ContainerLifecycle - - // Ports set during StartContainer. - hostP2PPort string - hostRPCPort string -} - -// Collection of NamadaNode. -type NamadaNodes []*NamadaNode - -const ( - p2pPort = "26656/tcp" - rpcPort = "26657/tcp" -) - -func NewNamadaNode( - ctx context.Context, - log *zap.Logger, - chain *NamadaChain, - index int, - validator bool, - testName string, - dockerClient *dockerclient.Client, - networkID string, - image ibc.DockerImage, -) (*NamadaNode, error) { - nn := &NamadaNode{ - Index: index, - Validator: validator, - TestName: testName, - Chain: chain, - DockerClient: dockerClient, - Image: image, - NetworkID: networkID, - - log: log.With( - zap.Bool("validator", validator), - zap.Int("i", index), - ), - } - - nn.containerLifecycle = dockerutil.NewContainerLifecycle(log, dockerClient, nn.Name()) - - nv, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - dockerutil.NodeOwnerLabel: nn.Name(), - }, - }) - if err != nil { - return nil, fmt.Errorf("creating namada volume: %w", err) - } - - nn.VolumeName = nv.Name - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: log, - - Client: dockerClient, - - VolumeName: nn.VolumeName, - ImageRef: nn.Image.Ref(), - TestName: nn.TestName, - UidGid: image.UIDGID, - }); err != nil { - return nil, fmt.Errorf("set namada volume owner: %w", err) - } - - return nn, nil -} - -func (n *NamadaNode) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) { - job := dockerutil.NewImage(n.logger(), n.DockerClient, n.NetworkID, n.TestName, n.Image.Repository, n.Image.Version) - opts := dockerutil.ContainerOptions{ - Env: env, - Binds: n.Bind(), - } - res := job.Run(ctx, cmd, opts) - return res.Stdout, res.Stderr, res.Err -} - -func (n *NamadaNode) logger() *zap.Logger { - return n.log.With( - zap.String("chain_id", n.Chain.Config().ChainID), - zap.String("test", n.TestName), - ) -} - -// Name of the test node container. -func (n *NamadaNode) Name() string { - return fmt.Sprintf("%s-%s-%d-%s", n.Chain.Config().ChainID, n.NodeType(), n.Index, n.TestName) -} - -func (n *NamadaNode) HostName() string { - return dockerutil.CondenseHostName(n.Name()) -} - -func (n *NamadaNode) Bind() []string { - return []string{fmt.Sprintf("%s:%s", n.VolumeName, n.HomeDir())} -} - -// Home directory in the Docker filesystem. -func (n *NamadaNode) HomeDir() string { - return "/home/namada" -} - -func (n *NamadaNode) NodeType() string { - nodeType := "fn" - if n.Validator { - nodeType = "val" - } - return nodeType -} - -func (n *NamadaNode) NewRPCClient(addr string) error { - httpClient, err := libclient.DefaultHTTPClient(addr) - if err != nil { - return err - } - - httpClient.Timeout = 10 * time.Second - rpcClient, err := rpchttp.NewWithClient(addr, "/websocket", httpClient) - if err != nil { - return err - } - - n.Client = rpcClient - return nil -} - -func (n *NamadaNode) Height(ctx context.Context) (int64, error) { - stat, err := n.Client.Status(ctx) - if err != nil { - return 0, fmt.Errorf("tendermint client status: %w", err) - } - return stat.SyncInfo.LatestBlockHeight, nil -} - -func (n *NamadaNode) CreateContainer(ctx context.Context) error { - setConfigDir := fmt.Sprintf("NAMADA_NETWORK_CONFIGS_DIR=%s", n.HomeDir()) - - joinNetworkCmd := fmt.Sprintf(`%s %s client --base-dir %s utils join-network --add-persistent-peers --chain-id %s --allow-duplicate-ip`, setConfigDir, n.Chain.Config().Bin, n.HomeDir(), n.Chain.Config().ChainID) - if n.Validator { - joinNetworkCmd += " --genesis-validator " + fmt.Sprintf("validator-%d", n.Index) - } - - mvCmd := "echo 'starting a validator node'" - if !n.Validator { - baseDir := fmt.Sprintf("%s/%s", n.HomeDir(), n.Chain.Config().ChainID) - mvCmd = fmt.Sprintf(`mv %s/wallet.toml %s && sed -i 's/127.0.0.1:26657/0.0.0.0:26657/g' %s/config.toml`, n.HomeDir(), baseDir, baseDir) - } - - ledgerCmd := fmt.Sprintf(`%s node --base-dir %s ledger`, n.Chain.Config().Bin, n.HomeDir()) - - cmd := []string{ - "sh", - "-c", - fmt.Sprintf(`%s && %s && %s`, joinNetworkCmd, mvCmd, ledgerCmd), - } - - exposedPorts := nat.PortMap{ - nat.Port(p2pPort): {}, - nat.Port(rpcPort): {}, - } - - netAddr, err := n.netAddress(ctx) - if err != nil { - return err - } - ipAddr := strings.Split(netAddr, ":")[0] - return n.containerLifecycle.CreateContainer(ctx, n.TestName, n.NetworkID, n.Image, exposedPorts, ipAddr, n.Bind(), nil, n.HostName(), cmd, n.Chain.Config().Env, []string{}) -} - -func (n *NamadaNode) StartContainer(ctx context.Context) error { - if err := n.containerLifecycle.StartContainer(ctx); err != nil { - return err - } - - hostPorts, err := n.containerLifecycle.GetHostPorts(ctx, p2pPort, rpcPort) - if err != nil { - return err - } - rpcPort := hostPorts[1] - err = n.NewRPCClient(fmt.Sprintf("tcp://%s", rpcPort)) - if err != nil { - return err - } - - n.hostP2PPort, n.hostRPCPort = hostPorts[0], hostPorts[1] - - time.Sleep(5 * time.Second) - err = n.WaitMaspFileDownload(ctx) - if err != nil { - return fmt.Errorf("failed to download MASP files: %v", err) - } - - return retry.Do(func() error { - stat, err := n.Client.Status(ctx) - if err != nil { - return err - } - if stat != nil && stat.SyncInfo.CatchingUp { - return fmt.Errorf("still catching up: height(%d) catching-up(%t)", - stat.SyncInfo.LatestBlockHeight, stat.SyncInfo.CatchingUp) - } - return nil - }, retry.Context(ctx), retry.DelayType(retry.BackOffDelay)) -} - -func (n *NamadaNode) WaitMaspFileDownload(ctx context.Context) error { - maspDir := ".masp-params" - requiredFiles := []string{ - "masp-spend.params", - "masp-output.params", - "masp-convert.params", - } - - fr := dockerutil.NewFileRetriever(n.logger(), n.DockerClient, n.TestName) - for _, file := range requiredFiles { - relPath := filepath.Join(maspDir, file) - timeout := 5 * time.Minute - timeoutChan := time.After(timeout) - size := -1 - completed := false - for !completed { - select { - case <-timeoutChan: - return fmt.Errorf("downloading masp files isn't completed") - default: - f, err := fr.SingleFileContent(ctx, n.VolumeName, relPath) - if err != nil { - time.Sleep(2 * time.Second) - continue - } - if size != len(f) { - size = len(f) - time.Sleep(2 * time.Second) - continue - } - completed = true - } - } - } - - return nil -} - -func (n *NamadaNode) netAddress(ctx context.Context) (string, error) { - var index int - if n.Validator { - index = n.Index + 128 - } else { - index = n.Index + 192 - } - networkResource, err := n.DockerClient.NetworkInspect(ctx, n.NetworkID, dockernetwork.InspectOptions{}) - if err != nil { - return "", fmt.Errorf("failed to get the network resource: %v", err) - } - for _, config := range networkResource.IPAM.Config { - if config.Subnet != "" { - ip, ipNet, err := net.ParseCIDR(config.Subnet) - if err != nil { - return "", fmt.Errorf("failed to parse the subnet: %v", err) - } - - ip = ip.To4() - if ip == nil { - return "", fmt.Errorf("subnet is not IPv4") - } - - ones, bits := ipNet.Mask.Size() - if index < 0 || index >= 1< 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NonVerifiableKeyValueResponse) Marshal() (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 *NonVerifiableKeyValueResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NonVerifiableKeyValueResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCnidarium(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NonVerifiableKeyValueResponse_Value) Marshal() (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 *NonVerifiableKeyValueResponse_Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NonVerifiableKeyValueResponse_Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *KeyValueRequest) Marshal() (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 *KeyValueRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proof { - i-- - if m.Proof { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *KeyValueResponse) Marshal() (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 *KeyValueResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValueResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCnidarium(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCnidarium(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *KeyValueResponse_Value) Marshal() (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 *KeyValueResponse_Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValueResponse_Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PrefixValueRequest) Marshal() (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 *PrefixValueRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PrefixValueRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Prefix) > 0 { - i -= len(m.Prefix) - copy(dAtA[i:], m.Prefix) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Prefix))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *PrefixValueResponse) Marshal() (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 *PrefixValueResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PrefixValueResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchRequest) Marshal() (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 *WatchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NvKeyRegex) > 0 { - i -= len(m.NvKeyRegex) - copy(dAtA[i:], m.NvKeyRegex) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.NvKeyRegex))) - i-- - dAtA[i] = 0x12 - } - if len(m.KeyRegex) > 0 { - i -= len(m.KeyRegex) - copy(dAtA[i:], m.KeyRegex) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.KeyRegex))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchResponse) Marshal() (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 *WatchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Entry != nil { - { - size := m.Entry.Size() - i -= size - if _, err := m.Entry.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Version != 0 { - i = encodeVarintCnidarium(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *WatchResponse_Kv) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchResponse_Kv) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Kv != nil { - { - size, err := m.Kv.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCnidarium(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *WatchResponse_NvKv) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchResponse_NvKv) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.NvKv != nil { - { - size, err := m.NvKv.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCnidarium(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *WatchResponse_KeyValue) Marshal() (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 *WatchResponse_KeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchResponse_KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Deleted { - i-- - if m.Deleted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchResponse_NvKeyValue) Marshal() (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 *WatchResponse_NvKeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchResponse_NvKeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Deleted { - i-- - if m.Deleted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCnidarium(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCnidarium(dAtA []byte, offset int, v uint64) int { - offset -= sovCnidarium(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *NonVerifiableKeyValueRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != nil { - l = m.Key.Size() - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *NonVerifiableKeyValueRequest_Key) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *NonVerifiableKeyValueResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *NonVerifiableKeyValueResponse_Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *KeyValueRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - if m.Proof { - n += 2 - } - return n -} - -func (m *KeyValueResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovCnidarium(uint64(l)) - } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *KeyValueResponse_Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *PrefixValueRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Prefix) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *PrefixValueResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *WatchRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.KeyRegex) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - l = len(m.NvKeyRegex) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} - -func (m *WatchResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCnidarium(uint64(m.Version)) - } - if m.Entry != nil { - n += m.Entry.Size() - } - return n -} - -func (m *WatchResponse_Kv) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Kv != nil { - l = m.Kv.Size() - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} -func (m *WatchResponse_NvKv) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NvKv != nil { - l = m.NvKv.Size() - n += 1 + l + sovCnidarium(uint64(l)) - } - return n -} -func (m *WatchResponse_KeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - if m.Deleted { - n += 2 - } - return n -} - -func (m *WatchResponse_NvKeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovCnidarium(uint64(l)) - } - if m.Deleted { - n += 2 - } - return n -} - -func sovCnidarium(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCnidarium(x uint64) (n int) { - return sovCnidarium(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *NonVerifiableKeyValueRequest) 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 ErrIntOverflowCnidarium - } - 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: NonVerifiableKeyValueRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NonVerifiableKeyValueRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Key == nil { - m.Key = &NonVerifiableKeyValueRequest_Key{} - } - if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NonVerifiableKeyValueRequest_Key) 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 ErrIntOverflowCnidarium - } - 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: Key: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Key: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NonVerifiableKeyValueResponse) 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 ErrIntOverflowCnidarium - } - 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: NonVerifiableKeyValueResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NonVerifiableKeyValueResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &NonVerifiableKeyValueResponse_Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NonVerifiableKeyValueResponse_Value) 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 ErrIntOverflowCnidarium - } - 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: Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValueRequest) 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 ErrIntOverflowCnidarium - } - 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: KeyValueRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValueRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Proof = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValueResponse) 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 ErrIntOverflowCnidarium - } - 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: KeyValueResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValueResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &KeyValueResponse_Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &types.MerkleProof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValueResponse_Value) 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 ErrIntOverflowCnidarium - } - 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: Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PrefixValueRequest) 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 ErrIntOverflowCnidarium - } - 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: PrefixValueRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PrefixValueRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PrefixValueResponse) 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 ErrIntOverflowCnidarium - } - 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: PrefixValueResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PrefixValueResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchRequest) 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 ErrIntOverflowCnidarium - } - 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: WatchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyRegex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyRegex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NvKeyRegex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NvKeyRegex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchResponse) 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 ErrIntOverflowCnidarium - } - 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: WatchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kv", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WatchResponse_KeyValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Entry = &WatchResponse_Kv{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NvKv", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WatchResponse_NvKeyValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Entry = &WatchResponse_NvKv{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchResponse_KeyValue) 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 ErrIntOverflowCnidarium - } - 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: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deleted = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchResponse_NvKeyValue) 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 ErrIntOverflowCnidarium - } - 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: NvKeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NvKeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCnidarium - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCnidarium - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCnidarium - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deleted = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCnidarium(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCnidarium - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCnidarium(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCnidarium - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCnidarium - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCnidarium - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCnidarium - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCnidarium - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCnidarium - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCnidarium = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCnidarium = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCnidarium = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/app/v1/app.pb.go b/chain/penumbra/core/app/v1/app.pb.go deleted file mode 100644 index 79f98463..00000000 --- a/chain/penumbra/core/app/v1/app.pb.go +++ /dev/null @@ -1,3013 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/app/v1/app.proto - -package appv1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v111 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/auction/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/community_pool/v1" - v110 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/dex/v1" - v17 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/distributions/v1" - v16 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/fee/v1" - v18 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/funding/v1" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/governance/v1" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/ibc/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v19 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/shielded_pool/v1" - v15 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/stake/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/transaction/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Requests the list of all transactions that occurred within a given block. -type TransactionsByHeightRequest struct { - // The block height to retrieve. - BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` -} - -func (m *TransactionsByHeightRequest) Reset() { *m = TransactionsByHeightRequest{} } -func (m *TransactionsByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*TransactionsByHeightRequest) ProtoMessage() {} -func (*TransactionsByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cd5d94926a61eaaf, []int{0} -} -func (m *TransactionsByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionsByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionsByHeightRequest.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 *TransactionsByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionsByHeightRequest.Merge(m, src) -} -func (m *TransactionsByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *TransactionsByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionsByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionsByHeightRequest proto.InternalMessageInfo - -func (m *TransactionsByHeightRequest) GetBlockHeight() uint64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -// A transaction that appeared within a given block. -type TransactionsByHeightResponse struct { - // The transactions. - Transactions []*v1.Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` - // The block height. - BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` -} - -func (m *TransactionsByHeightResponse) Reset() { *m = TransactionsByHeightResponse{} } -func (m *TransactionsByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*TransactionsByHeightResponse) ProtoMessage() {} -func (*TransactionsByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cd5d94926a61eaaf, []int{1} -} -func (m *TransactionsByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionsByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionsByHeightResponse.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 *TransactionsByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionsByHeightResponse.Merge(m, src) -} -func (m *TransactionsByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *TransactionsByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionsByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionsByHeightResponse proto.InternalMessageInfo - -func (m *TransactionsByHeightResponse) GetTransactions() []*v1.Transaction { - if m != nil { - return m.Transactions - } - return nil -} - -func (m *TransactionsByHeightResponse) GetBlockHeight() uint64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -type AppParameters struct { - // The chain identifier. - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Sct module parameters. - SctParams *v11.SctParameters `protobuf:"bytes,2,opt,name=sct_params,json=sctParams,proto3" json:"sct_params,omitempty"` - // Community Pool module parameters. - CommunityPoolParams *v12.CommunityPoolParameters `protobuf:"bytes,3,opt,name=community_pool_params,json=communityPoolParams,proto3" json:"community_pool_params,omitempty"` - // Governance module parameters. - GovernanceParams *v13.GovernanceParameters `protobuf:"bytes,4,opt,name=governance_params,json=governanceParams,proto3" json:"governance_params,omitempty"` - // IBC module parameters. - IbcParams *v14.IbcParameters `protobuf:"bytes,5,opt,name=ibc_params,json=ibcParams,proto3" json:"ibc_params,omitempty"` - // Stake module parameters. - StakeParams *v15.StakeParameters `protobuf:"bytes,6,opt,name=stake_params,json=stakeParams,proto3" json:"stake_params,omitempty"` - // Fee module parameters. - FeeParams *v16.FeeParameters `protobuf:"bytes,7,opt,name=fee_params,json=feeParams,proto3" json:"fee_params,omitempty"` - // Distributions module parameters. - DistributionsParams *v17.DistributionsParameters `protobuf:"bytes,8,opt,name=distributions_params,json=distributionsParams,proto3" json:"distributions_params,omitempty"` - // Funding module parameters. - FundingParams *v18.FundingParameters `protobuf:"bytes,9,opt,name=funding_params,json=fundingParams,proto3" json:"funding_params,omitempty"` - // Shielded pool module parameters. - ShieldedPoolParams *v19.ShieldedPoolParameters `protobuf:"bytes,10,opt,name=shielded_pool_params,json=shieldedPoolParams,proto3" json:"shielded_pool_params,omitempty"` - // DEX module parameters. - DexParams *v110.DexParameters `protobuf:"bytes,11,opt,name=dex_params,json=dexParams,proto3" json:"dex_params,omitempty"` - // Auction module parameters. - AuctionParams *v111.AuctionParameters `protobuf:"bytes,12,opt,name=auction_params,json=auctionParams,proto3" json:"auction_params,omitempty"` -} - -func (m *AppParameters) Reset() { *m = AppParameters{} } -func (m *AppParameters) String() string { return proto.CompactTextString(m) } -func (*AppParameters) ProtoMessage() {} -func (*AppParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_cd5d94926a61eaaf, []int{2} -} -func (m *AppParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AppParameters.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 *AppParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppParameters.Merge(m, src) -} -func (m *AppParameters) XXX_Size() int { - return m.Size() -} -func (m *AppParameters) XXX_DiscardUnknown() { - xxx_messageInfo_AppParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_AppParameters proto.InternalMessageInfo - -func (m *AppParameters) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *AppParameters) GetSctParams() *v11.SctParameters { - if m != nil { - return m.SctParams - } - return nil -} - -func (m *AppParameters) GetCommunityPoolParams() *v12.CommunityPoolParameters { - if m != nil { - return m.CommunityPoolParams - } - return nil -} - -func (m *AppParameters) GetGovernanceParams() *v13.GovernanceParameters { - if m != nil { - return m.GovernanceParams - } - return nil -} - -func (m *AppParameters) GetIbcParams() *v14.IbcParameters { - if m != nil { - return m.IbcParams - } - return nil -} - -func (m *AppParameters) GetStakeParams() *v15.StakeParameters { - if m != nil { - return m.StakeParams - } - return nil -} - -func (m *AppParameters) GetFeeParams() *v16.FeeParameters { - if m != nil { - return m.FeeParams - } - return nil -} - -func (m *AppParameters) GetDistributionsParams() *v17.DistributionsParameters { - if m != nil { - return m.DistributionsParams - } - return nil -} - -func (m *AppParameters) GetFundingParams() *v18.FundingParameters { - if m != nil { - return m.FundingParams - } - return nil -} - -func (m *AppParameters) GetShieldedPoolParams() *v19.ShieldedPoolParameters { - if m != nil { - return m.ShieldedPoolParams - } - return nil -} - -func (m *AppParameters) GetDexParams() *v110.DexParameters { - if m != nil { - return m.DexParams - } - return nil -} - -func (m *AppParameters) GetAuctionParams() *v111.AuctionParameters { - if m != nil { - return m.AuctionParams - } - return nil -} - -// Requests the global configuration data for the app. -type AppParametersRequest struct { -} - -func (m *AppParametersRequest) Reset() { *m = AppParametersRequest{} } -func (m *AppParametersRequest) String() string { return proto.CompactTextString(m) } -func (*AppParametersRequest) ProtoMessage() {} -func (*AppParametersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cd5d94926a61eaaf, []int{3} -} -func (m *AppParametersRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppParametersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AppParametersRequest.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 *AppParametersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppParametersRequest.Merge(m, src) -} -func (m *AppParametersRequest) XXX_Size() int { - return m.Size() -} -func (m *AppParametersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AppParametersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AppParametersRequest proto.InternalMessageInfo - -type AppParametersResponse struct { - AppParameters *AppParameters `protobuf:"bytes,1,opt,name=app_parameters,json=appParameters,proto3" json:"app_parameters,omitempty"` -} - -func (m *AppParametersResponse) Reset() { *m = AppParametersResponse{} } -func (m *AppParametersResponse) String() string { return proto.CompactTextString(m) } -func (*AppParametersResponse) ProtoMessage() {} -func (*AppParametersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cd5d94926a61eaaf, []int{4} -} -func (m *AppParametersResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppParametersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AppParametersResponse.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 *AppParametersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppParametersResponse.Merge(m, src) -} -func (m *AppParametersResponse) XXX_Size() int { - return m.Size() -} -func (m *AppParametersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AppParametersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AppParametersResponse proto.InternalMessageInfo - -func (m *AppParametersResponse) GetAppParameters() *AppParameters { - if m != nil { - return m.AppParameters - } - return nil -} - -type GenesisAppState struct { - // Types that are valid to be assigned to GenesisAppState: - // *GenesisAppState_GenesisContent - // *GenesisAppState_GenesisCheckpoint - GenesisAppState isGenesisAppState_GenesisAppState `protobuf_oneof:"genesis_app_state"` -} - -func (m *GenesisAppState) Reset() { *m = GenesisAppState{} } -func (m *GenesisAppState) String() string { return proto.CompactTextString(m) } -func (*GenesisAppState) ProtoMessage() {} -func (*GenesisAppState) Descriptor() ([]byte, []int) { - return fileDescriptor_cd5d94926a61eaaf, []int{5} -} -func (m *GenesisAppState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisAppState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisAppState.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 *GenesisAppState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisAppState.Merge(m, src) -} -func (m *GenesisAppState) XXX_Size() int { - return m.Size() -} -func (m *GenesisAppState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisAppState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisAppState proto.InternalMessageInfo - -type isGenesisAppState_GenesisAppState interface { - isGenesisAppState_GenesisAppState() - MarshalTo([]byte) (int, error) - Size() int -} - -type GenesisAppState_GenesisContent struct { - GenesisContent *GenesisContent `protobuf:"bytes,1,opt,name=genesis_content,json=genesisContent,proto3,oneof" json:"genesis_content,omitempty"` -} -type GenesisAppState_GenesisCheckpoint struct { - GenesisCheckpoint []byte `protobuf:"bytes,2,opt,name=genesis_checkpoint,json=genesisCheckpoint,proto3,oneof" json:"genesis_checkpoint,omitempty"` -} - -func (*GenesisAppState_GenesisContent) isGenesisAppState_GenesisAppState() {} -func (*GenesisAppState_GenesisCheckpoint) isGenesisAppState_GenesisAppState() {} - -func (m *GenesisAppState) GetGenesisAppState() isGenesisAppState_GenesisAppState { - if m != nil { - return m.GenesisAppState - } - return nil -} - -func (m *GenesisAppState) GetGenesisContent() *GenesisContent { - if x, ok := m.GetGenesisAppState().(*GenesisAppState_GenesisContent); ok { - return x.GenesisContent - } - return nil -} - -func (m *GenesisAppState) GetGenesisCheckpoint() []byte { - if x, ok := m.GetGenesisAppState().(*GenesisAppState_GenesisCheckpoint); ok { - return x.GenesisCheckpoint - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*GenesisAppState) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*GenesisAppState_GenesisContent)(nil), - (*GenesisAppState_GenesisCheckpoint)(nil), - } -} - -type GenesisContent struct { - // The initial chain identifier. - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Stake module genesis state. - StakeContent *v15.GenesisContent `protobuf:"bytes,2,opt,name=stake_content,json=stakeContent,proto3" json:"stake_content,omitempty"` - // Shielded pool module genesis state. - ShieldedPoolContent *v19.GenesisContent `protobuf:"bytes,3,opt,name=shielded_pool_content,json=shieldedPoolContent,proto3" json:"shielded_pool_content,omitempty"` - // Governance module genesis state. - GovernanceContent *v13.GenesisContent `protobuf:"bytes,4,opt,name=governance_content,json=governanceContent,proto3" json:"governance_content,omitempty"` - // IBC module genesis state. - IbcContent *v14.GenesisContent `protobuf:"bytes,5,opt,name=ibc_content,json=ibcContent,proto3" json:"ibc_content,omitempty"` - // Sct module genesis state. - SctContent *v11.GenesisContent `protobuf:"bytes,6,opt,name=sct_content,json=sctContent,proto3" json:"sct_content,omitempty"` - // Community Pool module genesis state. - CommunityPoolContent *v12.GenesisContent `protobuf:"bytes,7,opt,name=community_pool_content,json=communityPoolContent,proto3" json:"community_pool_content,omitempty"` - // Fee module genesis state. - FeeContent *v16.GenesisContent `protobuf:"bytes,8,opt,name=fee_content,json=feeContent,proto3" json:"fee_content,omitempty"` - // Distributions module genesis state. - DistributionsContent *v17.GenesisContent `protobuf:"bytes,9,opt,name=distributions_content,json=distributionsContent,proto3" json:"distributions_content,omitempty"` - // Funding module genesis state. - FundingContent *v18.GenesisContent `protobuf:"bytes,10,opt,name=funding_content,json=fundingContent,proto3" json:"funding_content,omitempty"` - // DEX component genesis state. - DexContent *v110.GenesisContent `protobuf:"bytes,11,opt,name=dex_content,json=dexContent,proto3" json:"dex_content,omitempty"` - // Auction component genesis state. - AuctionContent *v111.GenesisContent `protobuf:"bytes,12,opt,name=auction_content,json=auctionContent,proto3" json:"auction_content,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_cd5d94926a61eaaf, []int{6} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *GenesisContent) GetStakeContent() *v15.GenesisContent { - if m != nil { - return m.StakeContent - } - return nil -} - -func (m *GenesisContent) GetShieldedPoolContent() *v19.GenesisContent { - if m != nil { - return m.ShieldedPoolContent - } - return nil -} - -func (m *GenesisContent) GetGovernanceContent() *v13.GenesisContent { - if m != nil { - return m.GovernanceContent - } - return nil -} - -func (m *GenesisContent) GetIbcContent() *v14.GenesisContent { - if m != nil { - return m.IbcContent - } - return nil -} - -func (m *GenesisContent) GetSctContent() *v11.GenesisContent { - if m != nil { - return m.SctContent - } - return nil -} - -func (m *GenesisContent) GetCommunityPoolContent() *v12.GenesisContent { - if m != nil { - return m.CommunityPoolContent - } - return nil -} - -func (m *GenesisContent) GetFeeContent() *v16.GenesisContent { - if m != nil { - return m.FeeContent - } - return nil -} - -func (m *GenesisContent) GetDistributionsContent() *v17.GenesisContent { - if m != nil { - return m.DistributionsContent - } - return nil -} - -func (m *GenesisContent) GetFundingContent() *v18.GenesisContent { - if m != nil { - return m.FundingContent - } - return nil -} - -func (m *GenesisContent) GetDexContent() *v110.GenesisContent { - if m != nil { - return m.DexContent - } - return nil -} - -func (m *GenesisContent) GetAuctionContent() *v111.GenesisContent { - if m != nil { - return m.AuctionContent - } - return nil -} - -func init() { - proto.RegisterType((*TransactionsByHeightRequest)(nil), "penumbra.core.app.v1.TransactionsByHeightRequest") - proto.RegisterType((*TransactionsByHeightResponse)(nil), "penumbra.core.app.v1.TransactionsByHeightResponse") - proto.RegisterType((*AppParameters)(nil), "penumbra.core.app.v1.AppParameters") - proto.RegisterType((*AppParametersRequest)(nil), "penumbra.core.app.v1.AppParametersRequest") - proto.RegisterType((*AppParametersResponse)(nil), "penumbra.core.app.v1.AppParametersResponse") - proto.RegisterType((*GenesisAppState)(nil), "penumbra.core.app.v1.GenesisAppState") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.app.v1.GenesisContent") -} - -func init() { proto.RegisterFile("penumbra/core/app/v1/app.proto", fileDescriptor_cd5d94926a61eaaf) } - -var fileDescriptor_cd5d94926a61eaaf = []byte{ - // 1200 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xba, 0x21, 0x75, 0xc6, 0x4e, 0x42, 0x37, 0x4e, 0x09, 0x01, 0x59, 0xc1, 0x70, 0x08, - 0x7f, 0xba, 0xdb, 0x35, 0x02, 0x15, 0x17, 0xa1, 0xda, 0x41, 0x24, 0x45, 0x54, 0x35, 0x4e, 0xc9, - 0x01, 0x22, 0x59, 0xeb, 0xd9, 0xb1, 0xbd, 0x8a, 0xbd, 0x3b, 0xec, 0x8c, 0x57, 0xc9, 0x81, 0x13, - 0x5f, 0xa0, 0x9f, 0x81, 0x13, 0xe2, 0xcc, 0x07, 0xe0, 0x88, 0x38, 0xf5, 0xc8, 0x11, 0x25, 0x37, - 0xbe, 0x00, 0x57, 0x34, 0xff, 0x9c, 0x99, 0x8d, 0xb7, 0x9b, 0x9e, 0x3c, 0xf3, 0xe6, 0xbd, 0xdf, - 0xef, 0xcd, 0x9b, 0xb7, 0xbf, 0x19, 0x83, 0x3a, 0x46, 0xd1, 0x6c, 0x3a, 0x48, 0x7c, 0x17, 0xc6, - 0x09, 0x72, 0x7d, 0x8c, 0xdd, 0xd4, 0x63, 0x3f, 0x0e, 0x4e, 0x62, 0x1a, 0xdb, 0x35, 0xb5, 0xee, - 0xb0, 0x75, 0x87, 0x2d, 0xa4, 0xde, 0xce, 0x7d, 0x33, 0x0a, 0xc6, 0x53, 0x1c, 0x47, 0x28, 0xa2, - 0xae, 0x3f, 0x83, 0x34, 0x8c, 0x23, 0x8e, 0x21, 0x86, 0x02, 0x67, 0xe7, 0x8b, 0xbc, 0x08, 0x18, - 0x4f, 0xa7, 0xb3, 0x28, 0xa4, 0xe7, 0x7d, 0x1c, 0xc7, 0x13, 0x16, 0x68, 0x5a, 0x64, 0xfc, 0x5e, - 0x5e, 0x7c, 0x80, 0xce, 0x58, 0x50, 0x80, 0xce, 0xa4, 0xe7, 0xe7, 0xb9, 0x9e, 0x21, 0xa1, 0x49, - 0x38, 0x98, 0xb1, 0xac, 0x08, 0x8f, 0xd1, 0x0d, 0x45, 0x3c, 0x43, 0x84, 0x58, 0xcc, 0x10, 0x21, - 0xe9, 0x99, 0x5b, 0x83, 0xe1, 0x2c, 0x0a, 0xc2, 0x68, 0xc4, 0xbd, 0xc5, 0x50, 0x46, 0x7c, 0x9a, - 0x17, 0x31, 0x8a, 0x53, 0x94, 0x44, 0x7e, 0x04, 0x39, 0xc5, 0xd5, 0xac, 0x28, 0xa7, 0x70, 0x00, - 0x59, 0x40, 0x38, 0x80, 0x45, 0x9e, 0x04, 0x52, 0xe6, 0x49, 0x20, 0x2d, 0xaa, 0x12, 0x19, 0x87, - 0x68, 0x12, 0xa0, 0x60, 0x7e, 0x1c, 0x86, 0x41, 0x46, 0x7f, 0x94, 0x1b, 0x4d, 0xfd, 0x53, 0xbe, - 0x09, 0x3e, 0x90, 0xde, 0x8e, 0xe9, 0x4d, 0x13, 0x3f, 0x22, 0xfe, 0xbc, 0x4f, 0xb4, 0xa9, 0xf0, - 0x6f, 0x3c, 0x02, 0x6f, 0x3d, 0xbb, 0x32, 0x92, 0xce, 0xf9, 0x21, 0x0a, 0x47, 0x63, 0xda, 0x43, - 0x3f, 0xce, 0x10, 0xa1, 0xf6, 0x3b, 0xa0, 0x3a, 0x98, 0xc4, 0xf0, 0xb4, 0x3f, 0xe6, 0xe6, 0xed, - 0xd2, 0xae, 0xb5, 0xb7, 0xdc, 0xab, 0x70, 0x9b, 0xf0, 0x6c, 0x3c, 0xb7, 0xc0, 0xdb, 0x8b, 0x21, - 0x08, 0x8e, 0x23, 0x82, 0xec, 0x27, 0xa0, 0xaa, 0xf1, 0x92, 0x6d, 0x6b, 0xf7, 0xd6, 0x5e, 0xa5, - 0xf9, 0xbe, 0x63, 0x76, 0xbb, 0x9e, 0x5a, 0xea, 0x39, 0x1a, 0x62, 0xcf, 0x08, 0xbf, 0x49, 0x4a, - 0x7f, 0x94, 0xc1, 0x5a, 0x1b, 0xe3, 0xae, 0x9f, 0xf8, 0x53, 0x44, 0x51, 0x42, 0xec, 0x37, 0x41, - 0x19, 0x8e, 0xfd, 0x30, 0xea, 0x87, 0xc1, 0xb6, 0xb5, 0x6b, 0xed, 0xad, 0xf6, 0x6e, 0xf3, 0xf9, - 0xe3, 0xc0, 0xfe, 0x06, 0x00, 0x02, 0x69, 0x1f, 0x33, 0x67, 0xc2, 0xd1, 0x2a, 0xcd, 0x7b, 0x99, - 0xe4, 0xe6, 0x45, 0x77, 0xd8, 0xa9, 0xa6, 0x9e, 0x73, 0x04, 0xe9, 0x15, 0x7a, 0x6f, 0x95, 0xc8, - 0x29, 0xb1, 0x53, 0xb0, 0x65, 0x7e, 0x53, 0x0a, 0xf8, 0x16, 0x07, 0xee, 0xe4, 0x02, 0x67, 0xbe, - 0xc4, 0xd4, 0x73, 0xf6, 0x95, 0xa5, 0x1b, 0xc7, 0x13, 0x8d, 0x6d, 0x13, 0x5e, 0x5b, 0x20, 0xf6, - 0x18, 0xdc, 0xb9, 0xea, 0x65, 0xc5, 0xb9, 0xcc, 0x39, 0x1f, 0xe6, 0x72, 0x6a, 0xdd, 0x9f, 0x7a, - 0xce, 0xc1, 0x7c, 0xa6, 0x91, 0xbd, 0x3e, 0x32, 0xad, 0x84, 0xd5, 0x2b, 0x1c, 0x40, 0x45, 0xf1, - 0x5a, 0x41, 0xbd, 0xd8, 0xf7, 0x92, 0x7a, 0xce, 0xe3, 0x01, 0xd4, 0xeb, 0x15, 0xca, 0x29, 0xb1, - 0x9f, 0x81, 0x2a, 0x6f, 0x5f, 0x85, 0xb7, 0xc2, 0xf1, 0xbc, 0xfc, 0xfa, 0xf3, 0x5e, 0x67, 0x27, - 0xc0, 0x06, 0x1a, 0x66, 0x85, 0xcc, 0x0d, 0x3c, 0xc7, 0x21, 0x9a, 0x63, 0xde, 0x2e, 0xc8, 0x91, - 0xe9, 0x4c, 0xea, 0x39, 0x5f, 0x21, 0x1d, 0x6f, 0x75, 0x88, 0x14, 0x1a, 0x05, 0x35, 0x43, 0xbe, - 0x14, 0x6e, 0x99, 0xe3, 0xb6, 0x73, 0x71, 0x4d, 0xcd, 0x4b, 0x3d, 0xe7, 0x4b, 0xdd, 0xa0, 0x9f, - 0x68, 0x70, 0x6d, 0x81, 0xd8, 0x27, 0x60, 0x5d, 0x4a, 0x9a, 0xe2, 0x5b, 0xe5, 0x7c, 0x9f, 0xe4, - 0xef, 0x43, 0x2a, 0x20, 0xdb, 0x8b, 0x18, 0x6a, 0x1c, 0x6b, 0x43, 0xcd, 0x44, 0xec, 0x04, 0xd4, - 0x0c, 0xb1, 0x51, 0x1c, 0x80, 0x73, 0x3c, 0xca, 0xaf, 0xbf, 0xa1, 0x50, 0xec, 0x1c, 0xa4, 0x21, - 0xd3, 0xa4, 0x36, 0xc9, 0xda, 0xf9, 0xa9, 0x04, 0xe8, 0x4c, 0x31, 0x55, 0x0a, 0x4e, 0x85, 0xdd, - 0x32, 0xac, 0x66, 0xe8, 0x4c, 0x3f, 0x95, 0x40, 0x4e, 0x79, 0x7d, 0xe4, 0xb5, 0xa7, 0x10, 0xab, - 0x05, 0xf5, 0x51, 0xb7, 0x64, 0xea, 0x39, 0x6d, 0x31, 0xd4, 0xeb, 0xe3, 0x6b, 0x26, 0xd2, 0xb8, - 0x0b, 0x6a, 0x86, 0x82, 0x48, 0x41, 0x6c, 0x40, 0xb0, 0x95, 0xb1, 0x4b, 0x95, 0xfb, 0x1a, 0xac, - 0xfb, 0x18, 0x8b, 0x54, 0xf8, 0x0a, 0xd7, 0x99, 0x4a, 0xf3, 0x5d, 0x67, 0xd1, 0xad, 0xee, 0x98, - 0x20, 0x6b, 0xbe, 0x3e, 0x6d, 0xfc, 0x6a, 0x81, 0x8d, 0x03, 0x14, 0x21, 0x12, 0x92, 0x36, 0xc6, - 0x47, 0xd4, 0xa7, 0xc8, 0x7e, 0x0a, 0x36, 0x46, 0xc2, 0xd4, 0x87, 0x71, 0x44, 0x51, 0x44, 0x25, - 0xc1, 0x7b, 0x8b, 0x09, 0x64, 0xfc, 0xbe, 0xf0, 0x3d, 0x5c, 0xea, 0xad, 0x8f, 0x0c, 0x8b, 0xed, - 0x02, 0x7b, 0x0e, 0x38, 0x46, 0xf0, 0x14, 0xc7, 0x61, 0x24, 0xd4, 0xb4, 0x7a, 0xb8, 0xd4, 0xbb, - 0xa3, 0xbc, 0xe7, 0x4b, 0x9d, 0x4d, 0xa0, 0x8c, 0x7d, 0xb6, 0x53, 0xc2, 0xd2, 0x6a, 0xfc, 0x5e, - 0x06, 0xeb, 0x26, 0xd5, 0xcb, 0xb4, 0xf6, 0x3b, 0xb0, 0x26, 0xbe, 0x76, 0xb5, 0x05, 0x21, 0xb7, - 0xf7, 0x8b, 0x3f, 0x77, 0x93, 0xa3, 0x27, 0x44, 0x43, 0x31, 0x4e, 0xc0, 0x96, 0xd9, 0xcc, 0x0a, - 0x5e, 0x88, 0xee, 0x83, 0x9b, 0x77, 0x73, 0x86, 0x66, 0x53, 0xef, 0x62, 0xc5, 0x16, 0x00, 0x5b, - 0x93, 0x5a, 0x45, 0xb5, 0x5c, 0xd0, 0x7c, 0x19, 0xad, 0x35, 0x79, 0x34, 0xed, 0x56, 0x2c, 0x4f, - 0x41, 0x85, 0xc9, 0xac, 0x82, 0x17, 0x3a, 0xeb, 0x14, 0xe9, 0x6c, 0x06, 0x97, 0x29, 0xb5, 0x06, - 0xc8, 0xee, 0x39, 0x05, 0xb8, 0x52, 0x00, 0x28, 0x2f, 0xba, 0x2c, 0x20, 0x81, 0x54, 0x01, 0xc6, - 0xe0, 0x6e, 0xe6, 0xaa, 0x53, 0xd8, 0x42, 0x70, 0x3f, 0x7b, 0x85, 0xbb, 0x2e, 0x43, 0x53, 0x33, - 0xae, 0x38, 0x6d, 0x07, 0x4c, 0xd5, 0x15, 0x4b, 0xb9, 0x60, 0x07, 0x52, 0xd6, 0xb3, 0x3b, 0x18, - 0xa2, 0x79, 0x8d, 0xa7, 0x60, 0xcb, 0x14, 0x76, 0x05, 0xbd, 0x5a, 0xd0, 0x37, 0xd7, 0x94, 0x3d, - 0x9b, 0xbf, 0xe1, 0xa0, 0xe8, 0x7e, 0x00, 0x1b, 0x4a, 0xd1, 0x15, 0x91, 0x90, 0xdb, 0xe6, 0x4d, - 0x24, 0x3d, 0x43, 0xa1, 0x2e, 0x07, 0xad, 0x38, 0x4c, 0x5c, 0x15, 0x70, 0xa5, 0xa0, 0x38, 0x52, - 0x5d, 0xb3, 0xc5, 0x09, 0xd0, 0x99, 0x96, 0xad, 0xd2, 0x57, 0x05, 0x5a, 0x2d, 0xc8, 0x56, 0x13, - 0xd8, 0x6c, 0xb6, 0x72, 0x49, 0xce, 0x9b, 0xff, 0x59, 0xa0, 0xfa, 0xed, 0x0c, 0x25, 0xe7, 0x47, - 0x28, 0x49, 0x43, 0x88, 0xec, 0x71, 0xf6, 0xc5, 0xf6, 0xc1, 0x4d, 0x74, 0x53, 0x88, 0xf2, 0xce, - 0x87, 0x37, 0xf2, 0x95, 0x42, 0xfd, 0x13, 0xa8, 0x2d, 0x7a, 0xae, 0xda, 0xde, 0x62, 0x90, 0x97, - 0xbc, 0x8e, 0x77, 0x9a, 0xaf, 0x12, 0x22, 0xe8, 0x3b, 0x3f, 0x97, 0xfe, 0xbc, 0xa8, 0x5b, 0x2f, - 0x2e, 0xea, 0xd6, 0x3f, 0x17, 0x75, 0xeb, 0xf9, 0x65, 0x7d, 0xe9, 0xc5, 0x65, 0x7d, 0xe9, 0xef, - 0xcb, 0xfa, 0x12, 0xd8, 0x86, 0xf1, 0x74, 0x21, 0x62, 0xa7, 0xcc, 0xb6, 0xc2, 0xde, 0xeb, 0x5d, - 0xeb, 0xfb, 0xde, 0x28, 0xa4, 0xe3, 0xd9, 0x80, 0x95, 0xdd, 0x25, 0xec, 0x65, 0x3c, 0x42, 0x93, - 0x38, 0x45, 0xf7, 0x52, 0x14, 0xd1, 0x59, 0x82, 0x88, 0x1b, 0x46, 0x14, 0x25, 0x5c, 0x71, 0x29, - 0x22, 0xd4, 0x4d, 0x1f, 0xb8, 0x7c, 0xe2, 0x2e, 0xfa, 0xf7, 0xf9, 0xd0, 0xc7, 0x38, 0xf5, 0x7e, - 0x29, 0xdd, 0xea, 0xee, 0xb7, 0x7f, 0x2b, 0xd5, 0xba, 0x8a, 0x7c, 0x9f, 0x91, 0xb7, 0x31, 0x76, - 0x8e, 0xbd, 0xbf, 0xae, 0xcc, 0x27, 0xcc, 0x7c, 0xd2, 0xc6, 0xf8, 0xe4, 0xd8, 0xbb, 0x28, 0xed, - 0x2e, 0x32, 0x9f, 0x1c, 0x74, 0x3b, 0x4f, 0x10, 0xf5, 0x03, 0x9f, 0xfa, 0xff, 0x96, 0xde, 0x50, - 0x2e, 0xad, 0x16, 0xf3, 0x69, 0xb5, 0xda, 0x18, 0xb7, 0x5a, 0xc7, 0xde, 0x60, 0x85, 0xff, 0xfb, - 0xf8, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x3c, 0xb4, 0xae, 0x13, 0x0f, 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // Gets the app parameters. - AppParameters(ctx context.Context, in *AppParametersRequest, opts ...grpc.CallOption) (*AppParametersResponse, error) - // Returns the CometBFT transactions that occurred during a given block. - TransactionsByHeight(ctx context.Context, in *TransactionsByHeightRequest, opts ...grpc.CallOption) (*TransactionsByHeightResponse, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) AppParameters(ctx context.Context, in *AppParametersRequest, opts ...grpc.CallOption) (*AppParametersResponse, error) { - out := new(AppParametersResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.app.v1.QueryService/AppParameters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) TransactionsByHeight(ctx context.Context, in *TransactionsByHeightRequest, opts ...grpc.CallOption) (*TransactionsByHeightResponse, error) { - out := new(TransactionsByHeightResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.app.v1.QueryService/TransactionsByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // Gets the app parameters. - AppParameters(context.Context, *AppParametersRequest) (*AppParametersResponse, error) - // Returns the CometBFT transactions that occurred during a given block. - TransactionsByHeight(context.Context, *TransactionsByHeightRequest) (*TransactionsByHeightResponse, error) -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) AppParameters(ctx context.Context, req *AppParametersRequest) (*AppParametersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppParameters not implemented") -} -func (*UnimplementedQueryServiceServer) TransactionsByHeight(ctx context.Context, req *TransactionsByHeightRequest) (*TransactionsByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransactionsByHeight not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_AppParameters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AppParametersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).AppParameters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.app.v1.QueryService/AppParameters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).AppParameters(ctx, req.(*AppParametersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_TransactionsByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransactionsByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).TransactionsByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.app.v1.QueryService/TransactionsByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).TransactionsByHeight(ctx, req.(*TransactionsByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.app.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AppParameters", - Handler: _QueryService_AppParameters_Handler, - }, - { - MethodName: "TransactionsByHeight", - Handler: _QueryService_TransactionsByHeight_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "penumbra/core/app/v1/app.proto", -} - -func (m *TransactionsByHeightRequest) Marshal() (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 *TransactionsByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionsByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockHeight != 0 { - i = encodeVarintApp(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *TransactionsByHeightResponse) Marshal() (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 *TransactionsByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionsByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BlockHeight != 0 { - i = encodeVarintApp(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x10 - } - if len(m.Transactions) > 0 { - for iNdEx := len(m.Transactions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Transactions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AppParameters) Marshal() (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 *AppParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AuctionParams != nil { - { - size, err := m.AuctionParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - if m.DexParams != nil { - { - size, err := m.DexParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.ShieldedPoolParams != nil { - { - size, err := m.ShieldedPoolParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.FundingParams != nil { - { - size, err := m.FundingParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.DistributionsParams != nil { - { - size, err := m.DistributionsParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.FeeParams != nil { - { - size, err := m.FeeParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.StakeParams != nil { - { - size, err := m.StakeParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.IbcParams != nil { - { - size, err := m.IbcParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.GovernanceParams != nil { - { - size, err := m.GovernanceParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.CommunityPoolParams != nil { - { - size, err := m.CommunityPoolParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.SctParams != nil { - { - size, err := m.SctParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintApp(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AppParametersRequest) Marshal() (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 *AppParametersRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppParametersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AppParametersResponse) Marshal() (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 *AppParametersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppParametersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AppParameters != nil { - { - size, err := m.AppParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenesisAppState) Marshal() (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 *GenesisAppState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisAppState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GenesisAppState != nil { - { - size := m.GenesisAppState.Size() - i -= size - if _, err := m.GenesisAppState.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *GenesisAppState_GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisAppState_GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.GenesisContent != nil { - { - size, err := m.GenesisContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *GenesisAppState_GenesisCheckpoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisAppState_GenesisCheckpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.GenesisCheckpoint != nil { - i -= len(m.GenesisCheckpoint) - copy(dAtA[i:], m.GenesisCheckpoint) - i = encodeVarintApp(dAtA, i, uint64(len(m.GenesisCheckpoint))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AuctionContent != nil { - { - size, err := m.AuctionContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - if m.DexContent != nil { - { - size, err := m.DexContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.FundingContent != nil { - { - size, err := m.FundingContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.DistributionsContent != nil { - { - size, err := m.DistributionsContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.FeeContent != nil { - { - size, err := m.FeeContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.CommunityPoolContent != nil { - { - size, err := m.CommunityPoolContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.SctContent != nil { - { - size, err := m.SctContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.IbcContent != nil { - { - size, err := m.IbcContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.GovernanceContent != nil { - { - size, err := m.GovernanceContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.ShieldedPoolContent != nil { - { - size, err := m.ShieldedPoolContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.StakeContent != nil { - { - size, err := m.StakeContent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApp(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintApp(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintApp(dAtA []byte, offset int, v uint64) int { - offset -= sovApp(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TransactionsByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovApp(uint64(m.BlockHeight)) - } - return n -} - -func (m *TransactionsByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Transactions) > 0 { - for _, e := range m.Transactions { - l = e.Size() - n += 1 + l + sovApp(uint64(l)) - } - } - if m.BlockHeight != 0 { - n += 1 + sovApp(uint64(m.BlockHeight)) - } - return n -} - -func (m *AppParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovApp(uint64(l)) - } - if m.SctParams != nil { - l = m.SctParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.CommunityPoolParams != nil { - l = m.CommunityPoolParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.GovernanceParams != nil { - l = m.GovernanceParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.IbcParams != nil { - l = m.IbcParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.StakeParams != nil { - l = m.StakeParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.FeeParams != nil { - l = m.FeeParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.DistributionsParams != nil { - l = m.DistributionsParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.FundingParams != nil { - l = m.FundingParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.ShieldedPoolParams != nil { - l = m.ShieldedPoolParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.DexParams != nil { - l = m.DexParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.AuctionParams != nil { - l = m.AuctionParams.Size() - n += 1 + l + sovApp(uint64(l)) - } - return n -} - -func (m *AppParametersRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AppParametersResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AppParameters != nil { - l = m.AppParameters.Size() - n += 1 + l + sovApp(uint64(l)) - } - return n -} - -func (m *GenesisAppState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GenesisAppState != nil { - n += m.GenesisAppState.Size() - } - return n -} - -func (m *GenesisAppState_GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GenesisContent != nil { - l = m.GenesisContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - return n -} -func (m *GenesisAppState_GenesisCheckpoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GenesisCheckpoint != nil { - l = len(m.GenesisCheckpoint) - n += 1 + l + sovApp(uint64(l)) - } - return n -} -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovApp(uint64(l)) - } - if m.StakeContent != nil { - l = m.StakeContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.ShieldedPoolContent != nil { - l = m.ShieldedPoolContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.GovernanceContent != nil { - l = m.GovernanceContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.IbcContent != nil { - l = m.IbcContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.SctContent != nil { - l = m.SctContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.CommunityPoolContent != nil { - l = m.CommunityPoolContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.FeeContent != nil { - l = m.FeeContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.DistributionsContent != nil { - l = m.DistributionsContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.FundingContent != nil { - l = m.FundingContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.DexContent != nil { - l = m.DexContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - if m.AuctionContent != nil { - l = m.AuctionContent.Size() - n += 1 + l + sovApp(uint64(l)) - } - return n -} - -func sovApp(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozApp(x uint64) (n int) { - return sovApp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TransactionsByHeightRequest) 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 ErrIntOverflowApp - } - 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: TransactionsByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionsByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipApp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionsByHeightResponse) 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 ErrIntOverflowApp - } - 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: TransactionsByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionsByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Transactions = append(m.Transactions, &v1.Transaction{}) - if err := m.Transactions[len(m.Transactions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipApp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AppParameters) 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 ErrIntOverflowApp - } - 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: AppParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SctParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SctParams == nil { - m.SctParams = &v11.SctParameters{} - } - if err := m.SctParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommunityPoolParams == nil { - m.CommunityPoolParams = &v12.CommunityPoolParameters{} - } - if err := m.CommunityPoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GovernanceParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GovernanceParams == nil { - m.GovernanceParams = &v13.GovernanceParameters{} - } - if err := m.GovernanceParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IbcParams == nil { - m.IbcParams = &v14.IbcParameters{} - } - if err := m.IbcParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StakeParams == nil { - m.StakeParams = &v15.StakeParameters{} - } - if err := m.StakeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeParams == nil { - m.FeeParams = &v16.FeeParameters{} - } - if err := m.FeeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistributionsParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DistributionsParams == nil { - m.DistributionsParams = &v17.DistributionsParameters{} - } - if err := m.DistributionsParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FundingParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FundingParams == nil { - m.FundingParams = &v18.FundingParameters{} - } - if err := m.FundingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShieldedPoolParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ShieldedPoolParams == nil { - m.ShieldedPoolParams = &v19.ShieldedPoolParameters{} - } - if err := m.ShieldedPoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DexParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DexParams == nil { - m.DexParams = &v110.DexParameters{} - } - if err := m.DexParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionParams == nil { - m.AuctionParams = &v111.AuctionParameters{} - } - if err := m.AuctionParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AppParametersRequest) 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 ErrIntOverflowApp - } - 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: AppParametersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppParametersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AppParametersResponse) 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 ErrIntOverflowApp - } - 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: AppParametersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppParametersResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AppParameters == nil { - m.AppParameters = &AppParameters{} - } - if err := m.AppParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisAppState) 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 ErrIntOverflowApp - } - 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: GenesisAppState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisAppState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &GenesisContent{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.GenesisAppState = &GenesisAppState_GenesisContent{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisCheckpoint", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.GenesisAppState = &GenesisAppState_GenesisCheckpoint{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowApp - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StakeContent == nil { - m.StakeContent = &v15.GenesisContent{} - } - if err := m.StakeContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShieldedPoolContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ShieldedPoolContent == nil { - m.ShieldedPoolContent = &v19.GenesisContent{} - } - if err := m.ShieldedPoolContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GovernanceContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GovernanceContent == nil { - m.GovernanceContent = &v13.GenesisContent{} - } - if err := m.GovernanceContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IbcContent == nil { - m.IbcContent = &v14.GenesisContent{} - } - if err := m.IbcContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SctContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SctContent == nil { - m.SctContent = &v11.GenesisContent{} - } - if err := m.SctContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommunityPoolContent == nil { - m.CommunityPoolContent = &v12.GenesisContent{} - } - if err := m.CommunityPoolContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeContent == nil { - m.FeeContent = &v16.GenesisContent{} - } - if err := m.FeeContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistributionsContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DistributionsContent == nil { - m.DistributionsContent = &v17.GenesisContent{} - } - if err := m.DistributionsContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FundingContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FundingContent == nil { - m.FundingContent = &v18.GenesisContent{} - } - if err := m.FundingContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DexContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DexContent == nil { - m.DexContent = &v110.GenesisContent{} - } - if err := m.DexContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionContent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApp - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApp - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionContent == nil { - m.AuctionContent = &v111.GenesisContent{} - } - if err := m.AuctionContent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipApp(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthApp - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupApp - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthApp - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthApp = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowApp = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupApp = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/asset/v1/asset.pb.go b/chain/penumbra/core/asset/v1/asset.pb.go deleted file mode 100644 index 54ffaa9c..00000000 --- a/chain/penumbra/core/asset/v1/asset.pb.go +++ /dev/null @@ -1,4017 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/asset/v1/asset.proto - -package assetv1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type BalanceCommitment struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *BalanceCommitment) Reset() { *m = BalanceCommitment{} } -func (m *BalanceCommitment) String() string { return proto.CompactTextString(m) } -func (*BalanceCommitment) ProtoMessage() {} -func (*BalanceCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{0} -} -func (m *BalanceCommitment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BalanceCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BalanceCommitment.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 *BalanceCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_BalanceCommitment.Merge(m, src) -} -func (m *BalanceCommitment) XXX_Size() int { - return m.Size() -} -func (m *BalanceCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_BalanceCommitment.DiscardUnknown(m) -} - -var xxx_messageInfo_BalanceCommitment proto.InternalMessageInfo - -func (m *BalanceCommitment) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A Penumbra asset ID. -type AssetId struct { - // The bytes of the asset ID. - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` - // Alternatively, a Bech32m-encoded string representation of the `inner` - // bytes. - // - // NOTE: implementations are not required to support parsing this field. - // Implementations should prefer to encode the `inner` bytes in all messages they - // produce. Implementations must not accept messages with both `inner` and - // `alt_bech32m` set. This field exists for convenience of RPC users. - AltBech32M string `protobuf:"bytes,2,opt,name=alt_bech32m,json=altBech32m,proto3" json:"alt_bech32m,omitempty"` - // Alternatively, a base denomination string which should be hashed to obtain the asset ID. - // - // NOTE: implementations are not required to support parsing this field. - // Implementations should prefer to encode the bytes in all messages they - // produce. Implementations must not accept messages with both `inner` and - // `alt_base_denom` set. This field exists for convenience of RPC users. - AltBaseDenom string `protobuf:"bytes,3,opt,name=alt_base_denom,json=altBaseDenom,proto3" json:"alt_base_denom,omitempty"` -} - -func (m *AssetId) Reset() { *m = AssetId{} } -func (m *AssetId) String() string { return proto.CompactTextString(m) } -func (*AssetId) ProtoMessage() {} -func (*AssetId) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{1} -} -func (m *AssetId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetId.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 *AssetId) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetId.Merge(m, src) -} -func (m *AssetId) XXX_Size() int { - return m.Size() -} -func (m *AssetId) XXX_DiscardUnknown() { - xxx_messageInfo_AssetId.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetId proto.InternalMessageInfo - -func (m *AssetId) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -func (m *AssetId) GetAltBech32M() string { - if m != nil { - return m.AltBech32M - } - return "" -} - -func (m *AssetId) GetAltBaseDenom() string { - if m != nil { - return m.AltBaseDenom - } - return "" -} - -type Denom struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *Denom) Reset() { *m = Denom{} } -func (m *Denom) String() string { return proto.CompactTextString(m) } -func (*Denom) ProtoMessage() {} -func (*Denom) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{2} -} -func (m *Denom) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Denom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Denom.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 *Denom) XXX_Merge(src proto.Message) { - xxx_messageInfo_Denom.Merge(m, src) -} -func (m *Denom) XXX_Size() int { - return m.Size() -} -func (m *Denom) XXX_DiscardUnknown() { - xxx_messageInfo_Denom.DiscardUnknown(m) -} - -var xxx_messageInfo_Denom proto.InternalMessageInfo - -func (m *Denom) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -// Describes metadata about a given asset. -type Metadata struct { - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // denom_units represents the list of DenomUnit's for a given coin - DenomUnits []*DenomUnit `protobuf:"bytes,2,rep,name=denom_units,json=denomUnits,proto3" json:"denom_units,omitempty"` - // base represents the base denom (should be the DenomUnit with exponent = 0). - Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"` - // display indicates the suggested denom that should be - // displayed in clients. - Display string `protobuf:"bytes,4,opt,name=display,proto3" json:"display,omitempty"` - // name defines the name of the token (eg: Cosmos Atom) - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - // be the same as the display. - Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` - // the asset ID on Penumbra for this denomination. - PenumbraAssetId *AssetId `protobuf:"bytes,1984,opt,name=penumbra_asset_id,json=penumbraAssetId,proto3" json:"penumbra_asset_id,omitempty"` - Images []*AssetImage `protobuf:"bytes,1985,rep,name=images,proto3" json:"images,omitempty"` - // An optional "score" used to prioritize token lists. - // - // This is solely for use in client-side registries. - PriorityScore uint64 `protobuf:"varint,1986,opt,name=priority_score,json=priorityScore,proto3" json:"priority_score,omitempty"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{3} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func (m *Metadata) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Metadata) GetDenomUnits() []*DenomUnit { - if m != nil { - return m.DenomUnits - } - return nil -} - -func (m *Metadata) GetBase() string { - if m != nil { - return m.Base - } - return "" -} - -func (m *Metadata) GetDisplay() string { - if m != nil { - return m.Display - } - return "" -} - -func (m *Metadata) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Metadata) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *Metadata) GetPenumbraAssetId() *AssetId { - if m != nil { - return m.PenumbraAssetId - } - return nil -} - -func (m *Metadata) GetImages() []*AssetImage { - if m != nil { - return m.Images - } - return nil -} - -func (m *Metadata) GetPriorityScore() uint64 { - if m != nil { - return m.PriorityScore - } - return 0 -} - -// DenomUnit represents a struct that describes a given denomination unit of the basic token. -type DenomUnit struct { - // denom represents the string name of the given denom unit (e.g uatom). - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - // exponent represents power of 10 exponent that one must - // raise the base_denom to in order to equal the given DenomUnit's denom - // 1 denom = 10^exponent base_denom - // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - // exponent = 6, thus: 1 atom = 10^6 uatom). - Exponent uint32 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"` - // aliases is a list of string aliases for the given denom - Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` -} - -func (m *DenomUnit) Reset() { *m = DenomUnit{} } -func (m *DenomUnit) String() string { return proto.CompactTextString(m) } -func (*DenomUnit) ProtoMessage() {} -func (*DenomUnit) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{4} -} -func (m *DenomUnit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DenomUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DenomUnit.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 *DenomUnit) XXX_Merge(src proto.Message) { - xxx_messageInfo_DenomUnit.Merge(m, src) -} -func (m *DenomUnit) XXX_Size() int { - return m.Size() -} -func (m *DenomUnit) XXX_DiscardUnknown() { - xxx_messageInfo_DenomUnit.DiscardUnknown(m) -} - -var xxx_messageInfo_DenomUnit proto.InternalMessageInfo - -func (m *DenomUnit) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *DenomUnit) GetExponent() uint32 { - if m != nil { - return m.Exponent - } - return 0 -} - -func (m *DenomUnit) GetAliases() []string { - if m != nil { - return m.Aliases - } - return nil -} - -type Value struct { - Amount *v1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - AssetId *AssetId `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` -} - -func (m *Value) Reset() { *m = Value{} } -func (m *Value) String() string { return proto.CompactTextString(m) } -func (*Value) ProtoMessage() {} -func (*Value) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{5} -} -func (m *Value) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Value.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 *Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_Value.Merge(m, src) -} -func (m *Value) XXX_Size() int { - return m.Size() -} -func (m *Value) XXX_DiscardUnknown() { - xxx_messageInfo_Value.DiscardUnknown(m) -} - -var xxx_messageInfo_Value proto.InternalMessageInfo - -func (m *Value) GetAmount() *v1.Amount { - if m != nil { - return m.Amount - } - return nil -} - -func (m *Value) GetAssetId() *AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -// Represents a value of a known or unknown denomination. -type ValueView struct { - // Types that are valid to be assigned to ValueView: - // - // *ValueView_KnownAssetId_ - // *ValueView_UnknownAssetId_ - ValueView isValueView_ValueView `protobuf_oneof:"value_view"` -} - -func (m *ValueView) Reset() { *m = ValueView{} } -func (m *ValueView) String() string { return proto.CompactTextString(m) } -func (*ValueView) ProtoMessage() {} -func (*ValueView) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{6} -} -func (m *ValueView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValueView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValueView.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 *ValueView) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueView.Merge(m, src) -} -func (m *ValueView) XXX_Size() int { - return m.Size() -} -func (m *ValueView) XXX_DiscardUnknown() { - xxx_messageInfo_ValueView.DiscardUnknown(m) -} - -var xxx_messageInfo_ValueView proto.InternalMessageInfo - -type isValueView_ValueView interface { - isValueView_ValueView() - MarshalTo([]byte) (int, error) - Size() int -} - -type ValueView_KnownAssetId_ struct { - KnownAssetId *ValueView_KnownAssetId `protobuf:"bytes,1,opt,name=known_asset_id,json=knownAssetId,proto3,oneof" json:"known_asset_id,omitempty"` -} -type ValueView_UnknownAssetId_ struct { - UnknownAssetId *ValueView_UnknownAssetId `protobuf:"bytes,2,opt,name=unknown_asset_id,json=unknownAssetId,proto3,oneof" json:"unknown_asset_id,omitempty"` -} - -func (*ValueView_KnownAssetId_) isValueView_ValueView() {} -func (*ValueView_UnknownAssetId_) isValueView_ValueView() {} - -func (m *ValueView) GetValueView() isValueView_ValueView { - if m != nil { - return m.ValueView - } - return nil -} - -func (m *ValueView) GetKnownAssetId() *ValueView_KnownAssetId { - if x, ok := m.GetValueView().(*ValueView_KnownAssetId_); ok { - return x.KnownAssetId - } - return nil -} - -func (m *ValueView) GetUnknownAssetId() *ValueView_UnknownAssetId { - if x, ok := m.GetValueView().(*ValueView_UnknownAssetId_); ok { - return x.UnknownAssetId - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ValueView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ValueView_KnownAssetId_)(nil), - (*ValueView_UnknownAssetId_)(nil), - } -} - -// A value whose asset ID is known and has metadata. -type ValueView_KnownAssetId struct { - // The amount of the value. - Amount *v1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - // The asset metadata describing the asset of the value. - Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Optionally, a list of equivalent values in other numeraires. - EquivalentValues []*EquivalentValue `protobuf:"bytes,3,rep,name=equivalent_values,json=equivalentValues,proto3" json:"equivalent_values,omitempty"` - // Optionally, extended, dynamically-typed metadata about the object this - // token represents. - // - // This is left flexible to allow future extensions. For instance, a view - // server could augment an LPNFT with a message describing the current state - // of the position and its reserves, allowing a frontend to render LPNFTs - // with their position information (trading pair, etc). However, because - // this is in an extension, a frontend that does not have special handling - // logic would fall back on the ordinary asset metadata. - ExtendedMetadata *types.Any `protobuf:"bytes,4,opt,name=extended_metadata,json=extendedMetadata,proto3" json:"extended_metadata,omitempty"` -} - -func (m *ValueView_KnownAssetId) Reset() { *m = ValueView_KnownAssetId{} } -func (m *ValueView_KnownAssetId) String() string { return proto.CompactTextString(m) } -func (*ValueView_KnownAssetId) ProtoMessage() {} -func (*ValueView_KnownAssetId) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{6, 0} -} -func (m *ValueView_KnownAssetId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValueView_KnownAssetId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValueView_KnownAssetId.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 *ValueView_KnownAssetId) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueView_KnownAssetId.Merge(m, src) -} -func (m *ValueView_KnownAssetId) XXX_Size() int { - return m.Size() -} -func (m *ValueView_KnownAssetId) XXX_DiscardUnknown() { - xxx_messageInfo_ValueView_KnownAssetId.DiscardUnknown(m) -} - -var xxx_messageInfo_ValueView_KnownAssetId proto.InternalMessageInfo - -func (m *ValueView_KnownAssetId) GetAmount() *v1.Amount { - if m != nil { - return m.Amount - } - return nil -} - -func (m *ValueView_KnownAssetId) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *ValueView_KnownAssetId) GetEquivalentValues() []*EquivalentValue { - if m != nil { - return m.EquivalentValues - } - return nil -} - -func (m *ValueView_KnownAssetId) GetExtendedMetadata() *types.Any { - if m != nil { - return m.ExtendedMetadata - } - return nil -} - -// A value whose asset ID is unknown, with no metadata. -type ValueView_UnknownAssetId struct { - Amount *v1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - AssetId *AssetId `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` -} - -func (m *ValueView_UnknownAssetId) Reset() { *m = ValueView_UnknownAssetId{} } -func (m *ValueView_UnknownAssetId) String() string { return proto.CompactTextString(m) } -func (*ValueView_UnknownAssetId) ProtoMessage() {} -func (*ValueView_UnknownAssetId) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{6, 1} -} -func (m *ValueView_UnknownAssetId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValueView_UnknownAssetId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValueView_UnknownAssetId.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 *ValueView_UnknownAssetId) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueView_UnknownAssetId.Merge(m, src) -} -func (m *ValueView_UnknownAssetId) XXX_Size() int { - return m.Size() -} -func (m *ValueView_UnknownAssetId) XXX_DiscardUnknown() { - xxx_messageInfo_ValueView_UnknownAssetId.DiscardUnknown(m) -} - -var xxx_messageInfo_ValueView_UnknownAssetId proto.InternalMessageInfo - -func (m *ValueView_UnknownAssetId) GetAmount() *v1.Amount { - if m != nil { - return m.Amount - } - return nil -} - -func (m *ValueView_UnknownAssetId) GetAssetId() *AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -// An image related to an asset. -type AssetImage struct { - // The URI of the image in PNG format. - Png string `protobuf:"bytes,1,opt,name=png,proto3" json:"png,omitempty"` - // The URI of the image in SVG format. - Svg string `protobuf:"bytes,2,opt,name=svg,proto3" json:"svg,omitempty"` - Theme *AssetImage_Theme `protobuf:"bytes,3,opt,name=theme,proto3" json:"theme,omitempty"` -} - -func (m *AssetImage) Reset() { *m = AssetImage{} } -func (m *AssetImage) String() string { return proto.CompactTextString(m) } -func (*AssetImage) ProtoMessage() {} -func (*AssetImage) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{7} -} -func (m *AssetImage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetImage.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 *AssetImage) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetImage.Merge(m, src) -} -func (m *AssetImage) XXX_Size() int { - return m.Size() -} -func (m *AssetImage) XXX_DiscardUnknown() { - xxx_messageInfo_AssetImage.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetImage proto.InternalMessageInfo - -func (m *AssetImage) GetPng() string { - if m != nil { - return m.Png - } - return "" -} - -func (m *AssetImage) GetSvg() string { - if m != nil { - return m.Svg - } - return "" -} - -func (m *AssetImage) GetTheme() *AssetImage_Theme { - if m != nil { - return m.Theme - } - return nil -} - -type AssetImage_Theme struct { - // Should be in hex format, `^#[0-9a-fA-F]{6}$`. - PrimaryColorHex string `protobuf:"bytes,1,opt,name=primary_color_hex,json=primaryColorHex,proto3" json:"primary_color_hex,omitempty"` - Circle bool `protobuf:"varint,2,opt,name=circle,proto3" json:"circle,omitempty"` - DarkMode bool `protobuf:"varint,3,opt,name=dark_mode,json=darkMode,proto3" json:"dark_mode,omitempty"` -} - -func (m *AssetImage_Theme) Reset() { *m = AssetImage_Theme{} } -func (m *AssetImage_Theme) String() string { return proto.CompactTextString(m) } -func (*AssetImage_Theme) ProtoMessage() {} -func (*AssetImage_Theme) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{7, 0} -} -func (m *AssetImage_Theme) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetImage_Theme) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetImage_Theme.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 *AssetImage_Theme) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetImage_Theme.Merge(m, src) -} -func (m *AssetImage_Theme) XXX_Size() int { - return m.Size() -} -func (m *AssetImage_Theme) XXX_DiscardUnknown() { - xxx_messageInfo_AssetImage_Theme.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetImage_Theme proto.InternalMessageInfo - -func (m *AssetImage_Theme) GetPrimaryColorHex() string { - if m != nil { - return m.PrimaryColorHex - } - return "" -} - -func (m *AssetImage_Theme) GetCircle() bool { - if m != nil { - return m.Circle - } - return false -} - -func (m *AssetImage_Theme) GetDarkMode() bool { - if m != nil { - return m.DarkMode - } - return false -} - -// The estimated price of one asset in terms of a numeraire. -// -// This is used for generating "equivalent values" in ValueViews. -type EstimatedPrice struct { - PricedAsset *AssetId `protobuf:"bytes,1,opt,name=priced_asset,json=pricedAsset,proto3" json:"priced_asset,omitempty"` - Numeraire *AssetId `protobuf:"bytes,2,opt,name=numeraire,proto3" json:"numeraire,omitempty"` - // Multiply units of the priced asset by this value to get the value in the numeraire. - // - // This is a floating-point number since the price is approximate. - NumerairePerUnit float64 `protobuf:"fixed64,3,opt,name=numeraire_per_unit,json=numerairePerUnit,proto3" json:"numeraire_per_unit,omitempty"` - // If set, gives some idea of when the price was estimated. - AsOfHeight uint64 `protobuf:"varint,4,opt,name=as_of_height,json=asOfHeight,proto3" json:"as_of_height,omitempty"` -} - -func (m *EstimatedPrice) Reset() { *m = EstimatedPrice{} } -func (m *EstimatedPrice) String() string { return proto.CompactTextString(m) } -func (*EstimatedPrice) ProtoMessage() {} -func (*EstimatedPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{8} -} -func (m *EstimatedPrice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EstimatedPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EstimatedPrice.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 *EstimatedPrice) XXX_Merge(src proto.Message) { - xxx_messageInfo_EstimatedPrice.Merge(m, src) -} -func (m *EstimatedPrice) XXX_Size() int { - return m.Size() -} -func (m *EstimatedPrice) XXX_DiscardUnknown() { - xxx_messageInfo_EstimatedPrice.DiscardUnknown(m) -} - -var xxx_messageInfo_EstimatedPrice proto.InternalMessageInfo - -func (m *EstimatedPrice) GetPricedAsset() *AssetId { - if m != nil { - return m.PricedAsset - } - return nil -} - -func (m *EstimatedPrice) GetNumeraire() *AssetId { - if m != nil { - return m.Numeraire - } - return nil -} - -func (m *EstimatedPrice) GetNumerairePerUnit() float64 { - if m != nil { - return m.NumerairePerUnit - } - return 0 -} - -func (m *EstimatedPrice) GetAsOfHeight() uint64 { - if m != nil { - return m.AsOfHeight - } - return 0 -} - -// An "equivalent" value to a given value, in terms of a numeraire. -// -// For instance, this can provide a USD-equivalent value relative to a -// stablecoin, or an amount of the staking token, etc. A view server can -// optionally include this information to assist a frontend in displaying -// information about the value in a user-friendly way. -type EquivalentValue struct { - // The equivalent amount of the parent Value in terms of the numeraire. - EquivalentAmount *v1.Amount `protobuf:"bytes,1,opt,name=equivalent_amount,json=equivalentAmount,proto3" json:"equivalent_amount,omitempty"` - // Metadata describing the numeraire. - Numeraire *Metadata `protobuf:"bytes,2,opt,name=numeraire,proto3" json:"numeraire,omitempty"` - // If set, gives some idea of when the price/equivalence was estimated. - AsOfHeight uint64 `protobuf:"varint,3,opt,name=as_of_height,json=asOfHeight,proto3" json:"as_of_height,omitempty"` -} - -func (m *EquivalentValue) Reset() { *m = EquivalentValue{} } -func (m *EquivalentValue) String() string { return proto.CompactTextString(m) } -func (*EquivalentValue) ProtoMessage() {} -func (*EquivalentValue) Descriptor() ([]byte, []int) { - return fileDescriptor_c2e6e948c9ed8f1e, []int{9} -} -func (m *EquivalentValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EquivalentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EquivalentValue.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 *EquivalentValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_EquivalentValue.Merge(m, src) -} -func (m *EquivalentValue) XXX_Size() int { - return m.Size() -} -func (m *EquivalentValue) XXX_DiscardUnknown() { - xxx_messageInfo_EquivalentValue.DiscardUnknown(m) -} - -var xxx_messageInfo_EquivalentValue proto.InternalMessageInfo - -func (m *EquivalentValue) GetEquivalentAmount() *v1.Amount { - if m != nil { - return m.EquivalentAmount - } - return nil -} - -func (m *EquivalentValue) GetNumeraire() *Metadata { - if m != nil { - return m.Numeraire - } - return nil -} - -func (m *EquivalentValue) GetAsOfHeight() uint64 { - if m != nil { - return m.AsOfHeight - } - return 0 -} - -func init() { - proto.RegisterType((*BalanceCommitment)(nil), "penumbra.core.asset.v1.BalanceCommitment") - proto.RegisterType((*AssetId)(nil), "penumbra.core.asset.v1.AssetId") - proto.RegisterType((*Denom)(nil), "penumbra.core.asset.v1.Denom") - proto.RegisterType((*Metadata)(nil), "penumbra.core.asset.v1.Metadata") - proto.RegisterType((*DenomUnit)(nil), "penumbra.core.asset.v1.DenomUnit") - proto.RegisterType((*Value)(nil), "penumbra.core.asset.v1.Value") - proto.RegisterType((*ValueView)(nil), "penumbra.core.asset.v1.ValueView") - proto.RegisterType((*ValueView_KnownAssetId)(nil), "penumbra.core.asset.v1.ValueView.KnownAssetId") - proto.RegisterType((*ValueView_UnknownAssetId)(nil), "penumbra.core.asset.v1.ValueView.UnknownAssetId") - proto.RegisterType((*AssetImage)(nil), "penumbra.core.asset.v1.AssetImage") - proto.RegisterType((*AssetImage_Theme)(nil), "penumbra.core.asset.v1.AssetImage.Theme") - proto.RegisterType((*EstimatedPrice)(nil), "penumbra.core.asset.v1.EstimatedPrice") - proto.RegisterType((*EquivalentValue)(nil), "penumbra.core.asset.v1.EquivalentValue") -} - -func init() { - proto.RegisterFile("penumbra/core/asset/v1/asset.proto", fileDescriptor_c2e6e948c9ed8f1e) -} - -var fileDescriptor_c2e6e948c9ed8f1e = []byte{ - // 1085 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xaf, 0xf3, 0xa7, 0x75, 0x5e, 0xb2, 0x69, 0x3a, 0x5a, 0x55, 0xde, 0x00, 0xd9, 0x60, 0x21, - 0x28, 0x08, 0x1c, 0x92, 0xe5, 0x80, 0xb2, 0xb0, 0x52, 0x53, 0x56, 0xb4, 0x0b, 0x2b, 0xa2, 0x61, - 0x1b, 0x24, 0x54, 0xc9, 0x9a, 0xc4, 0xd3, 0x64, 0x54, 0x7b, 0x1c, 0x3c, 0xe3, 0xb4, 0xb9, 0xf2, - 0x09, 0x90, 0x38, 0x72, 0xe3, 0xc0, 0x81, 0x0f, 0x81, 0x80, 0x13, 0xe2, 0xb4, 0x47, 0xc4, 0x09, - 0xb5, 0x37, 0x8e, 0x7c, 0x02, 0x34, 0x63, 0x3b, 0x6d, 0x4a, 0x4b, 0x17, 0x0e, 0x7b, 0xea, 0xfb, - 0xf3, 0x7b, 0xef, 0xfd, 0xde, 0xf3, 0x9b, 0xd7, 0x80, 0x3d, 0xa5, 0x3c, 0x0e, 0x86, 0x11, 0x69, - 0x8d, 0xc2, 0x88, 0xb6, 0x88, 0x10, 0x54, 0xb6, 0x66, 0xed, 0x44, 0x70, 0xa6, 0x51, 0x28, 0x43, - 0xb4, 0x99, 0x61, 0x1c, 0x85, 0x71, 0x12, 0xd7, 0xac, 0x5d, 0xbf, 0x33, 0x0e, 0xc3, 0xb1, 0x4f, - 0x5b, 0x1a, 0x35, 0x8c, 0x0f, 0x5b, 0x84, 0xcf, 0x93, 0x90, 0x7a, 0x63, 0x39, 0x2d, 0x8f, 0x03, - 0x95, 0x94, 0xc7, 0x41, 0xe2, 0xb7, 0x5f, 0x87, 0x8d, 0x1e, 0xf1, 0x09, 0x1f, 0xd1, 0x9d, 0x30, - 0x08, 0x98, 0x0c, 0x28, 0x97, 0xe8, 0x36, 0x14, 0x19, 0xe7, 0x34, 0xb2, 0x8c, 0xa6, 0xb1, 0x55, - 0xc1, 0x89, 0x62, 0x1f, 0xc2, 0xda, 0xb6, 0xaa, 0xb8, 0xe7, 0x5d, 0x0d, 0x40, 0x77, 0xa1, 0x4c, - 0x7c, 0xe9, 0x0e, 0xe9, 0x68, 0x72, 0xaf, 0x13, 0x58, 0xb9, 0xa6, 0xb1, 0x55, 0xc2, 0x40, 0x7c, - 0xd9, 0x4b, 0x2c, 0xe8, 0x15, 0xa8, 0x6a, 0x00, 0x11, 0xd4, 0xf5, 0x28, 0x0f, 0x03, 0x2b, 0xaf, - 0x31, 0x15, 0x85, 0x21, 0x82, 0x7e, 0xa0, 0x6c, 0xf6, 0x4b, 0x50, 0xd4, 0x82, 0xaa, 0x92, 0xa0, - 0x0c, 0x8d, 0x4a, 0x14, 0xfb, 0xbb, 0x3c, 0x98, 0x8f, 0xa9, 0x24, 0x1e, 0x91, 0x04, 0x35, 0xa1, - 0xec, 0x51, 0x31, 0x8a, 0xd8, 0x54, 0xb2, 0x90, 0xa7, 0xc0, 0x8b, 0x26, 0xd4, 0x53, 0x08, 0x1e, - 0x06, 0x6e, 0xcc, 0x99, 0x14, 0x56, 0xae, 0x99, 0xdf, 0x2a, 0x77, 0x5e, 0x76, 0xae, 0x9e, 0xa4, - 0xa3, 0x0b, 0xef, 0x73, 0x26, 0x31, 0x78, 0x99, 0x28, 0x10, 0x82, 0x82, 0xe2, 0x9c, 0xb2, 0xd5, - 0x32, 0xb2, 0x60, 0xcd, 0x63, 0x62, 0xea, 0x93, 0xb9, 0x55, 0xd0, 0xe6, 0x4c, 0x55, 0x68, 0x4e, - 0x02, 0x6a, 0x15, 0x13, 0xb4, 0x92, 0xd1, 0x26, 0xac, 0x8a, 0x79, 0x30, 0x0c, 0x7d, 0x6b, 0x55, - 0x5b, 0x53, 0x0d, 0x7d, 0x0c, 0x1b, 0x19, 0x13, 0x57, 0x93, 0x70, 0x99, 0x67, 0xfd, 0xb8, 0xde, - 0x34, 0xb6, 0xca, 0x9d, 0xbb, 0xd7, 0x91, 0x4c, 0xbf, 0x02, 0x5e, 0xcf, 0xfc, 0xd9, 0x67, 0xb9, - 0x0f, 0xab, 0x2c, 0x20, 0x63, 0x2a, 0xac, 0x9f, 0xd6, 0x75, 0x9f, 0xf6, 0xbf, 0xa7, 0x50, 0x58, - 0x9c, 0x86, 0xa0, 0x57, 0xa1, 0x3a, 0x8d, 0x58, 0x18, 0x31, 0x39, 0x77, 0x85, 0x42, 0x5b, 0x3f, - 0x2b, 0x1e, 0x05, 0x7c, 0x2b, 0x33, 0x7f, 0xaa, 0xac, 0x8f, 0x0a, 0xe6, 0x5a, 0xcd, 0x7c, 0x54, - 0x30, 0xcd, 0x5a, 0x09, 0xe7, 0xe3, 0x88, 0xe1, 0xfc, 0x3e, 0xde, 0xc3, 0x66, 0x1c, 0x31, 0x77, - 0x42, 0xc4, 0x04, 0xaf, 0xed, 0xe3, 0xbd, 0x5d, 0x22, 0x26, 0xf6, 0x67, 0x50, 0x5a, 0x8c, 0xf3, - 0xea, 0x6f, 0x89, 0xea, 0x60, 0xd2, 0x93, 0x69, 0xc8, 0x29, 0x97, 0x7a, 0x5d, 0x6e, 0xe1, 0x85, - 0xae, 0x06, 0x4c, 0x7c, 0x46, 0x04, 0x15, 0x56, 0xbe, 0x99, 0x57, 0x03, 0x4e, 0x55, 0x7b, 0x0e, - 0xc5, 0x01, 0xf1, 0x63, 0x8a, 0xde, 0x81, 0x55, 0x12, 0x84, 0x31, 0x97, 0x3a, 0x6b, 0xb9, 0xf3, - 0xe2, 0xa5, 0x76, 0xd5, 0x9a, 0xab, 0x66, 0x35, 0x06, 0xa7, 0x58, 0xd4, 0x05, 0x73, 0x31, 0xea, - 0xdc, 0xb3, 0x4d, 0x7a, 0x8d, 0x24, 0x82, 0xfd, 0x57, 0x01, 0x4a, 0xba, 0xf6, 0x80, 0xd1, 0x63, - 0x34, 0x80, 0xea, 0x11, 0x0f, 0x8f, 0xf9, 0xf9, 0xa7, 0x4b, 0x78, 0x38, 0xd7, 0xe5, 0x5b, 0x84, - 0x3a, 0x1f, 0xa9, 0xb8, 0x34, 0xfd, 0xee, 0x0a, 0xae, 0x1c, 0x5d, 0xd0, 0xd1, 0x01, 0xd4, 0x62, - 0x7e, 0x29, 0x73, 0xc2, 0xf4, 0xed, 0x9b, 0x33, 0xef, 0xf3, 0xa3, 0xe5, 0xdc, 0xd5, 0x78, 0xc9, - 0x52, 0xff, 0x26, 0x07, 0x95, 0x8b, 0xe5, 0xff, 0xe7, 0x18, 0xdf, 0x03, 0x33, 0x48, 0x9f, 0x61, - 0x4a, 0xae, 0x79, 0x1d, 0xb9, 0xec, 0xb9, 0xe2, 0x45, 0x04, 0x7a, 0x02, 0x1b, 0xf4, 0x8b, 0x98, - 0xcd, 0x88, 0x4f, 0xb9, 0x74, 0x67, 0x8a, 0x7d, 0xf2, 0x9d, 0xcb, 0x9d, 0xd7, 0xae, 0x4b, 0xf3, - 0x70, 0x11, 0xa0, 0xbb, 0xc5, 0x35, 0xba, 0x6c, 0x10, 0x68, 0x1b, 0x36, 0xe8, 0x89, 0xa4, 0xdc, - 0xa3, 0x9e, 0xbb, 0x20, 0x57, 0xd0, 0xe4, 0x6e, 0x3b, 0xc9, 0x91, 0x74, 0xb2, 0x23, 0xe9, 0x6c, - 0xf3, 0x39, 0xae, 0x65, 0xf0, 0x8c, 0x62, 0xfd, 0x4b, 0x03, 0xaa, 0xcb, 0x23, 0x7c, 0xfe, 0x6b, - 0xd6, 0xab, 0x00, 0xe8, 0x91, 0xb8, 0x33, 0x46, 0x8f, 0xed, 0xdf, 0x0d, 0x80, 0xf3, 0x07, 0x8b, - 0x6a, 0x90, 0x9f, 0xf2, 0x71, 0xfa, 0x90, 0x94, 0xa8, 0x2c, 0x62, 0x36, 0x4e, 0x0f, 0xae, 0x12, - 0xd1, 0x03, 0x28, 0xca, 0x09, 0x0d, 0x92, 0x93, 0x55, 0xee, 0x6c, 0xdd, 0x7c, 0x07, 0x9c, 0x27, - 0x0a, 0x8f, 0x93, 0xb0, 0xfa, 0x04, 0x8a, 0x5a, 0x47, 0x6f, 0xc0, 0xc6, 0x34, 0x62, 0x01, 0x89, - 0xe6, 0xee, 0x28, 0xf4, 0xc3, 0xc8, 0x9d, 0xd0, 0x93, 0xb4, 0xf4, 0x7a, 0xea, 0xd8, 0x51, 0xf6, - 0x5d, 0x7a, 0xa2, 0x8e, 0xdc, 0x88, 0x45, 0x23, 0x9f, 0x6a, 0x26, 0x26, 0x4e, 0x35, 0xf4, 0x02, - 0x94, 0x3c, 0x12, 0x1d, 0xb9, 0x41, 0xe8, 0x25, 0x84, 0x4c, 0x6c, 0x2a, 0xc3, 0xe3, 0xd0, 0xa3, - 0xf6, 0x99, 0x01, 0xd5, 0x87, 0x42, 0xb2, 0x80, 0x48, 0xea, 0xf5, 0x23, 0x36, 0xa2, 0xa8, 0x07, - 0x95, 0xa9, 0x12, 0xbc, 0x64, 0xfb, 0xd3, 0xa9, 0xdf, 0x38, 0xbd, 0x72, 0x12, 0xa4, 0x55, 0xf4, - 0x3e, 0x94, 0x78, 0x1c, 0xd0, 0x88, 0xb0, 0x88, 0x3e, 0xeb, 0xf8, 0xcf, 0x23, 0xd0, 0x9b, 0x80, - 0x16, 0x8a, 0x3b, 0xa5, 0x91, 0xfe, 0xef, 0xa1, 0xb9, 0x1b, 0xb8, 0xb6, 0xf0, 0xf4, 0x69, 0xa4, - 0x8f, 0x5b, 0x13, 0x2a, 0x44, 0xb8, 0xe1, 0xa1, 0x3b, 0xa1, 0x6c, 0x3c, 0x91, 0x7a, 0xe3, 0x0a, - 0x18, 0x88, 0xf8, 0xe4, 0x70, 0x57, 0x5b, 0xec, 0x1f, 0x0c, 0x58, 0xbf, 0xb4, 0xbe, 0x68, 0x6f, - 0xe9, 0x09, 0xfc, 0x87, 0x0d, 0xbb, 0xb0, 0xf7, 0x89, 0x05, 0x3d, 0xf8, 0x67, 0xb7, 0x37, 0x3f, - 0xc6, 0x0b, 0xed, 0x5e, 0x6e, 0x20, 0x7f, 0xb9, 0x81, 0xde, 0xd7, 0xb9, 0x5f, 0x4e, 0x1b, 0xc6, - 0xd3, 0xd3, 0x86, 0xf1, 0xc7, 0x69, 0xc3, 0xf8, 0xea, 0xac, 0xb1, 0xf2, 0xf4, 0xac, 0xb1, 0xf2, - 0xdb, 0x59, 0x63, 0x05, 0xea, 0xa3, 0x30, 0xb8, 0xa6, 0x58, 0x2f, 0xd9, 0xdb, 0xbe, 0x7a, 0x72, - 0x7d, 0xe3, 0xf3, 0xc1, 0x98, 0xc9, 0x49, 0x3c, 0x74, 0x46, 0x61, 0xd0, 0x12, 0x32, 0x22, 0x7c, - 0x4c, 0xfd, 0x70, 0x46, 0xdf, 0x9a, 0x51, 0x2e, 0xe3, 0x88, 0x8a, 0x16, 0xe3, 0x92, 0x46, 0xa3, - 0x09, 0x51, 0x7f, 0x85, 0x6c, 0xcd, 0xde, 0x6d, 0x69, 0xa5, 0x75, 0xf5, 0x6f, 0xa3, 0xfb, 0x5a, - 0x98, 0xb5, 0xbf, 0xcd, 0xe5, 0xfb, 0x3b, 0xdb, 0xdf, 0xe7, 0x36, 0xfb, 0x19, 0x89, 0x1d, 0x45, - 0x42, 0x97, 0x76, 0x06, 0xed, 0x5f, 0xcf, 0x1d, 0x07, 0xca, 0x71, 0xa0, 0x1d, 0x07, 0x83, 0xf6, - 0x69, 0xce, 0xbe, 0xda, 0x71, 0xf0, 0x61, 0xbf, 0x97, 0x8d, 0xe9, 0xcf, 0xdc, 0x9d, 0x0c, 0xd4, - 0xed, 0x2a, 0x54, 0xb7, 0xab, 0x61, 0xdd, 0xee, 0xa0, 0x3d, 0x5c, 0xd5, 0xc7, 0xe4, 0xde, 0xdf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0xe3, 0x70, 0x5d, 0xbd, 0x09, 0x00, 0x00, -} - -func (m *BalanceCommitment) Marshal() (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 *BalanceCommitment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BalanceCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetId) Marshal() (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 *AssetId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AltBaseDenom) > 0 { - i -= len(m.AltBaseDenom) - copy(dAtA[i:], m.AltBaseDenom) - i = encodeVarintAsset(dAtA, i, uint64(len(m.AltBaseDenom))) - i-- - dAtA[i] = 0x1a - } - if len(m.AltBech32M) > 0 { - i -= len(m.AltBech32M) - copy(dAtA[i:], m.AltBech32M) - i = encodeVarintAsset(dAtA, i, uint64(len(m.AltBech32M))) - i-- - dAtA[i] = 0x12 - } - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Denom) Marshal() (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 *Denom) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Denom) 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 = encodeVarintAsset(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metadata) Marshal() (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 *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PriorityScore != 0 { - i = encodeVarintAsset(dAtA, i, uint64(m.PriorityScore)) - i-- - dAtA[i] = 0x7c - i-- - dAtA[i] = 0x90 - } - if len(m.Images) > 0 { - for iNdEx := len(m.Images) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Images[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7c - i-- - dAtA[i] = 0x8a - } - } - if m.PenumbraAssetId != nil { - { - size, err := m.PenumbraAssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7c - i-- - dAtA[i] = 0x82 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x32 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x2a - } - if len(m.Display) > 0 { - i -= len(m.Display) - copy(dAtA[i:], m.Display) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Display))) - i-- - dAtA[i] = 0x22 - } - if len(m.Base) > 0 { - i -= len(m.Base) - copy(dAtA[i:], m.Base) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Base))) - i-- - dAtA[i] = 0x1a - } - if len(m.DenomUnits) > 0 { - for iNdEx := len(m.DenomUnits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DenomUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DenomUnit) Marshal() (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 *DenomUnit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DenomUnit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Aliases) > 0 { - for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Aliases[iNdEx]) - copy(dAtA[i:], m.Aliases[iNdEx]) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Aliases[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if m.Exponent != 0 { - i = encodeVarintAsset(dAtA, i, uint64(m.Exponent)) - i-- - dAtA[i] = 0x10 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Value) Marshal() (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 *Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValueView) Marshal() (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 *ValueView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValueView != nil { - { - size := m.ValueView.Size() - i -= size - if _, err := m.ValueView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ValueView_KnownAssetId_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueView_KnownAssetId_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.KnownAssetId != nil { - { - size, err := m.KnownAssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *ValueView_UnknownAssetId_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueView_UnknownAssetId_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.UnknownAssetId != nil { - { - size, err := m.UnknownAssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ValueView_KnownAssetId) Marshal() (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 *ValueView_KnownAssetId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueView_KnownAssetId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ExtendedMetadata != nil { - { - size, err := m.ExtendedMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.EquivalentValues) > 0 { - for iNdEx := len(m.EquivalentValues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EquivalentValues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValueView_UnknownAssetId) Marshal() (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 *ValueView_UnknownAssetId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueView_UnknownAssetId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetImage) Marshal() (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 *AssetImage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetImage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Theme != nil { - { - size, err := m.Theme.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Svg) > 0 { - i -= len(m.Svg) - copy(dAtA[i:], m.Svg) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Svg))) - i-- - dAtA[i] = 0x12 - } - if len(m.Png) > 0 { - i -= len(m.Png) - copy(dAtA[i:], m.Png) - i = encodeVarintAsset(dAtA, i, uint64(len(m.Png))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetImage_Theme) Marshal() (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 *AssetImage_Theme) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetImage_Theme) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DarkMode { - i-- - if m.DarkMode { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Circle { - i-- - if m.Circle { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.PrimaryColorHex) > 0 { - i -= len(m.PrimaryColorHex) - copy(dAtA[i:], m.PrimaryColorHex) - i = encodeVarintAsset(dAtA, i, uint64(len(m.PrimaryColorHex))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EstimatedPrice) Marshal() (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 *EstimatedPrice) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EstimatedPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AsOfHeight != 0 { - i = encodeVarintAsset(dAtA, i, uint64(m.AsOfHeight)) - i-- - dAtA[i] = 0x20 - } - if m.NumerairePerUnit != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumerairePerUnit)))) - i-- - dAtA[i] = 0x19 - } - if m.Numeraire != nil { - { - size, err := m.Numeraire.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PricedAsset != nil { - { - size, err := m.PricedAsset.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EquivalentValue) Marshal() (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 *EquivalentValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EquivalentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AsOfHeight != 0 { - i = encodeVarintAsset(dAtA, i, uint64(m.AsOfHeight)) - i-- - dAtA[i] = 0x18 - } - if m.Numeraire != nil { - { - size, err := m.Numeraire.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.EquivalentAmount != nil { - { - size, err := m.EquivalentAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAsset(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAsset(dAtA []byte, offset int, v uint64) int { - offset -= sovAsset(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BalanceCommitment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - return n -} - -func (m *AssetId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.AltBech32M) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.AltBaseDenom) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - return n -} - -func (m *Denom) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Description) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - if len(m.DenomUnits) > 0 { - for _, e := range m.DenomUnits { - l = e.Size() - n += 1 + l + sovAsset(uint64(l)) - } - } - l = len(m.Base) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.Display) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - if m.PenumbraAssetId != nil { - l = m.PenumbraAssetId.Size() - n += 2 + l + sovAsset(uint64(l)) - } - if len(m.Images) > 0 { - for _, e := range m.Images { - l = e.Size() - n += 2 + l + sovAsset(uint64(l)) - } - } - if m.PriorityScore != 0 { - n += 2 + sovAsset(uint64(m.PriorityScore)) - } - return n -} - -func (m *DenomUnit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - if m.Exponent != 0 { - n += 1 + sovAsset(uint64(m.Exponent)) - } - if len(m.Aliases) > 0 { - for _, s := range m.Aliases { - l = len(s) - n += 1 + l + sovAsset(uint64(l)) - } - } - return n -} - -func (m *Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovAsset(uint64(l)) - } - return n -} - -func (m *ValueView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValueView != nil { - n += m.ValueView.Size() - } - return n -} - -func (m *ValueView_KnownAssetId_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KnownAssetId != nil { - l = m.KnownAssetId.Size() - n += 1 + l + sovAsset(uint64(l)) - } - return n -} -func (m *ValueView_UnknownAssetId_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UnknownAssetId != nil { - l = m.UnknownAssetId.Size() - n += 1 + l + sovAsset(uint64(l)) - } - return n -} -func (m *ValueView_KnownAssetId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if len(m.EquivalentValues) > 0 { - for _, e := range m.EquivalentValues { - l = e.Size() - n += 1 + l + sovAsset(uint64(l)) - } - } - if m.ExtendedMetadata != nil { - l = m.ExtendedMetadata.Size() - n += 1 + l + sovAsset(uint64(l)) - } - return n -} - -func (m *ValueView_UnknownAssetId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovAsset(uint64(l)) - } - return n -} - -func (m *AssetImage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Png) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - l = len(m.Svg) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - if m.Theme != nil { - l = m.Theme.Size() - n += 1 + l + sovAsset(uint64(l)) - } - return n -} - -func (m *AssetImage_Theme) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PrimaryColorHex) - if l > 0 { - n += 1 + l + sovAsset(uint64(l)) - } - if m.Circle { - n += 2 - } - if m.DarkMode { - n += 2 - } - return n -} - -func (m *EstimatedPrice) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PricedAsset != nil { - l = m.PricedAsset.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if m.Numeraire != nil { - l = m.Numeraire.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if m.NumerairePerUnit != 0 { - n += 9 - } - if m.AsOfHeight != 0 { - n += 1 + sovAsset(uint64(m.AsOfHeight)) - } - return n -} - -func (m *EquivalentValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EquivalentAmount != nil { - l = m.EquivalentAmount.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if m.Numeraire != nil { - l = m.Numeraire.Size() - n += 1 + l + sovAsset(uint64(l)) - } - if m.AsOfHeight != 0 { - n += 1 + sovAsset(uint64(m.AsOfHeight)) - } - return n -} - -func sovAsset(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAsset(x uint64) (n int) { - return sovAsset(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *BalanceCommitment) 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 ErrIntOverflowAsset - } - 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: BalanceCommitment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BalanceCommitment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetId) 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 ErrIntOverflowAsset - } - 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: AssetId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltBech32M", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltBech32M = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltBaseDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltBaseDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Denom) 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 ErrIntOverflowAsset - } - 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: Denom: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Denom: 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 ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metadata) 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 ErrIntOverflowAsset - } - 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: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DenomUnits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DenomUnits = append(m.DenomUnits, &DenomUnit{}) - if err := m.DenomUnits[len(m.DenomUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Base = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Display", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Display = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1984: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PenumbraAssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PenumbraAssetId == nil { - m.PenumbraAssetId = &AssetId{} - } - if err := m.PenumbraAssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1985: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Images = append(m.Images, &AssetImage{}) - if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 1986: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PriorityScore", wireType) - } - m.PriorityScore = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PriorityScore |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DenomUnit) 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 ErrIntOverflowAsset - } - 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: DenomUnit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DenomUnit: 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 ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) - } - m.Exponent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Exponent |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Value) 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 ErrIntOverflowAsset - } - 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: Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v1.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValueView) 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 ErrIntOverflowAsset - } - 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: ValueView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValueView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KnownAssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ValueView_KnownAssetId{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ValueView = &ValueView_KnownAssetId_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnknownAssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ValueView_UnknownAssetId{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ValueView = &ValueView_UnknownAssetId_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValueView_KnownAssetId) 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 ErrIntOverflowAsset - } - 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: KnownAssetId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KnownAssetId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v1.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EquivalentValues", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EquivalentValues = append(m.EquivalentValues, &EquivalentValue{}) - if err := m.EquivalentValues[len(m.EquivalentValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendedMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExtendedMetadata == nil { - m.ExtendedMetadata = &types.Any{} - } - if err := m.ExtendedMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValueView_UnknownAssetId) 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 ErrIntOverflowAsset - } - 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: UnknownAssetId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnknownAssetId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v1.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetImage) 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 ErrIntOverflowAsset - } - 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: AssetImage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetImage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Png", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Png = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Svg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Svg = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Theme", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Theme == nil { - m.Theme = &AssetImage_Theme{} - } - if err := m.Theme.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetImage_Theme) 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 ErrIntOverflowAsset - } - 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: Theme: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Theme: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrimaryColorHex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrimaryColorHex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Circle", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Circle = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DarkMode", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DarkMode = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EstimatedPrice) 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 ErrIntOverflowAsset - } - 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: EstimatedPrice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EstimatedPrice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PricedAsset", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PricedAsset == nil { - m.PricedAsset = &AssetId{} - } - if err := m.PricedAsset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Numeraire", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Numeraire == nil { - m.Numeraire = &AssetId{} - } - if err := m.Numeraire.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NumerairePerUnit", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.NumerairePerUnit = float64(math.Float64frombits(v)) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AsOfHeight", wireType) - } - m.AsOfHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AsOfHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EquivalentValue) 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 ErrIntOverflowAsset - } - 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: EquivalentValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EquivalentValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EquivalentAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EquivalentAmount == nil { - m.EquivalentAmount = &v1.Amount{} - } - if err := m.EquivalentAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Numeraire", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAsset - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAsset - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Numeraire == nil { - m.Numeraire = &Metadata{} - } - if err := m.Numeraire.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AsOfHeight", wireType) - } - m.AsOfHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAsset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AsOfHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAsset(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAsset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAsset(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAsset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAsset - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAsset - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAsset - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAsset = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAsset = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAsset = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/auction/v1/auction.pb.go b/chain/penumbra/core/component/auction/v1/auction.pb.go deleted file mode 100644 index eff11e74..00000000 --- a/chain/penumbra/core/component/auction/v1/auction.pb.go +++ /dev/null @@ -1,6360 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/auction/v1/auction.proto - -package auctionv1 - -import ( - context "context" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/dex/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// The reason the auction ended. -type EventDutchAuctionEnded_Reason int32 - -const ( - EventDutchAuctionEnded_REASON_UNSPECIFIED EventDutchAuctionEnded_Reason = 0 - // The auction ended due to reaching its terminal height. - EventDutchAuctionEnded_REASON_EXPIRED EventDutchAuctionEnded_Reason = 1 - // The auction ran out of reserves. - EventDutchAuctionEnded_REASON_FILLED EventDutchAuctionEnded_Reason = 2 - // The auction ended was terminated by the initiator. - EventDutchAuctionEnded_REASON_CLOSED_BY_OWNER EventDutchAuctionEnded_Reason = 3 -) - -var EventDutchAuctionEnded_Reason_name = map[int32]string{ - 0: "REASON_UNSPECIFIED", - 1: "REASON_EXPIRED", - 2: "REASON_FILLED", - 3: "REASON_CLOSED_BY_OWNER", -} - -var EventDutchAuctionEnded_Reason_value = map[string]int32{ - "REASON_UNSPECIFIED": 0, - "REASON_EXPIRED": 1, - "REASON_FILLED": 2, - "REASON_CLOSED_BY_OWNER": 3, -} - -func (x EventDutchAuctionEnded_Reason) String() string { - return proto.EnumName(EventDutchAuctionEnded_Reason_name, int32(x)) -} - -func (EventDutchAuctionEnded_Reason) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{19, 0} -} - -// The configuration parameters for the auction component. -type AuctionParameters struct { -} - -func (m *AuctionParameters) Reset() { *m = AuctionParameters{} } -func (m *AuctionParameters) String() string { return proto.CompactTextString(m) } -func (*AuctionParameters) ProtoMessage() {} -func (*AuctionParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{0} -} -func (m *AuctionParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionParameters.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 *AuctionParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionParameters.Merge(m, src) -} -func (m *AuctionParameters) XXX_Size() int { - return m.Size() -} -func (m *AuctionParameters) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionParameters proto.InternalMessageInfo - -// Genesis data for the auction component. -type GenesisContent struct { - // The configuration parameters for the auction component at genesis. - Params *AuctionParameters `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{1} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetParams() *AuctionParameters { - if m != nil { - return m.Params - } - return nil -} - -type AuctionStateByIdRequest struct { - Id *AuctionId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *AuctionStateByIdRequest) Reset() { *m = AuctionStateByIdRequest{} } -func (m *AuctionStateByIdRequest) String() string { return proto.CompactTextString(m) } -func (*AuctionStateByIdRequest) ProtoMessage() {} -func (*AuctionStateByIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{2} -} -func (m *AuctionStateByIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionStateByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionStateByIdRequest.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 *AuctionStateByIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionStateByIdRequest.Merge(m, src) -} -func (m *AuctionStateByIdRequest) XXX_Size() int { - return m.Size() -} -func (m *AuctionStateByIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionStateByIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionStateByIdRequest proto.InternalMessageInfo - -func (m *AuctionStateByIdRequest) GetId() *AuctionId { - if m != nil { - return m.Id - } - return nil -} - -type AuctionStateByIdResponse struct { - // If present, the state of the auction. If not present, no such auction is known. - Auction *types.Any `protobuf:"bytes,2,opt,name=auction,proto3" json:"auction,omitempty"` - // The state of any DEX positions relevant to the returned auction. - // - // Could be empty, depending on the auction state. - Positions []*v1.Position `protobuf:"bytes,3,rep,name=positions,proto3" json:"positions,omitempty"` -} - -func (m *AuctionStateByIdResponse) Reset() { *m = AuctionStateByIdResponse{} } -func (m *AuctionStateByIdResponse) String() string { return proto.CompactTextString(m) } -func (*AuctionStateByIdResponse) ProtoMessage() {} -func (*AuctionStateByIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{3} -} -func (m *AuctionStateByIdResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionStateByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionStateByIdResponse.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 *AuctionStateByIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionStateByIdResponse.Merge(m, src) -} -func (m *AuctionStateByIdResponse) XXX_Size() int { - return m.Size() -} -func (m *AuctionStateByIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionStateByIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionStateByIdResponse proto.InternalMessageInfo - -func (m *AuctionStateByIdResponse) GetAuction() *types.Any { - if m != nil { - return m.Auction - } - return nil -} - -func (m *AuctionStateByIdResponse) GetPositions() []*v1.Position { - if m != nil { - return m.Positions - } - return nil -} - -type AuctionStateByIdsRequest struct { - // The auction IDs to request. Only known IDs will be returned in the response. - Id []*AuctionId `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"` -} - -func (m *AuctionStateByIdsRequest) Reset() { *m = AuctionStateByIdsRequest{} } -func (m *AuctionStateByIdsRequest) String() string { return proto.CompactTextString(m) } -func (*AuctionStateByIdsRequest) ProtoMessage() {} -func (*AuctionStateByIdsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{4} -} -func (m *AuctionStateByIdsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionStateByIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionStateByIdsRequest.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 *AuctionStateByIdsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionStateByIdsRequest.Merge(m, src) -} -func (m *AuctionStateByIdsRequest) XXX_Size() int { - return m.Size() -} -func (m *AuctionStateByIdsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionStateByIdsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionStateByIdsRequest proto.InternalMessageInfo - -func (m *AuctionStateByIdsRequest) GetId() []*AuctionId { - if m != nil { - return m.Id - } - return nil -} - -type AuctionStateByIdsResponse struct { - // The auction ID of the returned auction. - Id *AuctionId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The state of the returned auction. - Auction *DutchAuctionState `protobuf:"bytes,2,opt,name=auction,proto3" json:"auction,omitempty"` - // The state of any DEX positions relevant to the returned auction. - // - // Could be empty, depending on the auction state. - Positions []*v1.Position `protobuf:"bytes,3,rep,name=positions,proto3" json:"positions,omitempty"` -} - -func (m *AuctionStateByIdsResponse) Reset() { *m = AuctionStateByIdsResponse{} } -func (m *AuctionStateByIdsResponse) String() string { return proto.CompactTextString(m) } -func (*AuctionStateByIdsResponse) ProtoMessage() {} -func (*AuctionStateByIdsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{5} -} -func (m *AuctionStateByIdsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionStateByIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionStateByIdsResponse.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 *AuctionStateByIdsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionStateByIdsResponse.Merge(m, src) -} -func (m *AuctionStateByIdsResponse) XXX_Size() int { - return m.Size() -} -func (m *AuctionStateByIdsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionStateByIdsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionStateByIdsResponse proto.InternalMessageInfo - -func (m *AuctionStateByIdsResponse) GetId() *AuctionId { - if m != nil { - return m.Id - } - return nil -} - -func (m *AuctionStateByIdsResponse) GetAuction() *DutchAuctionState { - if m != nil { - return m.Auction - } - return nil -} - -func (m *AuctionStateByIdsResponse) GetPositions() []*v1.Position { - if m != nil { - return m.Positions - } - return nil -} - -// A unique identifier for an auction, obtained from hashing a domain separator -// along with the immutable part of an auction description. -type AuctionId struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *AuctionId) Reset() { *m = AuctionId{} } -func (m *AuctionId) String() string { return proto.CompactTextString(m) } -func (*AuctionId) ProtoMessage() {} -func (*AuctionId) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{6} -} -func (m *AuctionId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionId.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 *AuctionId) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionId.Merge(m, src) -} -func (m *AuctionId) XXX_Size() int { - return m.Size() -} -func (m *AuctionId) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionId.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionId proto.InternalMessageInfo - -func (m *AuctionId) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A bearer NFT tracking ownership of an auction and its proceeds. -type AuctionNft struct { - Id *AuctionId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` -} - -func (m *AuctionNft) Reset() { *m = AuctionNft{} } -func (m *AuctionNft) String() string { return proto.CompactTextString(m) } -func (*AuctionNft) ProtoMessage() {} -func (*AuctionNft) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{7} -} -func (m *AuctionNft) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionNft) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionNft.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 *AuctionNft) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionNft.Merge(m, src) -} -func (m *AuctionNft) XXX_Size() int { - return m.Size() -} -func (m *AuctionNft) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionNft.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionNft proto.InternalMessageInfo - -func (m *AuctionNft) GetId() *AuctionId { - if m != nil { - return m.Id - } - return nil -} - -func (m *AuctionNft) GetSeq() uint64 { - if m != nil { - return m.Seq - } - return 0 -} - -// Describes a Dutch auction using programmatic liquidity on the DEX. -type DutchAuctionDescription struct { - // The value the seller wishes to auction. - Input *v11.Value `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - // The asset ID of the target asset the seller wishes to acquire. - OutputId *v11.AssetId `protobuf:"bytes,2,opt,name=output_id,json=outputId,proto3" json:"output_id,omitempty"` - // The maximum output the seller can receive. - // - // This implicitly defines the starting price for the auction. - MaxOutput *v12.Amount `protobuf:"bytes,3,opt,name=max_output,json=maxOutput,proto3" json:"max_output,omitempty"` - // The minimum output the seller is willing to receive. - // - // This implicitly defines the ending price for the auction. - MinOutput *v12.Amount `protobuf:"bytes,4,opt,name=min_output,json=minOutput,proto3" json:"min_output,omitempty"` - // The block height at which the auction begins. - // - // This allows the seller to schedule an auction at a future time. - StartHeight uint64 `protobuf:"varint,5,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` - // The block height at which the auction ends. - // - // Together with `start_height`, `max_output`, and `min_output`, - // this implicitly defines the speed of the auction. - EndHeight uint64 `protobuf:"varint,6,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` - // The number of discrete price steps to use for the auction. - // - // `end_height - start_height` must be a multiple of `step_count`. - StepCount uint64 `protobuf:"varint,7,opt,name=step_count,json=stepCount,proto3" json:"step_count,omitempty"` - // A random nonce used to allow identical auctions to have - // distinct auction IDs. - Nonce []byte `protobuf:"bytes,8,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (m *DutchAuctionDescription) Reset() { *m = DutchAuctionDescription{} } -func (m *DutchAuctionDescription) String() string { return proto.CompactTextString(m) } -func (*DutchAuctionDescription) ProtoMessage() {} -func (*DutchAuctionDescription) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{8} -} -func (m *DutchAuctionDescription) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DutchAuctionDescription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DutchAuctionDescription.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 *DutchAuctionDescription) XXX_Merge(src proto.Message) { - xxx_messageInfo_DutchAuctionDescription.Merge(m, src) -} -func (m *DutchAuctionDescription) XXX_Size() int { - return m.Size() -} -func (m *DutchAuctionDescription) XXX_DiscardUnknown() { - xxx_messageInfo_DutchAuctionDescription.DiscardUnknown(m) -} - -var xxx_messageInfo_DutchAuctionDescription proto.InternalMessageInfo - -func (m *DutchAuctionDescription) GetInput() *v11.Value { - if m != nil { - return m.Input - } - return nil -} - -func (m *DutchAuctionDescription) GetOutputId() *v11.AssetId { - if m != nil { - return m.OutputId - } - return nil -} - -func (m *DutchAuctionDescription) GetMaxOutput() *v12.Amount { - if m != nil { - return m.MaxOutput - } - return nil -} - -func (m *DutchAuctionDescription) GetMinOutput() *v12.Amount { - if m != nil { - return m.MinOutput - } - return nil -} - -func (m *DutchAuctionDescription) GetStartHeight() uint64 { - if m != nil { - return m.StartHeight - } - return 0 -} - -func (m *DutchAuctionDescription) GetEndHeight() uint64 { - if m != nil { - return m.EndHeight - } - return 0 -} - -func (m *DutchAuctionDescription) GetStepCount() uint64 { - if m != nil { - return m.StepCount - } - return 0 -} - -func (m *DutchAuctionDescription) GetNonce() []byte { - if m != nil { - return m.Nonce - } - return nil -} - -type DutchAuctionState struct { - // The sequence number of the auction state. - // - // Dutch auctions move from: - // 0 (opened) => 1 (closed) => n (withdrawn) - Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` - // If present, the current position controlled by this auction. - CurrentPosition *v1.PositionId `protobuf:"bytes,2,opt,name=current_position,json=currentPosition,proto3" json:"current_position,omitempty"` - // If present, the next trigger height to step down the price. - NextTrigger uint64 `protobuf:"varint,3,opt,name=next_trigger,json=nextTrigger,proto3" json:"next_trigger,omitempty"` - // The amount of the input asset directly owned by the auction. - // - // The auction may also own the input asset indirectly, - // via the reserves of `current_position` if it exists. - InputReserves *v12.Amount `protobuf:"bytes,4,opt,name=input_reserves,json=inputReserves,proto3" json:"input_reserves,omitempty"` - // The amount of the output asset directly owned by the auction. - // - // The auction may also own the output asset indirectly, - // via the reserves of `current_position` if it exists. - OutputReserves *v12.Amount `protobuf:"bytes,5,opt,name=output_reserves,json=outputReserves,proto3" json:"output_reserves,omitempty"` -} - -func (m *DutchAuctionState) Reset() { *m = DutchAuctionState{} } -func (m *DutchAuctionState) String() string { return proto.CompactTextString(m) } -func (*DutchAuctionState) ProtoMessage() {} -func (*DutchAuctionState) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{9} -} -func (m *DutchAuctionState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DutchAuctionState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DutchAuctionState.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 *DutchAuctionState) XXX_Merge(src proto.Message) { - xxx_messageInfo_DutchAuctionState.Merge(m, src) -} -func (m *DutchAuctionState) XXX_Size() int { - return m.Size() -} -func (m *DutchAuctionState) XXX_DiscardUnknown() { - xxx_messageInfo_DutchAuctionState.DiscardUnknown(m) -} - -var xxx_messageInfo_DutchAuctionState proto.InternalMessageInfo - -func (m *DutchAuctionState) GetSeq() uint64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *DutchAuctionState) GetCurrentPosition() *v1.PositionId { - if m != nil { - return m.CurrentPosition - } - return nil -} - -func (m *DutchAuctionState) GetNextTrigger() uint64 { - if m != nil { - return m.NextTrigger - } - return 0 -} - -func (m *DutchAuctionState) GetInputReserves() *v12.Amount { - if m != nil { - return m.InputReserves - } - return nil -} - -func (m *DutchAuctionState) GetOutputReserves() *v12.Amount { - if m != nil { - return m.OutputReserves - } - return nil -} - -type DutchAuction struct { - // The immutable data describing the auction and its auction ID. - Description *DutchAuctionDescription `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The mutable data describing the auction's execution. - State *DutchAuctionState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` -} - -func (m *DutchAuction) Reset() { *m = DutchAuction{} } -func (m *DutchAuction) String() string { return proto.CompactTextString(m) } -func (*DutchAuction) ProtoMessage() {} -func (*DutchAuction) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{10} -} -func (m *DutchAuction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DutchAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DutchAuction.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 *DutchAuction) XXX_Merge(src proto.Message) { - xxx_messageInfo_DutchAuction.Merge(m, src) -} -func (m *DutchAuction) XXX_Size() int { - return m.Size() -} -func (m *DutchAuction) XXX_DiscardUnknown() { - xxx_messageInfo_DutchAuction.DiscardUnknown(m) -} - -var xxx_messageInfo_DutchAuction proto.InternalMessageInfo - -func (m *DutchAuction) GetDescription() *DutchAuctionDescription { - if m != nil { - return m.Description - } - return nil -} - -func (m *DutchAuction) GetState() *DutchAuctionState { - if m != nil { - return m.State - } - return nil -} - -// Initiates a Dutch auction using protocol-controlled liquidity. -type ActionDutchAuctionSchedule struct { - Description *DutchAuctionDescription `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *ActionDutchAuctionSchedule) Reset() { *m = ActionDutchAuctionSchedule{} } -func (m *ActionDutchAuctionSchedule) String() string { return proto.CompactTextString(m) } -func (*ActionDutchAuctionSchedule) ProtoMessage() {} -func (*ActionDutchAuctionSchedule) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{11} -} -func (m *ActionDutchAuctionSchedule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionDutchAuctionSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionDutchAuctionSchedule.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 *ActionDutchAuctionSchedule) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionDutchAuctionSchedule.Merge(m, src) -} -func (m *ActionDutchAuctionSchedule) XXX_Size() int { - return m.Size() -} -func (m *ActionDutchAuctionSchedule) XXX_DiscardUnknown() { - xxx_messageInfo_ActionDutchAuctionSchedule.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionDutchAuctionSchedule proto.InternalMessageInfo - -func (m *ActionDutchAuctionSchedule) GetDescription() *DutchAuctionDescription { - if m != nil { - return m.Description - } - return nil -} - -// Terminate the auction associated with the specified `auction_id` -type ActionDutchAuctionEnd struct { - // The auction to end. - AuctionId *AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` -} - -func (m *ActionDutchAuctionEnd) Reset() { *m = ActionDutchAuctionEnd{} } -func (m *ActionDutchAuctionEnd) String() string { return proto.CompactTextString(m) } -func (*ActionDutchAuctionEnd) ProtoMessage() {} -func (*ActionDutchAuctionEnd) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{12} -} -func (m *ActionDutchAuctionEnd) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionDutchAuctionEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionDutchAuctionEnd.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 *ActionDutchAuctionEnd) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionDutchAuctionEnd.Merge(m, src) -} -func (m *ActionDutchAuctionEnd) XXX_Size() int { - return m.Size() -} -func (m *ActionDutchAuctionEnd) XXX_DiscardUnknown() { - xxx_messageInfo_ActionDutchAuctionEnd.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionDutchAuctionEnd proto.InternalMessageInfo - -func (m *ActionDutchAuctionEnd) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -// Withdraw funds from the ended auction associated with the specified `auction_id` -type ActionDutchAuctionWithdraw struct { - // The auction to withdraw funds from. - AuctionId *AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - // The sequence number of the withdrawal. - Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` - // A transparent (zero blinding factor) commitment to the - // auction's final reserves. - // - // The chain will check this commitment by recomputing it - // with the on-chain state. - ReservesCommitment *v11.BalanceCommitment `protobuf:"bytes,3,opt,name=reserves_commitment,json=reservesCommitment,proto3" json:"reserves_commitment,omitempty"` -} - -func (m *ActionDutchAuctionWithdraw) Reset() { *m = ActionDutchAuctionWithdraw{} } -func (m *ActionDutchAuctionWithdraw) String() string { return proto.CompactTextString(m) } -func (*ActionDutchAuctionWithdraw) ProtoMessage() {} -func (*ActionDutchAuctionWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{13} -} -func (m *ActionDutchAuctionWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionDutchAuctionWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionDutchAuctionWithdraw.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 *ActionDutchAuctionWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionDutchAuctionWithdraw.Merge(m, src) -} -func (m *ActionDutchAuctionWithdraw) XXX_Size() int { - return m.Size() -} -func (m *ActionDutchAuctionWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_ActionDutchAuctionWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionDutchAuctionWithdraw proto.InternalMessageInfo - -func (m *ActionDutchAuctionWithdraw) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *ActionDutchAuctionWithdraw) GetSeq() uint64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *ActionDutchAuctionWithdraw) GetReservesCommitment() *v11.BalanceCommitment { - if m != nil { - return m.ReservesCommitment - } - return nil -} - -// A plan to a `ActionDutchAuctionWithdraw` which contains both private and public data. -type ActionDutchAuctionWithdrawPlan struct { - AuctionId *AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` - ReservesInput *v11.Value `protobuf:"bytes,3,opt,name=reserves_input,json=reservesInput,proto3" json:"reserves_input,omitempty"` - ReservesOutput *v11.Value `protobuf:"bytes,4,opt,name=reserves_output,json=reservesOutput,proto3" json:"reserves_output,omitempty"` -} - -func (m *ActionDutchAuctionWithdrawPlan) Reset() { *m = ActionDutchAuctionWithdrawPlan{} } -func (m *ActionDutchAuctionWithdrawPlan) String() string { return proto.CompactTextString(m) } -func (*ActionDutchAuctionWithdrawPlan) ProtoMessage() {} -func (*ActionDutchAuctionWithdrawPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{14} -} -func (m *ActionDutchAuctionWithdrawPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionDutchAuctionWithdrawPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionDutchAuctionWithdrawPlan.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 *ActionDutchAuctionWithdrawPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionDutchAuctionWithdrawPlan.Merge(m, src) -} -func (m *ActionDutchAuctionWithdrawPlan) XXX_Size() int { - return m.Size() -} -func (m *ActionDutchAuctionWithdrawPlan) XXX_DiscardUnknown() { - xxx_messageInfo_ActionDutchAuctionWithdrawPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionDutchAuctionWithdrawPlan proto.InternalMessageInfo - -func (m *ActionDutchAuctionWithdrawPlan) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *ActionDutchAuctionWithdrawPlan) GetSeq() uint64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *ActionDutchAuctionWithdrawPlan) GetReservesInput() *v11.Value { - if m != nil { - return m.ReservesInput - } - return nil -} - -func (m *ActionDutchAuctionWithdrawPlan) GetReservesOutput() *v11.Value { - if m != nil { - return m.ReservesOutput - } - return nil -} - -// An `ActionDutchAuctionSchedule` augmented with additional metadata. -type ActionDutchAuctionScheduleView struct { - Action *ActionDutchAuctionSchedule `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` - AuctionId *AuctionId `protobuf:"bytes,2,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - InputMetadata *v11.Metadata `protobuf:"bytes,3,opt,name=input_metadata,json=inputMetadata,proto3" json:"input_metadata,omitempty"` - OutputMetadata *v11.Metadata `protobuf:"bytes,4,opt,name=output_metadata,json=outputMetadata,proto3" json:"output_metadata,omitempty"` -} - -func (m *ActionDutchAuctionScheduleView) Reset() { *m = ActionDutchAuctionScheduleView{} } -func (m *ActionDutchAuctionScheduleView) String() string { return proto.CompactTextString(m) } -func (*ActionDutchAuctionScheduleView) ProtoMessage() {} -func (*ActionDutchAuctionScheduleView) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{15} -} -func (m *ActionDutchAuctionScheduleView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionDutchAuctionScheduleView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionDutchAuctionScheduleView.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 *ActionDutchAuctionScheduleView) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionDutchAuctionScheduleView.Merge(m, src) -} -func (m *ActionDutchAuctionScheduleView) XXX_Size() int { - return m.Size() -} -func (m *ActionDutchAuctionScheduleView) XXX_DiscardUnknown() { - xxx_messageInfo_ActionDutchAuctionScheduleView.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionDutchAuctionScheduleView proto.InternalMessageInfo - -func (m *ActionDutchAuctionScheduleView) GetAction() *ActionDutchAuctionSchedule { - if m != nil { - return m.Action - } - return nil -} - -func (m *ActionDutchAuctionScheduleView) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *ActionDutchAuctionScheduleView) GetInputMetadata() *v11.Metadata { - if m != nil { - return m.InputMetadata - } - return nil -} - -func (m *ActionDutchAuctionScheduleView) GetOutputMetadata() *v11.Metadata { - if m != nil { - return m.OutputMetadata - } - return nil -} - -// An `ActionDutchAuctionWithdraw` augmented with additional metadata. -type ActionDutchAuctionWithdrawView struct { - Action *ActionDutchAuctionWithdraw `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` - // A sequence of values that sum together to the provided - // reserves commitment. - Reserves []*v11.ValueView `protobuf:"bytes,2,rep,name=reserves,proto3" json:"reserves,omitempty"` -} - -func (m *ActionDutchAuctionWithdrawView) Reset() { *m = ActionDutchAuctionWithdrawView{} } -func (m *ActionDutchAuctionWithdrawView) String() string { return proto.CompactTextString(m) } -func (*ActionDutchAuctionWithdrawView) ProtoMessage() {} -func (*ActionDutchAuctionWithdrawView) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{16} -} -func (m *ActionDutchAuctionWithdrawView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionDutchAuctionWithdrawView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionDutchAuctionWithdrawView.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 *ActionDutchAuctionWithdrawView) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionDutchAuctionWithdrawView.Merge(m, src) -} -func (m *ActionDutchAuctionWithdrawView) XXX_Size() int { - return m.Size() -} -func (m *ActionDutchAuctionWithdrawView) XXX_DiscardUnknown() { - xxx_messageInfo_ActionDutchAuctionWithdrawView.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionDutchAuctionWithdrawView proto.InternalMessageInfo - -func (m *ActionDutchAuctionWithdrawView) GetAction() *ActionDutchAuctionWithdraw { - if m != nil { - return m.Action - } - return nil -} - -func (m *ActionDutchAuctionWithdrawView) GetReserves() []*v11.ValueView { - if m != nil { - return m.Reserves - } - return nil -} - -type EventDutchAuctionScheduled struct { - AuctionId *AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - Description *DutchAuctionDescription `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *EventDutchAuctionScheduled) Reset() { *m = EventDutchAuctionScheduled{} } -func (m *EventDutchAuctionScheduled) String() string { return proto.CompactTextString(m) } -func (*EventDutchAuctionScheduled) ProtoMessage() {} -func (*EventDutchAuctionScheduled) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{17} -} -func (m *EventDutchAuctionScheduled) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDutchAuctionScheduled) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDutchAuctionScheduled.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 *EventDutchAuctionScheduled) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDutchAuctionScheduled.Merge(m, src) -} -func (m *EventDutchAuctionScheduled) XXX_Size() int { - return m.Size() -} -func (m *EventDutchAuctionScheduled) XXX_DiscardUnknown() { - xxx_messageInfo_EventDutchAuctionScheduled.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDutchAuctionScheduled proto.InternalMessageInfo - -func (m *EventDutchAuctionScheduled) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *EventDutchAuctionScheduled) GetDescription() *DutchAuctionDescription { - if m != nil { - return m.Description - } - return nil -} - -type EventDutchAuctionUpdated struct { - AuctionId *AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - State *DutchAuctionState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` -} - -func (m *EventDutchAuctionUpdated) Reset() { *m = EventDutchAuctionUpdated{} } -func (m *EventDutchAuctionUpdated) String() string { return proto.CompactTextString(m) } -func (*EventDutchAuctionUpdated) ProtoMessage() {} -func (*EventDutchAuctionUpdated) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{18} -} -func (m *EventDutchAuctionUpdated) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDutchAuctionUpdated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDutchAuctionUpdated.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 *EventDutchAuctionUpdated) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDutchAuctionUpdated.Merge(m, src) -} -func (m *EventDutchAuctionUpdated) XXX_Size() int { - return m.Size() -} -func (m *EventDutchAuctionUpdated) XXX_DiscardUnknown() { - xxx_messageInfo_EventDutchAuctionUpdated.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDutchAuctionUpdated proto.InternalMessageInfo - -func (m *EventDutchAuctionUpdated) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *EventDutchAuctionUpdated) GetState() *DutchAuctionState { - if m != nil { - return m.State - } - return nil -} - -type EventDutchAuctionEnded struct { - AuctionId *AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - State *DutchAuctionState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` - Reason EventDutchAuctionEnded_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=penumbra.core.component.auction.v1.EventDutchAuctionEnded_Reason" json:"reason,omitempty"` -} - -func (m *EventDutchAuctionEnded) Reset() { *m = EventDutchAuctionEnded{} } -func (m *EventDutchAuctionEnded) String() string { return proto.CompactTextString(m) } -func (*EventDutchAuctionEnded) ProtoMessage() {} -func (*EventDutchAuctionEnded) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{19} -} -func (m *EventDutchAuctionEnded) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDutchAuctionEnded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDutchAuctionEnded.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 *EventDutchAuctionEnded) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDutchAuctionEnded.Merge(m, src) -} -func (m *EventDutchAuctionEnded) XXX_Size() int { - return m.Size() -} -func (m *EventDutchAuctionEnded) XXX_DiscardUnknown() { - xxx_messageInfo_EventDutchAuctionEnded.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDutchAuctionEnded proto.InternalMessageInfo - -func (m *EventDutchAuctionEnded) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *EventDutchAuctionEnded) GetState() *DutchAuctionState { - if m != nil { - return m.State - } - return nil -} - -func (m *EventDutchAuctionEnded) GetReason() EventDutchAuctionEnded_Reason { - if m != nil { - return m.Reason - } - return EventDutchAuctionEnded_REASON_UNSPECIFIED -} - -type EventDutchAuctionWithdrawn struct { - AuctionId *AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - State *DutchAuctionState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` -} - -func (m *EventDutchAuctionWithdrawn) Reset() { *m = EventDutchAuctionWithdrawn{} } -func (m *EventDutchAuctionWithdrawn) String() string { return proto.CompactTextString(m) } -func (*EventDutchAuctionWithdrawn) ProtoMessage() {} -func (*EventDutchAuctionWithdrawn) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{20} -} -func (m *EventDutchAuctionWithdrawn) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDutchAuctionWithdrawn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDutchAuctionWithdrawn.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 *EventDutchAuctionWithdrawn) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDutchAuctionWithdrawn.Merge(m, src) -} -func (m *EventDutchAuctionWithdrawn) XXX_Size() int { - return m.Size() -} -func (m *EventDutchAuctionWithdrawn) XXX_DiscardUnknown() { - xxx_messageInfo_EventDutchAuctionWithdrawn.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDutchAuctionWithdrawn proto.InternalMessageInfo - -func (m *EventDutchAuctionWithdrawn) GetAuctionId() *AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *EventDutchAuctionWithdrawn) GetState() *DutchAuctionState { - if m != nil { - return m.State - } - return nil -} - -// A message emitted when value flows *into* the auction component. -type EventValueCircuitBreakerCredit struct { - // The asset ID being deposited into the Auction component. - AssetId *v11.AssetId `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - // The previous balance of the asset in the Auction component. - PreviousBalance *v12.Amount `protobuf:"bytes,2,opt,name=previous_balance,json=previousBalance,proto3" json:"previous_balance,omitempty"` - // The new balance of the asset in the Auction component. - NewBalance *v12.Amount `protobuf:"bytes,3,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"` -} - -func (m *EventValueCircuitBreakerCredit) Reset() { *m = EventValueCircuitBreakerCredit{} } -func (m *EventValueCircuitBreakerCredit) String() string { return proto.CompactTextString(m) } -func (*EventValueCircuitBreakerCredit) ProtoMessage() {} -func (*EventValueCircuitBreakerCredit) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{21} -} -func (m *EventValueCircuitBreakerCredit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValueCircuitBreakerCredit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValueCircuitBreakerCredit.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 *EventValueCircuitBreakerCredit) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValueCircuitBreakerCredit.Merge(m, src) -} -func (m *EventValueCircuitBreakerCredit) XXX_Size() int { - return m.Size() -} -func (m *EventValueCircuitBreakerCredit) XXX_DiscardUnknown() { - xxx_messageInfo_EventValueCircuitBreakerCredit.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValueCircuitBreakerCredit proto.InternalMessageInfo - -func (m *EventValueCircuitBreakerCredit) GetAssetId() *v11.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -func (m *EventValueCircuitBreakerCredit) GetPreviousBalance() *v12.Amount { - if m != nil { - return m.PreviousBalance - } - return nil -} - -func (m *EventValueCircuitBreakerCredit) GetNewBalance() *v12.Amount { - if m != nil { - return m.NewBalance - } - return nil -} - -// A message emitted when value flows *out* of the auction component. -type EventValueCircuitBreakerDebit struct { - // The asset ID being deposited into the Auction component. - AssetId *v11.AssetId `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - // The previous balance of the asset in the Auction component. - PreviousBalance *v12.Amount `protobuf:"bytes,2,opt,name=previous_balance,json=previousBalance,proto3" json:"previous_balance,omitempty"` - // The new balance of the asset in the Auction component. - NewBalance *v12.Amount `protobuf:"bytes,3,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"` -} - -func (m *EventValueCircuitBreakerDebit) Reset() { *m = EventValueCircuitBreakerDebit{} } -func (m *EventValueCircuitBreakerDebit) String() string { return proto.CompactTextString(m) } -func (*EventValueCircuitBreakerDebit) ProtoMessage() {} -func (*EventValueCircuitBreakerDebit) Descriptor() ([]byte, []int) { - return fileDescriptor_5bd5c1fb0f471c5d, []int{22} -} -func (m *EventValueCircuitBreakerDebit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValueCircuitBreakerDebit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValueCircuitBreakerDebit.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 *EventValueCircuitBreakerDebit) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValueCircuitBreakerDebit.Merge(m, src) -} -func (m *EventValueCircuitBreakerDebit) XXX_Size() int { - return m.Size() -} -func (m *EventValueCircuitBreakerDebit) XXX_DiscardUnknown() { - xxx_messageInfo_EventValueCircuitBreakerDebit.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValueCircuitBreakerDebit proto.InternalMessageInfo - -func (m *EventValueCircuitBreakerDebit) GetAssetId() *v11.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -func (m *EventValueCircuitBreakerDebit) GetPreviousBalance() *v12.Amount { - if m != nil { - return m.PreviousBalance - } - return nil -} - -func (m *EventValueCircuitBreakerDebit) GetNewBalance() *v12.Amount { - if m != nil { - return m.NewBalance - } - return nil -} - -func init() { - proto.RegisterEnum("penumbra.core.component.auction.v1.EventDutchAuctionEnded_Reason", EventDutchAuctionEnded_Reason_name, EventDutchAuctionEnded_Reason_value) - proto.RegisterType((*AuctionParameters)(nil), "penumbra.core.component.auction.v1.AuctionParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.auction.v1.GenesisContent") - proto.RegisterType((*AuctionStateByIdRequest)(nil), "penumbra.core.component.auction.v1.AuctionStateByIdRequest") - proto.RegisterType((*AuctionStateByIdResponse)(nil), "penumbra.core.component.auction.v1.AuctionStateByIdResponse") - proto.RegisterType((*AuctionStateByIdsRequest)(nil), "penumbra.core.component.auction.v1.AuctionStateByIdsRequest") - proto.RegisterType((*AuctionStateByIdsResponse)(nil), "penumbra.core.component.auction.v1.AuctionStateByIdsResponse") - proto.RegisterType((*AuctionId)(nil), "penumbra.core.component.auction.v1.AuctionId") - proto.RegisterType((*AuctionNft)(nil), "penumbra.core.component.auction.v1.AuctionNft") - proto.RegisterType((*DutchAuctionDescription)(nil), "penumbra.core.component.auction.v1.DutchAuctionDescription") - proto.RegisterType((*DutchAuctionState)(nil), "penumbra.core.component.auction.v1.DutchAuctionState") - proto.RegisterType((*DutchAuction)(nil), "penumbra.core.component.auction.v1.DutchAuction") - proto.RegisterType((*ActionDutchAuctionSchedule)(nil), "penumbra.core.component.auction.v1.ActionDutchAuctionSchedule") - proto.RegisterType((*ActionDutchAuctionEnd)(nil), "penumbra.core.component.auction.v1.ActionDutchAuctionEnd") - proto.RegisterType((*ActionDutchAuctionWithdraw)(nil), "penumbra.core.component.auction.v1.ActionDutchAuctionWithdraw") - proto.RegisterType((*ActionDutchAuctionWithdrawPlan)(nil), "penumbra.core.component.auction.v1.ActionDutchAuctionWithdrawPlan") - proto.RegisterType((*ActionDutchAuctionScheduleView)(nil), "penumbra.core.component.auction.v1.ActionDutchAuctionScheduleView") - proto.RegisterType((*ActionDutchAuctionWithdrawView)(nil), "penumbra.core.component.auction.v1.ActionDutchAuctionWithdrawView") - proto.RegisterType((*EventDutchAuctionScheduled)(nil), "penumbra.core.component.auction.v1.EventDutchAuctionScheduled") - proto.RegisterType((*EventDutchAuctionUpdated)(nil), "penumbra.core.component.auction.v1.EventDutchAuctionUpdated") - proto.RegisterType((*EventDutchAuctionEnded)(nil), "penumbra.core.component.auction.v1.EventDutchAuctionEnded") - proto.RegisterType((*EventDutchAuctionWithdrawn)(nil), "penumbra.core.component.auction.v1.EventDutchAuctionWithdrawn") - proto.RegisterType((*EventValueCircuitBreakerCredit)(nil), "penumbra.core.component.auction.v1.EventValueCircuitBreakerCredit") - proto.RegisterType((*EventValueCircuitBreakerDebit)(nil), "penumbra.core.component.auction.v1.EventValueCircuitBreakerDebit") -} - -func init() { - proto.RegisterFile("penumbra/core/component/auction/v1/auction.proto", fileDescriptor_5bd5c1fb0f471c5d) -} - -var fileDescriptor_5bd5c1fb0f471c5d = []byte{ - // 1394 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x6e, 0xdb, 0xc6, - 0x16, 0x36, 0x29, 0xdb, 0xb1, 0x8f, 0x1d, 0x5b, 0x99, 0xe4, 0x26, 0x8a, 0x70, 0xa3, 0x9b, 0x70, - 0x11, 0xf8, 0x5e, 0x20, 0x54, 0xe4, 0xe0, 0x02, 0x85, 0x1c, 0x17, 0xd0, 0x9f, 0x5d, 0xa1, 0x8e, - 0xad, 0xd2, 0x8d, 0xf3, 0x03, 0x07, 0x04, 0x4d, 0x4e, 0x24, 0xa2, 0xd6, 0x50, 0x19, 0x0e, 0x65, - 0x1b, 0x7d, 0x86, 0x16, 0x45, 0x1e, 0xa1, 0xcb, 0x76, 0x59, 0x14, 0x05, 0xfa, 0x04, 0x6d, 0x57, - 0x59, 0x06, 0x5d, 0xb5, 0x76, 0x57, 0xdd, 0x66, 0x5d, 0xa0, 0x18, 0x72, 0x86, 0x52, 0x24, 0x2b, - 0x56, 0x6c, 0x05, 0x08, 0xba, 0x91, 0x66, 0xce, 0x9c, 0xef, 0x3b, 0x3f, 0x73, 0xe6, 0x90, 0x1c, - 0xb8, 0xdd, 0xc2, 0x24, 0x68, 0xee, 0x50, 0x2b, 0x6b, 0x7b, 0x14, 0x67, 0x6d, 0xaf, 0xd9, 0xf2, - 0x08, 0x26, 0x2c, 0x6b, 0x05, 0x36, 0x73, 0x3d, 0x92, 0x6d, 0xe7, 0xe4, 0x50, 0x6f, 0x51, 0x8f, - 0x79, 0x48, 0x93, 0x08, 0x9d, 0x23, 0xf4, 0x18, 0xa1, 0x4b, 0xb5, 0x76, 0x2e, 0x7d, 0xb5, 0xee, - 0x79, 0xf5, 0x5d, 0x9c, 0x0d, 0x11, 0x3b, 0xc1, 0xd3, 0xac, 0x45, 0x0e, 0x22, 0x78, 0x5a, 0x7b, - 0xdd, 0xa0, 0xe5, 0xfb, 0x98, 0x85, 0x46, 0xf8, 0x40, 0xe8, 0x2c, 0x0c, 0x72, 0xca, 0xc1, 0xfb, - 0x5c, 0xd7, 0xc1, 0xfb, 0x42, 0x33, 0xf3, 0xba, 0x26, 0x09, 0x9a, 0x7c, 0x9d, 0x04, 0xcd, 0x68, - 0x5d, 0xbb, 0x08, 0x17, 0x0a, 0x91, 0x5b, 0x35, 0x8b, 0x5a, 0x4d, 0xcc, 0x30, 0xf5, 0x35, 0x13, - 0xe6, 0x56, 0x31, 0xc1, 0xbe, 0xeb, 0x97, 0x3c, 0xc2, 0x30, 0x61, 0xe8, 0x1e, 0x4c, 0xb6, 0xf8, - 0xba, 0x9f, 0x52, 0xae, 0x2b, 0x0b, 0x33, 0x8b, 0xff, 0xd7, 0x4f, 0x0e, 0x52, 0xef, 0x23, 0x36, - 0x04, 0x89, 0xf6, 0x10, 0xae, 0x88, 0xc5, 0x4d, 0x66, 0x31, 0x5c, 0x3c, 0xa8, 0x3a, 0x06, 0x7e, - 0x16, 0x60, 0x9f, 0xa1, 0x65, 0x50, 0x5d, 0x47, 0x58, 0xb9, 0xf5, 0x16, 0x56, 0xaa, 0x8e, 0xa1, - 0xba, 0x8e, 0xf6, 0x5c, 0x81, 0x54, 0x3f, 0xb5, 0xdf, 0xf2, 0x88, 0x8f, 0x91, 0x0e, 0xe7, 0x04, - 0x30, 0xa5, 0x86, 0x06, 0x2e, 0xe9, 0xd1, 0x3e, 0xe8, 0x72, 0x1f, 0xf4, 0x02, 0x39, 0x30, 0xa4, - 0x12, 0x5a, 0x81, 0xe9, 0x96, 0xe7, 0xbb, 0x7c, 0xec, 0xa7, 0x12, 0xd7, 0x13, 0x0b, 0x33, 0x8b, - 0x0b, 0x03, 0x5d, 0xe2, 0x39, 0x6f, 0xe7, 0xf4, 0x9a, 0x00, 0x18, 0x1d, 0xa8, 0xf6, 0xa8, 0xdf, - 0x27, 0xbf, 0x37, 0xde, 0xc4, 0xe9, 0xe2, 0x7d, 0xa5, 0xc0, 0xd5, 0x63, 0xb8, 0x45, 0xc0, 0x67, - 0x4b, 0x26, 0xda, 0xe8, 0xcd, 0xd7, 0x50, 0xdb, 0x5e, 0x0e, 0x98, 0xdd, 0xe8, 0xf6, 0x69, 0xf4, - 0x09, 0xbd, 0x01, 0xd3, 0xb1, 0xa7, 0xe8, 0x12, 0x4c, 0xb8, 0x84, 0x60, 0x1a, 0xc6, 0x39, 0x6b, - 0x44, 0x13, 0xed, 0x09, 0x80, 0x50, 0x59, 0x7f, 0x7a, 0xd6, 0xaa, 0x42, 0x49, 0x48, 0xf8, 0xf8, - 0x59, 0x98, 0x84, 0x71, 0x83, 0x0f, 0xb5, 0xbf, 0x54, 0xb8, 0xd2, 0x1d, 0x68, 0x19, 0xfb, 0x36, - 0x75, 0x5b, 0x61, 0x94, 0x77, 0xb8, 0x43, 0xad, 0x80, 0x09, 0x7b, 0xd7, 0x7a, 0xec, 0x45, 0x07, - 0xb9, 0x9d, 0xd3, 0xb7, 0xac, 0xdd, 0x00, 0x1b, 0x91, 0x2e, 0xba, 0x0b, 0xd3, 0x5e, 0xc0, 0x5a, - 0x01, 0x33, 0x5d, 0x47, 0x64, 0xfb, 0x3f, 0x83, 0x80, 0x05, 0x3e, 0xa8, 0x3a, 0xc6, 0x54, 0x84, - 0xa8, 0x3a, 0x68, 0x09, 0xa0, 0x69, 0xed, 0x9b, 0xd1, 0x3c, 0x95, 0x08, 0xe1, 0xff, 0xee, 0x81, - 0xf3, 0x43, 0xcf, 0xc1, 0x4d, 0x2f, 0x20, 0xcc, 0x98, 0x6e, 0x5a, 0xfb, 0x1b, 0xa1, 0x7a, 0x08, - 0x76, 0x89, 0x04, 0x8f, 0x0f, 0x05, 0x76, 0x89, 0x00, 0xdf, 0x80, 0x59, 0x9f, 0x59, 0x94, 0x99, - 0x0d, 0xec, 0xd6, 0x1b, 0x2c, 0x35, 0x11, 0xe6, 0x68, 0x26, 0x94, 0x7d, 0x14, 0x8a, 0xd0, 0x35, - 0x00, 0x4c, 0x1c, 0xa9, 0x30, 0x19, 0x2a, 0x4c, 0x63, 0xe2, 0x74, 0x96, 0x7d, 0x86, 0x5b, 0xa6, - 0xcd, 0xa9, 0x53, 0xe7, 0xa2, 0x65, 0x2e, 0x29, 0x71, 0x01, 0xdf, 0x5e, 0xe2, 0x11, 0x1b, 0xa7, - 0xa6, 0xa2, 0xed, 0x0d, 0x27, 0xda, 0xb7, 0x2a, 0x5c, 0xe8, 0x2b, 0x34, 0xb9, 0x4f, 0x4a, 0xbc, - 0x4f, 0xe8, 0x3e, 0x24, 0xed, 0x80, 0x52, 0x4c, 0x98, 0x29, 0xcb, 0x47, 0x64, 0xf7, 0x7f, 0xc3, - 0x16, 0x5e, 0xd5, 0x31, 0xe6, 0x05, 0x87, 0x14, 0xf1, 0xa8, 0x09, 0xde, 0x67, 0x26, 0xa3, 0x6e, - 0xbd, 0x8e, 0x69, 0x98, 0xf1, 0x71, 0x63, 0x86, 0xcb, 0x3e, 0x8d, 0x44, 0xa8, 0x04, 0x73, 0xe1, - 0xce, 0x9a, 0x14, 0xfb, 0x98, 0xb6, 0xb1, 0x3f, 0x54, 0x66, 0xcf, 0x87, 0x18, 0x43, 0x40, 0x50, - 0x05, 0xe6, 0x45, 0x55, 0xc4, 0x2c, 0x13, 0x43, 0xb0, 0xcc, 0x45, 0x20, 0x49, 0xa3, 0xfd, 0xa8, - 0xc0, 0x6c, 0x77, 0xb6, 0xd0, 0x13, 0x98, 0x71, 0x3a, 0x15, 0x2b, 0x0a, 0x75, 0xe9, 0x6d, 0x4f, - 0x77, 0x57, 0xd1, 0x1b, 0xdd, 0x7c, 0xe8, 0x63, 0x98, 0xf0, 0xf9, 0x86, 0x9c, 0xad, 0x6d, 0x44, - 0x1c, 0xda, 0xe7, 0x90, 0x2e, 0x44, 0xe6, 0xba, 0x35, 0xec, 0x06, 0x76, 0x82, 0x5d, 0xfc, 0x8e, - 0x23, 0xd1, 0x30, 0xfc, 0xab, 0xdf, 0x78, 0x85, 0x38, 0x68, 0x0d, 0x40, 0x70, 0x99, 0xa7, 0xed, - 0x2c, 0xd3, 0x96, 0x1c, 0x6a, 0x2f, 0x95, 0xe3, 0x82, 0x7c, 0xe0, 0xb2, 0x86, 0x43, 0xad, 0xbd, - 0xd1, 0x1a, 0xeb, 0xef, 0x66, 0xe8, 0x31, 0x5c, 0x94, 0xf5, 0x65, 0xda, 0x5e, 0xb3, 0xe9, 0xb2, - 0x26, 0x26, 0xb2, 0x8f, 0xfc, 0x77, 0x50, 0x1b, 0x2a, 0x5a, 0xbb, 0x16, 0xb1, 0x71, 0x29, 0x06, - 0x18, 0x48, 0xb2, 0x74, 0x64, 0xda, 0x97, 0x2a, 0x64, 0x06, 0x87, 0x56, 0xdb, 0xb5, 0xc8, 0x3b, - 0x0f, 0xaf, 0x0c, 0x73, 0x71, 0x78, 0x51, 0x67, 0x4e, 0x0c, 0xd3, 0x99, 0xcf, 0x4b, 0x50, 0x35, - 0xec, 0xd0, 0x2b, 0x30, 0x1f, 0xb3, 0xbc, 0xd6, 0x2b, 0x4f, 0xa0, 0x89, 0x6d, 0x47, 0x1d, 0x53, - 0xfb, 0xf5, 0xd8, 0x84, 0xc8, 0x82, 0xde, 0x72, 0xf1, 0x1e, 0xda, 0x82, 0x49, 0xcb, 0xee, 0xaa, - 0xe7, 0x0f, 0x87, 0x4a, 0xc6, 0x40, 0x4e, 0x43, 0xb0, 0xf5, 0x24, 0x5a, 0x3d, 0x63, 0xa2, 0x57, - 0x65, 0x87, 0x6b, 0x62, 0x66, 0x39, 0x16, 0xb3, 0x44, 0x5a, 0xaf, 0x0f, 0xca, 0xc7, 0x3d, 0xa1, - 0x27, 0xba, 0x9c, 0x9c, 0xa2, 0x6a, 0xdc, 0xe5, 0x62, 0xa6, 0xf1, 0x21, 0x99, 0x44, 0xa7, 0x93, - 0x73, 0xed, 0x07, 0xe5, 0x4d, 0xd5, 0x36, 0xca, 0xe4, 0x4a, 0xce, 0x38, 0xb9, 0xcb, 0x30, 0x15, - 0x37, 0x69, 0x35, 0x7c, 0xb7, 0xb9, 0xf1, 0xc6, 0xc2, 0xe0, 0xce, 0x18, 0x31, 0x44, 0xfb, 0x59, - 0x81, 0x74, 0xa5, 0x8d, 0x09, 0x3b, 0x6e, 0x07, 0x47, 0xdc, 0x6f, 0x7a, 0xbb, 0xa6, 0x3a, 0xe2, - 0xae, 0xf9, 0xbd, 0x02, 0xa9, 0xbe, 0x58, 0xee, 0xb7, 0x1c, 0x8b, 0x8d, 0x3c, 0x92, 0x91, 0x3e, - 0x6a, 0x5e, 0xa9, 0x70, 0xb9, 0xcf, 0xef, 0x0a, 0x71, 0xde, 0x6b, 0xaf, 0xd1, 0x23, 0x98, 0xa4, - 0xd8, 0xf2, 0x3d, 0x12, 0x9e, 0xbf, 0xb9, 0xc5, 0xc2, 0x30, 0x6c, 0xc7, 0x87, 0xa9, 0x1b, 0x21, - 0x91, 0x21, 0x08, 0x35, 0x1b, 0x26, 0x23, 0x09, 0xba, 0x0c, 0xc8, 0xa8, 0x14, 0x36, 0x37, 0xd6, - 0xcd, 0xfb, 0xeb, 0x9b, 0xb5, 0x4a, 0xa9, 0xba, 0x52, 0xad, 0x94, 0x93, 0x63, 0x08, 0xc1, 0x9c, - 0x90, 0x57, 0x1e, 0xd6, 0xaa, 0x46, 0xa5, 0x9c, 0x54, 0xd0, 0x05, 0x38, 0x2f, 0x64, 0x2b, 0xd5, - 0xb5, 0xb5, 0x4a, 0x39, 0xa9, 0xa2, 0x34, 0x5c, 0x16, 0xa2, 0xd2, 0xda, 0xc6, 0x66, 0xa5, 0x6c, - 0x16, 0x1f, 0x99, 0x1b, 0x0f, 0xd6, 0x2b, 0x46, 0x32, 0xc1, 0xcf, 0x6c, 0x7f, 0xe5, 0xcb, 0xe3, - 0x45, 0xde, 0xe7, 0x7a, 0xf9, 0x43, 0x81, 0x4c, 0xe8, 0x79, 0x78, 0xa0, 0x4b, 0x2e, 0xb5, 0x03, - 0x97, 0x15, 0x29, 0xb6, 0x3e, 0xc3, 0xb4, 0x44, 0xb1, 0xe3, 0x32, 0x94, 0x87, 0xa9, 0xf0, 0xd8, - 0x77, 0x7c, 0x3f, 0xf1, 0xb5, 0xfe, 0x9c, 0x15, 0x0d, 0xd0, 0x2a, 0x24, 0x5b, 0x14, 0xb7, 0x5d, - 0x2f, 0xf0, 0xcd, 0x9d, 0xe8, 0x61, 0x2b, 0xdc, 0x7e, 0xf3, 0xeb, 0xdf, 0xbc, 0x44, 0x89, 0x27, - 0x34, 0x5a, 0x86, 0x19, 0x82, 0xf7, 0x62, 0x8e, 0x61, 0xbe, 0x0f, 0x80, 0xe0, 0x3d, 0x01, 0xd7, - 0x8e, 0x14, 0xb8, 0x36, 0x28, 0xcc, 0x32, 0xde, 0xf9, 0x67, 0x44, 0xb9, 0xf8, 0x9d, 0x0a, 0xb3, - 0x9f, 0x04, 0x98, 0x1e, 0x6c, 0x62, 0xda, 0x76, 0x6d, 0x8c, 0xbe, 0x50, 0x20, 0xd9, 0xfb, 0x6d, - 0x8d, 0x96, 0xde, 0xa2, 0xf2, 0x7a, 0x2f, 0x37, 0xd2, 0x77, 0x4f, 0x07, 0x16, 0x5f, 0xf3, 0xcf, - 0x95, 0xf8, 0xb2, 0xa6, 0xf3, 0xad, 0x8f, 0x4e, 0xc5, 0x29, 0xaf, 0x1f, 0xd2, 0xcb, 0xa7, 0x44, - 0x47, 0x2e, 0xdd, 0x56, 0x8a, 0xbf, 0xab, 0x3f, 0x1d, 0x66, 0x94, 0x17, 0x87, 0x19, 0xe5, 0xb7, - 0xc3, 0x8c, 0xf2, 0xd5, 0x51, 0x66, 0xec, 0xc5, 0x51, 0x66, 0xec, 0xe5, 0x51, 0x66, 0x0c, 0x6e, - 0xda, 0x5e, 0x73, 0x08, 0xfa, 0xe2, 0xac, 0xbc, 0x28, 0xa2, 0x1e, 0xf3, 0x6a, 0xca, 0x63, 0xa7, - 0xee, 0xb2, 0x46, 0xb0, 0xc3, 0x95, 0xb3, 0x3e, 0xa3, 0x16, 0xa9, 0xe3, 0x5d, 0xaf, 0x8d, 0x6f, - 0xf1, 0x0a, 0x0c, 0x28, 0xf6, 0xb3, 0x2e, 0x61, 0x98, 0xda, 0x0d, 0x8b, 0xff, 0xfb, 0x2c, 0xdb, - 0xfe, 0x20, 0x1b, 0x4e, 0xb2, 0x27, 0x5f, 0xd5, 0x2d, 0x89, 0x61, 0x3b, 0xf7, 0xb5, 0x3a, 0x5e, - 0x2b, 0x95, 0x0a, 0xdf, 0xa8, 0x5a, 0x4d, 0x7a, 0x58, 0xe2, 0x1e, 0x96, 0x62, 0x0f, 0x85, 0x57, - 0xfa, 0x56, 0xee, 0x97, 0x8e, 0xd2, 0x36, 0x57, 0xda, 0x8e, 0x95, 0xb6, 0x85, 0xd2, 0xf6, 0x56, - 0xee, 0x50, 0xd5, 0x4f, 0x56, 0xda, 0x5e, 0xad, 0x15, 0xe5, 0xbb, 0xca, 0x9f, 0xea, 0x4d, 0x09, - 0xc8, 0xe7, 0x39, 0x82, 0xff, 0x0a, 0x48, 0x3e, 0x2f, 0x30, 0xf9, 0xfc, 0x56, 0x6e, 0x67, 0x32, - 0xbc, 0x9e, 0xba, 0xf3, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xc5, 0x0f, 0x20, 0x8c, 0x14, - 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // Get the current state of an auction by ID. - AuctionStateById(ctx context.Context, in *AuctionStateByIdRequest, opts ...grpc.CallOption) (*AuctionStateByIdResponse, error) - // Get the current state of a group of auctions by ID. - AuctionStateByIds(ctx context.Context, in *AuctionStateByIdsRequest, opts ...grpc.CallOption) (QueryService_AuctionStateByIdsClient, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) AuctionStateById(ctx context.Context, in *AuctionStateByIdRequest, opts ...grpc.CallOption) (*AuctionStateByIdResponse, error) { - out := new(AuctionStateByIdResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.auction.v1.QueryService/AuctionStateById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) AuctionStateByIds(ctx context.Context, in *AuctionStateByIdsRequest, opts ...grpc.CallOption) (QueryService_AuctionStateByIdsClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/penumbra.core.component.auction.v1.QueryService/AuctionStateByIds", opts...) - if err != nil { - return nil, err - } - x := &queryServiceAuctionStateByIdsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_AuctionStateByIdsClient interface { - Recv() (*AuctionStateByIdsResponse, error) - grpc.ClientStream -} - -type queryServiceAuctionStateByIdsClient struct { - grpc.ClientStream -} - -func (x *queryServiceAuctionStateByIdsClient) Recv() (*AuctionStateByIdsResponse, error) { - m := new(AuctionStateByIdsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // Get the current state of an auction by ID. - AuctionStateById(context.Context, *AuctionStateByIdRequest) (*AuctionStateByIdResponse, error) - // Get the current state of a group of auctions by ID. - AuctionStateByIds(*AuctionStateByIdsRequest, QueryService_AuctionStateByIdsServer) error -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) AuctionStateById(ctx context.Context, req *AuctionStateByIdRequest) (*AuctionStateByIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuctionStateById not implemented") -} -func (*UnimplementedQueryServiceServer) AuctionStateByIds(req *AuctionStateByIdsRequest, srv QueryService_AuctionStateByIdsServer) error { - return status.Errorf(codes.Unimplemented, "method AuctionStateByIds not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_AuctionStateById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuctionStateByIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).AuctionStateById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.auction.v1.QueryService/AuctionStateById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).AuctionStateById(ctx, req.(*AuctionStateByIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_AuctionStateByIds_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(AuctionStateByIdsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).AuctionStateByIds(m, &queryServiceAuctionStateByIdsServer{stream}) -} - -type QueryService_AuctionStateByIdsServer interface { - Send(*AuctionStateByIdsResponse) error - grpc.ServerStream -} - -type queryServiceAuctionStateByIdsServer struct { - grpc.ServerStream -} - -func (x *queryServiceAuctionStateByIdsServer) Send(m *AuctionStateByIdsResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.auction.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AuctionStateById", - Handler: _QueryService_AuctionStateById_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "AuctionStateByIds", - Handler: _QueryService_AuctionStateByIds_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/core/component/auction/v1/auction.proto", -} - -func (m *AuctionParameters) Marshal() (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 *AuctionParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuctionStateByIdRequest) Marshal() (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 *AuctionStateByIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionStateByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuctionStateByIdResponse) Marshal() (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 *AuctionStateByIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionStateByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Positions) > 0 { - for iNdEx := len(m.Positions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Positions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Auction != nil { - { - size, err := m.Auction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *AuctionStateByIdsRequest) Marshal() (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 *AuctionStateByIdsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionStateByIdsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - for iNdEx := len(m.Id) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Id[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AuctionStateByIdsResponse) Marshal() (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 *AuctionStateByIdsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionStateByIdsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Positions) > 0 { - for iNdEx := len(m.Positions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Positions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Auction != nil { - { - size, err := m.Auction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuctionId) Marshal() (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 *AuctionId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintAuction(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuctionNft) Marshal() (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 *AuctionNft) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionNft) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Seq != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x10 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DutchAuctionDescription) Marshal() (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 *DutchAuctionDescription) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DutchAuctionDescription) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = encodeVarintAuction(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x42 - } - if m.StepCount != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.StepCount)) - i-- - dAtA[i] = 0x38 - } - if m.EndHeight != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.EndHeight)) - i-- - dAtA[i] = 0x30 - } - if m.StartHeight != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x28 - } - if m.MinOutput != nil { - { - size, err := m.MinOutput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.MaxOutput != nil { - { - size, err := m.MaxOutput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.OutputId != nil { - { - size, err := m.OutputId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DutchAuctionState) Marshal() (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 *DutchAuctionState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DutchAuctionState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OutputReserves != nil { - { - size, err := m.OutputReserves.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.InputReserves != nil { - { - size, err := m.InputReserves.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.NextTrigger != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.NextTrigger)) - i-- - dAtA[i] = 0x18 - } - if m.CurrentPosition != nil { - { - size, err := m.CurrentPosition.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Seq != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DutchAuction) Marshal() (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 *DutchAuction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DutchAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActionDutchAuctionSchedule) Marshal() (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 *ActionDutchAuctionSchedule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionDutchAuctionSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActionDutchAuctionEnd) Marshal() (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 *ActionDutchAuctionEnd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionDutchAuctionEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActionDutchAuctionWithdraw) Marshal() (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 *ActionDutchAuctionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionDutchAuctionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ReservesCommitment != nil { - { - size, err := m.ReservesCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Seq != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x10 - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActionDutchAuctionWithdrawPlan) Marshal() (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 *ActionDutchAuctionWithdrawPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionDutchAuctionWithdrawPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ReservesOutput != nil { - { - size, err := m.ReservesOutput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.ReservesInput != nil { - { - size, err := m.ReservesInput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Seq != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x10 - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActionDutchAuctionScheduleView) Marshal() (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 *ActionDutchAuctionScheduleView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionDutchAuctionScheduleView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OutputMetadata != nil { - { - size, err := m.OutputMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.InputMetadata != nil { - { - size, err := m.InputMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Action != nil { - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ActionDutchAuctionWithdrawView) Marshal() (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 *ActionDutchAuctionWithdrawView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionDutchAuctionWithdrawView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Reserves) > 0 { - for iNdEx := len(m.Reserves) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Reserves[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Action != nil { - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventDutchAuctionScheduled) Marshal() (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 *EventDutchAuctionScheduled) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDutchAuctionScheduled) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventDutchAuctionUpdated) Marshal() (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 *EventDutchAuctionUpdated) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDutchAuctionUpdated) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventDutchAuctionEnded) Marshal() (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 *EventDutchAuctionEnded) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDutchAuctionEnded) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Reason != 0 { - i = encodeVarintAuction(dAtA, i, uint64(m.Reason)) - i-- - dAtA[i] = 0x18 - } - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventDutchAuctionWithdrawn) Marshal() (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 *EventDutchAuctionWithdrawn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDutchAuctionWithdrawn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValueCircuitBreakerCredit) Marshal() (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 *EventValueCircuitBreakerCredit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValueCircuitBreakerCredit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NewBalance != nil { - { - size, err := m.NewBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PreviousBalance != nil { - { - size, err := m.PreviousBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValueCircuitBreakerDebit) Marshal() (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 *EventValueCircuitBreakerDebit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValueCircuitBreakerDebit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NewBalance != nil { - { - size, err := m.NewBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PreviousBalance != nil { - { - size, err := m.PreviousBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAuction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAuction(dAtA []byte, offset int, v uint64) int { - offset -= sovAuction(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AuctionParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *AuctionStateByIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *AuctionStateByIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Auction != nil { - l = m.Auction.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if len(m.Positions) > 0 { - for _, e := range m.Positions { - l = e.Size() - n += 1 + l + sovAuction(uint64(l)) - } - } - return n -} - -func (m *AuctionStateByIdsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Id) > 0 { - for _, e := range m.Id { - l = e.Size() - n += 1 + l + sovAuction(uint64(l)) - } - } - return n -} - -func (m *AuctionStateByIdsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.Auction != nil { - l = m.Auction.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if len(m.Positions) > 0 { - for _, e := range m.Positions { - l = e.Size() - n += 1 + l + sovAuction(uint64(l)) - } - } - return n -} - -func (m *AuctionId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *AuctionNft) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.Seq != 0 { - n += 1 + sovAuction(uint64(m.Seq)) - } - return n -} - -func (m *DutchAuctionDescription) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Input != nil { - l = m.Input.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.OutputId != nil { - l = m.OutputId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.MaxOutput != nil { - l = m.MaxOutput.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.MinOutput != nil { - l = m.MinOutput.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.StartHeight != 0 { - n += 1 + sovAuction(uint64(m.StartHeight)) - } - if m.EndHeight != 0 { - n += 1 + sovAuction(uint64(m.EndHeight)) - } - if m.StepCount != 0 { - n += 1 + sovAuction(uint64(m.StepCount)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *DutchAuctionState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seq != 0 { - n += 1 + sovAuction(uint64(m.Seq)) - } - if m.CurrentPosition != nil { - l = m.CurrentPosition.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.NextTrigger != 0 { - n += 1 + sovAuction(uint64(m.NextTrigger)) - } - if m.InputReserves != nil { - l = m.InputReserves.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.OutputReserves != nil { - l = m.OutputReserves.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *DutchAuction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *ActionDutchAuctionSchedule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *ActionDutchAuctionEnd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *ActionDutchAuctionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.Seq != 0 { - n += 1 + sovAuction(uint64(m.Seq)) - } - if m.ReservesCommitment != nil { - l = m.ReservesCommitment.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *ActionDutchAuctionWithdrawPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.Seq != 0 { - n += 1 + sovAuction(uint64(m.Seq)) - } - if m.ReservesInput != nil { - l = m.ReservesInput.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.ReservesOutput != nil { - l = m.ReservesOutput.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *ActionDutchAuctionScheduleView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.InputMetadata != nil { - l = m.InputMetadata.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.OutputMetadata != nil { - l = m.OutputMetadata.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *ActionDutchAuctionWithdrawView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if len(m.Reserves) > 0 { - for _, e := range m.Reserves { - l = e.Size() - n += 1 + l + sovAuction(uint64(l)) - } - } - return n -} - -func (m *EventDutchAuctionScheduled) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *EventDutchAuctionUpdated) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *EventDutchAuctionEnded) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.Reason != 0 { - n += 1 + sovAuction(uint64(m.Reason)) - } - return n -} - -func (m *EventDutchAuctionWithdrawn) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *EventValueCircuitBreakerCredit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.PreviousBalance != nil { - l = m.PreviousBalance.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.NewBalance != nil { - l = m.NewBalance.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func (m *EventValueCircuitBreakerDebit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.PreviousBalance != nil { - l = m.PreviousBalance.Size() - n += 1 + l + sovAuction(uint64(l)) - } - if m.NewBalance != nil { - l = m.NewBalance.Size() - n += 1 + l + sovAuction(uint64(l)) - } - return n -} - -func sovAuction(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAuction(x uint64) (n int) { - return sovAuction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AuctionParameters) 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 ErrIntOverflowAuction - } - 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: AuctionParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowAuction - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: 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 ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Params == nil { - m.Params = &AuctionParameters{} - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuctionStateByIdRequest) 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 ErrIntOverflowAuction - } - 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: AuctionStateByIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionStateByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &AuctionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuctionStateByIdResponse) 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 ErrIntOverflowAuction - } - 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: AuctionStateByIdResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionStateByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Auction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Auction == nil { - m.Auction = &types.Any{} - } - if err := m.Auction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Positions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Positions = append(m.Positions, &v1.Position{}) - if err := m.Positions[len(m.Positions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuctionStateByIdsRequest) 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 ErrIntOverflowAuction - } - 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: AuctionStateByIdsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionStateByIdsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = append(m.Id, &AuctionId{}) - if err := m.Id[len(m.Id)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuctionStateByIdsResponse) 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 ErrIntOverflowAuction - } - 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: AuctionStateByIdsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionStateByIdsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &AuctionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Auction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Auction == nil { - m.Auction = &DutchAuctionState{} - } - if err := m.Auction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Positions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Positions = append(m.Positions, &v1.Position{}) - if err := m.Positions[len(m.Positions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuctionId) 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 ErrIntOverflowAuction - } - 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: AuctionId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuctionNft) 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 ErrIntOverflowAuction - } - 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: AuctionNft: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionNft: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &AuctionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) - } - m.Seq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DutchAuctionDescription) 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 ErrIntOverflowAuction - } - 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: DutchAuctionDescription: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DutchAuctionDescription: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Input == nil { - m.Input = &v11.Value{} - } - if err := m.Input.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutputId == nil { - m.OutputId = &v11.AssetId{} - } - if err := m.OutputId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxOutput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxOutput == nil { - m.MaxOutput = &v12.Amount{} - } - if err := m.MaxOutput.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinOutput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MinOutput == nil { - m.MinOutput = &v12.Amount{} - } - if err := m.MinOutput.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - m.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) - } - m.EndHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StepCount", wireType) - } - m.StepCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StepCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DutchAuctionState) 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 ErrIntOverflowAuction - } - 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: DutchAuctionState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DutchAuctionState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) - } - m.Seq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentPosition", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CurrentPosition == nil { - m.CurrentPosition = &v1.PositionId{} - } - if err := m.CurrentPosition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextTrigger", wireType) - } - m.NextTrigger = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextTrigger |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InputReserves", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InputReserves == nil { - m.InputReserves = &v12.Amount{} - } - if err := m.InputReserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputReserves", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutputReserves == nil { - m.OutputReserves = &v12.Amount{} - } - if err := m.OutputReserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DutchAuction) 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 ErrIntOverflowAuction - } - 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: DutchAuction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DutchAuction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Description == nil { - m.Description = &DutchAuctionDescription{} - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &DutchAuctionState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionDutchAuctionSchedule) 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 ErrIntOverflowAuction - } - 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: ActionDutchAuctionSchedule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionSchedule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Description == nil { - m.Description = &DutchAuctionDescription{} - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionDutchAuctionEnd) 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 ErrIntOverflowAuction - } - 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: ActionDutchAuctionEnd: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionEnd: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionDutchAuctionWithdraw) 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 ErrIntOverflowAuction - } - 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: ActionDutchAuctionWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) - } - m.Seq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReservesCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReservesCommitment == nil { - m.ReservesCommitment = &v11.BalanceCommitment{} - } - if err := m.ReservesCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionDutchAuctionWithdrawPlan) 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 ErrIntOverflowAuction - } - 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: ActionDutchAuctionWithdrawPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionWithdrawPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) - } - m.Seq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReservesInput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReservesInput == nil { - m.ReservesInput = &v11.Value{} - } - if err := m.ReservesInput.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReservesOutput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReservesOutput == nil { - m.ReservesOutput = &v11.Value{} - } - if err := m.ReservesOutput.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionDutchAuctionScheduleView) 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 ErrIntOverflowAuction - } - 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: ActionDutchAuctionScheduleView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionScheduleView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &ActionDutchAuctionSchedule{} - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InputMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.InputMetadata == nil { - m.InputMetadata = &v11.Metadata{} - } - if err := m.InputMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutputMetadata == nil { - m.OutputMetadata = &v11.Metadata{} - } - if err := m.OutputMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionDutchAuctionWithdrawView) 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 ErrIntOverflowAuction - } - 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: ActionDutchAuctionWithdrawView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionWithdrawView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &ActionDutchAuctionWithdraw{} - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reserves = append(m.Reserves, &v11.ValueView{}) - if err := m.Reserves[len(m.Reserves)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDutchAuctionScheduled) 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 ErrIntOverflowAuction - } - 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: EventDutchAuctionScheduled: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDutchAuctionScheduled: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Description == nil { - m.Description = &DutchAuctionDescription{} - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDutchAuctionUpdated) 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 ErrIntOverflowAuction - } - 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: EventDutchAuctionUpdated: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDutchAuctionUpdated: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &DutchAuctionState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDutchAuctionEnded) 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 ErrIntOverflowAuction - } - 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: EventDutchAuctionEnded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDutchAuctionEnded: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &DutchAuctionState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - m.Reason = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Reason |= EventDutchAuctionEnded_Reason(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDutchAuctionWithdrawn) 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 ErrIntOverflowAuction - } - 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: EventDutchAuctionWithdrawn: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDutchAuctionWithdrawn: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &DutchAuctionState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValueCircuitBreakerCredit) 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 ErrIntOverflowAuction - } - 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: EventValueCircuitBreakerCredit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValueCircuitBreakerCredit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v11.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PreviousBalance == nil { - m.PreviousBalance = &v12.Amount{} - } - if err := m.PreviousBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NewBalance == nil { - m.NewBalance = &v12.Amount{} - } - if err := m.NewBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValueCircuitBreakerDebit) 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 ErrIntOverflowAuction - } - 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: EventValueCircuitBreakerDebit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValueCircuitBreakerDebit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v11.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PreviousBalance == nil { - m.PreviousBalance = &v12.Amount{} - } - if err := m.PreviousBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAuction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAuction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NewBalance == nil { - m.NewBalance = &v12.Amount{} - } - if err := m.NewBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAuction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAuction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAuction(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAuction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAuction - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAuction - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAuction - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAuction = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAuction = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAuction = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/community_pool/v1/community_pool.pb.go b/chain/penumbra/core/component/community_pool/v1/community_pool.pb.go deleted file mode 100644 index bf6389a2..00000000 --- a/chain/penumbra/core/component/community_pool/v1/community_pool.pb.go +++ /dev/null @@ -1,989 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/community_pool/v1/community_pool.proto - -package community_poolv1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// CommunityPool parameter data. -type CommunityPoolParameters struct { - // Whether Community Pool spend proposals are enabled. - CommunityPoolSpendProposalsEnabled bool `protobuf:"varint,1,opt,name=community_pool_spend_proposals_enabled,json=communityPoolSpendProposalsEnabled,proto3" json:"community_pool_spend_proposals_enabled,omitempty"` -} - -func (m *CommunityPoolParameters) Reset() { *m = CommunityPoolParameters{} } -func (m *CommunityPoolParameters) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolParameters) ProtoMessage() {} -func (*CommunityPoolParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6b5a43fb54145e, []int{0} -} -func (m *CommunityPoolParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolParameters.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 *CommunityPoolParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolParameters.Merge(m, src) -} -func (m *CommunityPoolParameters) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolParameters) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolParameters proto.InternalMessageInfo - -func (m *CommunityPoolParameters) GetCommunityPoolSpendProposalsEnabled() bool { - if m != nil { - return m.CommunityPoolSpendProposalsEnabled - } - return false -} - -// CommunityPool genesis state. -type GenesisContent struct { - // CommunityPool parameters. - CommunityPoolParams *CommunityPoolParameters `protobuf:"bytes,1,opt,name=community_pool_params,json=communityPoolParams,proto3" json:"community_pool_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6b5a43fb54145e, []int{1} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetCommunityPoolParams() *CommunityPoolParameters { - if m != nil { - return m.CommunityPoolParams - } - return nil -} - -// Requests the list of all asset balances associated with the Community Pool. -type CommunityPoolAssetBalancesRequest struct { - // (Optional): The specific asset balances to retrieve, if excluded all will be returned. - AssetIds []*v1.AssetId `protobuf:"bytes,2,rep,name=asset_ids,json=assetIds,proto3" json:"asset_ids,omitempty"` -} - -func (m *CommunityPoolAssetBalancesRequest) Reset() { *m = CommunityPoolAssetBalancesRequest{} } -func (m *CommunityPoolAssetBalancesRequest) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolAssetBalancesRequest) ProtoMessage() {} -func (*CommunityPoolAssetBalancesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6b5a43fb54145e, []int{2} -} -func (m *CommunityPoolAssetBalancesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolAssetBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolAssetBalancesRequest.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 *CommunityPoolAssetBalancesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolAssetBalancesRequest.Merge(m, src) -} -func (m *CommunityPoolAssetBalancesRequest) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolAssetBalancesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolAssetBalancesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolAssetBalancesRequest proto.InternalMessageInfo - -func (m *CommunityPoolAssetBalancesRequest) GetAssetIds() []*v1.AssetId { - if m != nil { - return m.AssetIds - } - return nil -} - -// The Community Pool's balance of a single asset. -type CommunityPoolAssetBalancesResponse struct { - // The balance for a single asset. - Balance *v1.Value `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` -} - -func (m *CommunityPoolAssetBalancesResponse) Reset() { *m = CommunityPoolAssetBalancesResponse{} } -func (m *CommunityPoolAssetBalancesResponse) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolAssetBalancesResponse) ProtoMessage() {} -func (*CommunityPoolAssetBalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6b5a43fb54145e, []int{3} -} -func (m *CommunityPoolAssetBalancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolAssetBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolAssetBalancesResponse.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 *CommunityPoolAssetBalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolAssetBalancesResponse.Merge(m, src) -} -func (m *CommunityPoolAssetBalancesResponse) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolAssetBalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolAssetBalancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolAssetBalancesResponse proto.InternalMessageInfo - -func (m *CommunityPoolAssetBalancesResponse) GetBalance() *v1.Value { - if m != nil { - return m.Balance - } - return nil -} - -func init() { - proto.RegisterType((*CommunityPoolParameters)(nil), "penumbra.core.component.community_pool.v1.CommunityPoolParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.community_pool.v1.GenesisContent") - proto.RegisterType((*CommunityPoolAssetBalancesRequest)(nil), "penumbra.core.component.community_pool.v1.CommunityPoolAssetBalancesRequest") - proto.RegisterType((*CommunityPoolAssetBalancesResponse)(nil), "penumbra.core.component.community_pool.v1.CommunityPoolAssetBalancesResponse") -} - -func init() { - proto.RegisterFile("penumbra/core/component/community_pool/v1/community_pool.proto", fileDescriptor_1c6b5a43fb54145e) -} - -var fileDescriptor_1c6b5a43fb54145e = []byte{ - // 521 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x6a, 0xd4, 0x40, - 0x18, 0xc7, 0x77, 0x52, 0xd1, 0x3a, 0x15, 0x0f, 0x11, 0xb1, 0x2c, 0x18, 0x6b, 0x0e, 0xb2, 0x82, - 0x4d, 0xcc, 0x2a, 0x28, 0xab, 0x08, 0x26, 0x48, 0x11, 0x2c, 0xc4, 0x14, 0xf6, 0x20, 0x91, 0x30, - 0x49, 0x3e, 0xda, 0x40, 0x32, 0x13, 0x67, 0x26, 0x81, 0xbe, 0x81, 0x47, 0x0f, 0x3e, 0x81, 0x47, - 0x5f, 0xc1, 0x17, 0x10, 0xf1, 0xd0, 0xa3, 0x47, 0xd9, 0xbd, 0xf9, 0x14, 0x32, 0x49, 0xb3, 0x35, - 0xab, 0x2b, 0x8b, 0x78, 0x49, 0xbe, 0x4c, 0x7e, 0xff, 0xff, 0xf7, 0xcd, 0x9f, 0x49, 0xf0, 0x93, - 0x12, 0x68, 0x55, 0xc4, 0x9c, 0xd8, 0x09, 0xe3, 0x60, 0x27, 0xac, 0x28, 0x19, 0x05, 0x2a, 0x55, - 0x55, 0x54, 0x34, 0x93, 0xc7, 0x51, 0xc9, 0x58, 0x6e, 0xd7, 0xce, 0xd2, 0x8a, 0x55, 0x72, 0x26, - 0x99, 0x7e, 0xbb, 0xd3, 0x5b, 0x4a, 0x6f, 0x2d, 0xf4, 0xd6, 0x12, 0x5d, 0x3b, 0x43, 0xb3, 0xdf, - 0x8a, 0x08, 0x01, 0x52, 0xf9, 0x36, 0x45, 0x6b, 0x67, 0x16, 0xf8, 0x9a, 0xd7, 0x09, 0x7d, 0xc6, - 0x72, 0x9f, 0x70, 0x52, 0x80, 0x04, 0x2e, 0xf4, 0x00, 0xdf, 0xea, 0x7b, 0x46, 0xa2, 0x04, 0x9a, - 0x46, 0x25, 0x67, 0x25, 0x13, 0x24, 0x17, 0x11, 0x50, 0x12, 0xe7, 0x90, 0x6e, 0xa3, 0x1d, 0x34, - 0xda, 0x0c, 0xcc, 0xe4, 0x57, 0xa3, 0x03, 0xc5, 0xfa, 0x1d, 0xfa, 0xac, 0x25, 0xcd, 0xb7, 0x08, - 0x5f, 0xde, 0x03, 0x0a, 0x22, 0x13, 0x1e, 0xa3, 0x12, 0xa8, 0xd4, 0x6b, 0x7c, 0x75, 0xa9, 0x4d, - 0xa9, 0x66, 0x10, 0x8d, 0xeb, 0xd6, 0xd8, 0xb5, 0xd6, 0xde, 0xb0, 0xb5, 0x62, 0x27, 0xc1, 0x95, - 0xe4, 0xb7, 0x17, 0xc2, 0x24, 0xf8, 0x66, 0x8f, 0x7f, 0xaa, 0x52, 0x71, 0x49, 0x4e, 0x68, 0x02, - 0x22, 0x80, 0x37, 0x15, 0x08, 0xa9, 0x3f, 0xc6, 0x17, 0x9b, 0xb4, 0xa2, 0x2c, 0x15, 0xdb, 0xda, - 0xce, 0xc6, 0x68, 0x6b, 0x7c, 0x63, 0x69, 0xa0, 0x36, 0xcd, 0xda, 0xb1, 0x1a, 0x83, 0xe7, 0x69, - 0xb0, 0x49, 0xda, 0x42, 0x98, 0xaf, 0xb1, 0xf9, 0xb7, 0x16, 0xa2, 0x64, 0x54, 0x80, 0xfe, 0x00, - 0x5f, 0x88, 0xdb, 0xb5, 0xd3, 0x2d, 0x5f, 0x5f, 0xd5, 0x61, 0x4a, 0xf2, 0x0a, 0x82, 0x8e, 0x1e, - 0x7f, 0x45, 0xf8, 0xd2, 0xcb, 0x0a, 0xf8, 0xf1, 0x01, 0xf0, 0x3a, 0x4b, 0x40, 0xff, 0x84, 0xf0, - 0x70, 0x75, 0x43, 0xfd, 0xc5, 0xbf, 0x46, 0xf9, 0xa7, 0x68, 0x86, 0xfb, 0xff, 0xc9, 0xad, 0x4d, - 0xe1, 0x2e, 0x72, 0xdf, 0x6f, 0x7c, 0x9e, 0x19, 0xe8, 0x64, 0x66, 0xa0, 0xef, 0x33, 0x03, 0xbd, - 0x9b, 0x1b, 0x83, 0x93, 0xb9, 0x31, 0xf8, 0x36, 0x37, 0x06, 0x78, 0x37, 0x61, 0xc5, 0xfa, 0xed, - 0x5c, 0xbd, 0x7f, 0x10, 0xd4, 0x41, 0xf7, 0xd1, 0x2b, 0x7e, 0x98, 0xc9, 0xa3, 0x2a, 0x56, 0xbc, - 0x2d, 0x24, 0x27, 0xf4, 0x10, 0x72, 0x56, 0xc3, 0x6e, 0x0d, 0x54, 0x56, 0x1c, 0x84, 0x9d, 0x51, - 0x09, 0x3c, 0x39, 0x22, 0xea, 0x2e, 0xa4, 0x5d, 0x3f, 0xb4, 0x9b, 0x07, 0x7b, 0xed, 0x2f, 0xf6, - 0x51, 0x7f, 0xa5, 0x76, 0x3e, 0x68, 0xe7, 0x7c, 0xcf, 0xf3, 0x3e, 0x6a, 0x23, 0xbf, 0x1b, 0xde, - 0x53, 0xc3, 0x7b, 0x8b, 0xe1, 0x7b, 0x93, 0x5a, 0x53, 0xe7, 0xcb, 0x19, 0x1a, 0x2a, 0x34, 0x5c, - 0xa0, 0x61, 0x0f, 0x0d, 0xa7, 0xce, 0x4c, 0xbb, 0xbf, 0x2e, 0x1a, 0xee, 0xf9, 0xee, 0x3e, 0x48, - 0x92, 0x12, 0x49, 0x7e, 0x68, 0x77, 0x3a, 0xd9, 0x64, 0xa2, 0x74, 0xea, 0x7a, 0x2a, 0x6c, 0xca, - 0x33, 0xe5, 0x64, 0x32, 0x75, 0xe2, 0xf3, 0xcd, 0x8f, 0xe2, 0xde, 0xcf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xc9, 0x5e, 0x38, 0xe3, 0xb9, 0x04, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - CommunityPoolAssetBalances(ctx context.Context, in *CommunityPoolAssetBalancesRequest, opts ...grpc.CallOption) (QueryService_CommunityPoolAssetBalancesClient, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) CommunityPoolAssetBalances(ctx context.Context, in *CommunityPoolAssetBalancesRequest, opts ...grpc.CallOption) (QueryService_CommunityPoolAssetBalancesClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/penumbra.core.component.community_pool.v1.QueryService/CommunityPoolAssetBalances", opts...) - if err != nil { - return nil, err - } - x := &queryServiceCommunityPoolAssetBalancesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_CommunityPoolAssetBalancesClient interface { - Recv() (*CommunityPoolAssetBalancesResponse, error) - grpc.ClientStream -} - -type queryServiceCommunityPoolAssetBalancesClient struct { - grpc.ClientStream -} - -func (x *queryServiceCommunityPoolAssetBalancesClient) Recv() (*CommunityPoolAssetBalancesResponse, error) { - m := new(CommunityPoolAssetBalancesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - CommunityPoolAssetBalances(*CommunityPoolAssetBalancesRequest, QueryService_CommunityPoolAssetBalancesServer) error -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) CommunityPoolAssetBalances(req *CommunityPoolAssetBalancesRequest, srv QueryService_CommunityPoolAssetBalancesServer) error { - return status.Errorf(codes.Unimplemented, "method CommunityPoolAssetBalances not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_CommunityPoolAssetBalances_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(CommunityPoolAssetBalancesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).CommunityPoolAssetBalances(m, &queryServiceCommunityPoolAssetBalancesServer{stream}) -} - -type QueryService_CommunityPoolAssetBalancesServer interface { - Send(*CommunityPoolAssetBalancesResponse) error - grpc.ServerStream -} - -type queryServiceCommunityPoolAssetBalancesServer struct { - grpc.ServerStream -} - -func (x *queryServiceCommunityPoolAssetBalancesServer) Send(m *CommunityPoolAssetBalancesResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.community_pool.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "CommunityPoolAssetBalances", - Handler: _QueryService_CommunityPoolAssetBalances_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/core/component/community_pool/v1/community_pool.proto", -} - -func (m *CommunityPoolParameters) Marshal() (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 *CommunityPoolParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CommunityPoolSpendProposalsEnabled { - i-- - if m.CommunityPoolSpendProposalsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CommunityPoolParams != nil { - { - size, err := m.CommunityPoolParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommunityPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommunityPoolAssetBalancesRequest) Marshal() (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 *CommunityPoolAssetBalancesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolAssetBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AssetIds) > 0 { - for iNdEx := len(m.AssetIds) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AssetIds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommunityPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - return len(dAtA) - i, nil -} - -func (m *CommunityPoolAssetBalancesResponse) Marshal() (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 *CommunityPoolAssetBalancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolAssetBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Balance != nil { - { - size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommunityPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCommunityPool(dAtA []byte, offset int, v uint64) int { - offset -= sovCommunityPool(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CommunityPoolParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolSpendProposalsEnabled { - n += 2 - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolParams != nil { - l = m.CommunityPoolParams.Size() - n += 1 + l + sovCommunityPool(uint64(l)) - } - return n -} - -func (m *CommunityPoolAssetBalancesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AssetIds) > 0 { - for _, e := range m.AssetIds { - l = e.Size() - n += 1 + l + sovCommunityPool(uint64(l)) - } - } - return n -} - -func (m *CommunityPoolAssetBalancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Balance != nil { - l = m.Balance.Size() - n += 1 + l + sovCommunityPool(uint64(l)) - } - return n -} - -func sovCommunityPool(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommunityPool(x uint64) (n int) { - return sovCommunityPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CommunityPoolParameters) 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 ErrIntOverflowCommunityPool - } - 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: CommunityPoolParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolSpendProposalsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommunityPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CommunityPoolSpendProposalsEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCommunityPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommunityPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowCommunityPool - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommunityPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommunityPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommunityPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommunityPoolParams == nil { - m.CommunityPoolParams = &CommunityPoolParameters{} - } - if err := m.CommunityPoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommunityPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommunityPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommunityPoolAssetBalancesRequest) 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 ErrIntOverflowCommunityPool - } - 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: CommunityPoolAssetBalancesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolAssetBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetIds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommunityPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommunityPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommunityPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssetIds = append(m.AssetIds, &v1.AssetId{}) - if err := m.AssetIds[len(m.AssetIds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommunityPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommunityPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommunityPoolAssetBalancesResponse) 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 ErrIntOverflowCommunityPool - } - 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: CommunityPoolAssetBalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolAssetBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommunityPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommunityPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommunityPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Balance == nil { - m.Balance = &v1.Value{} - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommunityPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommunityPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommunityPool(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommunityPool - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommunityPool - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommunityPool - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommunityPool - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommunityPool - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommunityPool - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommunityPool = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommunityPool = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommunityPool = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/compact_block/v1/compact_block.pb.go b/chain/penumbra/core/component/compact_block/v1/compact_block.pb.go deleted file mode 100644 index 0a424b2e..00000000 --- a/chain/penumbra/core/component/compact_block/v1/compact_block.pb.go +++ /dev/null @@ -1,2881 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/compact_block/v1/compact_block.proto - -package compact_blockv1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/dex/v1" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/fee/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/shielded_pool/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/tct/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Contains the minimum data needed to update client state. -type CompactBlock struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // State payloads describing new state fragments. - StatePayloads []*StatePayload `protobuf:"bytes,2,rep,name=state_payloads,json=statePayloads,proto3" json:"state_payloads,omitempty"` - // Nullifiers identifying spent notes. - Nullifiers []*v1.Nullifier `protobuf:"bytes,3,rep,name=nullifiers,proto3" json:"nullifiers,omitempty"` - // The block root of this block. - BlockRoot *v11.MerkleRoot `protobuf:"bytes,4,opt,name=block_root,json=blockRoot,proto3" json:"block_root,omitempty"` - // The epoch root of this epoch (only present when the block is the last in an epoch). - EpochRoot *v11.MerkleRoot `protobuf:"bytes,5,opt,name=epoch_root,json=epochRoot,proto3" json:"epoch_root,omitempty"` - // If a proposal started voting in this block, this is set to `true`. - ProposalStarted bool `protobuf:"varint,6,opt,name=proposal_started,json=proposalStarted,proto3" json:"proposal_started,omitempty"` - // Latest Fuzzy Message Detection parameters. - FmdParameters *v12.FmdParameters `protobuf:"bytes,7,opt,name=fmd_parameters,json=fmdParameters,proto3" json:"fmd_parameters,omitempty"` - // Price data for swaps executed in this block. - SwapOutputs []*v13.BatchSwapOutputData `protobuf:"bytes,8,rep,name=swap_outputs,json=swapOutputs,proto3" json:"swap_outputs,omitempty"` - // Indicates updated app parameters. - AppParametersUpdated bool `protobuf:"varint,9,opt,name=app_parameters_updated,json=appParametersUpdated,proto3" json:"app_parameters_updated,omitempty"` - // Updated gas prices, if they have changed. - GasPrices *v14.GasPrices `protobuf:"bytes,10,opt,name=gas_prices,json=gasPrices,proto3" json:"gas_prices,omitempty"` - // Updated gas prices for alternative fee tokens, if they have changed. - AltGasPrices []*v14.GasPrices `protobuf:"bytes,100,rep,name=alt_gas_prices,json=altGasPrices,proto3" json:"alt_gas_prices,omitempty"` - // The epoch index - EpochIndex uint64 `protobuf:"varint,11,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` -} - -func (m *CompactBlock) Reset() { *m = CompactBlock{} } -func (m *CompactBlock) String() string { return proto.CompactTextString(m) } -func (*CompactBlock) ProtoMessage() {} -func (*CompactBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{0} -} -func (m *CompactBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CompactBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CompactBlock.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 *CompactBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompactBlock.Merge(m, src) -} -func (m *CompactBlock) XXX_Size() int { - return m.Size() -} -func (m *CompactBlock) XXX_DiscardUnknown() { - xxx_messageInfo_CompactBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_CompactBlock proto.InternalMessageInfo - -func (m *CompactBlock) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *CompactBlock) GetStatePayloads() []*StatePayload { - if m != nil { - return m.StatePayloads - } - return nil -} - -func (m *CompactBlock) GetNullifiers() []*v1.Nullifier { - if m != nil { - return m.Nullifiers - } - return nil -} - -func (m *CompactBlock) GetBlockRoot() *v11.MerkleRoot { - if m != nil { - return m.BlockRoot - } - return nil -} - -func (m *CompactBlock) GetEpochRoot() *v11.MerkleRoot { - if m != nil { - return m.EpochRoot - } - return nil -} - -func (m *CompactBlock) GetProposalStarted() bool { - if m != nil { - return m.ProposalStarted - } - return false -} - -func (m *CompactBlock) GetFmdParameters() *v12.FmdParameters { - if m != nil { - return m.FmdParameters - } - return nil -} - -func (m *CompactBlock) GetSwapOutputs() []*v13.BatchSwapOutputData { - if m != nil { - return m.SwapOutputs - } - return nil -} - -func (m *CompactBlock) GetAppParametersUpdated() bool { - if m != nil { - return m.AppParametersUpdated - } - return false -} - -func (m *CompactBlock) GetGasPrices() *v14.GasPrices { - if m != nil { - return m.GasPrices - } - return nil -} - -func (m *CompactBlock) GetAltGasPrices() []*v14.GasPrices { - if m != nil { - return m.AltGasPrices - } - return nil -} - -func (m *CompactBlock) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -// An encrypted payload, corresponding to a single commitment in the state commitment tree. -type StatePayload struct { - // The source of the payload, if known. - Source *v1.CommitmentSource `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - // The state payload itself. - // - // Types that are valid to be assigned to StatePayload: - // *StatePayload_RolledUp_ - // *StatePayload_Note_ - // *StatePayload_Swap_ - StatePayload isStatePayload_StatePayload `protobuf_oneof:"state_payload"` -} - -func (m *StatePayload) Reset() { *m = StatePayload{} } -func (m *StatePayload) String() string { return proto.CompactTextString(m) } -func (*StatePayload) ProtoMessage() {} -func (*StatePayload) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{1} -} -func (m *StatePayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatePayload.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 *StatePayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatePayload.Merge(m, src) -} -func (m *StatePayload) XXX_Size() int { - return m.Size() -} -func (m *StatePayload) XXX_DiscardUnknown() { - xxx_messageInfo_StatePayload.DiscardUnknown(m) -} - -var xxx_messageInfo_StatePayload proto.InternalMessageInfo - -type isStatePayload_StatePayload interface { - isStatePayload_StatePayload() - MarshalTo([]byte) (int, error) - Size() int -} - -type StatePayload_RolledUp_ struct { - RolledUp *StatePayload_RolledUp `protobuf:"bytes,2,opt,name=rolled_up,json=rolledUp,proto3,oneof" json:"rolled_up,omitempty"` -} -type StatePayload_Note_ struct { - Note *StatePayload_Note `protobuf:"bytes,3,opt,name=note,proto3,oneof" json:"note,omitempty"` -} -type StatePayload_Swap_ struct { - Swap *StatePayload_Swap `protobuf:"bytes,4,opt,name=swap,proto3,oneof" json:"swap,omitempty"` -} - -func (*StatePayload_RolledUp_) isStatePayload_StatePayload() {} -func (*StatePayload_Note_) isStatePayload_StatePayload() {} -func (*StatePayload_Swap_) isStatePayload_StatePayload() {} - -func (m *StatePayload) GetStatePayload() isStatePayload_StatePayload { - if m != nil { - return m.StatePayload - } - return nil -} - -func (m *StatePayload) GetSource() *v1.CommitmentSource { - if m != nil { - return m.Source - } - return nil -} - -func (m *StatePayload) GetRolledUp() *StatePayload_RolledUp { - if x, ok := m.GetStatePayload().(*StatePayload_RolledUp_); ok { - return x.RolledUp - } - return nil -} - -func (m *StatePayload) GetNote() *StatePayload_Note { - if x, ok := m.GetStatePayload().(*StatePayload_Note_); ok { - return x.Note - } - return nil -} - -func (m *StatePayload) GetSwap() *StatePayload_Swap { - if x, ok := m.GetStatePayload().(*StatePayload_Swap_); ok { - return x.Swap - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*StatePayload) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*StatePayload_RolledUp_)(nil), - (*StatePayload_Note_)(nil), - (*StatePayload_Swap_)(nil), - } -} - -type StatePayload_RolledUp struct { - Commitment *v11.StateCommitment `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` -} - -func (m *StatePayload_RolledUp) Reset() { *m = StatePayload_RolledUp{} } -func (m *StatePayload_RolledUp) String() string { return proto.CompactTextString(m) } -func (*StatePayload_RolledUp) ProtoMessage() {} -func (*StatePayload_RolledUp) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{1, 0} -} -func (m *StatePayload_RolledUp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatePayload_RolledUp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatePayload_RolledUp.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 *StatePayload_RolledUp) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatePayload_RolledUp.Merge(m, src) -} -func (m *StatePayload_RolledUp) XXX_Size() int { - return m.Size() -} -func (m *StatePayload_RolledUp) XXX_DiscardUnknown() { - xxx_messageInfo_StatePayload_RolledUp.DiscardUnknown(m) -} - -var xxx_messageInfo_StatePayload_RolledUp proto.InternalMessageInfo - -func (m *StatePayload_RolledUp) GetCommitment() *v11.StateCommitment { - if m != nil { - return m.Commitment - } - return nil -} - -type StatePayload_Note struct { - Note *v12.NotePayload `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` -} - -func (m *StatePayload_Note) Reset() { *m = StatePayload_Note{} } -func (m *StatePayload_Note) String() string { return proto.CompactTextString(m) } -func (*StatePayload_Note) ProtoMessage() {} -func (*StatePayload_Note) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{1, 1} -} -func (m *StatePayload_Note) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatePayload_Note) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatePayload_Note.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 *StatePayload_Note) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatePayload_Note.Merge(m, src) -} -func (m *StatePayload_Note) XXX_Size() int { - return m.Size() -} -func (m *StatePayload_Note) XXX_DiscardUnknown() { - xxx_messageInfo_StatePayload_Note.DiscardUnknown(m) -} - -var xxx_messageInfo_StatePayload_Note proto.InternalMessageInfo - -func (m *StatePayload_Note) GetNote() *v12.NotePayload { - if m != nil { - return m.Note - } - return nil -} - -type StatePayload_Swap struct { - Swap *v13.SwapPayload `protobuf:"bytes,2,opt,name=swap,proto3" json:"swap,omitempty"` -} - -func (m *StatePayload_Swap) Reset() { *m = StatePayload_Swap{} } -func (m *StatePayload_Swap) String() string { return proto.CompactTextString(m) } -func (*StatePayload_Swap) ProtoMessage() {} -func (*StatePayload_Swap) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{1, 2} -} -func (m *StatePayload_Swap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatePayload_Swap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatePayload_Swap.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 *StatePayload_Swap) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatePayload_Swap.Merge(m, src) -} -func (m *StatePayload_Swap) XXX_Size() int { - return m.Size() -} -func (m *StatePayload_Swap) XXX_DiscardUnknown() { - xxx_messageInfo_StatePayload_Swap.DiscardUnknown(m) -} - -var xxx_messageInfo_StatePayload_Swap proto.InternalMessageInfo - -func (m *StatePayload_Swap) GetSwap() *v13.SwapPayload { - if m != nil { - return m.Swap - } - return nil -} - -// Requests a range of compact block data. -type CompactBlockRangeRequest struct { - // The start height of the range. - StartHeight uint64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` - // The end height of the range, defaults to the latest block height. - EndHeight uint64 `protobuf:"varint,3,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` - // If set, keeps the connection alive past `end_height`, - // streaming new compact blocks as they are created. - KeepAlive bool `protobuf:"varint,4,opt,name=keep_alive,json=keepAlive,proto3" json:"keep_alive,omitempty"` -} - -func (m *CompactBlockRangeRequest) Reset() { *m = CompactBlockRangeRequest{} } -func (m *CompactBlockRangeRequest) String() string { return proto.CompactTextString(m) } -func (*CompactBlockRangeRequest) ProtoMessage() {} -func (*CompactBlockRangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{2} -} -func (m *CompactBlockRangeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CompactBlockRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CompactBlockRangeRequest.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 *CompactBlockRangeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompactBlockRangeRequest.Merge(m, src) -} -func (m *CompactBlockRangeRequest) XXX_Size() int { - return m.Size() -} -func (m *CompactBlockRangeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CompactBlockRangeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CompactBlockRangeRequest proto.InternalMessageInfo - -func (m *CompactBlockRangeRequest) GetStartHeight() uint64 { - if m != nil { - return m.StartHeight - } - return 0 -} - -func (m *CompactBlockRangeRequest) GetEndHeight() uint64 { - if m != nil { - return m.EndHeight - } - return 0 -} - -func (m *CompactBlockRangeRequest) GetKeepAlive() bool { - if m != nil { - return m.KeepAlive - } - return false -} - -type CompactBlockRangeResponse struct { - CompactBlock *CompactBlock `protobuf:"bytes,1,opt,name=compact_block,json=compactBlock,proto3" json:"compact_block,omitempty"` -} - -func (m *CompactBlockRangeResponse) Reset() { *m = CompactBlockRangeResponse{} } -func (m *CompactBlockRangeResponse) String() string { return proto.CompactTextString(m) } -func (*CompactBlockRangeResponse) ProtoMessage() {} -func (*CompactBlockRangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{3} -} -func (m *CompactBlockRangeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CompactBlockRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CompactBlockRangeResponse.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 *CompactBlockRangeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompactBlockRangeResponse.Merge(m, src) -} -func (m *CompactBlockRangeResponse) XXX_Size() int { - return m.Size() -} -func (m *CompactBlockRangeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CompactBlockRangeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CompactBlockRangeResponse proto.InternalMessageInfo - -func (m *CompactBlockRangeResponse) GetCompactBlock() *CompactBlock { - if m != nil { - return m.CompactBlock - } - return nil -} - -type CompactBlockRequest struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *CompactBlockRequest) Reset() { *m = CompactBlockRequest{} } -func (m *CompactBlockRequest) String() string { return proto.CompactTextString(m) } -func (*CompactBlockRequest) ProtoMessage() {} -func (*CompactBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{4} -} -func (m *CompactBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CompactBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CompactBlockRequest.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 *CompactBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompactBlockRequest.Merge(m, src) -} -func (m *CompactBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *CompactBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CompactBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CompactBlockRequest proto.InternalMessageInfo - -func (m *CompactBlockRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type CompactBlockResponse struct { - CompactBlock *CompactBlock `protobuf:"bytes,1,opt,name=compact_block,json=compactBlock,proto3" json:"compact_block,omitempty"` -} - -func (m *CompactBlockResponse) Reset() { *m = CompactBlockResponse{} } -func (m *CompactBlockResponse) String() string { return proto.CompactTextString(m) } -func (*CompactBlockResponse) ProtoMessage() {} -func (*CompactBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5be1c543aaa156af, []int{5} -} -func (m *CompactBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CompactBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CompactBlockResponse.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 *CompactBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CompactBlockResponse.Merge(m, src) -} -func (m *CompactBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *CompactBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CompactBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CompactBlockResponse proto.InternalMessageInfo - -func (m *CompactBlockResponse) GetCompactBlock() *CompactBlock { - if m != nil { - return m.CompactBlock - } - return nil -} - -func init() { - proto.RegisterType((*CompactBlock)(nil), "penumbra.core.component.compact_block.v1.CompactBlock") - proto.RegisterType((*StatePayload)(nil), "penumbra.core.component.compact_block.v1.StatePayload") - proto.RegisterType((*StatePayload_RolledUp)(nil), "penumbra.core.component.compact_block.v1.StatePayload.RolledUp") - proto.RegisterType((*StatePayload_Note)(nil), "penumbra.core.component.compact_block.v1.StatePayload.Note") - proto.RegisterType((*StatePayload_Swap)(nil), "penumbra.core.component.compact_block.v1.StatePayload.Swap") - proto.RegisterType((*CompactBlockRangeRequest)(nil), "penumbra.core.component.compact_block.v1.CompactBlockRangeRequest") - proto.RegisterType((*CompactBlockRangeResponse)(nil), "penumbra.core.component.compact_block.v1.CompactBlockRangeResponse") - proto.RegisterType((*CompactBlockRequest)(nil), "penumbra.core.component.compact_block.v1.CompactBlockRequest") - proto.RegisterType((*CompactBlockResponse)(nil), "penumbra.core.component.compact_block.v1.CompactBlockResponse") -} - -func init() { - proto.RegisterFile("penumbra/core/component/compact_block/v1/compact_block.proto", fileDescriptor_5be1c543aaa156af) -} - -var fileDescriptor_5be1c543aaa156af = []byte{ - // 1026 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x73, 0xdb, 0x44, - 0x14, 0xc7, 0x23, 0xc7, 0x84, 0x78, 0xed, 0xa4, 0xb0, 0x74, 0x3a, 0x22, 0x33, 0x18, 0xe3, 0x4b, - 0xdd, 0x29, 0x95, 0xab, 0x84, 0x5f, 0x93, 0x02, 0x9d, 0xda, 0x0c, 0x71, 0x0e, 0x6d, 0x1d, 0x79, - 0x9a, 0x03, 0x98, 0x6a, 0x36, 0xd2, 0xb3, 0xad, 0x89, 0xac, 0x5d, 0xb4, 0x2b, 0x35, 0x19, 0xfe, - 0x05, 0x98, 0xe1, 0x2f, 0xe0, 0xc0, 0x11, 0xfe, 0x08, 0xae, 0x0c, 0xa7, 0x1e, 0x39, 0x76, 0x92, - 0x1b, 0x7f, 0x05, 0xb3, 0x2b, 0xc9, 0x96, 0x28, 0x9e, 0x18, 0x33, 0xd3, 0x8b, 0xbd, 0xfb, 0xf4, - 0xbe, 0x9f, 0x7d, 0xef, 0xed, 0xbe, 0x95, 0xd0, 0xa7, 0x0c, 0x82, 0x68, 0x7a, 0x12, 0x92, 0xb6, - 0x43, 0x43, 0x68, 0x3b, 0x74, 0xca, 0x68, 0x00, 0x81, 0x50, 0x23, 0xe2, 0x08, 0xfb, 0xc4, 0xa7, - 0xce, 0x69, 0x3b, 0x36, 0x8b, 0x06, 0x83, 0x85, 0x54, 0x50, 0xdc, 0xca, 0xd4, 0x86, 0x54, 0x1b, - 0x33, 0xb5, 0x51, 0x74, 0x8e, 0xcd, 0x9d, 0xd6, 0xa2, 0x75, 0x5c, 0x38, 0x93, 0x74, 0x17, 0xce, - 0x12, 0xe6, 0x62, 0xcf, 0x11, 0x80, 0xf4, 0x1c, 0x01, 0x5c, 0xe5, 0xc9, 0x1d, 0x21, 0x3d, 0xb9, - 0x23, 0x52, 0xcf, 0x85, 0x59, 0xf2, 0x89, 0x07, 0xbe, 0x0b, 0xae, 0xcd, 0x28, 0xf5, 0x95, 0x26, - 0x6f, 0x48, 0xd5, 0x8d, 0xb9, 0x3a, 0x3c, 0x67, 0x82, 0xb6, 0x45, 0xc2, 0x17, 0x19, 0xbf, 0xf9, - 0xeb, 0x06, 0xaa, 0x75, 0x93, 0x94, 0x3b, 0x32, 0x63, 0x7c, 0x03, 0x6d, 0x4c, 0xc0, 0x1b, 0x4f, - 0x84, 0xae, 0x35, 0xb4, 0x56, 0xd9, 0x4a, 0x67, 0xf8, 0x1b, 0xb4, 0xcd, 0x05, 0x11, 0x60, 0x33, - 0x72, 0xee, 0x53, 0xe2, 0x72, 0xbd, 0xd4, 0x58, 0x6f, 0x55, 0x77, 0x3f, 0x32, 0x96, 0xad, 0xa4, - 0x31, 0x90, 0xfa, 0x7e, 0x22, 0xb7, 0xb6, 0x78, 0x6e, 0xc6, 0xf1, 0x21, 0x42, 0x41, 0xe4, 0xfb, - 0xde, 0xc8, 0x83, 0x90, 0xeb, 0xeb, 0x0a, 0x7d, 0x6b, 0x21, 0x5a, 0xd6, 0x27, 0x36, 0x8d, 0x47, - 0x99, 0xc2, 0xca, 0x89, 0xf1, 0x03, 0x84, 0xd4, 0x92, 0x76, 0x48, 0xa9, 0xd0, 0xcb, 0x0d, 0xad, - 0x55, 0xdd, 0x6d, 0xe6, 0x50, 0xaa, 0x12, 0x86, 0x48, 0x10, 0x0f, 0x21, 0x3c, 0xf5, 0xc1, 0xa2, - 0x54, 0x58, 0x15, 0xa5, 0x92, 0x43, 0x89, 0x00, 0x46, 0x9d, 0x49, 0x82, 0x78, 0x6d, 0x79, 0x84, - 0x52, 0x29, 0xc4, 0x2d, 0xf4, 0x06, 0x0b, 0x29, 0xa3, 0x9c, 0xf8, 0x36, 0x17, 0x24, 0x14, 0xe0, - 0xea, 0x1b, 0x0d, 0xad, 0xb5, 0x69, 0x5d, 0xcb, 0xec, 0x83, 0xc4, 0x8c, 0x9f, 0xa2, 0xed, 0xd1, - 0xd4, 0xb5, 0x19, 0x09, 0xc9, 0x14, 0x84, 0xcc, 0xff, 0x75, 0xb5, 0xe2, 0xc7, 0x8b, 0xf3, 0x2f, - 0xec, 0x75, 0x6c, 0x1a, 0x5f, 0x4e, 0xdd, 0xfe, 0x4c, 0x6e, 0x6d, 0x8d, 0xf2, 0x53, 0x7c, 0x8c, - 0x6a, 0xfc, 0x19, 0x61, 0x36, 0x8d, 0x04, 0x8b, 0x04, 0xd7, 0x37, 0x55, 0x75, 0xf7, 0x16, 0xd2, - 0xe5, 0x89, 0x8e, 0x4d, 0xa3, 0x43, 0x84, 0x33, 0x19, 0x3c, 0x23, 0xec, 0xb1, 0xd2, 0x7d, 0x41, - 0x04, 0xb1, 0xaa, 0x7c, 0x36, 0xe7, 0xf8, 0x03, 0x74, 0x83, 0x30, 0x96, 0x8b, 0xdb, 0x8e, 0x98, - 0x4b, 0x64, 0xa2, 0x15, 0x95, 0xe8, 0x75, 0xc2, 0xd8, 0x3c, 0x8c, 0x27, 0xc9, 0x33, 0xdc, 0x43, - 0x68, 0x4c, 0xb8, 0xcd, 0x42, 0xcf, 0x01, 0xae, 0x23, 0x95, 0xe9, 0xe2, 0x9d, 0x96, 0x3d, 0x13, - 0x9b, 0xc6, 0x01, 0xe1, 0x7d, 0x25, 0xb0, 0x2a, 0xe3, 0x6c, 0x88, 0x1f, 0xa3, 0x6d, 0xe2, 0x0b, - 0x3b, 0x47, 0x73, 0xaf, 0x38, 0x37, 0x2f, 0xd1, 0x6a, 0xc4, 0x17, 0xb3, 0x19, 0x7e, 0x17, 0x55, - 0x93, 0x6d, 0xf7, 0x02, 0x17, 0xce, 0xf4, 0xaa, 0x6a, 0x80, 0xe4, 0x24, 0x1c, 0x4a, 0x4b, 0xf3, - 0x45, 0x19, 0xd5, 0xf2, 0xa7, 0x18, 0xf7, 0xd0, 0x06, 0xa7, 0x51, 0xe8, 0x80, 0xea, 0x96, 0xea, - 0xee, 0xdd, 0xab, 0x8e, 0x6c, 0x97, 0x4e, 0xa7, 0x9e, 0x98, 0x42, 0x20, 0x06, 0x4a, 0x67, 0xa5, - 0x7a, 0xfc, 0x14, 0x55, 0x42, 0xea, 0xfb, 0xe0, 0xda, 0x11, 0xd3, 0x4b, 0x0a, 0x76, 0x7f, 0xb5, - 0xd6, 0x32, 0x2c, 0xc5, 0x79, 0xc2, 0x7a, 0x6b, 0xd6, 0x66, 0x98, 0x8e, 0xf1, 0x11, 0x2a, 0x07, - 0x54, 0x80, 0xbe, 0xae, 0xd0, 0xf7, 0x56, 0x44, 0x3f, 0xa2, 0x02, 0x7a, 0x6b, 0x96, 0x42, 0x49, - 0xa4, 0x3c, 0x0e, 0x69, 0x8b, 0xad, 0x8a, 0x94, 0x27, 0x4c, 0x22, 0x25, 0x6a, 0x67, 0x80, 0x36, - 0xb3, 0xe8, 0xf1, 0x01, 0x42, 0xce, 0xac, 0x5a, 0x69, 0x7d, 0x6f, 0x2e, 0x6a, 0x42, 0x85, 0x9c, - 0x17, 0xd7, 0xca, 0x49, 0x77, 0x8e, 0x50, 0x59, 0xc6, 0x8d, 0x0f, 0xd3, 0x12, 0x24, 0xd5, 0xfd, - 0x70, 0xf9, 0xee, 0x92, 0xea, 0xec, 0xde, 0x52, 0x88, 0x9d, 0x03, 0x54, 0x96, 0x71, 0xe3, 0xfb, - 0x69, 0x09, 0x12, 0xe4, 0xed, 0xab, 0x5a, 0x4a, 0x6a, 0x66, 0x20, 0x29, 0xec, 0x5c, 0x43, 0x5b, - 0x85, 0x6b, 0xb5, 0xf9, 0x1d, 0xd2, 0xf3, 0xf7, 0xb1, 0x45, 0x82, 0x31, 0x58, 0xf0, 0x6d, 0x04, - 0x5c, 0xe0, 0xf7, 0x50, 0x4d, 0x5d, 0x25, 0x76, 0x7a, 0x43, 0x97, 0xd4, 0x01, 0xad, 0x2a, 0x5b, - 0x2f, 0xb9, 0xa6, 0xdf, 0x41, 0x08, 0x02, 0x37, 0x73, 0x58, 0x57, 0x0e, 0x15, 0x08, 0xdc, 0xf9, - 0xe3, 0x53, 0x00, 0x66, 0x13, 0xdf, 0x8b, 0x41, 0x6d, 0xdc, 0xa6, 0x55, 0x91, 0x96, 0x07, 0xd2, - 0xd0, 0x3c, 0x43, 0x6f, 0xff, 0xcb, 0xe2, 0x9c, 0xd1, 0x80, 0x03, 0xfe, 0x1a, 0x6d, 0x15, 0x76, - 0x32, 0xdd, 0x92, 0xff, 0xf0, 0x02, 0x28, 0xb0, 0x6b, 0x4e, 0x6e, 0xd6, 0xbc, 0x83, 0xde, 0x2a, - 0x3c, 0x4d, 0x33, 0x5e, 0xf0, 0x36, 0x6a, 0x72, 0x74, 0xbd, 0xe8, 0xfe, 0x0a, 0x62, 0xdc, 0xfd, - 0xad, 0x84, 0x6a, 0x47, 0x11, 0x84, 0xe7, 0x03, 0x08, 0x63, 0xcf, 0x01, 0xfc, 0x93, 0x86, 0xde, - 0x7c, 0xa9, 0x5e, 0xb8, 0xb3, 0xe2, 0x62, 0xb9, 0x9d, 0xde, 0xe9, 0xfe, 0x2f, 0x46, 0x52, 0x8c, - 0xbb, 0x1a, 0xfe, 0x41, 0xfb, 0xc7, 0xdb, 0xfd, 0xb3, 0x15, 0xb9, 0x69, 0x58, 0x9f, 0xaf, 0x2a, - 0x4f, 0x22, 0xea, 0x7c, 0xbf, 0xfe, 0xfb, 0x45, 0x5d, 0x7b, 0x7e, 0x51, 0xd7, 0x5e, 0x5c, 0xd4, - 0xb5, 0x1f, 0x2f, 0xeb, 0x6b, 0xcf, 0x2f, 0xeb, 0x6b, 0x7f, 0x5e, 0xd6, 0xd7, 0xd0, 0xfb, 0x0e, - 0x9d, 0x2e, 0x4d, 0xef, 0x14, 0xca, 0xde, 0x97, 0x5f, 0x32, 0x7d, 0xed, 0x2b, 0x36, 0xf6, 0xc4, - 0x24, 0x3a, 0x91, 0xde, 0x6d, 0x2e, 0x42, 0x59, 0x0b, 0x9f, 0xc6, 0x70, 0x27, 0x86, 0x40, 0x44, - 0x21, 0xf0, 0xb6, 0x17, 0x08, 0x08, 0x9d, 0x09, 0x91, 0xff, 0x5c, 0xb4, 0xe3, 0x4f, 0xda, 0x6a, - 0xd2, 0x5e, 0xf6, 0x4b, 0xf2, 0x5e, 0xc1, 0x10, 0x9b, 0x3f, 0x97, 0xca, 0xfd, 0x6e, 0xb7, 0xfb, - 0x4b, 0xe9, 0x66, 0x3f, 0x0b, 0xbc, 0x2b, 0x03, 0xef, 0xce, 0x02, 0xcf, 0x87, 0x69, 0x1c, 0x9b, - 0x7f, 0xcc, 0x3d, 0x87, 0xd2, 0x73, 0x38, 0xf3, 0x1c, 0xe6, 0x3d, 0x87, 0xc7, 0xe6, 0x45, 0x69, - 0x6f, 0x49, 0xcf, 0xe1, 0x41, 0xbf, 0xf3, 0x10, 0x04, 0x71, 0x89, 0x20, 0x7f, 0x95, 0x6e, 0x67, - 0xaa, 0xfd, 0x7d, 0x29, 0x93, 0xbf, 0xa9, 0x2e, 0x19, 0x66, 0xc2, 0xfd, 0xfd, 0x63, 0xf3, 0x64, - 0x43, 0x7d, 0x03, 0xee, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x2f, 0xcc, 0x90, 0x24, 0x4b, 0x0b, - 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // Returns a stream of compact blocks, optionally keeping the stream alive for push notifications. - CompactBlockRange(ctx context.Context, in *CompactBlockRangeRequest, opts ...grpc.CallOption) (QueryService_CompactBlockRangeClient, error) - // Returns a single compact block at a specific height. - // - // Clients requesting multiple compact blocks should generally use the streaming RPC. - CompactBlock(ctx context.Context, in *CompactBlockRequest, opts ...grpc.CallOption) (*CompactBlockResponse, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) CompactBlockRange(ctx context.Context, in *CompactBlockRangeRequest, opts ...grpc.CallOption) (QueryService_CompactBlockRangeClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/penumbra.core.component.compact_block.v1.QueryService/CompactBlockRange", opts...) - if err != nil { - return nil, err - } - x := &queryServiceCompactBlockRangeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_CompactBlockRangeClient interface { - Recv() (*CompactBlockRangeResponse, error) - grpc.ClientStream -} - -type queryServiceCompactBlockRangeClient struct { - grpc.ClientStream -} - -func (x *queryServiceCompactBlockRangeClient) Recv() (*CompactBlockRangeResponse, error) { - m := new(CompactBlockRangeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) CompactBlock(ctx context.Context, in *CompactBlockRequest, opts ...grpc.CallOption) (*CompactBlockResponse, error) { - out := new(CompactBlockResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.compact_block.v1.QueryService/CompactBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // Returns a stream of compact blocks, optionally keeping the stream alive for push notifications. - CompactBlockRange(*CompactBlockRangeRequest, QueryService_CompactBlockRangeServer) error - // Returns a single compact block at a specific height. - // - // Clients requesting multiple compact blocks should generally use the streaming RPC. - CompactBlock(context.Context, *CompactBlockRequest) (*CompactBlockResponse, error) -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) CompactBlockRange(req *CompactBlockRangeRequest, srv QueryService_CompactBlockRangeServer) error { - return status.Errorf(codes.Unimplemented, "method CompactBlockRange not implemented") -} -func (*UnimplementedQueryServiceServer) CompactBlock(ctx context.Context, req *CompactBlockRequest) (*CompactBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompactBlock not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_CompactBlockRange_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(CompactBlockRangeRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).CompactBlockRange(m, &queryServiceCompactBlockRangeServer{stream}) -} - -type QueryService_CompactBlockRangeServer interface { - Send(*CompactBlockRangeResponse) error - grpc.ServerStream -} - -type queryServiceCompactBlockRangeServer struct { - grpc.ServerStream -} - -func (x *queryServiceCompactBlockRangeServer) Send(m *CompactBlockRangeResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_CompactBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CompactBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).CompactBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.compact_block.v1.QueryService/CompactBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).CompactBlock(ctx, req.(*CompactBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.compact_block.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CompactBlock", - Handler: _QueryService_CompactBlock_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "CompactBlockRange", - Handler: _QueryService_CompactBlockRange_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/core/component/compact_block/v1/compact_block.proto", -} - -func (m *CompactBlock) Marshal() (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 *CompactBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CompactBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AltGasPrices) > 0 { - for iNdEx := len(m.AltGasPrices) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AltGasPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xa2 - } - } - if m.EpochIndex != 0 { - i = encodeVarintCompactBlock(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0x58 - } - if m.GasPrices != nil { - { - size, err := m.GasPrices.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.AppParametersUpdated { - i-- - if m.AppParametersUpdated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if len(m.SwapOutputs) > 0 { - for iNdEx := len(m.SwapOutputs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SwapOutputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if m.FmdParameters != nil { - { - size, err := m.FmdParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.ProposalStarted { - i-- - if m.ProposalStarted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.EpochRoot != nil { - { - size, err := m.EpochRoot.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.BlockRoot != nil { - { - size, err := m.BlockRoot.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Nullifiers) > 0 { - for iNdEx := len(m.Nullifiers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Nullifiers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.StatePayloads) > 0 { - for iNdEx := len(m.StatePayloads) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StatePayloads[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Height != 0 { - i = encodeVarintCompactBlock(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StatePayload) Marshal() (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 *StatePayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StatePayload != nil { - { - size := m.StatePayload.Size() - i -= size - if _, err := m.StatePayload.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Source != nil { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatePayload_RolledUp_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatePayload_RolledUp_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RolledUp != nil { - { - size, err := m.RolledUp.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *StatePayload_Note_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatePayload_Note_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *StatePayload_Swap_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatePayload_Swap_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *StatePayload_RolledUp) Marshal() (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 *StatePayload_RolledUp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatePayload_RolledUp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Commitment != nil { - { - size, err := m.Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatePayload_Note) Marshal() (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 *StatePayload_Note) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatePayload_Note) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *StatePayload_Swap) Marshal() (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 *StatePayload_Swap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatePayload_Swap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *CompactBlockRangeRequest) Marshal() (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 *CompactBlockRangeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CompactBlockRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.KeepAlive { - i-- - if m.KeepAlive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.EndHeight != 0 { - i = encodeVarintCompactBlock(dAtA, i, uint64(m.EndHeight)) - i-- - dAtA[i] = 0x18 - } - if m.StartHeight != 0 { - i = encodeVarintCompactBlock(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *CompactBlockRangeResponse) Marshal() (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 *CompactBlockRangeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CompactBlockRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CompactBlock != nil { - { - size, err := m.CompactBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CompactBlockRequest) Marshal() (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 *CompactBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CompactBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintCompactBlock(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CompactBlockResponse) Marshal() (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 *CompactBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CompactBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CompactBlock != nil { - { - size, err := m.CompactBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCompactBlock(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCompactBlock(dAtA []byte, offset int, v uint64) int { - offset -= sovCompactBlock(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CompactBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovCompactBlock(uint64(m.Height)) - } - if len(m.StatePayloads) > 0 { - for _, e := range m.StatePayloads { - l = e.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - } - if len(m.Nullifiers) > 0 { - for _, e := range m.Nullifiers { - l = e.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - } - if m.BlockRoot != nil { - l = m.BlockRoot.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - if m.EpochRoot != nil { - l = m.EpochRoot.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - if m.ProposalStarted { - n += 2 - } - if m.FmdParameters != nil { - l = m.FmdParameters.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - if len(m.SwapOutputs) > 0 { - for _, e := range m.SwapOutputs { - l = e.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - } - if m.AppParametersUpdated { - n += 2 - } - if m.GasPrices != nil { - l = m.GasPrices.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - if m.EpochIndex != 0 { - n += 1 + sovCompactBlock(uint64(m.EpochIndex)) - } - if len(m.AltGasPrices) > 0 { - for _, e := range m.AltGasPrices { - l = e.Size() - n += 2 + l + sovCompactBlock(uint64(l)) - } - } - return n -} - -func (m *StatePayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - if m.StatePayload != nil { - n += m.StatePayload.Size() - } - return n -} - -func (m *StatePayload_RolledUp_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RolledUp != nil { - l = m.RolledUp.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} -func (m *StatePayload_Note_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} -func (m *StatePayload_Swap_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} -func (m *StatePayload_RolledUp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Commitment != nil { - l = m.Commitment.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} - -func (m *StatePayload_Note) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} - -func (m *StatePayload_Swap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} - -func (m *CompactBlockRangeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartHeight != 0 { - n += 1 + sovCompactBlock(uint64(m.StartHeight)) - } - if m.EndHeight != 0 { - n += 1 + sovCompactBlock(uint64(m.EndHeight)) - } - if m.KeepAlive { - n += 2 - } - return n -} - -func (m *CompactBlockRangeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CompactBlock != nil { - l = m.CompactBlock.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} - -func (m *CompactBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovCompactBlock(uint64(m.Height)) - } - return n -} - -func (m *CompactBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CompactBlock != nil { - l = m.CompactBlock.Size() - n += 1 + l + sovCompactBlock(uint64(l)) - } - return n -} - -func sovCompactBlock(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCompactBlock(x uint64) (n int) { - return sovCompactBlock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CompactBlock) 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 ErrIntOverflowCompactBlock - } - 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: CompactBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompactBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatePayloads", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatePayloads = append(m.StatePayloads, &StatePayload{}) - if err := m.StatePayloads[len(m.StatePayloads)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifiers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nullifiers = append(m.Nullifiers, &v1.Nullifier{}) - if err := m.Nullifiers[len(m.Nullifiers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockRoot", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockRoot == nil { - m.BlockRoot = &v11.MerkleRoot{} - } - if err := m.BlockRoot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochRoot", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EpochRoot == nil { - m.EpochRoot = &v11.MerkleRoot{} - } - if err := m.EpochRoot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalStarted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ProposalStarted = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FmdParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FmdParameters == nil { - m.FmdParameters = &v12.FmdParameters{} - } - if err := m.FmdParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapOutputs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SwapOutputs = append(m.SwapOutputs, &v13.BatchSwapOutputData{}) - if err := m.SwapOutputs[len(m.SwapOutputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AppParametersUpdated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AppParametersUpdated = bool(v != 0) - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GasPrices == nil { - m.GasPrices = &v14.GasPrices{} - } - if err := m.GasPrices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltGasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltGasPrices = append(m.AltGasPrices, &v14.GasPrices{}) - if err := m.AltGasPrices[len(m.AltGasPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatePayload) 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 ErrIntOverflowCompactBlock - } - 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: StatePayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatePayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &v1.CommitmentSource{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RolledUp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &StatePayload_RolledUp{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.StatePayload = &StatePayload_RolledUp_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &StatePayload_Note{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.StatePayload = &StatePayload_Note_{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &StatePayload_Swap{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.StatePayload = &StatePayload_Swap_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatePayload_RolledUp) 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 ErrIntOverflowCompactBlock - } - 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: RolledUp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RolledUp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commitment == nil { - m.Commitment = &v11.StateCommitment{} - } - if err := m.Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatePayload_Note) 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 ErrIntOverflowCompactBlock - } - 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: Note: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Note: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Note == nil { - m.Note = &v12.NotePayload{} - } - if err := m.Note.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatePayload_Swap) 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 ErrIntOverflowCompactBlock - } - 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: Swap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Swap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Swap == nil { - m.Swap = &v13.SwapPayload{} - } - if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompactBlockRangeRequest) 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 ErrIntOverflowCompactBlock - } - 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: CompactBlockRangeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompactBlockRangeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - m.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) - } - m.EndHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeepAlive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.KeepAlive = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompactBlockRangeResponse) 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 ErrIntOverflowCompactBlock - } - 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: CompactBlockRangeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompactBlockRangeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompactBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CompactBlock == nil { - m.CompactBlock = &CompactBlock{} - } - if err := m.CompactBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompactBlockRequest) 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 ErrIntOverflowCompactBlock - } - 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: CompactBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompactBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CompactBlockResponse) 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 ErrIntOverflowCompactBlock - } - 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: CompactBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CompactBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompactBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCompactBlock - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCompactBlock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CompactBlock == nil { - m.CompactBlock = &CompactBlock{} - } - if err := m.CompactBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCompactBlock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCompactBlock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCompactBlock(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCompactBlock - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCompactBlock - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCompactBlock - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCompactBlock - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCompactBlock = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCompactBlock = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCompactBlock = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/dex/v1/dex.pb.go b/chain/penumbra/core/component/dex/v1/dex.pb.go deleted file mode 100644 index 3649d870..00000000 --- a/chain/penumbra/core/component/dex/v1/dex.pb.go +++ /dev/null @@ -1,22026 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/dex/v1/dex.proto - -package dexv1 - -import ( - context "context" - encoding_binary "encoding/binary" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/fee/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v17 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/shielded_pool/v1" - v15 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - v16 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/txhash/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/tct/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type PositionState_PositionStateEnum int32 - -const ( - PositionState_POSITION_STATE_ENUM_UNSPECIFIED PositionState_PositionStateEnum = 0 - // The position has been opened, is active, has reserves and accumulated - // fees, and can be traded against. - PositionState_POSITION_STATE_ENUM_OPENED PositionState_PositionStateEnum = 1 - // The position has been closed, is inactive and can no longer be traded - // against, but still has reserves and accumulated fees. - PositionState_POSITION_STATE_ENUM_CLOSED PositionState_PositionStateEnum = 2 - // The final reserves and accumulated fees have been withdrawn, leaving an - // empty, inactive position awaiting (possible) retroactive rewards. - // - // Positions can be withdrawn from multiple times, incrementing a sequence - // number each time. - PositionState_POSITION_STATE_ENUM_WITHDRAWN PositionState_PositionStateEnum = 3 - // Deprecated. - PositionState_POSITION_STATE_ENUM_CLAIMED PositionState_PositionStateEnum = 4 // Deprecated: Do not use. -) - -var PositionState_PositionStateEnum_name = map[int32]string{ - 0: "POSITION_STATE_ENUM_UNSPECIFIED", - 1: "POSITION_STATE_ENUM_OPENED", - 2: "POSITION_STATE_ENUM_CLOSED", - 3: "POSITION_STATE_ENUM_WITHDRAWN", - 4: "POSITION_STATE_ENUM_CLAIMED", -} - -var PositionState_PositionStateEnum_value = map[string]int32{ - "POSITION_STATE_ENUM_UNSPECIFIED": 0, - "POSITION_STATE_ENUM_OPENED": 1, - "POSITION_STATE_ENUM_CLOSED": 2, - "POSITION_STATE_ENUM_WITHDRAWN": 3, - "POSITION_STATE_ENUM_CLAIMED": 4, -} - -func (x PositionState_PositionStateEnum) String() string { - return proto.EnumName(PositionState_PositionStateEnum_name, int32(x)) -} - -func (PositionState_PositionStateEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{20, 0} -} - -// A Penumbra ZK swap proof. -type ZKSwapProof struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ZKSwapProof) Reset() { *m = ZKSwapProof{} } -func (m *ZKSwapProof) String() string { return proto.CompactTextString(m) } -func (*ZKSwapProof) ProtoMessage() {} -func (*ZKSwapProof) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{0} -} -func (m *ZKSwapProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ZKSwapProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ZKSwapProof.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 *ZKSwapProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_ZKSwapProof.Merge(m, src) -} -func (m *ZKSwapProof) XXX_Size() int { - return m.Size() -} -func (m *ZKSwapProof) XXX_DiscardUnknown() { - xxx_messageInfo_ZKSwapProof.DiscardUnknown(m) -} - -var xxx_messageInfo_ZKSwapProof proto.InternalMessageInfo - -func (m *ZKSwapProof) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A Penumbra ZK swap claim proof. -type ZKSwapClaimProof struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ZKSwapClaimProof) Reset() { *m = ZKSwapClaimProof{} } -func (m *ZKSwapClaimProof) String() string { return proto.CompactTextString(m) } -func (*ZKSwapClaimProof) ProtoMessage() {} -func (*ZKSwapClaimProof) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{1} -} -func (m *ZKSwapClaimProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ZKSwapClaimProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ZKSwapClaimProof.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 *ZKSwapClaimProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_ZKSwapClaimProof.Merge(m, src) -} -func (m *ZKSwapClaimProof) XXX_Size() int { - return m.Size() -} -func (m *ZKSwapClaimProof) XXX_DiscardUnknown() { - xxx_messageInfo_ZKSwapClaimProof.DiscardUnknown(m) -} - -var xxx_messageInfo_ZKSwapClaimProof proto.InternalMessageInfo - -func (m *ZKSwapClaimProof) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A transaction action that submits a swap to the dex. -type Swap struct { - // Contains the Swap proof. - Proof *ZKSwapProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` - // Encapsulates the authorized fields of the Swap action, used in signing. - Body *SwapBody `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` -} - -func (m *Swap) Reset() { *m = Swap{} } -func (m *Swap) String() string { return proto.CompactTextString(m) } -func (*Swap) ProtoMessage() {} -func (*Swap) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{2} -} -func (m *Swap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Swap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Swap.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 *Swap) XXX_Merge(src proto.Message) { - xxx_messageInfo_Swap.Merge(m, src) -} -func (m *Swap) XXX_Size() int { - return m.Size() -} -func (m *Swap) XXX_DiscardUnknown() { - xxx_messageInfo_Swap.DiscardUnknown(m) -} - -var xxx_messageInfo_Swap proto.InternalMessageInfo - -func (m *Swap) GetProof() *ZKSwapProof { - if m != nil { - return m.Proof - } - return nil -} - -func (m *Swap) GetBody() *SwapBody { - if m != nil { - return m.Body - } - return nil -} - -// A transaction action that obtains assets previously confirmed -// via a Swap transaction. Does not include a spend authorization -// signature, as it is only capable of consuming the NFT from a -// Swap transaction. -type SwapClaim struct { - // Contains the SwapClaim proof. - Proof *ZKSwapClaimProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` - // Encapsulates the authorized fields of the SwapClaim action, used in signing. - Body *SwapClaimBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` - // The epoch duration of the chain when the swap claim took place. - EpochDuration uint64 `protobuf:"varint,7,opt,name=epoch_duration,json=epochDuration,proto3" json:"epoch_duration,omitempty"` -} - -func (m *SwapClaim) Reset() { *m = SwapClaim{} } -func (m *SwapClaim) String() string { return proto.CompactTextString(m) } -func (*SwapClaim) ProtoMessage() {} -func (*SwapClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{3} -} -func (m *SwapClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapClaim.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 *SwapClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapClaim.Merge(m, src) -} -func (m *SwapClaim) XXX_Size() int { - return m.Size() -} -func (m *SwapClaim) XXX_DiscardUnknown() { - xxx_messageInfo_SwapClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapClaim proto.InternalMessageInfo - -func (m *SwapClaim) GetProof() *ZKSwapClaimProof { - if m != nil { - return m.Proof - } - return nil -} - -func (m *SwapClaim) GetBody() *SwapClaimBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *SwapClaim) GetEpochDuration() uint64 { - if m != nil { - return m.EpochDuration - } - return 0 -} - -// Encapsulates the authorized fields of the SwapClaim action, used in signing. -type SwapClaimBody struct { - // The nullifier for the Swap commitment to be consumed. - Nullifier *v1.Nullifier `protobuf:"bytes,1,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - // The fee allows `SwapClaim` without an additional `Spend`. - Fee *v11.Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` - // Note output for asset 1. - Output_1Commitment *v12.StateCommitment `protobuf:"bytes,3,opt,name=output_1_commitment,json=output1Commitment,proto3" json:"output_1_commitment,omitempty"` - // Note output for asset 2. - Output_2Commitment *v12.StateCommitment `protobuf:"bytes,4,opt,name=output_2_commitment,json=output2Commitment,proto3" json:"output_2_commitment,omitempty"` - // Input and output amounts, and asset IDs for the assets in the swap. - OutputData *BatchSwapOutputData `protobuf:"bytes,6,opt,name=output_data,json=outputData,proto3" json:"output_data,omitempty"` -} - -func (m *SwapClaimBody) Reset() { *m = SwapClaimBody{} } -func (m *SwapClaimBody) String() string { return proto.CompactTextString(m) } -func (*SwapClaimBody) ProtoMessage() {} -func (*SwapClaimBody) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{4} -} -func (m *SwapClaimBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapClaimBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapClaimBody.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 *SwapClaimBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapClaimBody.Merge(m, src) -} -func (m *SwapClaimBody) XXX_Size() int { - return m.Size() -} -func (m *SwapClaimBody) XXX_DiscardUnknown() { - xxx_messageInfo_SwapClaimBody.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapClaimBody proto.InternalMessageInfo - -func (m *SwapClaimBody) GetNullifier() *v1.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *SwapClaimBody) GetFee() *v11.Fee { - if m != nil { - return m.Fee - } - return nil -} - -func (m *SwapClaimBody) GetOutput_1Commitment() *v12.StateCommitment { - if m != nil { - return m.Output_1Commitment - } - return nil -} - -func (m *SwapClaimBody) GetOutput_2Commitment() *v12.StateCommitment { - if m != nil { - return m.Output_2Commitment - } - return nil -} - -func (m *SwapClaimBody) GetOutputData() *BatchSwapOutputData { - if m != nil { - return m.OutputData - } - return nil -} - -// The authorized data of a Swap transaction. -type SwapBody struct { - // The trading pair to swap. - TradingPair *TradingPair `protobuf:"bytes,1,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // The amount for asset 1. - Delta_1I *v13.Amount `protobuf:"bytes,2,opt,name=delta_1_i,json=delta1I,proto3" json:"delta_1_i,omitempty"` - // The amount for asset 2. - Delta_2I *v13.Amount `protobuf:"bytes,3,opt,name=delta_2_i,json=delta2I,proto3" json:"delta_2_i,omitempty"` - // A commitment to a prepaid fee for the future SwapClaim. - // This is recorded separately from delta_j_i because it's shielded; - // in the future we'll want separate commitments to each delta_j_i - // anyways in order to prove consistency with flow encryption. - FeeCommitment *v14.BalanceCommitment `protobuf:"bytes,4,opt,name=fee_commitment,json=feeCommitment,proto3" json:"fee_commitment,omitempty"` - // The swap commitment and encryption of the swap data. - Payload *SwapPayload `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *SwapBody) Reset() { *m = SwapBody{} } -func (m *SwapBody) String() string { return proto.CompactTextString(m) } -func (*SwapBody) ProtoMessage() {} -func (*SwapBody) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{5} -} -func (m *SwapBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapBody.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 *SwapBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapBody.Merge(m, src) -} -func (m *SwapBody) XXX_Size() int { - return m.Size() -} -func (m *SwapBody) XXX_DiscardUnknown() { - xxx_messageInfo_SwapBody.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapBody proto.InternalMessageInfo - -func (m *SwapBody) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *SwapBody) GetDelta_1I() *v13.Amount { - if m != nil { - return m.Delta_1I - } - return nil -} - -func (m *SwapBody) GetDelta_2I() *v13.Amount { - if m != nil { - return m.Delta_2I - } - return nil -} - -func (m *SwapBody) GetFeeCommitment() *v14.BalanceCommitment { - if m != nil { - return m.FeeCommitment - } - return nil -} - -func (m *SwapBody) GetPayload() *SwapPayload { - if m != nil { - return m.Payload - } - return nil -} - -type SwapPayload struct { - Commitment *v12.StateCommitment `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` - EncryptedSwap []byte `protobuf:"bytes,2,opt,name=encrypted_swap,json=encryptedSwap,proto3" json:"encrypted_swap,omitempty"` -} - -func (m *SwapPayload) Reset() { *m = SwapPayload{} } -func (m *SwapPayload) String() string { return proto.CompactTextString(m) } -func (*SwapPayload) ProtoMessage() {} -func (*SwapPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{6} -} -func (m *SwapPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapPayload.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 *SwapPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapPayload.Merge(m, src) -} -func (m *SwapPayload) XXX_Size() int { - return m.Size() -} -func (m *SwapPayload) XXX_DiscardUnknown() { - xxx_messageInfo_SwapPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapPayload proto.InternalMessageInfo - -func (m *SwapPayload) GetCommitment() *v12.StateCommitment { - if m != nil { - return m.Commitment - } - return nil -} - -func (m *SwapPayload) GetEncryptedSwap() []byte { - if m != nil { - return m.EncryptedSwap - } - return nil -} - -type SwapPlaintext struct { - // The trading pair to swap. - TradingPair *TradingPair `protobuf:"bytes,1,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // Input amount of asset 1 - Delta_1I *v13.Amount `protobuf:"bytes,2,opt,name=delta_1_i,json=delta1I,proto3" json:"delta_1_i,omitempty"` - // Input amount of asset 2 - Delta_2I *v13.Amount `protobuf:"bytes,3,opt,name=delta_2_i,json=delta2I,proto3" json:"delta_2_i,omitempty"` - // Pre-paid fee to claim the swap - ClaimFee *v11.Fee `protobuf:"bytes,4,opt,name=claim_fee,json=claimFee,proto3" json:"claim_fee,omitempty"` - // Address that will claim the swap outputs via SwapClaim. - ClaimAddress *v15.Address `protobuf:"bytes,5,opt,name=claim_address,json=claimAddress,proto3" json:"claim_address,omitempty"` - // Swap rseed (blinding factors are derived from this) - Rseed []byte `protobuf:"bytes,6,opt,name=rseed,proto3" json:"rseed,omitempty"` -} - -func (m *SwapPlaintext) Reset() { *m = SwapPlaintext{} } -func (m *SwapPlaintext) String() string { return proto.CompactTextString(m) } -func (*SwapPlaintext) ProtoMessage() {} -func (*SwapPlaintext) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{7} -} -func (m *SwapPlaintext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapPlaintext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapPlaintext.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 *SwapPlaintext) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapPlaintext.Merge(m, src) -} -func (m *SwapPlaintext) XXX_Size() int { - return m.Size() -} -func (m *SwapPlaintext) XXX_DiscardUnknown() { - xxx_messageInfo_SwapPlaintext.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapPlaintext proto.InternalMessageInfo - -func (m *SwapPlaintext) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *SwapPlaintext) GetDelta_1I() *v13.Amount { - if m != nil { - return m.Delta_1I - } - return nil -} - -func (m *SwapPlaintext) GetDelta_2I() *v13.Amount { - if m != nil { - return m.Delta_2I - } - return nil -} - -func (m *SwapPlaintext) GetClaimFee() *v11.Fee { - if m != nil { - return m.ClaimFee - } - return nil -} - -func (m *SwapPlaintext) GetClaimAddress() *v15.Address { - if m != nil { - return m.ClaimAddress - } - return nil -} - -func (m *SwapPlaintext) GetRseed() []byte { - if m != nil { - return m.Rseed - } - return nil -} - -type SwapPlan struct { - // The plaintext version of the swap to be performed. - SwapPlaintext *SwapPlaintext `protobuf:"bytes,1,opt,name=swap_plaintext,json=swapPlaintext,proto3" json:"swap_plaintext,omitempty"` - // The blinding factor for the fee commitment. The fee in the SwapPlan is private to prevent linkability with the SwapClaim. - FeeBlinding []byte `protobuf:"bytes,2,opt,name=fee_blinding,json=feeBlinding,proto3" json:"fee_blinding,omitempty"` - // The first blinding factor to use for the ZK swap proof. - ProofBlindingR []byte `protobuf:"bytes,3,opt,name=proof_blinding_r,json=proofBlindingR,proto3" json:"proof_blinding_r,omitempty"` - // The second blinding factor to use for the ZK swap proof. - ProofBlindingS []byte `protobuf:"bytes,4,opt,name=proof_blinding_s,json=proofBlindingS,proto3" json:"proof_blinding_s,omitempty"` -} - -func (m *SwapPlan) Reset() { *m = SwapPlan{} } -func (m *SwapPlan) String() string { return proto.CompactTextString(m) } -func (*SwapPlan) ProtoMessage() {} -func (*SwapPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{8} -} -func (m *SwapPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapPlan.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 *SwapPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapPlan.Merge(m, src) -} -func (m *SwapPlan) XXX_Size() int { - return m.Size() -} -func (m *SwapPlan) XXX_DiscardUnknown() { - xxx_messageInfo_SwapPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapPlan proto.InternalMessageInfo - -func (m *SwapPlan) GetSwapPlaintext() *SwapPlaintext { - if m != nil { - return m.SwapPlaintext - } - return nil -} - -func (m *SwapPlan) GetFeeBlinding() []byte { - if m != nil { - return m.FeeBlinding - } - return nil -} - -func (m *SwapPlan) GetProofBlindingR() []byte { - if m != nil { - return m.ProofBlindingR - } - return nil -} - -func (m *SwapPlan) GetProofBlindingS() []byte { - if m != nil { - return m.ProofBlindingS - } - return nil -} - -type SwapClaimPlan struct { - // The plaintext version of the swap to be performed. - SwapPlaintext *SwapPlaintext `protobuf:"bytes,1,opt,name=swap_plaintext,json=swapPlaintext,proto3" json:"swap_plaintext,omitempty"` - // The position of the swap commitment. - Position uint64 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"` - // Input and output amounts for the Swap. - OutputData *BatchSwapOutputData `protobuf:"bytes,3,opt,name=output_data,json=outputData,proto3" json:"output_data,omitempty"` - // The epoch duration, used in proving. - EpochDuration uint64 `protobuf:"varint,4,opt,name=epoch_duration,json=epochDuration,proto3" json:"epoch_duration,omitempty"` - // The first blinding factor to use for the ZK swap claim proof. - ProofBlindingR []byte `protobuf:"bytes,5,opt,name=proof_blinding_r,json=proofBlindingR,proto3" json:"proof_blinding_r,omitempty"` - // The second blinding factor to use for the ZK swap claim proof. - ProofBlindingS []byte `protobuf:"bytes,6,opt,name=proof_blinding_s,json=proofBlindingS,proto3" json:"proof_blinding_s,omitempty"` -} - -func (m *SwapClaimPlan) Reset() { *m = SwapClaimPlan{} } -func (m *SwapClaimPlan) String() string { return proto.CompactTextString(m) } -func (*SwapClaimPlan) ProtoMessage() {} -func (*SwapClaimPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{9} -} -func (m *SwapClaimPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapClaimPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapClaimPlan.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 *SwapClaimPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapClaimPlan.Merge(m, src) -} -func (m *SwapClaimPlan) XXX_Size() int { - return m.Size() -} -func (m *SwapClaimPlan) XXX_DiscardUnknown() { - xxx_messageInfo_SwapClaimPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapClaimPlan proto.InternalMessageInfo - -func (m *SwapClaimPlan) GetSwapPlaintext() *SwapPlaintext { - if m != nil { - return m.SwapPlaintext - } - return nil -} - -func (m *SwapClaimPlan) GetPosition() uint64 { - if m != nil { - return m.Position - } - return 0 -} - -func (m *SwapClaimPlan) GetOutputData() *BatchSwapOutputData { - if m != nil { - return m.OutputData - } - return nil -} - -func (m *SwapClaimPlan) GetEpochDuration() uint64 { - if m != nil { - return m.EpochDuration - } - return 0 -} - -func (m *SwapClaimPlan) GetProofBlindingR() []byte { - if m != nil { - return m.ProofBlindingR - } - return nil -} - -func (m *SwapClaimPlan) GetProofBlindingS() []byte { - if m != nil { - return m.ProofBlindingS - } - return nil -} - -type SwapView struct { - // Types that are valid to be assigned to SwapView: - // *SwapView_Visible_ - // *SwapView_Opaque_ - SwapView isSwapView_SwapView `protobuf_oneof:"swap_view"` -} - -func (m *SwapView) Reset() { *m = SwapView{} } -func (m *SwapView) String() string { return proto.CompactTextString(m) } -func (*SwapView) ProtoMessage() {} -func (*SwapView) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{10} -} -func (m *SwapView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapView.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 *SwapView) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapView.Merge(m, src) -} -func (m *SwapView) XXX_Size() int { - return m.Size() -} -func (m *SwapView) XXX_DiscardUnknown() { - xxx_messageInfo_SwapView.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapView proto.InternalMessageInfo - -type isSwapView_SwapView interface { - isSwapView_SwapView() - MarshalTo([]byte) (int, error) - Size() int -} - -type SwapView_Visible_ struct { - Visible *SwapView_Visible `protobuf:"bytes,1,opt,name=visible,proto3,oneof" json:"visible,omitempty"` -} -type SwapView_Opaque_ struct { - Opaque *SwapView_Opaque `protobuf:"bytes,2,opt,name=opaque,proto3,oneof" json:"opaque,omitempty"` -} - -func (*SwapView_Visible_) isSwapView_SwapView() {} -func (*SwapView_Opaque_) isSwapView_SwapView() {} - -func (m *SwapView) GetSwapView() isSwapView_SwapView { - if m != nil { - return m.SwapView - } - return nil -} - -func (m *SwapView) GetVisible() *SwapView_Visible { - if x, ok := m.GetSwapView().(*SwapView_Visible_); ok { - return x.Visible - } - return nil -} - -func (m *SwapView) GetOpaque() *SwapView_Opaque { - if x, ok := m.GetSwapView().(*SwapView_Opaque_); ok { - return x.Opaque - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SwapView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SwapView_Visible_)(nil), - (*SwapView_Opaque_)(nil), - } -} - -type SwapView_Visible struct { - // The underlying Swap action being viewed. - Swap *Swap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap,omitempty"` - // The plaintext of the encrypted swap. - SwapPlaintext *SwapPlaintext `protobuf:"bytes,3,opt,name=swap_plaintext,json=swapPlaintext,proto3" json:"swap_plaintext,omitempty"` - // Optionally, a transaction hash for the transaction that claimed this - // swap. - // - // Presence of this field signals that the swap outputs have been claimed - // and that the claim transaction is known to the view server. Absence of - // this field does not indicate anything about the state of the swap. - // - // This field allows frontends to more easily crossreference the sequence of - // Swap/SwapClaim actions. - ClaimTx *v16.TransactionId `protobuf:"bytes,4,opt,name=claim_tx,json=claimTx,proto3" json:"claim_tx,omitempty"` - // Optionally, if the swap has been confirmed, the batch price it received. - // - // As soon as the swap is detected, the view server can in principle record - // the relevant BSOD and provide it as part of the view. This allows providing - // info about the execution of the swap. - BatchSwapOutputData *BatchSwapOutputData `protobuf:"bytes,20,opt,name=batch_swap_output_data,json=batchSwapOutputData,proto3" json:"batch_swap_output_data,omitempty"` - // Optionally, if the swap has been confirmed, the output note of asset 1. - // - // This is the note that will be minted by the SwapClaim action. - Output_1 *v17.NoteView `protobuf:"bytes,30,opt,name=output_1,json=output1,proto3" json:"output_1,omitempty"` - // Optionally, if the swap has been confirmed, the output note of asset 2. - // - // This is the note that will be minted by the SwapClaim action. - Output_2 *v17.NoteView `protobuf:"bytes,31,opt,name=output_2,json=output2,proto3" json:"output_2,omitempty"` - // Optionally, metadata about asset 1 in the `swap`'s trading pair. - Asset_1Metadata *v14.Metadata `protobuf:"bytes,40,opt,name=asset_1_metadata,json=asset1Metadata,proto3" json:"asset_1_metadata,omitempty"` - // Optionally, metadata about asset 2 in the `swap`'s trading pair. - Asset_2Metadata *v14.Metadata `protobuf:"bytes,41,opt,name=asset_2_metadata,json=asset2Metadata,proto3" json:"asset_2_metadata,omitempty"` -} - -func (m *SwapView_Visible) Reset() { *m = SwapView_Visible{} } -func (m *SwapView_Visible) String() string { return proto.CompactTextString(m) } -func (*SwapView_Visible) ProtoMessage() {} -func (*SwapView_Visible) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{10, 0} -} -func (m *SwapView_Visible) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapView_Visible) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapView_Visible.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 *SwapView_Visible) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapView_Visible.Merge(m, src) -} -func (m *SwapView_Visible) XXX_Size() int { - return m.Size() -} -func (m *SwapView_Visible) XXX_DiscardUnknown() { - xxx_messageInfo_SwapView_Visible.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapView_Visible proto.InternalMessageInfo - -func (m *SwapView_Visible) GetSwap() *Swap { - if m != nil { - return m.Swap - } - return nil -} - -func (m *SwapView_Visible) GetSwapPlaintext() *SwapPlaintext { - if m != nil { - return m.SwapPlaintext - } - return nil -} - -func (m *SwapView_Visible) GetClaimTx() *v16.TransactionId { - if m != nil { - return m.ClaimTx - } - return nil -} - -func (m *SwapView_Visible) GetBatchSwapOutputData() *BatchSwapOutputData { - if m != nil { - return m.BatchSwapOutputData - } - return nil -} - -func (m *SwapView_Visible) GetOutput_1() *v17.NoteView { - if m != nil { - return m.Output_1 - } - return nil -} - -func (m *SwapView_Visible) GetOutput_2() *v17.NoteView { - if m != nil { - return m.Output_2 - } - return nil -} - -func (m *SwapView_Visible) GetAsset_1Metadata() *v14.Metadata { - if m != nil { - return m.Asset_1Metadata - } - return nil -} - -func (m *SwapView_Visible) GetAsset_2Metadata() *v14.Metadata { - if m != nil { - return m.Asset_2Metadata - } - return nil -} - -type SwapView_Opaque struct { - Swap *Swap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap,omitempty"` - // Optionally, if the swap has been confirmed, the batch price it received. - // - // As soon as the swap is detected, the view server can in principle record - // the relevant BSOD and provide it as part of the view. This allows providing - // info about the execution of the swap. - BatchSwapOutputData *BatchSwapOutputData `protobuf:"bytes,20,opt,name=batch_swap_output_data,json=batchSwapOutputData,proto3" json:"batch_swap_output_data,omitempty"` - // Optionally, if the swap has been confirmed, the output value of asset 1. - // - // This is the value of the note that will be minted by the SwapClaim action. - // Note that unlike the `Visible` variant, this is only a `ValueView` since - // the details of the note (in particular the claim address) are not publicly known. - Output_1Value *v14.ValueView `protobuf:"bytes,30,opt,name=output_1_value,json=output1Value,proto3" json:"output_1_value,omitempty"` - // Optionally, if the swap has been confirmed, the output value of asset 2. - // - // This is the note that will be minted by the SwapClaim action. - // Note that unlike the `Visible` variant, this is only a `ValueView` since - // the details of the note (in particular the claim address) are not publicly known. - Output_2Value *v14.ValueView `protobuf:"bytes,31,opt,name=output_2_value,json=output2Value,proto3" json:"output_2_value,omitempty"` - // Optionally, metadata about asset 1 in the `swap`'s trading pair. - Asset_1Metadata *v14.Metadata `protobuf:"bytes,40,opt,name=asset_1_metadata,json=asset1Metadata,proto3" json:"asset_1_metadata,omitempty"` - // Optionally, metadata about asset 2 in the `swap`'s trading pair. - Asset_2Metadata *v14.Metadata `protobuf:"bytes,41,opt,name=asset_2_metadata,json=asset2Metadata,proto3" json:"asset_2_metadata,omitempty"` -} - -func (m *SwapView_Opaque) Reset() { *m = SwapView_Opaque{} } -func (m *SwapView_Opaque) String() string { return proto.CompactTextString(m) } -func (*SwapView_Opaque) ProtoMessage() {} -func (*SwapView_Opaque) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{10, 1} -} -func (m *SwapView_Opaque) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapView_Opaque) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapView_Opaque.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 *SwapView_Opaque) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapView_Opaque.Merge(m, src) -} -func (m *SwapView_Opaque) XXX_Size() int { - return m.Size() -} -func (m *SwapView_Opaque) XXX_DiscardUnknown() { - xxx_messageInfo_SwapView_Opaque.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapView_Opaque proto.InternalMessageInfo - -func (m *SwapView_Opaque) GetSwap() *Swap { - if m != nil { - return m.Swap - } - return nil -} - -func (m *SwapView_Opaque) GetBatchSwapOutputData() *BatchSwapOutputData { - if m != nil { - return m.BatchSwapOutputData - } - return nil -} - -func (m *SwapView_Opaque) GetOutput_1Value() *v14.ValueView { - if m != nil { - return m.Output_1Value - } - return nil -} - -func (m *SwapView_Opaque) GetOutput_2Value() *v14.ValueView { - if m != nil { - return m.Output_2Value - } - return nil -} - -func (m *SwapView_Opaque) GetAsset_1Metadata() *v14.Metadata { - if m != nil { - return m.Asset_1Metadata - } - return nil -} - -func (m *SwapView_Opaque) GetAsset_2Metadata() *v14.Metadata { - if m != nil { - return m.Asset_2Metadata - } - return nil -} - -type SwapClaimView struct { - // Types that are valid to be assigned to SwapClaimView: - // - // *SwapClaimView_Visible_ - // *SwapClaimView_Opaque_ - SwapClaimView isSwapClaimView_SwapClaimView `protobuf_oneof:"swap_claim_view"` -} - -func (m *SwapClaimView) Reset() { *m = SwapClaimView{} } -func (m *SwapClaimView) String() string { return proto.CompactTextString(m) } -func (*SwapClaimView) ProtoMessage() {} -func (*SwapClaimView) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{11} -} -func (m *SwapClaimView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapClaimView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapClaimView.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 *SwapClaimView) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapClaimView.Merge(m, src) -} -func (m *SwapClaimView) XXX_Size() int { - return m.Size() -} -func (m *SwapClaimView) XXX_DiscardUnknown() { - xxx_messageInfo_SwapClaimView.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapClaimView proto.InternalMessageInfo - -type isSwapClaimView_SwapClaimView interface { - isSwapClaimView_SwapClaimView() - MarshalTo([]byte) (int, error) - Size() int -} - -type SwapClaimView_Visible_ struct { - Visible *SwapClaimView_Visible `protobuf:"bytes,1,opt,name=visible,proto3,oneof" json:"visible,omitempty"` -} -type SwapClaimView_Opaque_ struct { - Opaque *SwapClaimView_Opaque `protobuf:"bytes,2,opt,name=opaque,proto3,oneof" json:"opaque,omitempty"` -} - -func (*SwapClaimView_Visible_) isSwapClaimView_SwapClaimView() {} -func (*SwapClaimView_Opaque_) isSwapClaimView_SwapClaimView() {} - -func (m *SwapClaimView) GetSwapClaimView() isSwapClaimView_SwapClaimView { - if m != nil { - return m.SwapClaimView - } - return nil -} - -func (m *SwapClaimView) GetVisible() *SwapClaimView_Visible { - if x, ok := m.GetSwapClaimView().(*SwapClaimView_Visible_); ok { - return x.Visible - } - return nil -} - -func (m *SwapClaimView) GetOpaque() *SwapClaimView_Opaque { - if x, ok := m.GetSwapClaimView().(*SwapClaimView_Opaque_); ok { - return x.Opaque - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SwapClaimView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SwapClaimView_Visible_)(nil), - (*SwapClaimView_Opaque_)(nil), - } -} - -type SwapClaimView_Visible struct { - SwapClaim *SwapClaim `protobuf:"bytes,1,opt,name=swap_claim,json=swapClaim,proto3" json:"swap_claim,omitempty"` - Output_1 *v17.NoteView `protobuf:"bytes,2,opt,name=output_1,json=output1,proto3" json:"output_1,omitempty"` - Output_2 *v17.NoteView `protobuf:"bytes,3,opt,name=output_2,json=output2,proto3" json:"output_2,omitempty"` - // Optionally, a transaction hash for the transaction that created the swap - // this action claims. - // - // This field allows frontends to more easily crossreference the sequence of - // Swap/SwapClaim actions. - SwapTx *v16.TransactionId `protobuf:"bytes,4,opt,name=swap_tx,json=swapTx,proto3" json:"swap_tx,omitempty"` -} - -func (m *SwapClaimView_Visible) Reset() { *m = SwapClaimView_Visible{} } -func (m *SwapClaimView_Visible) String() string { return proto.CompactTextString(m) } -func (*SwapClaimView_Visible) ProtoMessage() {} -func (*SwapClaimView_Visible) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{11, 0} -} -func (m *SwapClaimView_Visible) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapClaimView_Visible) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapClaimView_Visible.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 *SwapClaimView_Visible) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapClaimView_Visible.Merge(m, src) -} -func (m *SwapClaimView_Visible) XXX_Size() int { - return m.Size() -} -func (m *SwapClaimView_Visible) XXX_DiscardUnknown() { - xxx_messageInfo_SwapClaimView_Visible.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapClaimView_Visible proto.InternalMessageInfo - -func (m *SwapClaimView_Visible) GetSwapClaim() *SwapClaim { - if m != nil { - return m.SwapClaim - } - return nil -} - -func (m *SwapClaimView_Visible) GetOutput_1() *v17.NoteView { - if m != nil { - return m.Output_1 - } - return nil -} - -func (m *SwapClaimView_Visible) GetOutput_2() *v17.NoteView { - if m != nil { - return m.Output_2 - } - return nil -} - -func (m *SwapClaimView_Visible) GetSwapTx() *v16.TransactionId { - if m != nil { - return m.SwapTx - } - return nil -} - -type SwapClaimView_Opaque struct { - SwapClaim *SwapClaim `protobuf:"bytes,1,opt,name=swap_claim,json=swapClaim,proto3" json:"swap_claim,omitempty"` -} - -func (m *SwapClaimView_Opaque) Reset() { *m = SwapClaimView_Opaque{} } -func (m *SwapClaimView_Opaque) String() string { return proto.CompactTextString(m) } -func (*SwapClaimView_Opaque) ProtoMessage() {} -func (*SwapClaimView_Opaque) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{11, 1} -} -func (m *SwapClaimView_Opaque) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapClaimView_Opaque) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapClaimView_Opaque.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 *SwapClaimView_Opaque) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapClaimView_Opaque.Merge(m, src) -} -func (m *SwapClaimView_Opaque) XXX_Size() int { - return m.Size() -} -func (m *SwapClaimView_Opaque) XXX_DiscardUnknown() { - xxx_messageInfo_SwapClaimView_Opaque.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapClaimView_Opaque proto.InternalMessageInfo - -func (m *SwapClaimView_Opaque) GetSwapClaim() *SwapClaim { - if m != nil { - return m.SwapClaim - } - return nil -} - -// Holds two asset IDs. Ordering doesn't reflect trading direction. Instead, we -// require `asset_1 < asset_2` as field elements, to ensure a canonical -// representation of an unordered pair. -type TradingPair struct { - // The first asset of the pair. - Asset_1 *v14.AssetId `protobuf:"bytes,1,opt,name=asset_1,json=asset1,proto3" json:"asset_1,omitempty"` - // The second asset of the pair. - Asset_2 *v14.AssetId `protobuf:"bytes,2,opt,name=asset_2,json=asset2,proto3" json:"asset_2,omitempty"` -} - -func (m *TradingPair) Reset() { *m = TradingPair{} } -func (m *TradingPair) String() string { return proto.CompactTextString(m) } -func (*TradingPair) ProtoMessage() {} -func (*TradingPair) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{12} -} -func (m *TradingPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TradingPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TradingPair.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 *TradingPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_TradingPair.Merge(m, src) -} -func (m *TradingPair) XXX_Size() int { - return m.Size() -} -func (m *TradingPair) XXX_DiscardUnknown() { - xxx_messageInfo_TradingPair.DiscardUnknown(m) -} - -var xxx_messageInfo_TradingPair proto.InternalMessageInfo - -func (m *TradingPair) GetAsset_1() *v14.AssetId { - if m != nil { - return m.Asset_1 - } - return nil -} - -func (m *TradingPair) GetAsset_2() *v14.AssetId { - if m != nil { - return m.Asset_2 - } - return nil -} - -// Encodes a trading pair starting from asset `start` -// and ending on asset `end`. -type DirectedTradingPair struct { - // The start asset of the pair. - Start *v14.AssetId `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"` - // The end asset of the pair. - End *v14.AssetId `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"` -} - -func (m *DirectedTradingPair) Reset() { *m = DirectedTradingPair{} } -func (m *DirectedTradingPair) String() string { return proto.CompactTextString(m) } -func (*DirectedTradingPair) ProtoMessage() {} -func (*DirectedTradingPair) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{13} -} -func (m *DirectedTradingPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DirectedTradingPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DirectedTradingPair.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 *DirectedTradingPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_DirectedTradingPair.Merge(m, src) -} -func (m *DirectedTradingPair) XXX_Size() int { - return m.Size() -} -func (m *DirectedTradingPair) XXX_DiscardUnknown() { - xxx_messageInfo_DirectedTradingPair.DiscardUnknown(m) -} - -var xxx_messageInfo_DirectedTradingPair proto.InternalMessageInfo - -func (m *DirectedTradingPair) GetStart() *v14.AssetId { - if m != nil { - return m.Start - } - return nil -} - -func (m *DirectedTradingPair) GetEnd() *v14.AssetId { - if m != nil { - return m.End - } - return nil -} - -// Records the result of a batch swap on-chain. -// -// Used as a public input to a swap claim proof, as it implies the effective -// clearing price for the batch. -type BatchSwapOutputData struct { - // The total amount of asset 1 that was input to the batch swap. - Delta_1 *v13.Amount `protobuf:"bytes,1,opt,name=delta_1,json=delta1,proto3" json:"delta_1,omitempty"` - // The total amount of asset 2 that was input to the batch swap. - Delta_2 *v13.Amount `protobuf:"bytes,2,opt,name=delta_2,json=delta2,proto3" json:"delta_2,omitempty"` - // The total amount of asset 1 that was output from the batch swap for 2=>1 trades. - Lambda_1 *v13.Amount `protobuf:"bytes,3,opt,name=lambda_1,json=lambda1,proto3" json:"lambda_1,omitempty"` - // The total amount of asset 2 that was output from the batch swap for 1=>2 trades. - Lambda_2 *v13.Amount `protobuf:"bytes,4,opt,name=lambda_2,json=lambda2,proto3" json:"lambda_2,omitempty"` - // The total amount of asset 1 that was returned unfilled from the batch swap for 1=>2 trades. - Unfilled_1 *v13.Amount `protobuf:"bytes,5,opt,name=unfilled_1,json=unfilled1,proto3" json:"unfilled_1,omitempty"` - // The total amount of asset 2 that was returned unfilled from the batch swap for 2=>1 trades. - Unfilled_2 *v13.Amount `protobuf:"bytes,6,opt,name=unfilled_2,json=unfilled2,proto3" json:"unfilled_2,omitempty"` - // The height for which the batch swap data is valid. - Height uint64 `protobuf:"varint,7,opt,name=height,proto3" json:"height,omitempty"` - // The trading pair associated with the batch swap. - TradingPair *TradingPair `protobuf:"bytes,8,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // The starting block height of the epoch for which the batch swap data is valid. - EpochStartingHeight uint64 `protobuf:"varint,9,opt,name=epoch_starting_height,json=epochStartingHeight,proto3" json:"epoch_starting_height,omitempty"` // Deprecated: Do not use. - // The prefix (epoch, block) of the position where this batch swap occurred. - SctPositionPrefix uint64 `protobuf:"varint,10,opt,name=sct_position_prefix,json=sctPositionPrefix,proto3" json:"sct_position_prefix,omitempty"` -} - -func (m *BatchSwapOutputData) Reset() { *m = BatchSwapOutputData{} } -func (m *BatchSwapOutputData) String() string { return proto.CompactTextString(m) } -func (*BatchSwapOutputData) ProtoMessage() {} -func (*BatchSwapOutputData) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{14} -} -func (m *BatchSwapOutputData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchSwapOutputData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchSwapOutputData.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 *BatchSwapOutputData) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchSwapOutputData.Merge(m, src) -} -func (m *BatchSwapOutputData) XXX_Size() int { - return m.Size() -} -func (m *BatchSwapOutputData) XXX_DiscardUnknown() { - xxx_messageInfo_BatchSwapOutputData.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchSwapOutputData proto.InternalMessageInfo - -func (m *BatchSwapOutputData) GetDelta_1() *v13.Amount { - if m != nil { - return m.Delta_1 - } - return nil -} - -func (m *BatchSwapOutputData) GetDelta_2() *v13.Amount { - if m != nil { - return m.Delta_2 - } - return nil -} - -func (m *BatchSwapOutputData) GetLambda_1() *v13.Amount { - if m != nil { - return m.Lambda_1 - } - return nil -} - -func (m *BatchSwapOutputData) GetLambda_2() *v13.Amount { - if m != nil { - return m.Lambda_2 - } - return nil -} - -func (m *BatchSwapOutputData) GetUnfilled_1() *v13.Amount { - if m != nil { - return m.Unfilled_1 - } - return nil -} - -func (m *BatchSwapOutputData) GetUnfilled_2() *v13.Amount { - if m != nil { - return m.Unfilled_2 - } - return nil -} - -func (m *BatchSwapOutputData) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *BatchSwapOutputData) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -// Deprecated: Do not use. -func (m *BatchSwapOutputData) GetEpochStartingHeight() uint64 { - if m != nil { - return m.EpochStartingHeight - } - return 0 -} - -func (m *BatchSwapOutputData) GetSctPositionPrefix() uint64 { - if m != nil { - return m.SctPositionPrefix - } - return 0 -} - -// The trading function for a specific pair. -// For a pair (asset_1, asset_2), a trading function is defined by: -// `phi(R) = p*R_1 + q*R_2` and `gamma = 1 - fee`. -// The trading function is frequently referred to as "phi". -type TradingFunction struct { - Component *BareTradingFunction `protobuf:"bytes,1,opt,name=component,proto3" json:"component,omitempty"` - Pair *TradingPair `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` -} - -func (m *TradingFunction) Reset() { *m = TradingFunction{} } -func (m *TradingFunction) String() string { return proto.CompactTextString(m) } -func (*TradingFunction) ProtoMessage() {} -func (*TradingFunction) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{15} -} -func (m *TradingFunction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TradingFunction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TradingFunction.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 *TradingFunction) XXX_Merge(src proto.Message) { - xxx_messageInfo_TradingFunction.Merge(m, src) -} -func (m *TradingFunction) XXX_Size() int { - return m.Size() -} -func (m *TradingFunction) XXX_DiscardUnknown() { - xxx_messageInfo_TradingFunction.DiscardUnknown(m) -} - -var xxx_messageInfo_TradingFunction proto.InternalMessageInfo - -func (m *TradingFunction) GetComponent() *BareTradingFunction { - if m != nil { - return m.Component - } - return nil -} - -func (m *TradingFunction) GetPair() *TradingPair { - if m != nil { - return m.Pair - } - return nil -} - -// The minimum amount of data describing a trading function. -// -// This implicitly treats the trading function as being between assets 1 and 2, -// without specifying what those assets are, to avoid duplicating data (each -// asset ID alone is twice the size of the trading function). -type BareTradingFunction struct { - Fee uint32 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` - // This is not actually an amount, it's an integer the same width as an amount - P *v13.Amount `protobuf:"bytes,2,opt,name=p,proto3" json:"p,omitempty"` - // This is not actually an amount, it's an integer the same width as an amount - Q *v13.Amount `protobuf:"bytes,3,opt,name=q,proto3" json:"q,omitempty"` -} - -func (m *BareTradingFunction) Reset() { *m = BareTradingFunction{} } -func (m *BareTradingFunction) String() string { return proto.CompactTextString(m) } -func (*BareTradingFunction) ProtoMessage() {} -func (*BareTradingFunction) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{16} -} -func (m *BareTradingFunction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BareTradingFunction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BareTradingFunction.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 *BareTradingFunction) XXX_Merge(src proto.Message) { - xxx_messageInfo_BareTradingFunction.Merge(m, src) -} -func (m *BareTradingFunction) XXX_Size() int { - return m.Size() -} -func (m *BareTradingFunction) XXX_DiscardUnknown() { - xxx_messageInfo_BareTradingFunction.DiscardUnknown(m) -} - -var xxx_messageInfo_BareTradingFunction proto.InternalMessageInfo - -func (m *BareTradingFunction) GetFee() uint32 { - if m != nil { - return m.Fee - } - return 0 -} - -func (m *BareTradingFunction) GetP() *v13.Amount { - if m != nil { - return m.P - } - return nil -} - -func (m *BareTradingFunction) GetQ() *v13.Amount { - if m != nil { - return m.Q - } - return nil -} - -// The reserves of a position. -// -// Like a position, this implicitly treats the trading function as being -// between assets 1 and 2, without specifying what those assets are, to avoid -// duplicating data (each asset ID alone is four times the size of the -// reserves). -type Reserves struct { - R1 *v13.Amount `protobuf:"bytes,1,opt,name=r1,proto3" json:"r1,omitempty"` - R2 *v13.Amount `protobuf:"bytes,2,opt,name=r2,proto3" json:"r2,omitempty"` -} - -func (m *Reserves) Reset() { *m = Reserves{} } -func (m *Reserves) String() string { return proto.CompactTextString(m) } -func (*Reserves) ProtoMessage() {} -func (*Reserves) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{17} -} -func (m *Reserves) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Reserves) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Reserves.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 *Reserves) XXX_Merge(src proto.Message) { - xxx_messageInfo_Reserves.Merge(m, src) -} -func (m *Reserves) XXX_Size() int { - return m.Size() -} -func (m *Reserves) XXX_DiscardUnknown() { - xxx_messageInfo_Reserves.DiscardUnknown(m) -} - -var xxx_messageInfo_Reserves proto.InternalMessageInfo - -func (m *Reserves) GetR1() *v13.Amount { - if m != nil { - return m.R1 - } - return nil -} - -func (m *Reserves) GetR2() *v13.Amount { - if m != nil { - return m.R2 - } - return nil -} - -// Data identifying a position. -type Position struct { - Phi *TradingFunction `protobuf:"bytes,1,opt,name=phi,proto3" json:"phi,omitempty"` - // A random value used to disambiguate different positions with the exact same - // trading function. The chain should reject newly created positions with the - // same nonce as an existing position. This ensures that `PositionId`s will - // be unique, and allows us to track position ownership with a - // sequence of stateful NFTs based on the `PositionId`. - Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - State *PositionState `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` - Reserves *Reserves `protobuf:"bytes,4,opt,name=reserves,proto3" json:"reserves,omitempty"` - // / If set to true, the position is a limit-order and will be closed - // / immediately after being filled. - CloseOnFill bool `protobuf:"varint,5,opt,name=close_on_fill,json=closeOnFill,proto3" json:"close_on_fill,omitempty"` -} - -func (m *Position) Reset() { *m = Position{} } -func (m *Position) String() string { return proto.CompactTextString(m) } -func (*Position) ProtoMessage() {} -func (*Position) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{18} -} -func (m *Position) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Position.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 *Position) XXX_Merge(src proto.Message) { - xxx_messageInfo_Position.Merge(m, src) -} -func (m *Position) XXX_Size() int { - return m.Size() -} -func (m *Position) XXX_DiscardUnknown() { - xxx_messageInfo_Position.DiscardUnknown(m) -} - -var xxx_messageInfo_Position proto.InternalMessageInfo - -func (m *Position) GetPhi() *TradingFunction { - if m != nil { - return m.Phi - } - return nil -} - -func (m *Position) GetNonce() []byte { - if m != nil { - return m.Nonce - } - return nil -} - -func (m *Position) GetState() *PositionState { - if m != nil { - return m.State - } - return nil -} - -func (m *Position) GetReserves() *Reserves { - if m != nil { - return m.Reserves - } - return nil -} - -func (m *Position) GetCloseOnFill() bool { - if m != nil { - return m.CloseOnFill - } - return false -} - -// A hash of a `Position`. -type PositionId struct { - // The bytes of the position ID. - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` - // Alternatively, a Bech32m-encoded string representation of the `inner` - // bytes. - // - // NOTE: implementations are not required to support parsing this field. - // Implementations should prefer to encode the bytes in all messages they - // produce. Implementations must not accept messages with both `inner` and - // `alt_bech32m` set. - AltBech32M string `protobuf:"bytes,2,opt,name=alt_bech32m,json=altBech32m,proto3" json:"alt_bech32m,omitempty"` -} - -func (m *PositionId) Reset() { *m = PositionId{} } -func (m *PositionId) String() string { return proto.CompactTextString(m) } -func (*PositionId) ProtoMessage() {} -func (*PositionId) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{19} -} -func (m *PositionId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionId.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 *PositionId) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionId.Merge(m, src) -} -func (m *PositionId) XXX_Size() int { - return m.Size() -} -func (m *PositionId) XXX_DiscardUnknown() { - xxx_messageInfo_PositionId.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionId proto.InternalMessageInfo - -func (m *PositionId) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -func (m *PositionId) GetAltBech32M() string { - if m != nil { - return m.AltBech32M - } - return "" -} - -// The state of a position. -type PositionState struct { - State PositionState_PositionStateEnum `protobuf:"varint,1,opt,name=state,proto3,enum=penumbra.core.component.dex.v1.PositionState_PositionStateEnum" json:"state,omitempty"` - // Only meaningful if `state` is `POSITION_STATE_ENUM_WITHDRAWN`. - // - // The sequence number allows multiple withdrawals from the same position. - Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (m *PositionState) Reset() { *m = PositionState{} } -func (m *PositionState) String() string { return proto.CompactTextString(m) } -func (*PositionState) ProtoMessage() {} -func (*PositionState) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{20} -} -func (m *PositionState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionState.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 *PositionState) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionState.Merge(m, src) -} -func (m *PositionState) XXX_Size() int { - return m.Size() -} -func (m *PositionState) XXX_DiscardUnknown() { - xxx_messageInfo_PositionState.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionState proto.InternalMessageInfo - -func (m *PositionState) GetState() PositionState_PositionStateEnum { - if m != nil { - return m.State - } - return PositionState_POSITION_STATE_ENUM_UNSPECIFIED -} - -func (m *PositionState) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -// An LPNFT tracking both ownership and state of a position. -// -// Tracking the state as part of the LPNFT means that all LP-related actions can -// be authorized by spending funds: a state transition (e.g., closing a -// position) is modeled as spending an "open position LPNFT" and minting a -// "closed position LPNFT" for the same (globally unique) position ID. -// -// This means that the LP mechanics can be agnostic to the mechanism used to -// record custody and spend authorization. For instance, they can be recorded -// in the shielded pool, where custody is based on off-chain keys, or they could -// be recorded in a programmatic on-chain account (in the future, e.g., to -// support interchain accounts). This also means that LP-related actions don't -// require any cryptographic implementation (proofs, signatures, etc), other -// than hooking into the value commitment mechanism used for transaction -// balances. -type LpNft struct { - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - State *PositionState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` -} - -func (m *LpNft) Reset() { *m = LpNft{} } -func (m *LpNft) String() string { return proto.CompactTextString(m) } -func (*LpNft) ProtoMessage() {} -func (*LpNft) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{21} -} -func (m *LpNft) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LpNft) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LpNft.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 *LpNft) XXX_Merge(src proto.Message) { - xxx_messageInfo_LpNft.Merge(m, src) -} -func (m *LpNft) XXX_Size() int { - return m.Size() -} -func (m *LpNft) XXX_DiscardUnknown() { - xxx_messageInfo_LpNft.DiscardUnknown(m) -} - -var xxx_messageInfo_LpNft proto.InternalMessageInfo - -func (m *LpNft) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *LpNft) GetState() *PositionState { - if m != nil { - return m.State - } - return nil -} - -// A transaction action that opens a new position. -// -// This action's contribution to the transaction's value balance is to consume -// the initial reserves and contribute an opened position NFT. -type PositionOpen struct { - // Contains the data defining the position, sufficient to compute its `PositionId`. - // - // Positions are immutable, so the `PositionData` (and hence the `PositionId`) - // are unchanged over the entire lifetime of the position. - Position *Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` -} - -func (m *PositionOpen) Reset() { *m = PositionOpen{} } -func (m *PositionOpen) String() string { return proto.CompactTextString(m) } -func (*PositionOpen) ProtoMessage() {} -func (*PositionOpen) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{22} -} -func (m *PositionOpen) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionOpen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionOpen.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 *PositionOpen) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionOpen.Merge(m, src) -} -func (m *PositionOpen) XXX_Size() int { - return m.Size() -} -func (m *PositionOpen) XXX_DiscardUnknown() { - xxx_messageInfo_PositionOpen.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionOpen proto.InternalMessageInfo - -func (m *PositionOpen) GetPosition() *Position { - if m != nil { - return m.Position - } - return nil -} - -// A transaction action that closes a position. -// -// This action's contribution to the transaction's value balance is to consume -// an opened position NFT and contribute a closed position NFT. -// -// Closing a position does not immediately withdraw funds, because Penumbra -// transactions (like any ZK transaction model) are early-binding: the prover -// must know the state transition they prove knowledge of, and they cannot know -// the final reserves with certainty until after the position has been deactivated. -type PositionClose struct { - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` -} - -func (m *PositionClose) Reset() { *m = PositionClose{} } -func (m *PositionClose) String() string { return proto.CompactTextString(m) } -func (*PositionClose) ProtoMessage() {} -func (*PositionClose) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{23} -} -func (m *PositionClose) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionClose.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 *PositionClose) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionClose.Merge(m, src) -} -func (m *PositionClose) XXX_Size() int { - return m.Size() -} -func (m *PositionClose) XXX_DiscardUnknown() { - xxx_messageInfo_PositionClose.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionClose proto.InternalMessageInfo - -func (m *PositionClose) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -// A transaction action that withdraws funds from a closed position. -// -// This action's contribution to the transaction's value balance is to consume a -// closed position NFT and contribute a withdrawn position NFT, as well as all -// of the funds that were in the position at the time of closing. -type PositionWithdraw struct { - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - // A transparent (zero blinding factor) commitment to the position's final reserves and fees. - // - // The chain will check this commitment by recomputing it with the on-chain state. - ReservesCommitment *v14.BalanceCommitment `protobuf:"bytes,2,opt,name=reserves_commitment,json=reservesCommitment,proto3" json:"reserves_commitment,omitempty"` - // The sequence number of the withdrawal. - // - // This allows multiple withdrawals from the same position, rather than a single reward claim. - Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (m *PositionWithdraw) Reset() { *m = PositionWithdraw{} } -func (m *PositionWithdraw) String() string { return proto.CompactTextString(m) } -func (*PositionWithdraw) ProtoMessage() {} -func (*PositionWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{24} -} -func (m *PositionWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionWithdraw.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 *PositionWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionWithdraw.Merge(m, src) -} -func (m *PositionWithdraw) XXX_Size() int { - return m.Size() -} -func (m *PositionWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_PositionWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionWithdraw proto.InternalMessageInfo - -func (m *PositionWithdraw) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *PositionWithdraw) GetReservesCommitment() *v14.BalanceCommitment { - if m != nil { - return m.ReservesCommitment - } - return nil -} - -func (m *PositionWithdraw) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -// Deprecated. -type PositionRewardClaim struct { - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - RewardsCommitment *v14.BalanceCommitment `protobuf:"bytes,2,opt,name=rewards_commitment,json=rewardsCommitment,proto3" json:"rewards_commitment,omitempty"` -} - -func (m *PositionRewardClaim) Reset() { *m = PositionRewardClaim{} } -func (m *PositionRewardClaim) String() string { return proto.CompactTextString(m) } -func (*PositionRewardClaim) ProtoMessage() {} -func (*PositionRewardClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{25} -} -func (m *PositionRewardClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionRewardClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionRewardClaim.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 *PositionRewardClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionRewardClaim.Merge(m, src) -} -func (m *PositionRewardClaim) XXX_Size() int { - return m.Size() -} -func (m *PositionRewardClaim) XXX_DiscardUnknown() { - xxx_messageInfo_PositionRewardClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionRewardClaim proto.InternalMessageInfo - -func (m *PositionRewardClaim) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *PositionRewardClaim) GetRewardsCommitment() *v14.BalanceCommitment { - if m != nil { - return m.RewardsCommitment - } - return nil -} - -// Contains the entire execution of a particular swap. -type SwapExecution struct { - Traces []*SwapExecution_Trace `protobuf:"bytes,1,rep,name=traces,proto3" json:"traces,omitempty"` - // The total input amount for this execution. - Input *v14.Value `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` - // The total output amount for this execution. - Output *v14.Value `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` -} - -func (m *SwapExecution) Reset() { *m = SwapExecution{} } -func (m *SwapExecution) String() string { return proto.CompactTextString(m) } -func (*SwapExecution) ProtoMessage() {} -func (*SwapExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{26} -} -func (m *SwapExecution) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapExecution.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 *SwapExecution) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapExecution.Merge(m, src) -} -func (m *SwapExecution) XXX_Size() int { - return m.Size() -} -func (m *SwapExecution) XXX_DiscardUnknown() { - xxx_messageInfo_SwapExecution.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapExecution proto.InternalMessageInfo - -func (m *SwapExecution) GetTraces() []*SwapExecution_Trace { - if m != nil { - return m.Traces - } - return nil -} - -func (m *SwapExecution) GetInput() *v14.Value { - if m != nil { - return m.Input - } - return nil -} - -func (m *SwapExecution) GetOutput() *v14.Value { - if m != nil { - return m.Output - } - return nil -} - -// Contains all individual steps consisting of a trade trace. -type SwapExecution_Trace struct { - // Each step in the trade trace. - Value []*v14.Value `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` -} - -func (m *SwapExecution_Trace) Reset() { *m = SwapExecution_Trace{} } -func (m *SwapExecution_Trace) String() string { return proto.CompactTextString(m) } -func (*SwapExecution_Trace) ProtoMessage() {} -func (*SwapExecution_Trace) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{26, 0} -} -func (m *SwapExecution_Trace) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapExecution_Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapExecution_Trace.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 *SwapExecution_Trace) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapExecution_Trace.Merge(m, src) -} -func (m *SwapExecution_Trace) XXX_Size() int { - return m.Size() -} -func (m *SwapExecution_Trace) XXX_DiscardUnknown() { - xxx_messageInfo_SwapExecution_Trace.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapExecution_Trace proto.InternalMessageInfo - -func (m *SwapExecution_Trace) GetValue() []*v14.Value { - if m != nil { - return m.Value - } - return nil -} - -// Contains private and public data for withdrawing funds from a closed position. -type PositionWithdrawPlan struct { - Reserves *Reserves `protobuf:"bytes,1,opt,name=reserves,proto3" json:"reserves,omitempty"` - PositionId *PositionId `protobuf:"bytes,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - Pair *TradingPair `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - // The sequence number of the withdrawal. - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - // Any accumulated rewards assigned to this position. - Rewards []*v14.Value `protobuf:"bytes,5,rep,name=rewards,proto3" json:"rewards,omitempty"` -} - -func (m *PositionWithdrawPlan) Reset() { *m = PositionWithdrawPlan{} } -func (m *PositionWithdrawPlan) String() string { return proto.CompactTextString(m) } -func (*PositionWithdrawPlan) ProtoMessage() {} -func (*PositionWithdrawPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{27} -} -func (m *PositionWithdrawPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionWithdrawPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionWithdrawPlan.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 *PositionWithdrawPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionWithdrawPlan.Merge(m, src) -} -func (m *PositionWithdrawPlan) XXX_Size() int { - return m.Size() -} -func (m *PositionWithdrawPlan) XXX_DiscardUnknown() { - xxx_messageInfo_PositionWithdrawPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionWithdrawPlan proto.InternalMessageInfo - -func (m *PositionWithdrawPlan) GetReserves() *Reserves { - if m != nil { - return m.Reserves - } - return nil -} - -func (m *PositionWithdrawPlan) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *PositionWithdrawPlan) GetPair() *TradingPair { - if m != nil { - return m.Pair - } - return nil -} - -func (m *PositionWithdrawPlan) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -func (m *PositionWithdrawPlan) GetRewards() []*v14.Value { - if m != nil { - return m.Rewards - } - return nil -} - -// Deprecated. -type PositionRewardClaimPlan struct { - Reserves *Reserves `protobuf:"bytes,1,opt,name=reserves,proto3" json:"reserves,omitempty"` -} - -func (m *PositionRewardClaimPlan) Reset() { *m = PositionRewardClaimPlan{} } -func (m *PositionRewardClaimPlan) String() string { return proto.CompactTextString(m) } -func (*PositionRewardClaimPlan) ProtoMessage() {} -func (*PositionRewardClaimPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{28} -} -func (m *PositionRewardClaimPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionRewardClaimPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionRewardClaimPlan.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 *PositionRewardClaimPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionRewardClaimPlan.Merge(m, src) -} -func (m *PositionRewardClaimPlan) XXX_Size() int { - return m.Size() -} -func (m *PositionRewardClaimPlan) XXX_DiscardUnknown() { - xxx_messageInfo_PositionRewardClaimPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionRewardClaimPlan proto.InternalMessageInfo - -func (m *PositionRewardClaimPlan) GetReserves() *Reserves { - if m != nil { - return m.Reserves - } - return nil -} - -// Requests batch swap data associated with a given height and trading pair from the view service. -type BatchSwapOutputDataRequest struct { - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - TradingPair *TradingPair `protobuf:"bytes,3,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` -} - -func (m *BatchSwapOutputDataRequest) Reset() { *m = BatchSwapOutputDataRequest{} } -func (m *BatchSwapOutputDataRequest) String() string { return proto.CompactTextString(m) } -func (*BatchSwapOutputDataRequest) ProtoMessage() {} -func (*BatchSwapOutputDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{29} -} -func (m *BatchSwapOutputDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchSwapOutputDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchSwapOutputDataRequest.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 *BatchSwapOutputDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchSwapOutputDataRequest.Merge(m, src) -} -func (m *BatchSwapOutputDataRequest) XXX_Size() int { - return m.Size() -} -func (m *BatchSwapOutputDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BatchSwapOutputDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchSwapOutputDataRequest proto.InternalMessageInfo - -func (m *BatchSwapOutputDataRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *BatchSwapOutputDataRequest) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -type BatchSwapOutputDataResponse struct { - Data *BatchSwapOutputData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *BatchSwapOutputDataResponse) Reset() { *m = BatchSwapOutputDataResponse{} } -func (m *BatchSwapOutputDataResponse) String() string { return proto.CompactTextString(m) } -func (*BatchSwapOutputDataResponse) ProtoMessage() {} -func (*BatchSwapOutputDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{30} -} -func (m *BatchSwapOutputDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BatchSwapOutputDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BatchSwapOutputDataResponse.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 *BatchSwapOutputDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchSwapOutputDataResponse.Merge(m, src) -} -func (m *BatchSwapOutputDataResponse) XXX_Size() int { - return m.Size() -} -func (m *BatchSwapOutputDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchSwapOutputDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchSwapOutputDataResponse proto.InternalMessageInfo - -func (m *BatchSwapOutputDataResponse) GetData() *BatchSwapOutputData { - if m != nil { - return m.Data - } - return nil -} - -type SwapExecutionRequest struct { - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - TradingPair *DirectedTradingPair `protobuf:"bytes,3,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` -} - -func (m *SwapExecutionRequest) Reset() { *m = SwapExecutionRequest{} } -func (m *SwapExecutionRequest) String() string { return proto.CompactTextString(m) } -func (*SwapExecutionRequest) ProtoMessage() {} -func (*SwapExecutionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{31} -} -func (m *SwapExecutionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapExecutionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapExecutionRequest.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 *SwapExecutionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapExecutionRequest.Merge(m, src) -} -func (m *SwapExecutionRequest) XXX_Size() int { - return m.Size() -} -func (m *SwapExecutionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SwapExecutionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapExecutionRequest proto.InternalMessageInfo - -func (m *SwapExecutionRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *SwapExecutionRequest) GetTradingPair() *DirectedTradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -type SwapExecutionResponse struct { - SwapExecution *SwapExecution `protobuf:"bytes,1,opt,name=swap_execution,json=swapExecution,proto3" json:"swap_execution,omitempty"` -} - -func (m *SwapExecutionResponse) Reset() { *m = SwapExecutionResponse{} } -func (m *SwapExecutionResponse) String() string { return proto.CompactTextString(m) } -func (*SwapExecutionResponse) ProtoMessage() {} -func (*SwapExecutionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{32} -} -func (m *SwapExecutionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapExecutionResponse.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 *SwapExecutionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapExecutionResponse.Merge(m, src) -} -func (m *SwapExecutionResponse) XXX_Size() int { - return m.Size() -} -func (m *SwapExecutionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SwapExecutionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapExecutionResponse proto.InternalMessageInfo - -func (m *SwapExecutionResponse) GetSwapExecution() *SwapExecution { - if m != nil { - return m.SwapExecution - } - return nil -} - -type ArbExecutionRequest struct { - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *ArbExecutionRequest) Reset() { *m = ArbExecutionRequest{} } -func (m *ArbExecutionRequest) String() string { return proto.CompactTextString(m) } -func (*ArbExecutionRequest) ProtoMessage() {} -func (*ArbExecutionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{33} -} -func (m *ArbExecutionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArbExecutionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArbExecutionRequest.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 *ArbExecutionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArbExecutionRequest.Merge(m, src) -} -func (m *ArbExecutionRequest) XXX_Size() int { - return m.Size() -} -func (m *ArbExecutionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ArbExecutionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ArbExecutionRequest proto.InternalMessageInfo - -func (m *ArbExecutionRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type ArbExecutionResponse struct { - SwapExecution *SwapExecution `protobuf:"bytes,1,opt,name=swap_execution,json=swapExecution,proto3" json:"swap_execution,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *ArbExecutionResponse) Reset() { *m = ArbExecutionResponse{} } -func (m *ArbExecutionResponse) String() string { return proto.CompactTextString(m) } -func (*ArbExecutionResponse) ProtoMessage() {} -func (*ArbExecutionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{34} -} -func (m *ArbExecutionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArbExecutionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArbExecutionResponse.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 *ArbExecutionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArbExecutionResponse.Merge(m, src) -} -func (m *ArbExecutionResponse) XXX_Size() int { - return m.Size() -} -func (m *ArbExecutionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ArbExecutionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ArbExecutionResponse proto.InternalMessageInfo - -func (m *ArbExecutionResponse) GetSwapExecution() *SwapExecution { - if m != nil { - return m.SwapExecution - } - return nil -} - -func (m *ArbExecutionResponse) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type SwapExecutionsRequest struct { - // If present, only return swap executions occurring after the given height. - StartHeight uint64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` - // If present, only return swap executions occurring before the given height. - EndHeight uint64 `protobuf:"varint,3,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` - // If present, filter swap executions by the given trading pair. - TradingPair *DirectedTradingPair `protobuf:"bytes,4,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` -} - -func (m *SwapExecutionsRequest) Reset() { *m = SwapExecutionsRequest{} } -func (m *SwapExecutionsRequest) String() string { return proto.CompactTextString(m) } -func (*SwapExecutionsRequest) ProtoMessage() {} -func (*SwapExecutionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{35} -} -func (m *SwapExecutionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapExecutionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapExecutionsRequest.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 *SwapExecutionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapExecutionsRequest.Merge(m, src) -} -func (m *SwapExecutionsRequest) XXX_Size() int { - return m.Size() -} -func (m *SwapExecutionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SwapExecutionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapExecutionsRequest proto.InternalMessageInfo - -func (m *SwapExecutionsRequest) GetStartHeight() uint64 { - if m != nil { - return m.StartHeight - } - return 0 -} - -func (m *SwapExecutionsRequest) GetEndHeight() uint64 { - if m != nil { - return m.EndHeight - } - return 0 -} - -func (m *SwapExecutionsRequest) GetTradingPair() *DirectedTradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -type SwapExecutionsResponse struct { - SwapExecution *SwapExecution `protobuf:"bytes,1,opt,name=swap_execution,json=swapExecution,proto3" json:"swap_execution,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - TradingPair *DirectedTradingPair `protobuf:"bytes,3,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` -} - -func (m *SwapExecutionsResponse) Reset() { *m = SwapExecutionsResponse{} } -func (m *SwapExecutionsResponse) String() string { return proto.CompactTextString(m) } -func (*SwapExecutionsResponse) ProtoMessage() {} -func (*SwapExecutionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{36} -} -func (m *SwapExecutionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapExecutionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapExecutionsResponse.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 *SwapExecutionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapExecutionsResponse.Merge(m, src) -} -func (m *SwapExecutionsResponse) XXX_Size() int { - return m.Size() -} -func (m *SwapExecutionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SwapExecutionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapExecutionsResponse proto.InternalMessageInfo - -func (m *SwapExecutionsResponse) GetSwapExecution() *SwapExecution { - if m != nil { - return m.SwapExecution - } - return nil -} - -func (m *SwapExecutionsResponse) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *SwapExecutionsResponse) GetTradingPair() *DirectedTradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -type ArbExecutionsRequest struct { - // If present, only return arb executions occurring after the given height. - StartHeight uint64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` - // If present, only return arb executions occurring before the given height. - EndHeight uint64 `protobuf:"varint,3,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` -} - -func (m *ArbExecutionsRequest) Reset() { *m = ArbExecutionsRequest{} } -func (m *ArbExecutionsRequest) String() string { return proto.CompactTextString(m) } -func (*ArbExecutionsRequest) ProtoMessage() {} -func (*ArbExecutionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{37} -} -func (m *ArbExecutionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArbExecutionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArbExecutionsRequest.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 *ArbExecutionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArbExecutionsRequest.Merge(m, src) -} -func (m *ArbExecutionsRequest) XXX_Size() int { - return m.Size() -} -func (m *ArbExecutionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ArbExecutionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ArbExecutionsRequest proto.InternalMessageInfo - -func (m *ArbExecutionsRequest) GetStartHeight() uint64 { - if m != nil { - return m.StartHeight - } - return 0 -} - -func (m *ArbExecutionsRequest) GetEndHeight() uint64 { - if m != nil { - return m.EndHeight - } - return 0 -} - -type ArbExecutionsResponse struct { - SwapExecution *SwapExecution `protobuf:"bytes,1,opt,name=swap_execution,json=swapExecution,proto3" json:"swap_execution,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *ArbExecutionsResponse) Reset() { *m = ArbExecutionsResponse{} } -func (m *ArbExecutionsResponse) String() string { return proto.CompactTextString(m) } -func (*ArbExecutionsResponse) ProtoMessage() {} -func (*ArbExecutionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{38} -} -func (m *ArbExecutionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArbExecutionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArbExecutionsResponse.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 *ArbExecutionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArbExecutionsResponse.Merge(m, src) -} -func (m *ArbExecutionsResponse) XXX_Size() int { - return m.Size() -} -func (m *ArbExecutionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ArbExecutionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ArbExecutionsResponse proto.InternalMessageInfo - -func (m *ArbExecutionsResponse) GetSwapExecution() *SwapExecution { - if m != nil { - return m.SwapExecution - } - return nil -} - -func (m *ArbExecutionsResponse) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type LiquidityPositionsRequest struct { - // If true, include closed and withdrawn positions. - IncludeClosed bool `protobuf:"varint,4,opt,name=include_closed,json=includeClosed,proto3" json:"include_closed,omitempty"` -} - -func (m *LiquidityPositionsRequest) Reset() { *m = LiquidityPositionsRequest{} } -func (m *LiquidityPositionsRequest) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionsRequest) ProtoMessage() {} -func (*LiquidityPositionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{39} -} -func (m *LiquidityPositionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionsRequest.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 *LiquidityPositionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionsRequest.Merge(m, src) -} -func (m *LiquidityPositionsRequest) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionsRequest proto.InternalMessageInfo - -func (m *LiquidityPositionsRequest) GetIncludeClosed() bool { - if m != nil { - return m.IncludeClosed - } - return false -} - -type LiquidityPositionsResponse struct { - Data *Position `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *LiquidityPositionsResponse) Reset() { *m = LiquidityPositionsResponse{} } -func (m *LiquidityPositionsResponse) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionsResponse) ProtoMessage() {} -func (*LiquidityPositionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{40} -} -func (m *LiquidityPositionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionsResponse.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 *LiquidityPositionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionsResponse.Merge(m, src) -} -func (m *LiquidityPositionsResponse) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionsResponse proto.InternalMessageInfo - -func (m *LiquidityPositionsResponse) GetData() *Position { - if m != nil { - return m.Data - } - return nil -} - -type LiquidityPositionByIdRequest struct { - PositionId *PositionId `protobuf:"bytes,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` -} - -func (m *LiquidityPositionByIdRequest) Reset() { *m = LiquidityPositionByIdRequest{} } -func (m *LiquidityPositionByIdRequest) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionByIdRequest) ProtoMessage() {} -func (*LiquidityPositionByIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{41} -} -func (m *LiquidityPositionByIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionByIdRequest.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 *LiquidityPositionByIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionByIdRequest.Merge(m, src) -} -func (m *LiquidityPositionByIdRequest) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionByIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionByIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionByIdRequest proto.InternalMessageInfo - -func (m *LiquidityPositionByIdRequest) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -type LiquidityPositionByIdResponse struct { - Data *Position `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *LiquidityPositionByIdResponse) Reset() { *m = LiquidityPositionByIdResponse{} } -func (m *LiquidityPositionByIdResponse) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionByIdResponse) ProtoMessage() {} -func (*LiquidityPositionByIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{42} -} -func (m *LiquidityPositionByIdResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionByIdResponse.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 *LiquidityPositionByIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionByIdResponse.Merge(m, src) -} -func (m *LiquidityPositionByIdResponse) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionByIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionByIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionByIdResponse proto.InternalMessageInfo - -func (m *LiquidityPositionByIdResponse) GetData() *Position { - if m != nil { - return m.Data - } - return nil -} - -type LiquidityPositionsByIdRequest struct { - PositionId []*PositionId `protobuf:"bytes,2,rep,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` -} - -func (m *LiquidityPositionsByIdRequest) Reset() { *m = LiquidityPositionsByIdRequest{} } -func (m *LiquidityPositionsByIdRequest) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionsByIdRequest) ProtoMessage() {} -func (*LiquidityPositionsByIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{43} -} -func (m *LiquidityPositionsByIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionsByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionsByIdRequest.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 *LiquidityPositionsByIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionsByIdRequest.Merge(m, src) -} -func (m *LiquidityPositionsByIdRequest) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionsByIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionsByIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionsByIdRequest proto.InternalMessageInfo - -func (m *LiquidityPositionsByIdRequest) GetPositionId() []*PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -type LiquidityPositionsByIdResponse struct { - Data *Position `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *LiquidityPositionsByIdResponse) Reset() { *m = LiquidityPositionsByIdResponse{} } -func (m *LiquidityPositionsByIdResponse) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionsByIdResponse) ProtoMessage() {} -func (*LiquidityPositionsByIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{44} -} -func (m *LiquidityPositionsByIdResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionsByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionsByIdResponse.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 *LiquidityPositionsByIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionsByIdResponse.Merge(m, src) -} -func (m *LiquidityPositionsByIdResponse) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionsByIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionsByIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionsByIdResponse proto.InternalMessageInfo - -func (m *LiquidityPositionsByIdResponse) GetData() *Position { - if m != nil { - return m.Data - } - return nil -} - -type LiquidityPositionsByPriceRequest struct { - // The directed trading pair to request positions for - TradingPair *DirectedTradingPair `protobuf:"bytes,2,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // The maximum number of positions to return. - Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` -} - -func (m *LiquidityPositionsByPriceRequest) Reset() { *m = LiquidityPositionsByPriceRequest{} } -func (m *LiquidityPositionsByPriceRequest) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionsByPriceRequest) ProtoMessage() {} -func (*LiquidityPositionsByPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{45} -} -func (m *LiquidityPositionsByPriceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionsByPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionsByPriceRequest.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 *LiquidityPositionsByPriceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionsByPriceRequest.Merge(m, src) -} -func (m *LiquidityPositionsByPriceRequest) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionsByPriceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionsByPriceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionsByPriceRequest proto.InternalMessageInfo - -func (m *LiquidityPositionsByPriceRequest) GetTradingPair() *DirectedTradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *LiquidityPositionsByPriceRequest) GetLimit() uint64 { - if m != nil { - return m.Limit - } - return 0 -} - -type LiquidityPositionsByPriceResponse struct { - Data *Position `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Id *PositionId `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *LiquidityPositionsByPriceResponse) Reset() { *m = LiquidityPositionsByPriceResponse{} } -func (m *LiquidityPositionsByPriceResponse) String() string { return proto.CompactTextString(m) } -func (*LiquidityPositionsByPriceResponse) ProtoMessage() {} -func (*LiquidityPositionsByPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{46} -} -func (m *LiquidityPositionsByPriceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LiquidityPositionsByPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LiquidityPositionsByPriceResponse.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 *LiquidityPositionsByPriceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LiquidityPositionsByPriceResponse.Merge(m, src) -} -func (m *LiquidityPositionsByPriceResponse) XXX_Size() int { - return m.Size() -} -func (m *LiquidityPositionsByPriceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LiquidityPositionsByPriceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LiquidityPositionsByPriceResponse proto.InternalMessageInfo - -func (m *LiquidityPositionsByPriceResponse) GetData() *Position { - if m != nil { - return m.Data - } - return nil -} - -func (m *LiquidityPositionsByPriceResponse) GetId() *PositionId { - if m != nil { - return m.Id - } - return nil -} - -type SpreadRequest struct { - TradingPair *TradingPair `protobuf:"bytes,2,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` -} - -func (m *SpreadRequest) Reset() { *m = SpreadRequest{} } -func (m *SpreadRequest) String() string { return proto.CompactTextString(m) } -func (*SpreadRequest) ProtoMessage() {} -func (*SpreadRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{47} -} -func (m *SpreadRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpreadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpreadRequest.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 *SpreadRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpreadRequest.Merge(m, src) -} -func (m *SpreadRequest) XXX_Size() int { - return m.Size() -} -func (m *SpreadRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SpreadRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SpreadRequest proto.InternalMessageInfo - -func (m *SpreadRequest) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -type SpreadResponse struct { - // The best position when trading 1 => 2. - Best_1To_2Position *Position `protobuf:"bytes,1,opt,name=best_1_to_2_position,json=best1To2Position,proto3" json:"best_1_to_2_position,omitempty"` - // The best position when trading 2 => 1. - Best_2To_1Position *Position `protobuf:"bytes,2,opt,name=best_2_to_1_position,json=best2To1Position,proto3" json:"best_2_to_1_position,omitempty"` - // An approximation of the effective price when trading 1 => 2. - ApproxEffectivePrice_1To_2 float64 `protobuf:"fixed64,3,opt,name=approx_effective_price_1_to_2,json=approxEffectivePrice1To2,proto3" json:"approx_effective_price_1_to_2,omitempty"` - // An approximation of the effective price when trading 2 => 1. - ApproxEffectivePrice_2To_1 float64 `protobuf:"fixed64,4,opt,name=approx_effective_price_2_to_1,json=approxEffectivePrice2To1,proto3" json:"approx_effective_price_2_to_1,omitempty"` -} - -func (m *SpreadResponse) Reset() { *m = SpreadResponse{} } -func (m *SpreadResponse) String() string { return proto.CompactTextString(m) } -func (*SpreadResponse) ProtoMessage() {} -func (*SpreadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{48} -} -func (m *SpreadResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpreadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpreadResponse.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 *SpreadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpreadResponse.Merge(m, src) -} -func (m *SpreadResponse) XXX_Size() int { - return m.Size() -} -func (m *SpreadResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SpreadResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SpreadResponse proto.InternalMessageInfo - -func (m *SpreadResponse) GetBest_1To_2Position() *Position { - if m != nil { - return m.Best_1To_2Position - } - return nil -} - -func (m *SpreadResponse) GetBest_2To_1Position() *Position { - if m != nil { - return m.Best_2To_1Position - } - return nil -} - -func (m *SpreadResponse) GetApproxEffectivePrice_1To_2() float64 { - if m != nil { - return m.ApproxEffectivePrice_1To_2 - } - return 0 -} - -func (m *SpreadResponse) GetApproxEffectivePrice_2To_1() float64 { - if m != nil { - return m.ApproxEffectivePrice_2To_1 - } - return 0 -} - -type SimulateTradeRequest struct { - Input *v14.Value `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - Output *v14.AssetId `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` - Routing *SimulateTradeRequest_Routing `protobuf:"bytes,3,opt,name=routing,proto3" json:"routing,omitempty"` -} - -func (m *SimulateTradeRequest) Reset() { *m = SimulateTradeRequest{} } -func (m *SimulateTradeRequest) String() string { return proto.CompactTextString(m) } -func (*SimulateTradeRequest) ProtoMessage() {} -func (*SimulateTradeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{49} -} -func (m *SimulateTradeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateTradeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateTradeRequest.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 *SimulateTradeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateTradeRequest.Merge(m, src) -} -func (m *SimulateTradeRequest) XXX_Size() int { - return m.Size() -} -func (m *SimulateTradeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateTradeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateTradeRequest proto.InternalMessageInfo - -func (m *SimulateTradeRequest) GetInput() *v14.Value { - if m != nil { - return m.Input - } - return nil -} - -func (m *SimulateTradeRequest) GetOutput() *v14.AssetId { - if m != nil { - return m.Output - } - return nil -} - -func (m *SimulateTradeRequest) GetRouting() *SimulateTradeRequest_Routing { - if m != nil { - return m.Routing - } - return nil -} - -type SimulateTradeRequest_Routing struct { - // Types that are valid to be assigned to Setting: - // - // *SimulateTradeRequest_Routing_Default_ - // *SimulateTradeRequest_Routing_SingleHop_ - Setting isSimulateTradeRequest_Routing_Setting `protobuf_oneof:"setting"` -} - -func (m *SimulateTradeRequest_Routing) Reset() { *m = SimulateTradeRequest_Routing{} } -func (m *SimulateTradeRequest_Routing) String() string { return proto.CompactTextString(m) } -func (*SimulateTradeRequest_Routing) ProtoMessage() {} -func (*SimulateTradeRequest_Routing) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{49, 0} -} -func (m *SimulateTradeRequest_Routing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateTradeRequest_Routing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateTradeRequest_Routing.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 *SimulateTradeRequest_Routing) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateTradeRequest_Routing.Merge(m, src) -} -func (m *SimulateTradeRequest_Routing) XXX_Size() int { - return m.Size() -} -func (m *SimulateTradeRequest_Routing) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateTradeRequest_Routing.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateTradeRequest_Routing proto.InternalMessageInfo - -type isSimulateTradeRequest_Routing_Setting interface { - isSimulateTradeRequest_Routing_Setting() - MarshalTo([]byte) (int, error) - Size() int -} - -type SimulateTradeRequest_Routing_Default_ struct { - Default *SimulateTradeRequest_Routing_Default `protobuf:"bytes,1,opt,name=default,proto3,oneof" json:"default,omitempty"` -} -type SimulateTradeRequest_Routing_SingleHop_ struct { - SingleHop *SimulateTradeRequest_Routing_SingleHop `protobuf:"bytes,2,opt,name=single_hop,json=singleHop,proto3,oneof" json:"single_hop,omitempty"` -} - -func (*SimulateTradeRequest_Routing_Default_) isSimulateTradeRequest_Routing_Setting() {} -func (*SimulateTradeRequest_Routing_SingleHop_) isSimulateTradeRequest_Routing_Setting() {} - -func (m *SimulateTradeRequest_Routing) GetSetting() isSimulateTradeRequest_Routing_Setting { - if m != nil { - return m.Setting - } - return nil -} - -func (m *SimulateTradeRequest_Routing) GetDefault() *SimulateTradeRequest_Routing_Default { - if x, ok := m.GetSetting().(*SimulateTradeRequest_Routing_Default_); ok { - return x.Default - } - return nil -} - -func (m *SimulateTradeRequest_Routing) GetSingleHop() *SimulateTradeRequest_Routing_SingleHop { - if x, ok := m.GetSetting().(*SimulateTradeRequest_Routing_SingleHop_); ok { - return x.SingleHop - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SimulateTradeRequest_Routing) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SimulateTradeRequest_Routing_Default_)(nil), - (*SimulateTradeRequest_Routing_SingleHop_)(nil), - } -} - -type SimulateTradeRequest_Routing_SingleHop struct { -} - -func (m *SimulateTradeRequest_Routing_SingleHop) Reset() { - *m = SimulateTradeRequest_Routing_SingleHop{} -} -func (m *SimulateTradeRequest_Routing_SingleHop) String() string { return proto.CompactTextString(m) } -func (*SimulateTradeRequest_Routing_SingleHop) ProtoMessage() {} -func (*SimulateTradeRequest_Routing_SingleHop) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{49, 0, 0} -} -func (m *SimulateTradeRequest_Routing_SingleHop) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateTradeRequest_Routing_SingleHop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateTradeRequest_Routing_SingleHop.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 *SimulateTradeRequest_Routing_SingleHop) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateTradeRequest_Routing_SingleHop.Merge(m, src) -} -func (m *SimulateTradeRequest_Routing_SingleHop) XXX_Size() int { - return m.Size() -} -func (m *SimulateTradeRequest_Routing_SingleHop) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateTradeRequest_Routing_SingleHop.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateTradeRequest_Routing_SingleHop proto.InternalMessageInfo - -type SimulateTradeRequest_Routing_Default struct { -} - -func (m *SimulateTradeRequest_Routing_Default) Reset() { *m = SimulateTradeRequest_Routing_Default{} } -func (m *SimulateTradeRequest_Routing_Default) String() string { return proto.CompactTextString(m) } -func (*SimulateTradeRequest_Routing_Default) ProtoMessage() {} -func (*SimulateTradeRequest_Routing_Default) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{49, 0, 1} -} -func (m *SimulateTradeRequest_Routing_Default) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateTradeRequest_Routing_Default) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateTradeRequest_Routing_Default.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 *SimulateTradeRequest_Routing_Default) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateTradeRequest_Routing_Default.Merge(m, src) -} -func (m *SimulateTradeRequest_Routing_Default) XXX_Size() int { - return m.Size() -} -func (m *SimulateTradeRequest_Routing_Default) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateTradeRequest_Routing_Default.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateTradeRequest_Routing_Default proto.InternalMessageInfo - -type SimulateTradeResponse struct { - Output *SwapExecution `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` - // Estimated input amount that will not be swapped due to liquidity - Unfilled *v14.Value `protobuf:"bytes,2,opt,name=unfilled,proto3" json:"unfilled,omitempty"` -} - -func (m *SimulateTradeResponse) Reset() { *m = SimulateTradeResponse{} } -func (m *SimulateTradeResponse) String() string { return proto.CompactTextString(m) } -func (*SimulateTradeResponse) ProtoMessage() {} -func (*SimulateTradeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{50} -} -func (m *SimulateTradeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SimulateTradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SimulateTradeResponse.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 *SimulateTradeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimulateTradeResponse.Merge(m, src) -} -func (m *SimulateTradeResponse) XXX_Size() int { - return m.Size() -} -func (m *SimulateTradeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SimulateTradeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SimulateTradeResponse proto.InternalMessageInfo - -func (m *SimulateTradeResponse) GetOutput() *SwapExecution { - if m != nil { - return m.Output - } - return nil -} - -func (m *SimulateTradeResponse) GetUnfilled() *v14.Value { - if m != nil { - return m.Unfilled - } - return nil -} - -type EventSwap struct { - // The trading pair to swap. - TradingPair *TradingPair `protobuf:"bytes,1,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // The amount for asset 1. - Delta_1I *v13.Amount `protobuf:"bytes,2,opt,name=delta_1_i,json=delta1I,proto3" json:"delta_1_i,omitempty"` - // The amount for asset 2. - Delta_2I *v13.Amount `protobuf:"bytes,3,opt,name=delta_2_i,json=delta2I,proto3" json:"delta_2_i,omitempty"` - // The swap commitment. - SwapCommitment *v12.StateCommitment `protobuf:"bytes,4,opt,name=swap_commitment,json=swapCommitment,proto3" json:"swap_commitment,omitempty"` -} - -func (m *EventSwap) Reset() { *m = EventSwap{} } -func (m *EventSwap) String() string { return proto.CompactTextString(m) } -func (*EventSwap) ProtoMessage() {} -func (*EventSwap) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{51} -} -func (m *EventSwap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventSwap.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 *EventSwap) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSwap.Merge(m, src) -} -func (m *EventSwap) XXX_Size() int { - return m.Size() -} -func (m *EventSwap) XXX_DiscardUnknown() { - xxx_messageInfo_EventSwap.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSwap proto.InternalMessageInfo - -func (m *EventSwap) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *EventSwap) GetDelta_1I() *v13.Amount { - if m != nil { - return m.Delta_1I - } - return nil -} - -func (m *EventSwap) GetDelta_2I() *v13.Amount { - if m != nil { - return m.Delta_2I - } - return nil -} - -func (m *EventSwap) GetSwapCommitment() *v12.StateCommitment { - if m != nil { - return m.SwapCommitment - } - return nil -} - -type EventSwapClaim struct { - // The trading pair that is subject of the swap claim. - TradingPair *TradingPair `protobuf:"bytes,1,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // Note commitment for the first asset. - Output_1Commitment *v12.StateCommitment `protobuf:"bytes,2,opt,name=output_1_commitment,json=output1Commitment,proto3" json:"output_1_commitment,omitempty"` - // Note commitment for the second asset. - Output_2Commitment *v12.StateCommitment `protobuf:"bytes,3,opt,name=output_2_commitment,json=output2Commitment,proto3" json:"output_2_commitment,omitempty"` - // The nullifier for the swap commitment. - Nullifier *v1.Nullifier `protobuf:"bytes,4,opt,name=nullifier,proto3" json:"nullifier,omitempty"` -} - -func (m *EventSwapClaim) Reset() { *m = EventSwapClaim{} } -func (m *EventSwapClaim) String() string { return proto.CompactTextString(m) } -func (*EventSwapClaim) ProtoMessage() {} -func (*EventSwapClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{52} -} -func (m *EventSwapClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSwapClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventSwapClaim.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 *EventSwapClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSwapClaim.Merge(m, src) -} -func (m *EventSwapClaim) XXX_Size() int { - return m.Size() -} -func (m *EventSwapClaim) XXX_DiscardUnknown() { - xxx_messageInfo_EventSwapClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSwapClaim proto.InternalMessageInfo - -func (m *EventSwapClaim) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *EventSwapClaim) GetOutput_1Commitment() *v12.StateCommitment { - if m != nil { - return m.Output_1Commitment - } - return nil -} - -func (m *EventSwapClaim) GetOutput_2Commitment() *v12.StateCommitment { - if m != nil { - return m.Output_2Commitment - } - return nil -} - -func (m *EventSwapClaim) GetNullifier() *v1.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -type EventPositionOpen struct { - // Position ID. - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - // The trading pair to open. - TradingPair *TradingPair `protobuf:"bytes,2,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // The amount for asset 1. - Reserves_1 *v13.Amount `protobuf:"bytes,3,opt,name=reserves_1,json=reserves1,proto3" json:"reserves_1,omitempty"` - // The amount for asset 2. - Reserves_2 *v13.Amount `protobuf:"bytes,4,opt,name=reserves_2,json=reserves2,proto3" json:"reserves_2,omitempty"` - // The trading fee for the position, expressed in basis points. - // e.g. 2% fee is expressed as 200, 100% fee is expressed as 10000; - TradingFee uint32 `protobuf:"varint,5,opt,name=trading_fee,json=tradingFee,proto3" json:"trading_fee,omitempty"` -} - -func (m *EventPositionOpen) Reset() { *m = EventPositionOpen{} } -func (m *EventPositionOpen) String() string { return proto.CompactTextString(m) } -func (*EventPositionOpen) ProtoMessage() {} -func (*EventPositionOpen) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{53} -} -func (m *EventPositionOpen) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventPositionOpen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventPositionOpen.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 *EventPositionOpen) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventPositionOpen.Merge(m, src) -} -func (m *EventPositionOpen) XXX_Size() int { - return m.Size() -} -func (m *EventPositionOpen) XXX_DiscardUnknown() { - xxx_messageInfo_EventPositionOpen.DiscardUnknown(m) -} - -var xxx_messageInfo_EventPositionOpen proto.InternalMessageInfo - -func (m *EventPositionOpen) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *EventPositionOpen) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *EventPositionOpen) GetReserves_1() *v13.Amount { - if m != nil { - return m.Reserves_1 - } - return nil -} - -func (m *EventPositionOpen) GetReserves_2() *v13.Amount { - if m != nil { - return m.Reserves_2 - } - return nil -} - -func (m *EventPositionOpen) GetTradingFee() uint32 { - if m != nil { - return m.TradingFee - } - return 0 -} - -type EventPositionClose struct { - // The ID of the closed position - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` -} - -func (m *EventPositionClose) Reset() { *m = EventPositionClose{} } -func (m *EventPositionClose) String() string { return proto.CompactTextString(m) } -func (*EventPositionClose) ProtoMessage() {} -func (*EventPositionClose) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{54} -} -func (m *EventPositionClose) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventPositionClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventPositionClose.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 *EventPositionClose) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventPositionClose.Merge(m, src) -} -func (m *EventPositionClose) XXX_Size() int { - return m.Size() -} -func (m *EventPositionClose) XXX_DiscardUnknown() { - xxx_messageInfo_EventPositionClose.DiscardUnknown(m) -} - -var xxx_messageInfo_EventPositionClose proto.InternalMessageInfo - -func (m *EventPositionClose) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -type EventQueuePositionClose struct { - // The ID of the position queued that is closed for closure. - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` -} - -func (m *EventQueuePositionClose) Reset() { *m = EventQueuePositionClose{} } -func (m *EventQueuePositionClose) String() string { return proto.CompactTextString(m) } -func (*EventQueuePositionClose) ProtoMessage() {} -func (*EventQueuePositionClose) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{55} -} -func (m *EventQueuePositionClose) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventQueuePositionClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventQueuePositionClose.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 *EventQueuePositionClose) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventQueuePositionClose.Merge(m, src) -} -func (m *EventQueuePositionClose) XXX_Size() int { - return m.Size() -} -func (m *EventQueuePositionClose) XXX_DiscardUnknown() { - xxx_messageInfo_EventQueuePositionClose.DiscardUnknown(m) -} - -var xxx_messageInfo_EventQueuePositionClose proto.InternalMessageInfo - -func (m *EventQueuePositionClose) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -type EventPositionWithdraw struct { - // The ID of the withdrawn position. - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - // The trading pair of the withdrawn position. - TradingPair *TradingPair `protobuf:"bytes,2,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // The reserves of asset 1 of the withdrawn position. - Reserves_1 *v13.Amount `protobuf:"bytes,3,opt,name=reserves_1,json=reserves1,proto3" json:"reserves_1,omitempty"` - // The reserves of asset 2 of the withdrawn position. - Reserves_2 *v13.Amount `protobuf:"bytes,4,opt,name=reserves_2,json=reserves2,proto3" json:"reserves_2,omitempty"` - // The sequence number of the withdrawal. - Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (m *EventPositionWithdraw) Reset() { *m = EventPositionWithdraw{} } -func (m *EventPositionWithdraw) String() string { return proto.CompactTextString(m) } -func (*EventPositionWithdraw) ProtoMessage() {} -func (*EventPositionWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{56} -} -func (m *EventPositionWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventPositionWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventPositionWithdraw.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 *EventPositionWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventPositionWithdraw.Merge(m, src) -} -func (m *EventPositionWithdraw) XXX_Size() int { - return m.Size() -} -func (m *EventPositionWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_EventPositionWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_EventPositionWithdraw proto.InternalMessageInfo - -func (m *EventPositionWithdraw) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *EventPositionWithdraw) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *EventPositionWithdraw) GetReserves_1() *v13.Amount { - if m != nil { - return m.Reserves_1 - } - return nil -} - -func (m *EventPositionWithdraw) GetReserves_2() *v13.Amount { - if m != nil { - return m.Reserves_2 - } - return nil -} - -func (m *EventPositionWithdraw) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -type EventPositionExecution struct { - // The ID of the position executed against. - PositionId *PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - // The trading pair of the position executed against. - TradingPair *TradingPair `protobuf:"bytes,2,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` - // The reserves of asset 1 of the position after execution. - Reserves_1 *v13.Amount `protobuf:"bytes,3,opt,name=reserves_1,json=reserves1,proto3" json:"reserves_1,omitempty"` - // The reserves of asset 2 of the position after execution. - Reserves_2 *v13.Amount `protobuf:"bytes,4,opt,name=reserves_2,json=reserves2,proto3" json:"reserves_2,omitempty"` - // The reserves of asset 1 of the position before execution. - PrevReserves_1 *v13.Amount `protobuf:"bytes,5,opt,name=prev_reserves_1,json=prevReserves1,proto3" json:"prev_reserves_1,omitempty"` - // The reserves of asset 2 of the position before execution. - PrevReserves_2 *v13.Amount `protobuf:"bytes,6,opt,name=prev_reserves_2,json=prevReserves2,proto3" json:"prev_reserves_2,omitempty"` - // Context: the end-to-end route that was being traversed during execution. - Context *DirectedTradingPair `protobuf:"bytes,7,opt,name=context,proto3" json:"context,omitempty"` -} - -func (m *EventPositionExecution) Reset() { *m = EventPositionExecution{} } -func (m *EventPositionExecution) String() string { return proto.CompactTextString(m) } -func (*EventPositionExecution) ProtoMessage() {} -func (*EventPositionExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{57} -} -func (m *EventPositionExecution) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventPositionExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventPositionExecution.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 *EventPositionExecution) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventPositionExecution.Merge(m, src) -} -func (m *EventPositionExecution) XXX_Size() int { - return m.Size() -} -func (m *EventPositionExecution) XXX_DiscardUnknown() { - xxx_messageInfo_EventPositionExecution.DiscardUnknown(m) -} - -var xxx_messageInfo_EventPositionExecution proto.InternalMessageInfo - -func (m *EventPositionExecution) GetPositionId() *PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *EventPositionExecution) GetTradingPair() *TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -func (m *EventPositionExecution) GetReserves_1() *v13.Amount { - if m != nil { - return m.Reserves_1 - } - return nil -} - -func (m *EventPositionExecution) GetReserves_2() *v13.Amount { - if m != nil { - return m.Reserves_2 - } - return nil -} - -func (m *EventPositionExecution) GetPrevReserves_1() *v13.Amount { - if m != nil { - return m.PrevReserves_1 - } - return nil -} - -func (m *EventPositionExecution) GetPrevReserves_2() *v13.Amount { - if m != nil { - return m.PrevReserves_2 - } - return nil -} - -func (m *EventPositionExecution) GetContext() *DirectedTradingPair { - if m != nil { - return m.Context - } - return nil -} - -type EventBatchSwap struct { - // The BatchSwapOutputData containing the results of the batch swap. - BatchSwapOutputData *BatchSwapOutputData `protobuf:"bytes,1,opt,name=batch_swap_output_data,json=batchSwapOutputData,proto3" json:"batch_swap_output_data,omitempty"` - // The record of execution for the batch swap in the 1 -> 2 direction. - SwapExecution_1For_2 *SwapExecution `protobuf:"bytes,2,opt,name=swap_execution_1_for_2,json=swapExecution1For2,proto3" json:"swap_execution_1_for_2,omitempty"` - // The record of execution for the batch swap in the 2 -> 1 direction. - SwapExecution_2For_1 *SwapExecution `protobuf:"bytes,3,opt,name=swap_execution_2_for_1,json=swapExecution2For1,proto3" json:"swap_execution_2_for_1,omitempty"` -} - -func (m *EventBatchSwap) Reset() { *m = EventBatchSwap{} } -func (m *EventBatchSwap) String() string { return proto.CompactTextString(m) } -func (*EventBatchSwap) ProtoMessage() {} -func (*EventBatchSwap) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{58} -} -func (m *EventBatchSwap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBatchSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBatchSwap.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 *EventBatchSwap) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBatchSwap.Merge(m, src) -} -func (m *EventBatchSwap) XXX_Size() int { - return m.Size() -} -func (m *EventBatchSwap) XXX_DiscardUnknown() { - xxx_messageInfo_EventBatchSwap.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBatchSwap proto.InternalMessageInfo - -func (m *EventBatchSwap) GetBatchSwapOutputData() *BatchSwapOutputData { - if m != nil { - return m.BatchSwapOutputData - } - return nil -} - -func (m *EventBatchSwap) GetSwapExecution_1For_2() *SwapExecution { - if m != nil { - return m.SwapExecution_1For_2 - } - return nil -} - -func (m *EventBatchSwap) GetSwapExecution_2For_1() *SwapExecution { - if m != nil { - return m.SwapExecution_2For_1 - } - return nil -} - -type EventArbExecution struct { - // The height at which the arb execution occurred. - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // The record of execution for the arb execution. - SwapExecution *SwapExecution `protobuf:"bytes,2,opt,name=swap_execution,json=swapExecution,proto3" json:"swap_execution,omitempty"` -} - -func (m *EventArbExecution) Reset() { *m = EventArbExecution{} } -func (m *EventArbExecution) String() string { return proto.CompactTextString(m) } -func (*EventArbExecution) ProtoMessage() {} -func (*EventArbExecution) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{59} -} -func (m *EventArbExecution) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventArbExecution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventArbExecution.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 *EventArbExecution) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventArbExecution.Merge(m, src) -} -func (m *EventArbExecution) XXX_Size() int { - return m.Size() -} -func (m *EventArbExecution) XXX_DiscardUnknown() { - xxx_messageInfo_EventArbExecution.DiscardUnknown(m) -} - -var xxx_messageInfo_EventArbExecution proto.InternalMessageInfo - -func (m *EventArbExecution) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *EventArbExecution) GetSwapExecution() *SwapExecution { - if m != nil { - return m.SwapExecution - } - return nil -} - -// Indicates that value was added to the DEX. -type EventValueCircuitBreakerCredit struct { - // The asset ID being deposited into the DEX. - AssetId *v14.AssetId `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - // The previous balance of the asset in the DEX. - PreviousBalance *v13.Amount `protobuf:"bytes,2,opt,name=previous_balance,json=previousBalance,proto3" json:"previous_balance,omitempty"` - // The new balance of the asset in the DEX. - NewBalance *v13.Amount `protobuf:"bytes,3,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"` -} - -func (m *EventValueCircuitBreakerCredit) Reset() { *m = EventValueCircuitBreakerCredit{} } -func (m *EventValueCircuitBreakerCredit) String() string { return proto.CompactTextString(m) } -func (*EventValueCircuitBreakerCredit) ProtoMessage() {} -func (*EventValueCircuitBreakerCredit) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{60} -} -func (m *EventValueCircuitBreakerCredit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValueCircuitBreakerCredit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValueCircuitBreakerCredit.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 *EventValueCircuitBreakerCredit) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValueCircuitBreakerCredit.Merge(m, src) -} -func (m *EventValueCircuitBreakerCredit) XXX_Size() int { - return m.Size() -} -func (m *EventValueCircuitBreakerCredit) XXX_DiscardUnknown() { - xxx_messageInfo_EventValueCircuitBreakerCredit.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValueCircuitBreakerCredit proto.InternalMessageInfo - -func (m *EventValueCircuitBreakerCredit) GetAssetId() *v14.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -func (m *EventValueCircuitBreakerCredit) GetPreviousBalance() *v13.Amount { - if m != nil { - return m.PreviousBalance - } - return nil -} - -func (m *EventValueCircuitBreakerCredit) GetNewBalance() *v13.Amount { - if m != nil { - return m.NewBalance - } - return nil -} - -// Indicates that value is leaving the DEX. -type EventValueCircuitBreakerDebit struct { - // The asset ID being deposited into the DEX. - AssetId *v14.AssetId `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - // The previous balance of the asset in the DEX. - PreviousBalance *v13.Amount `protobuf:"bytes,2,opt,name=previous_balance,json=previousBalance,proto3" json:"previous_balance,omitempty"` - // The new balance of the asset in the DEX. - NewBalance *v13.Amount `protobuf:"bytes,3,opt,name=new_balance,json=newBalance,proto3" json:"new_balance,omitempty"` -} - -func (m *EventValueCircuitBreakerDebit) Reset() { *m = EventValueCircuitBreakerDebit{} } -func (m *EventValueCircuitBreakerDebit) String() string { return proto.CompactTextString(m) } -func (*EventValueCircuitBreakerDebit) ProtoMessage() {} -func (*EventValueCircuitBreakerDebit) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{61} -} -func (m *EventValueCircuitBreakerDebit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValueCircuitBreakerDebit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValueCircuitBreakerDebit.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 *EventValueCircuitBreakerDebit) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValueCircuitBreakerDebit.Merge(m, src) -} -func (m *EventValueCircuitBreakerDebit) XXX_Size() int { - return m.Size() -} -func (m *EventValueCircuitBreakerDebit) XXX_DiscardUnknown() { - xxx_messageInfo_EventValueCircuitBreakerDebit.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValueCircuitBreakerDebit proto.InternalMessageInfo - -func (m *EventValueCircuitBreakerDebit) GetAssetId() *v14.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -func (m *EventValueCircuitBreakerDebit) GetPreviousBalance() *v13.Amount { - if m != nil { - return m.PreviousBalance - } - return nil -} - -func (m *EventValueCircuitBreakerDebit) GetNewBalance() *v13.Amount { - if m != nil { - return m.NewBalance - } - return nil -} - -type DexParameters struct { - // Whether or not the DEX is enabled. - IsEnabled bool `protobuf:"varint,1,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - // The list of fixed candidates for routing. - FixedCandidates []*v14.AssetId `protobuf:"bytes,2,rep,name=fixed_candidates,json=fixedCandidates,proto3" json:"fixed_candidates,omitempty"` - // The number of hops to traverse while routing from A to B. - MaxHops uint32 `protobuf:"varint,3,opt,name=max_hops,json=maxHops,proto3" json:"max_hops,omitempty"` - // The maximum number of positions per trading pair. - // If this number is exceeded, positions with the least - // inventory get evicted from the DEX. - MaxPositionsPerPair uint32 `protobuf:"varint,4,opt,name=max_positions_per_pair,json=maxPositionsPerPair,proto3" json:"max_positions_per_pair,omitempty"` - // The maximum number of routing and execution steps to be performed - // for a single pair - MaxExecutionBudget uint32 `protobuf:"varint,5,opt,name=max_execution_budget,json=maxExecutionBudget,proto3" json:"max_execution_budget,omitempty"` -} - -func (m *DexParameters) Reset() { *m = DexParameters{} } -func (m *DexParameters) String() string { return proto.CompactTextString(m) } -func (*DexParameters) ProtoMessage() {} -func (*DexParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{62} -} -func (m *DexParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DexParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DexParameters.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 *DexParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_DexParameters.Merge(m, src) -} -func (m *DexParameters) XXX_Size() int { - return m.Size() -} -func (m *DexParameters) XXX_DiscardUnknown() { - xxx_messageInfo_DexParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_DexParameters proto.InternalMessageInfo - -func (m *DexParameters) GetIsEnabled() bool { - if m != nil { - return m.IsEnabled - } - return false -} - -func (m *DexParameters) GetFixedCandidates() []*v14.AssetId { - if m != nil { - return m.FixedCandidates - } - return nil -} - -func (m *DexParameters) GetMaxHops() uint32 { - if m != nil { - return m.MaxHops - } - return 0 -} - -func (m *DexParameters) GetMaxPositionsPerPair() uint32 { - if m != nil { - return m.MaxPositionsPerPair - } - return 0 -} - -func (m *DexParameters) GetMaxExecutionBudget() uint32 { - if m != nil { - return m.MaxExecutionBudget - } - return 0 -} - -type GenesisContent struct { - // The initial parameters for the DEX. - DexParams *DexParameters `protobuf:"bytes,1,opt,name=dex_params,json=dexParams,proto3" json:"dex_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{63} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetDexParams() *DexParameters { - if m != nil { - return m.DexParams - } - return nil -} - -type CandlestickData struct { - // The height of the candlestick data. - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // The first observed price during the block execution. - Open float64 `protobuf:"fixed64,2,opt,name=open,proto3" json:"open,omitempty"` - // The last observed price during the block execution. - Close float64 `protobuf:"fixed64,3,opt,name=close,proto3" json:"close,omitempty"` - // The highest observed price during the block execution. - High float64 `protobuf:"fixed64,4,opt,name=high,proto3" json:"high,omitempty"` - // The lowest observed price during the block execution. - Low float64 `protobuf:"fixed64,5,opt,name=low,proto3" json:"low,omitempty"` - // The volume that traded "directly", during individual position executions. - DirectVolume float64 `protobuf:"fixed64,6,opt,name=direct_volume,json=directVolume,proto3" json:"direct_volume,omitempty"` - // The volume that traded as part of swaps, which could have traversed multiple routes. - SwapVolume float64 `protobuf:"fixed64,7,opt,name=swap_volume,json=swapVolume,proto3" json:"swap_volume,omitempty"` -} - -func (m *CandlestickData) Reset() { *m = CandlestickData{} } -func (m *CandlestickData) String() string { return proto.CompactTextString(m) } -func (*CandlestickData) ProtoMessage() {} -func (*CandlestickData) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{64} -} -func (m *CandlestickData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CandlestickData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CandlestickData.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 *CandlestickData) XXX_Merge(src proto.Message) { - xxx_messageInfo_CandlestickData.Merge(m, src) -} -func (m *CandlestickData) XXX_Size() int { - return m.Size() -} -func (m *CandlestickData) XXX_DiscardUnknown() { - xxx_messageInfo_CandlestickData.DiscardUnknown(m) -} - -var xxx_messageInfo_CandlestickData proto.InternalMessageInfo - -func (m *CandlestickData) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *CandlestickData) GetOpen() float64 { - if m != nil { - return m.Open - } - return 0 -} - -func (m *CandlestickData) GetClose() float64 { - if m != nil { - return m.Close - } - return 0 -} - -func (m *CandlestickData) GetHigh() float64 { - if m != nil { - return m.High - } - return 0 -} - -func (m *CandlestickData) GetLow() float64 { - if m != nil { - return m.Low - } - return 0 -} - -func (m *CandlestickData) GetDirectVolume() float64 { - if m != nil { - return m.DirectVolume - } - return 0 -} - -func (m *CandlestickData) GetSwapVolume() float64 { - if m != nil { - return m.SwapVolume - } - return 0 -} - -type CandlestickDataRequest struct { - // The directed trading pair to request candlestick data for. - // - // NOTE: the returned data will only have trades from the SOURCE asset to the - // DEST asset, not the other direction. Make another request if you want both - // sets of data. - Pair *DirectedTradingPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - // The maximum number of candlestick data points to return. - // - // The server may clamp this limit to a maximum value. - Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - // The height to start the query from. - // - // If this is unset (= 0), the server will return the most recent data points. - StartHeight uint64 `protobuf:"varint,3,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` -} - -func (m *CandlestickDataRequest) Reset() { *m = CandlestickDataRequest{} } -func (m *CandlestickDataRequest) String() string { return proto.CompactTextString(m) } -func (*CandlestickDataRequest) ProtoMessage() {} -func (*CandlestickDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{65} -} -func (m *CandlestickDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CandlestickDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CandlestickDataRequest.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 *CandlestickDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CandlestickDataRequest.Merge(m, src) -} -func (m *CandlestickDataRequest) XXX_Size() int { - return m.Size() -} -func (m *CandlestickDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CandlestickDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CandlestickDataRequest proto.InternalMessageInfo - -func (m *CandlestickDataRequest) GetPair() *DirectedTradingPair { - if m != nil { - return m.Pair - } - return nil -} - -func (m *CandlestickDataRequest) GetLimit() uint64 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *CandlestickDataRequest) GetStartHeight() uint64 { - if m != nil { - return m.StartHeight - } - return 0 -} - -type CandlestickDataResponse struct { - // The candlestick data points. - Data []*CandlestickData `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` -} - -func (m *CandlestickDataResponse) Reset() { *m = CandlestickDataResponse{} } -func (m *CandlestickDataResponse) String() string { return proto.CompactTextString(m) } -func (*CandlestickDataResponse) ProtoMessage() {} -func (*CandlestickDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{66} -} -func (m *CandlestickDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CandlestickDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CandlestickDataResponse.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 *CandlestickDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CandlestickDataResponse.Merge(m, src) -} -func (m *CandlestickDataResponse) XXX_Size() int { - return m.Size() -} -func (m *CandlestickDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CandlestickDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CandlestickDataResponse proto.InternalMessageInfo - -func (m *CandlestickDataResponse) GetData() []*CandlestickData { - if m != nil { - return m.Data - } - return nil -} - -type CandlestickDataStreamRequest struct { - // The directed trading pair to subscribe to. - Pair *DirectedTradingPair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` -} - -func (m *CandlestickDataStreamRequest) Reset() { *m = CandlestickDataStreamRequest{} } -func (m *CandlestickDataStreamRequest) String() string { return proto.CompactTextString(m) } -func (*CandlestickDataStreamRequest) ProtoMessage() {} -func (*CandlestickDataStreamRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{67} -} -func (m *CandlestickDataStreamRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CandlestickDataStreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CandlestickDataStreamRequest.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 *CandlestickDataStreamRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CandlestickDataStreamRequest.Merge(m, src) -} -func (m *CandlestickDataStreamRequest) XXX_Size() int { - return m.Size() -} -func (m *CandlestickDataStreamRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CandlestickDataStreamRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CandlestickDataStreamRequest proto.InternalMessageInfo - -func (m *CandlestickDataStreamRequest) GetPair() *DirectedTradingPair { - if m != nil { - return m.Pair - } - return nil -} - -type CandlestickDataStreamResponse struct { - // The candlestick data point. - Data *CandlestickData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *CandlestickDataStreamResponse) Reset() { *m = CandlestickDataStreamResponse{} } -func (m *CandlestickDataStreamResponse) String() string { return proto.CompactTextString(m) } -func (*CandlestickDataStreamResponse) ProtoMessage() {} -func (*CandlestickDataStreamResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ec17dcdac15b4004, []int{68} -} -func (m *CandlestickDataStreamResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CandlestickDataStreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CandlestickDataStreamResponse.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 *CandlestickDataStreamResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CandlestickDataStreamResponse.Merge(m, src) -} -func (m *CandlestickDataStreamResponse) XXX_Size() int { - return m.Size() -} -func (m *CandlestickDataStreamResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CandlestickDataStreamResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CandlestickDataStreamResponse proto.InternalMessageInfo - -func (m *CandlestickDataStreamResponse) GetData() *CandlestickData { - if m != nil { - return m.Data - } - return nil -} - -func init() { - proto.RegisterEnum("penumbra.core.component.dex.v1.PositionState_PositionStateEnum", PositionState_PositionStateEnum_name, PositionState_PositionStateEnum_value) - proto.RegisterType((*ZKSwapProof)(nil), "penumbra.core.component.dex.v1.ZKSwapProof") - proto.RegisterType((*ZKSwapClaimProof)(nil), "penumbra.core.component.dex.v1.ZKSwapClaimProof") - proto.RegisterType((*Swap)(nil), "penumbra.core.component.dex.v1.Swap") - proto.RegisterType((*SwapClaim)(nil), "penumbra.core.component.dex.v1.SwapClaim") - proto.RegisterType((*SwapClaimBody)(nil), "penumbra.core.component.dex.v1.SwapClaimBody") - proto.RegisterType((*SwapBody)(nil), "penumbra.core.component.dex.v1.SwapBody") - proto.RegisterType((*SwapPayload)(nil), "penumbra.core.component.dex.v1.SwapPayload") - proto.RegisterType((*SwapPlaintext)(nil), "penumbra.core.component.dex.v1.SwapPlaintext") - proto.RegisterType((*SwapPlan)(nil), "penumbra.core.component.dex.v1.SwapPlan") - proto.RegisterType((*SwapClaimPlan)(nil), "penumbra.core.component.dex.v1.SwapClaimPlan") - proto.RegisterType((*SwapView)(nil), "penumbra.core.component.dex.v1.SwapView") - proto.RegisterType((*SwapView_Visible)(nil), "penumbra.core.component.dex.v1.SwapView.Visible") - proto.RegisterType((*SwapView_Opaque)(nil), "penumbra.core.component.dex.v1.SwapView.Opaque") - proto.RegisterType((*SwapClaimView)(nil), "penumbra.core.component.dex.v1.SwapClaimView") - proto.RegisterType((*SwapClaimView_Visible)(nil), "penumbra.core.component.dex.v1.SwapClaimView.Visible") - proto.RegisterType((*SwapClaimView_Opaque)(nil), "penumbra.core.component.dex.v1.SwapClaimView.Opaque") - proto.RegisterType((*TradingPair)(nil), "penumbra.core.component.dex.v1.TradingPair") - proto.RegisterType((*DirectedTradingPair)(nil), "penumbra.core.component.dex.v1.DirectedTradingPair") - proto.RegisterType((*BatchSwapOutputData)(nil), "penumbra.core.component.dex.v1.BatchSwapOutputData") - proto.RegisterType((*TradingFunction)(nil), "penumbra.core.component.dex.v1.TradingFunction") - proto.RegisterType((*BareTradingFunction)(nil), "penumbra.core.component.dex.v1.BareTradingFunction") - proto.RegisterType((*Reserves)(nil), "penumbra.core.component.dex.v1.Reserves") - proto.RegisterType((*Position)(nil), "penumbra.core.component.dex.v1.Position") - proto.RegisterType((*PositionId)(nil), "penumbra.core.component.dex.v1.PositionId") - proto.RegisterType((*PositionState)(nil), "penumbra.core.component.dex.v1.PositionState") - proto.RegisterType((*LpNft)(nil), "penumbra.core.component.dex.v1.LpNft") - proto.RegisterType((*PositionOpen)(nil), "penumbra.core.component.dex.v1.PositionOpen") - proto.RegisterType((*PositionClose)(nil), "penumbra.core.component.dex.v1.PositionClose") - proto.RegisterType((*PositionWithdraw)(nil), "penumbra.core.component.dex.v1.PositionWithdraw") - proto.RegisterType((*PositionRewardClaim)(nil), "penumbra.core.component.dex.v1.PositionRewardClaim") - proto.RegisterType((*SwapExecution)(nil), "penumbra.core.component.dex.v1.SwapExecution") - proto.RegisterType((*SwapExecution_Trace)(nil), "penumbra.core.component.dex.v1.SwapExecution.Trace") - proto.RegisterType((*PositionWithdrawPlan)(nil), "penumbra.core.component.dex.v1.PositionWithdrawPlan") - proto.RegisterType((*PositionRewardClaimPlan)(nil), "penumbra.core.component.dex.v1.PositionRewardClaimPlan") - proto.RegisterType((*BatchSwapOutputDataRequest)(nil), "penumbra.core.component.dex.v1.BatchSwapOutputDataRequest") - proto.RegisterType((*BatchSwapOutputDataResponse)(nil), "penumbra.core.component.dex.v1.BatchSwapOutputDataResponse") - proto.RegisterType((*SwapExecutionRequest)(nil), "penumbra.core.component.dex.v1.SwapExecutionRequest") - proto.RegisterType((*SwapExecutionResponse)(nil), "penumbra.core.component.dex.v1.SwapExecutionResponse") - proto.RegisterType((*ArbExecutionRequest)(nil), "penumbra.core.component.dex.v1.ArbExecutionRequest") - proto.RegisterType((*ArbExecutionResponse)(nil), "penumbra.core.component.dex.v1.ArbExecutionResponse") - proto.RegisterType((*SwapExecutionsRequest)(nil), "penumbra.core.component.dex.v1.SwapExecutionsRequest") - proto.RegisterType((*SwapExecutionsResponse)(nil), "penumbra.core.component.dex.v1.SwapExecutionsResponse") - proto.RegisterType((*ArbExecutionsRequest)(nil), "penumbra.core.component.dex.v1.ArbExecutionsRequest") - proto.RegisterType((*ArbExecutionsResponse)(nil), "penumbra.core.component.dex.v1.ArbExecutionsResponse") - proto.RegisterType((*LiquidityPositionsRequest)(nil), "penumbra.core.component.dex.v1.LiquidityPositionsRequest") - proto.RegisterType((*LiquidityPositionsResponse)(nil), "penumbra.core.component.dex.v1.LiquidityPositionsResponse") - proto.RegisterType((*LiquidityPositionByIdRequest)(nil), "penumbra.core.component.dex.v1.LiquidityPositionByIdRequest") - proto.RegisterType((*LiquidityPositionByIdResponse)(nil), "penumbra.core.component.dex.v1.LiquidityPositionByIdResponse") - proto.RegisterType((*LiquidityPositionsByIdRequest)(nil), "penumbra.core.component.dex.v1.LiquidityPositionsByIdRequest") - proto.RegisterType((*LiquidityPositionsByIdResponse)(nil), "penumbra.core.component.dex.v1.LiquidityPositionsByIdResponse") - proto.RegisterType((*LiquidityPositionsByPriceRequest)(nil), "penumbra.core.component.dex.v1.LiquidityPositionsByPriceRequest") - proto.RegisterType((*LiquidityPositionsByPriceResponse)(nil), "penumbra.core.component.dex.v1.LiquidityPositionsByPriceResponse") - proto.RegisterType((*SpreadRequest)(nil), "penumbra.core.component.dex.v1.SpreadRequest") - proto.RegisterType((*SpreadResponse)(nil), "penumbra.core.component.dex.v1.SpreadResponse") - proto.RegisterType((*SimulateTradeRequest)(nil), "penumbra.core.component.dex.v1.SimulateTradeRequest") - proto.RegisterType((*SimulateTradeRequest_Routing)(nil), "penumbra.core.component.dex.v1.SimulateTradeRequest.Routing") - proto.RegisterType((*SimulateTradeRequest_Routing_SingleHop)(nil), "penumbra.core.component.dex.v1.SimulateTradeRequest.Routing.SingleHop") - proto.RegisterType((*SimulateTradeRequest_Routing_Default)(nil), "penumbra.core.component.dex.v1.SimulateTradeRequest.Routing.Default") - proto.RegisterType((*SimulateTradeResponse)(nil), "penumbra.core.component.dex.v1.SimulateTradeResponse") - proto.RegisterType((*EventSwap)(nil), "penumbra.core.component.dex.v1.EventSwap") - proto.RegisterType((*EventSwapClaim)(nil), "penumbra.core.component.dex.v1.EventSwapClaim") - proto.RegisterType((*EventPositionOpen)(nil), "penumbra.core.component.dex.v1.EventPositionOpen") - proto.RegisterType((*EventPositionClose)(nil), "penumbra.core.component.dex.v1.EventPositionClose") - proto.RegisterType((*EventQueuePositionClose)(nil), "penumbra.core.component.dex.v1.EventQueuePositionClose") - proto.RegisterType((*EventPositionWithdraw)(nil), "penumbra.core.component.dex.v1.EventPositionWithdraw") - proto.RegisterType((*EventPositionExecution)(nil), "penumbra.core.component.dex.v1.EventPositionExecution") - proto.RegisterType((*EventBatchSwap)(nil), "penumbra.core.component.dex.v1.EventBatchSwap") - proto.RegisterType((*EventArbExecution)(nil), "penumbra.core.component.dex.v1.EventArbExecution") - proto.RegisterType((*EventValueCircuitBreakerCredit)(nil), "penumbra.core.component.dex.v1.EventValueCircuitBreakerCredit") - proto.RegisterType((*EventValueCircuitBreakerDebit)(nil), "penumbra.core.component.dex.v1.EventValueCircuitBreakerDebit") - proto.RegisterType((*DexParameters)(nil), "penumbra.core.component.dex.v1.DexParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.dex.v1.GenesisContent") - proto.RegisterType((*CandlestickData)(nil), "penumbra.core.component.dex.v1.CandlestickData") - proto.RegisterType((*CandlestickDataRequest)(nil), "penumbra.core.component.dex.v1.CandlestickDataRequest") - proto.RegisterType((*CandlestickDataResponse)(nil), "penumbra.core.component.dex.v1.CandlestickDataResponse") - proto.RegisterType((*CandlestickDataStreamRequest)(nil), "penumbra.core.component.dex.v1.CandlestickDataStreamRequest") - proto.RegisterType((*CandlestickDataStreamResponse)(nil), "penumbra.core.component.dex.v1.CandlestickDataStreamResponse") -} - -func init() { - proto.RegisterFile("penumbra/core/component/dex/v1/dex.proto", fileDescriptor_ec17dcdac15b4004) -} - -var fileDescriptor_ec17dcdac15b4004 = []byte{ - // 3751 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5c, 0x5d, 0x6c, 0x23, 0x59, - 0x56, 0xee, 0x2a, 0x3b, 0xb1, 0x7d, 0x12, 0xa7, 0xd3, 0x37, 0xe9, 0x9e, 0xac, 0x77, 0x3a, 0xdd, - 0x5d, 0xbd, 0x0b, 0xbd, 0x03, 0xe3, 0xb4, 0xab, 0xa7, 0x67, 0x66, 0x33, 0xbd, 0xcc, 0x26, 0x76, - 0xfe, 0x76, 0xba, 0x13, 0x4f, 0x25, 0x93, 0x19, 0x8d, 0x9a, 0x29, 0xca, 0xae, 0xeb, 0xb8, 0x34, - 0x76, 0x55, 0x75, 0x55, 0xd9, 0x71, 0x24, 0x7e, 0x34, 0x08, 0x16, 0x04, 0x02, 0x2d, 0x08, 0x81, - 0x06, 0x89, 0x07, 0x56, 0xe2, 0x85, 0x37, 0x78, 0x06, 0xcd, 0xf2, 0x00, 0x42, 0x8b, 0x84, 0x56, - 0x3c, 0xec, 0x22, 0x21, 0x21, 0x34, 0x83, 0x84, 0xc4, 0x13, 0x6f, 0xbc, 0xec, 0x03, 0xba, 0x3f, - 0x55, 0xae, 0x72, 0xca, 0x71, 0xd9, 0x71, 0xb3, 0xa8, 0xc5, 0x4b, 0xb7, 0xef, 0xad, 0x73, 0xbe, - 0x7b, 0xce, 0xb9, 0xe7, 0x9e, 0x7b, 0xee, 0xb9, 0xb7, 0x1b, 0xee, 0xd9, 0xd8, 0xec, 0xb4, 0x6b, - 0x8e, 0xb6, 0x56, 0xb7, 0x1c, 0xbc, 0x56, 0xb7, 0xda, 0xb6, 0x65, 0x62, 0xd3, 0x5b, 0xd3, 0x71, - 0x6f, 0xad, 0x5b, 0x22, 0x7f, 0x15, 0x6d, 0xc7, 0xf2, 0x2c, 0xb4, 0xea, 0x53, 0x16, 0x09, 0x65, - 0x31, 0xa0, 0x2c, 0x12, 0x92, 0x6e, 0xa9, 0x20, 0x45, 0x91, 0x34, 0xd7, 0xc5, 0x1e, 0x41, 0xa0, - 0x3f, 0x18, 0x46, 0x61, 0xe8, 0x68, 0x0d, 0x8c, 0x09, 0x6d, 0x03, 0xe3, 0x51, 0x94, 0x6e, 0x9d, - 0xa2, 0xba, 0x75, 0x1f, 0xf3, 0xd1, 0x50, 0xca, 0xa6, 0x81, 0x5b, 0x3a, 0xd6, 0x55, 0xdb, 0xb2, - 0x5a, 0x94, 0x27, 0xdc, 0xc1, 0xb9, 0x6f, 0x47, 0xb9, 0x3f, 0xc6, 0x67, 0x2e, 0x21, 0x25, 0x7f, - 0x73, 0x8a, 0xd5, 0x28, 0x85, 0xd9, 0x69, 0x13, 0x02, 0xb3, 0xd3, 0xe6, 0xdf, 0xbf, 0x12, 0xfd, - 0xee, 0xf5, 0x9a, 0x9a, 0xdb, 0x24, 0x24, 0xec, 0xd7, 0xf9, 0x71, 0x9c, 0x33, 0xdb, 0xb3, 0xd6, - 0x3c, 0xa6, 0x87, 0xe7, 0xeb, 0x21, 0xdd, 0x85, 0xb9, 0x0f, 0xdf, 0x39, 0x3c, 0xd5, 0xec, 0xaa, - 0x63, 0x59, 0x0d, 0xb4, 0x0c, 0x33, 0x86, 0x69, 0x62, 0x67, 0x45, 0xb8, 0x2d, 0xdc, 0x9b, 0x57, - 0x58, 0x43, 0xba, 0x07, 0x8b, 0x8c, 0xa8, 0xdc, 0xd2, 0x8c, 0xf6, 0x45, 0x94, 0xbf, 0x21, 0x40, - 0x9a, 0x10, 0xa2, 0x0d, 0x98, 0xb1, 0x09, 0x1d, 0xfd, 0x3c, 0x27, 0xff, 0x4c, 0xf1, 0xe2, 0x79, - 0x2c, 0x86, 0x84, 0x50, 0x18, 0x27, 0x7a, 0x04, 0xe9, 0x9a, 0xa5, 0x9f, 0xad, 0xa4, 0x29, 0xc2, - 0xbd, 0x51, 0x08, 0x84, 0x7f, 0xd3, 0xd2, 0xcf, 0x14, 0xca, 0x25, 0xfd, 0xb5, 0x00, 0xb9, 0x40, - 0x64, 0xb4, 0x1d, 0x15, 0xe7, 0x7e, 0x32, 0x71, 0xfa, 0xea, 0xfa, 0x32, 0x6d, 0x70, 0x99, 0x44, - 0x0a, 0xf3, 0x6a, 0x12, 0x99, 0x28, 0x48, 0x5f, 0x30, 0xf4, 0x55, 0x58, 0xc0, 0xb6, 0x55, 0x6f, - 0xaa, 0x7a, 0xc7, 0xd1, 0x3c, 0xc3, 0x32, 0x57, 0x32, 0xb7, 0x85, 0x7b, 0x69, 0x25, 0x4f, 0x7b, - 0x2b, 0xbc, 0x53, 0xfa, 0xa3, 0x14, 0xe4, 0x23, 0xec, 0x68, 0x07, 0x72, 0x66, 0xa7, 0xd5, 0x32, - 0x1a, 0x06, 0xb7, 0xfa, 0x9c, 0xfc, 0xb5, 0xa1, 0x02, 0x10, 0x4f, 0xed, 0x96, 0x8a, 0xfb, 0x3e, - 0x83, 0xd2, 0xe7, 0x45, 0x0f, 0x21, 0xd5, 0xc0, 0x98, 0xeb, 0x70, 0x77, 0x28, 0x04, 0x59, 0x16, - 0xdd, 0x52, 0x71, 0x1b, 0x63, 0x85, 0xd0, 0xa3, 0xf7, 0x61, 0xc9, 0xea, 0x78, 0x76, 0xc7, 0x53, - 0x4b, 0x6a, 0xdd, 0x6a, 0xb7, 0x0d, 0xaf, 0x8d, 0x4d, 0x6f, 0x25, 0x45, 0x61, 0x7e, 0x3a, 0x04, - 0x43, 0x5d, 0xad, 0xe8, 0x31, 0x09, 0x0e, 0x3d, 0xcd, 0xc3, 0xe5, 0x80, 0x5c, 0xb9, 0xc6, 0x30, - 0x4a, 0xfd, 0xae, 0x10, 0xb0, 0x1c, 0x06, 0x4e, 0x4f, 0x04, 0x2c, 0x87, 0x80, 0x8f, 0x60, 0x8e, - 0x03, 0xeb, 0x9a, 0xa7, 0xad, 0xcc, 0x52, 0xc0, 0x07, 0xa3, 0x26, 0x6d, 0x53, 0xf3, 0xea, 0x4d, - 0x62, 0xfa, 0x03, 0xca, 0x5b, 0xd1, 0x3c, 0x4d, 0x01, 0x2b, 0xf8, 0x2d, 0xfd, 0x87, 0x08, 0x59, - 0xdf, 0xd9, 0xd0, 0x3e, 0xcc, 0x7b, 0x8e, 0xa6, 0x1b, 0xe6, 0x89, 0x6a, 0x6b, 0x86, 0x93, 0xd4, - 0xdd, 0x8f, 0x18, 0x4f, 0x55, 0x33, 0x1c, 0x65, 0xce, 0xeb, 0x37, 0xd0, 0x9b, 0x90, 0xd3, 0x71, - 0xcb, 0xd3, 0xd4, 0x92, 0x6a, 0xf0, 0x19, 0x7a, 0x79, 0x00, 0x8c, 0x04, 0x81, 0x6e, 0xa9, 0xb8, - 0xd1, 0xb6, 0x3a, 0xa6, 0xa7, 0x64, 0x28, 0x79, 0x69, 0xaf, 0xcf, 0x29, 0xab, 0x06, 0x9f, 0x94, - 0x24, 0x9c, 0xf2, 0x1e, 0xaa, 0xc2, 0x42, 0x03, 0xe3, 0xf3, 0xa6, 0x1f, 0xf4, 0x2e, 0x16, 0x53, - 0xa9, 0x85, 0x5a, 0x9a, 0x59, 0x0f, 0x1b, 0x3f, 0xdf, 0xc0, 0xa1, 0x26, 0xda, 0x82, 0x8c, 0xad, - 0x9d, 0xb5, 0x2c, 0x4d, 0x5f, 0x99, 0x49, 0x66, 0x10, 0xba, 0xfa, 0x19, 0x8b, 0xe2, 0xf3, 0x4a, - 0xbf, 0x04, 0x73, 0xa1, 0x7e, 0xb4, 0x03, 0x10, 0x92, 0x51, 0x18, 0xcf, 0x3d, 0x42, 0xac, 0x74, - 0x09, 0x9a, 0x94, 0x1c, 0xeb, 0xaa, 0x7b, 0xaa, 0xd9, 0xd4, 0xd2, 0xf3, 0x4a, 0x3e, 0xe8, 0x25, - 0xc3, 0x4a, 0xff, 0x25, 0xb2, 0x25, 0x58, 0x6d, 0x69, 0x86, 0xe9, 0xe1, 0x9e, 0xf7, 0x42, 0xcc, - 0xf6, 0x37, 0x21, 0x57, 0x27, 0x31, 0x45, 0x25, 0x31, 0x20, 0x9d, 0x3c, 0x06, 0x64, 0x29, 0xd7, - 0x36, 0xc6, 0xa8, 0x0c, 0x79, 0x86, 0xa0, 0xe9, 0xba, 0x83, 0x5d, 0x97, 0xcf, 0xf1, 0xea, 0x00, - 0x0a, 0xdd, 0xcd, 0x88, 0x00, 0x8c, 0x4a, 0x99, 0xa7, 0x4c, 0xbc, 0x45, 0xf6, 0x0f, 0xc7, 0xc5, - 0x58, 0xa7, 0xab, 0x72, 0x5e, 0x61, 0x0d, 0xe9, 0x47, 0x02, 0x5b, 0x5b, 0xd5, 0x96, 0x66, 0xa2, - 0x23, 0x58, 0x20, 0x93, 0xa3, 0xda, 0xbe, 0xfd, 0xb9, 0xbd, 0x13, 0x85, 0xdd, 0x60, 0xd2, 0x94, - 0xbc, 0x1b, 0x99, 0xc3, 0x3b, 0x30, 0x4f, 0xbc, 0xbd, 0xd6, 0x32, 0x4c, 0x32, 0x0f, 0x7c, 0xea, - 0xe7, 0x1a, 0x18, 0x6f, 0xf2, 0x2e, 0x74, 0x0f, 0x16, 0x69, 0xb8, 0x0f, 0x88, 0x54, 0x87, 0xda, - 0x78, 0x5e, 0x59, 0xa0, 0xfd, 0x3e, 0xa1, 0x12, 0x43, 0xe9, 0x52, 0x9b, 0x0e, 0x52, 0x1e, 0x4a, - 0xff, 0x24, 0x86, 0xe2, 0xf9, 0x73, 0x54, 0xaf, 0x00, 0x59, 0xdb, 0x72, 0x0d, 0xba, 0xb1, 0x88, - 0x74, 0x63, 0x09, 0xda, 0x83, 0xf1, 0x30, 0x35, 0x95, 0x78, 0x18, 0xb3, 0xa1, 0xa5, 0x63, 0x36, - 0xb4, 0x58, 0xa3, 0xce, 0x24, 0x36, 0xea, 0x6c, 0xac, 0x51, 0x7f, 0x13, 0x98, 0xbb, 0x1c, 0x1b, - 0xf8, 0x14, 0x3d, 0x86, 0x4c, 0xd7, 0x70, 0x8d, 0x5a, 0x0b, 0x27, 0xdd, 0xe5, 0x7d, 0xd6, 0xe2, - 0x31, 0xe3, 0xdb, 0xbd, 0xa2, 0xf8, 0x10, 0x68, 0x0f, 0x66, 0x2d, 0x5b, 0x7b, 0xd6, 0xf1, 0xf7, - 0xc9, 0xb5, 0xc4, 0x60, 0x07, 0x94, 0x6d, 0xf7, 0x8a, 0xc2, 0x01, 0x0a, 0x3f, 0x4e, 0x43, 0x86, - 0x8f, 0x80, 0xde, 0x84, 0x34, 0x0d, 0x38, 0x4c, 0xc2, 0xaf, 0x24, 0x01, 0x55, 0x28, 0x47, 0x8c, - 0xbb, 0xa4, 0xa6, 0xe0, 0x2e, 0x1b, 0xc0, 0xd6, 0xb5, 0xea, 0xf5, 0x78, 0x30, 0xf8, 0xa9, 0x01, - 0x3c, 0x9e, 0x50, 0xb2, 0x30, 0x66, 0xba, 0x5a, 0x9d, 0xcc, 0xe6, 0x9e, 0xae, 0x64, 0x28, 0xdf, - 0x51, 0x0f, 0x35, 0xe1, 0x46, 0x8d, 0xb8, 0x08, 0x8d, 0xa4, 0x6a, 0xd8, 0xc1, 0x96, 0x27, 0x77, - 0xb0, 0xa5, 0xda, 0xf9, 0x4e, 0xf4, 0x04, 0xb2, 0x7e, 0x06, 0xb2, 0xb2, 0x4a, 0xb1, 0xe5, 0xe1, - 0x09, 0x50, 0x24, 0xed, 0x26, 0xa9, 0x90, 0xe5, 0x61, 0x32, 0x3f, 0x4a, 0x86, 0x67, 0x20, 0x21, - 0x38, 0x79, 0xe5, 0xd6, 0x65, 0xe1, 0x64, 0xf4, 0x2d, 0x58, 0xa4, 0x3b, 0xa4, 0x5a, 0x52, 0xdb, - 0xd8, 0xd3, 0xa8, 0x05, 0xee, 0x51, 0xd8, 0xdb, 0xc3, 0x36, 0xd2, 0x27, 0x9c, 0x4e, 0x59, 0xa0, - 0x5d, 0x25, 0xbf, 0xdd, 0xc7, 0x92, 0xfb, 0x58, 0x5f, 0x1b, 0x0b, 0x4b, 0xf6, 0xdb, 0x85, 0x1f, - 0xa6, 0x60, 0x96, 0xf9, 0xe4, 0x25, 0xbc, 0xef, 0x7f, 0x6f, 0x92, 0x77, 0x60, 0x21, 0x48, 0x33, - 0xbb, 0x5a, 0xab, 0x83, 0xf9, 0x54, 0xdf, 0x19, 0xa6, 0xf8, 0x31, 0x21, 0xa2, 0x53, 0x31, 0xcf, - 0x67, 0x96, 0xf6, 0x84, 0x80, 0x64, 0x0e, 0x74, 0x6b, 0x4c, 0x20, 0x99, 0x01, 0xfd, 0x1f, 0x9d, - 0xd8, 0xcd, 0x39, 0xc8, 0xd1, 0xd9, 0xe8, 0x1a, 0xf8, 0x54, 0xfa, 0xc7, 0x74, 0x68, 0x7f, 0xa1, - 0xf1, 0xf0, 0xdd, 0xc1, 0x78, 0xf8, 0x30, 0xf1, 0x71, 0x65, 0x58, 0x50, 0xdc, 0x1f, 0x08, 0x8a, - 0xaf, 0x8d, 0x87, 0x78, 0x2e, 0x32, 0xfe, 0xa5, 0xd8, 0x8f, 0x8c, 0xbb, 0x00, 0x54, 0x1b, 0x1a, - 0x56, 0x46, 0x9e, 0x6f, 0x06, 0xf1, 0x15, 0x6a, 0x0a, 0x76, 0xd8, 0x0b, 0x87, 0x09, 0x71, 0xba, - 0x61, 0x22, 0x75, 0xf9, 0x30, 0xf1, 0x36, 0x64, 0xa8, 0x9e, 0x63, 0x07, 0xdc, 0x59, 0xc2, 0x76, - 0xd4, 0x2b, 0x28, 0xc1, 0x72, 0x9e, 0x9a, 0xc9, 0x36, 0xaf, 0xc1, 0xd5, 0x3e, 0x12, 0x73, 0xa8, - 0x4f, 0x04, 0x98, 0x3b, 0x8a, 0xe4, 0xaa, 0x19, 0xbe, 0x0a, 0xf8, 0x48, 0xb7, 0x86, 0x39, 0xec, - 0x06, 0xf9, 0x41, 0x04, 0x66, 0xbe, 0xdf, 0xe7, 0x94, 0xf9, 0x74, 0x24, 0xe4, 0x94, 0xa5, 0x5f, - 0x81, 0xa5, 0x8a, 0xe1, 0xe0, 0xba, 0x87, 0xf5, 0xb0, 0x28, 0x0f, 0x61, 0xc6, 0xf5, 0x34, 0xc7, - 0x4b, 0x2a, 0x08, 0xa3, 0x46, 0x25, 0x48, 0x61, 0x53, 0x4f, 0x2a, 0x03, 0xa1, 0x95, 0x3e, 0x4b, - 0xc3, 0x52, 0x4c, 0xe4, 0x42, 0x0f, 0x21, 0xc3, 0x13, 0x77, 0x2e, 0xc3, 0xc5, 0xc9, 0xf7, 0x2c, - 0x4b, 0xdb, 0xfb, 0x6c, 0x72, 0xa2, 0x6c, 0x9f, 0xb1, 0xc9, 0xe8, 0x0d, 0xc8, 0xb6, 0xb4, 0x76, - 0x4d, 0x27, 0xc3, 0x25, 0xca, 0xf5, 0x19, 0x75, 0x29, 0xc4, 0x28, 0x73, 0x67, 0x4b, 0xc4, 0x28, - 0xa3, 0xb7, 0x00, 0x3a, 0x66, 0xc3, 0x68, 0xb5, 0xb0, 0xae, 0x96, 0x78, 0x7e, 0x7f, 0x31, 0x6b, - 0xce, 0xa7, 0x2f, 0x45, 0x98, 0x65, 0x7e, 0xea, 0x4e, 0xc8, 0x2c, 0xa3, 0x1b, 0x30, 0xdb, 0xc4, - 0xc6, 0x49, 0xd3, 0xe3, 0x65, 0x11, 0xde, 0x3a, 0x77, 0xf4, 0xca, 0x5e, 0xf2, 0xe8, 0xf5, 0x3a, - 0x5c, 0x67, 0x59, 0x2b, 0xf5, 0x0d, 0x02, 0xcb, 0x87, 0xcd, 0x91, 0x61, 0x37, 0xc5, 0x15, 0x41, - 0x59, 0xa2, 0x04, 0x87, 0xfc, 0xfb, 0x2e, 0x93, 0xa3, 0x08, 0x4b, 0x6e, 0xdd, 0x53, 0xfd, 0x9c, - 0x5a, 0xb5, 0x1d, 0xdc, 0x30, 0x7a, 0x2b, 0x40, 0x85, 0xbd, 0xe6, 0xd6, 0xbd, 0x2a, 0xff, 0x52, - 0xa5, 0x1f, 0xa4, 0x3f, 0x13, 0xe0, 0x2a, 0x17, 0x62, 0xbb, 0x63, 0xd2, 0xb5, 0x8c, 0xde, 0x85, - 0x5c, 0x20, 0x28, 0xf7, 0x9f, 0x04, 0xfb, 0xa7, 0x83, 0x07, 0x70, 0x94, 0x3e, 0x0a, 0x7a, 0x1b, - 0xd2, 0xd4, 0x2c, 0xe2, 0xf8, 0x66, 0xa1, 0x8c, 0x64, 0xa9, 0xc5, 0x0c, 0x81, 0x16, 0x59, 0xad, - 0x88, 0x08, 0x99, 0x67, 0x65, 0xa0, 0x57, 0x40, 0xb0, 0x13, 0x79, 0xaf, 0x60, 0x13, 0xda, 0x67, - 0x89, 0x3c, 0x56, 0x78, 0x26, 0x35, 0x20, 0xab, 0x60, 0x17, 0x3b, 0x5d, 0xec, 0xa2, 0x9f, 0x05, - 0xd1, 0x49, 0xb6, 0xb2, 0x44, 0xa7, 0x44, 0xa9, 0x93, 0x2d, 0x28, 0xd1, 0x91, 0xa5, 0xdf, 0x17, - 0x21, 0xeb, 0xcf, 0x11, 0xda, 0x80, 0x94, 0xdd, 0x34, 0xf8, 0x48, 0x6b, 0x09, 0xad, 0x16, 0xd8, - 0x9f, 0xf0, 0x92, 0x83, 0xac, 0x69, 0x99, 0x75, 0xcc, 0x0f, 0x92, 0xac, 0x81, 0xca, 0x34, 0x44, - 0x79, 0x38, 0x69, 0x92, 0xee, 0x4b, 0x44, 0xcb, 0x16, 0x0a, 0xe3, 0x45, 0x15, 0xc8, 0x3a, 0xdc, - 0x24, 0x49, 0xab, 0xa0, 0xbe, 0x09, 0x95, 0x80, 0x13, 0x49, 0xe4, 0xb8, 0x6e, 0xb9, 0x58, 0xb5, - 0x4c, 0x95, 0xac, 0x32, 0xba, 0x9c, 0xb3, 0xca, 0x1c, 0xed, 0x3c, 0x30, 0xb7, 0x8d, 0x56, 0x4b, - 0x2a, 0x03, 0xf8, 0x12, 0xec, 0xe9, 0xf1, 0xb5, 0x5d, 0x74, 0x0b, 0xe6, 0xb4, 0x96, 0xa7, 0xd6, - 0x70, 0xbd, 0xf9, 0x40, 0x6e, 0x53, 0x75, 0x73, 0x0a, 0x68, 0x2d, 0x6f, 0x93, 0xf5, 0x48, 0x7f, - 0x2b, 0x42, 0x3e, 0xa2, 0x07, 0x7a, 0xcf, 0xb7, 0x02, 0x01, 0x5a, 0x90, 0xdf, 0x1e, 0xcb, 0x0a, - 0xd1, 0xd6, 0x96, 0xd9, 0x69, 0xfb, 0x76, 0x29, 0x40, 0xd6, 0xc5, 0xcf, 0x3a, 0xd8, 0xb7, 0x7a, - 0x5a, 0x09, 0xda, 0xd2, 0xf7, 0x04, 0xb8, 0x76, 0x8e, 0x11, 0xdd, 0x85, 0x5b, 0xd5, 0x83, 0xc3, - 0xbd, 0xa3, 0xbd, 0x83, 0x7d, 0xf5, 0xf0, 0x68, 0xe3, 0x68, 0x4b, 0xdd, 0xda, 0x7f, 0xef, 0x89, - 0xfa, 0xde, 0xfe, 0x61, 0x75, 0xab, 0xbc, 0xb7, 0xbd, 0xb7, 0x55, 0x59, 0xbc, 0x82, 0x56, 0xa1, - 0x10, 0x47, 0x74, 0x50, 0xdd, 0xda, 0xdf, 0xaa, 0x2c, 0x0a, 0xc3, 0xbe, 0x97, 0x1f, 0x1f, 0x1c, - 0x6e, 0x55, 0x16, 0x45, 0x74, 0x07, 0x6e, 0xc6, 0x7d, 0x7f, 0x7f, 0xef, 0x68, 0xb7, 0xa2, 0x6c, - 0xbc, 0xbf, 0xbf, 0x98, 0x42, 0x77, 0xe1, 0xcb, 0xf1, 0x10, 0x1b, 0x7b, 0x4f, 0xb6, 0x2a, 0x8b, - 0xe9, 0x82, 0x98, 0x15, 0xa4, 0x4f, 0x05, 0x98, 0x79, 0x6c, 0xef, 0x37, 0x3c, 0xf4, 0x0e, 0xcc, - 0x05, 0x81, 0xc6, 0xd0, 0xb9, 0x9b, 0xbe, 0x92, 0xd4, 0x8a, 0x7b, 0xba, 0x02, 0x76, 0x7f, 0x56, - 0x03, 0x97, 0x14, 0x27, 0x77, 0x49, 0xe9, 0x08, 0xe6, 0xfd, 0xfe, 0x03, 0x1b, 0x9b, 0xc4, 0x45, - 0x83, 0x72, 0x83, 0x90, 0xcc, 0x45, 0x7d, 0xfe, 0x7e, 0x61, 0x42, 0x7a, 0xda, 0x77, 0x9c, 0x32, - 0xf1, 0xca, 0xa9, 0x2a, 0x2e, 0xfd, 0x48, 0x80, 0x45, 0xff, 0xd3, 0xfb, 0x86, 0xd7, 0xd4, 0x1d, - 0xed, 0x74, 0xba, 0xa6, 0xfd, 0x10, 0x96, 0xfc, 0xe5, 0x16, 0x2e, 0xa3, 0x8a, 0xe3, 0x96, 0x51, - 0x91, 0x8f, 0x12, 0xaa, 0xa5, 0x86, 0x9d, 0x3d, 0x35, 0xe0, 0xec, 0x7f, 0x25, 0xc0, 0x52, 0x60, - 0x4e, 0x7c, 0xaa, 0x39, 0x3a, 0xcb, 0x80, 0xa7, 0xaa, 0xdc, 0x07, 0x80, 0x1c, 0x8a, 0x7d, 0x39, - 0xdd, 0xae, 0x71, 0x90, 0x7e, 0x97, 0xf4, 0x6d, 0x5e, 0x13, 0xdb, 0xea, 0xe1, 0x7a, 0x87, 0xc6, - 0xe3, 0x77, 0x60, 0xd6, 0x73, 0xb4, 0x3a, 0x76, 0x57, 0x84, 0xdb, 0xa9, 0x24, 0xdb, 0x62, 0x84, - 0x9d, 0x04, 0xe8, 0x3a, 0x56, 0x38, 0x04, 0x7a, 0x40, 0xc2, 0x98, 0xdd, 0xf1, 0x65, 0xbd, 0x79, - 0xe1, 0xb9, 0x4f, 0x61, 0xb4, 0xe8, 0x21, 0xcc, 0xb2, 0x4c, 0x9d, 0x47, 0xee, 0x11, 0x5c, 0x9c, - 0xb8, 0xf0, 0x08, 0x66, 0xe8, 0xe0, 0x64, 0x50, 0x76, 0xd8, 0x64, 0x0a, 0x8c, 0x1a, 0x94, 0xd2, - 0x4a, 0x9f, 0x89, 0xb0, 0x3c, 0xe8, 0xa1, 0xb4, 0x46, 0x18, 0xde, 0x01, 0x84, 0x89, 0x77, 0x80, - 0x01, 0x77, 0x10, 0x2f, 0xe5, 0x0e, 0x7e, 0xa6, 0x91, 0x9a, 0x30, 0xd3, 0x88, 0x38, 0x74, 0x3a, - 0xea, 0xd0, 0xe8, 0x0d, 0xc8, 0x70, 0x37, 0x59, 0x99, 0x49, 0x62, 0x3f, 0x9f, 0x5a, 0x52, 0xe1, - 0xa5, 0x98, 0x85, 0x30, 0x3d, 0x1b, 0x4a, 0xbf, 0x26, 0x40, 0x21, 0xae, 0x86, 0x41, 0x24, 0x77, - 0xbd, 0x50, 0xda, 0x2a, 0x5e, 0x98, 0xb6, 0xa6, 0x2e, 0x97, 0xb6, 0x4a, 0x0d, 0xf8, 0x72, 0xac, - 0x14, 0xae, 0x6d, 0x99, 0x2e, 0x46, 0x3b, 0x90, 0xa6, 0x25, 0x05, 0x61, 0xf2, 0xa2, 0x0c, 0x05, - 0x90, 0xbe, 0x2d, 0xc0, 0x72, 0x64, 0x6d, 0x8d, 0x52, 0xf4, 0x38, 0x56, 0xd1, 0x91, 0x12, 0xc4, - 0x1c, 0xef, 0xa2, 0x0a, 0xb7, 0xe1, 0xfa, 0x80, 0x1c, 0x5c, 0x55, 0xbf, 0x1e, 0x8a, 0xfd, 0x2f, - 0xe3, 0x94, 0xcf, 0xfb, 0x70, 0xb4, 0x1e, 0x1a, 0x34, 0xa5, 0x57, 0x61, 0x69, 0xc3, 0xa9, 0x25, - 0xd5, 0x9a, 0x78, 0xc5, 0x72, 0x94, 0xfe, 0x79, 0x4a, 0x37, 0x54, 0x8c, 0xbf, 0x10, 0x06, 0xac, - 0xe4, 0xfa, 0x82, 0xdf, 0x81, 0x79, 0x7a, 0xc0, 0x51, 0x23, 0x7c, 0x73, 0xb4, 0x8f, 0x9f, 0x68, - 0x6e, 0x02, 0x60, 0x53, 0xf7, 0x09, 0xd8, 0x16, 0x93, 0xc3, 0xa6, 0xbe, 0x1b, 0x3f, 0xb1, 0xe9, - 0x29, 0x4d, 0xec, 0xbf, 0x0a, 0x70, 0x63, 0x50, 0xe6, 0x9f, 0x84, 0xf1, 0x9e, 0x9b, 0xe7, 0x7e, - 0x10, 0x75, 0x8d, 0xe9, 0x4d, 0x89, 0xf4, 0xeb, 0x02, 0x5c, 0x1f, 0x80, 0xfe, 0x89, 0xb8, 0xdd, - 0x26, 0x7c, 0xe9, 0xb1, 0xf1, 0xac, 0x63, 0xe8, 0x86, 0x77, 0xe6, 0x47, 0xdf, 0x40, 0xcd, 0xaf, - 0xc2, 0x82, 0x61, 0xd6, 0x5b, 0x1d, 0x1d, 0xab, 0xf4, 0xa4, 0xa1, 0x53, 0xcf, 0xc9, 0x2a, 0x79, - 0xde, 0x4b, 0x13, 0x3d, 0x5d, 0xfa, 0x10, 0x0a, 0x71, 0x18, 0x5c, 0x9f, 0x47, 0x91, 0x78, 0x96, - 0x3c, 0xb5, 0x64, 0x41, 0xec, 0x63, 0x78, 0xf9, 0x1c, 0xf6, 0xe6, 0xd9, 0x9e, 0xee, 0x8b, 0x38, - 0xcd, 0x7d, 0x51, 0xfa, 0x79, 0xb8, 0x39, 0x64, 0xb0, 0xa9, 0xe8, 0xd2, 0x8a, 0x81, 0x77, 0x2f, - 0x54, 0x26, 0x75, 0x09, 0x65, 0x3e, 0x82, 0xd5, 0x61, 0xa3, 0x4d, 0x45, 0x9b, 0xef, 0x08, 0x70, - 0x3b, 0x6e, 0x80, 0xaa, 0x63, 0xd4, 0xb1, 0xaf, 0xd1, 0xe0, 0xc2, 0x14, 0xa7, 0xb3, 0x30, 0xc9, - 0xf1, 0xb6, 0x65, 0xb4, 0x0d, 0x8f, 0x1e, 0x84, 0xd3, 0x0a, 0x6b, 0x48, 0x7f, 0x22, 0xc0, 0x9d, - 0x0b, 0x44, 0x9a, 0x86, 0xda, 0x68, 0x1d, 0xc4, 0x89, 0xfc, 0x4c, 0x34, 0x74, 0x49, 0x85, 0xfc, - 0xa1, 0xed, 0x60, 0x2d, 0x98, 0xf0, 0xfd, 0x58, 0xf3, 0x4c, 0x9e, 0x5a, 0xfc, 0x9d, 0x08, 0x0b, - 0xfe, 0x08, 0x5c, 0xdb, 0x0f, 0x60, 0xb9, 0x86, 0x5d, 0x4f, 0x2d, 0xa9, 0x9e, 0xa5, 0xca, 0xea, - 0xc4, 0x27, 0xbd, 0x45, 0x82, 0x52, 0x3a, 0xb2, 0xe4, 0xa0, 0xf0, 0xe2, 0x23, 0xcb, 0x04, 0xb9, - 0xa4, 0x46, 0xae, 0xac, 0xc7, 0x46, 0x96, 0x8f, 0xac, 0x52, 0x80, 0xfc, 0x36, 0xdc, 0xd4, 0x6c, - 0xdb, 0xb1, 0x7a, 0x2a, 0x6e, 0x34, 0x70, 0xdd, 0x33, 0xba, 0x58, 0xb5, 0xc9, 0x1c, 0x72, 0x2d, - 0x68, 0x38, 0x15, 0x94, 0x15, 0x46, 0xb4, 0xe5, 0xd3, 0xd0, 0x69, 0x26, 0x22, 0x5e, 0x00, 0xc0, - 0x84, 0xa5, 0x71, 0x6c, 0x08, 0x00, 0x91, 0x44, 0xfa, 0x61, 0x0a, 0x96, 0x0f, 0x8d, 0x76, 0xa7, - 0xa5, 0x79, 0xb4, 0x9e, 0x16, 0x38, 0x74, 0x70, 0x20, 0x11, 0xc6, 0x38, 0x90, 0xbc, 0x11, 0x1c, - 0x48, 0x92, 0x16, 0xcf, 0x19, 0x39, 0x3a, 0x86, 0x8c, 0x63, 0x75, 0x3c, 0xc3, 0x3c, 0xe1, 0x5b, - 0xda, 0xa3, 0x91, 0x9b, 0x40, 0x8c, 0xd0, 0x45, 0x85, 0x61, 0x28, 0x3e, 0x58, 0xe1, 0xbf, 0x05, - 0xc8, 0xf0, 0x4e, 0xf4, 0x0b, 0x90, 0xd1, 0x71, 0x43, 0xeb, 0xb4, 0x7c, 0x9d, 0x2a, 0x97, 0x19, - 0xa3, 0x58, 0x61, 0x58, 0xbb, 0x57, 0x14, 0x1f, 0x16, 0x9d, 0x00, 0xb8, 0x86, 0x79, 0xd2, 0xc2, - 0x6a, 0xd3, 0xf2, 0xeb, 0x8e, 0xdb, 0x97, 0x1a, 0xe4, 0x90, 0xc2, 0xed, 0x5a, 0xf6, 0xee, 0x15, - 0x25, 0xe7, 0xfa, 0x8d, 0xc2, 0x1c, 0xe4, 0x82, 0x2f, 0x85, 0x1c, 0x64, 0xb8, 0x2c, 0x9b, 0x39, - 0xc8, 0xb8, 0xd8, 0x23, 0x9c, 0xd2, 0xa7, 0x24, 0xcd, 0x8a, 0x42, 0xf3, 0x85, 0xb2, 0x15, 0x4c, - 0xd2, 0x44, 0xfb, 0xad, 0x3f, 0x65, 0x5f, 0x87, 0xac, 0x5f, 0x09, 0x4f, 0x76, 0x68, 0x0d, 0xc8, - 0xa5, 0x3f, 0x15, 0x21, 0xb7, 0xd5, 0xc5, 0xa6, 0x47, 0x9f, 0x5f, 0xbe, 0x18, 0xcf, 0xd2, 0xf8, - 0x9d, 0xd4, 0xc4, 0x4f, 0x02, 0x69, 0x2e, 0x14, 0xaa, 0x37, 0xfc, 0x8b, 0x08, 0x0b, 0x81, 0x8d, - 0x58, 0xa5, 0x64, 0xda, 0x86, 0x1a, 0xf2, 0x48, 0x52, 0x7c, 0x5e, 0x8f, 0x24, 0x53, 0x97, 0x7e, - 0x24, 0x19, 0x79, 0x56, 0x9a, 0x9e, 0xfc, 0x59, 0xa9, 0xf4, 0x0f, 0x22, 0x5c, 0xa3, 0xd6, 0x8d, - 0x14, 0x08, 0xa7, 0x5a, 0x8a, 0x9a, 0xf2, 0x96, 0x87, 0xde, 0x02, 0x08, 0xea, 0x76, 0xc9, 0xae, - 0xd6, 0x72, 0x3e, 0x7d, 0x29, 0xc2, 0x9c, 0xec, 0x7a, 0x2d, 0x60, 0x96, 0xd1, 0x2d, 0xf0, 0x05, - 0xa1, 0xef, 0xf0, 0x66, 0xe8, 0xfd, 0x0a, 0xf0, 0xae, 0x6d, 0x8c, 0x25, 0x0d, 0x50, 0xc4, 0x98, - 0xcf, 0xa1, 0x2e, 0xda, 0x80, 0x97, 0xe8, 0x10, 0xef, 0x76, 0x70, 0x07, 0x3f, 0xc7, 0x71, 0xbe, - 0x2f, 0xc2, 0xf5, 0x88, 0x2e, 0xcf, 0xa7, 0x08, 0xfb, 0xe2, 0x38, 0x47, 0xb8, 0x42, 0x36, 0x33, - 0x50, 0xf2, 0xfd, 0xad, 0x34, 0xdc, 0x88, 0x18, 0x33, 0x5c, 0x3c, 0xfd, 0x7f, 0x6b, 0xc6, 0x58, - 0xb3, 0x02, 0x57, 0x6d, 0x07, 0x77, 0xd5, 0xd0, 0xf0, 0x49, 0x2e, 0xb4, 0xf3, 0x84, 0x49, 0x09, - 0x44, 0x38, 0x87, 0x92, 0xec, 0x66, 0x3b, 0x82, 0x22, 0xa3, 0x27, 0x90, 0xa9, 0x5b, 0xec, 0xf5, - 0x5e, 0x66, 0xf2, 0xd3, 0x8c, 0x8f, 0x21, 0x7d, 0xcf, 0xdf, 0xd0, 0x82, 0x42, 0xde, 0x05, 0x0f, - 0xb5, 0x84, 0x29, 0x3f, 0xd4, 0xd2, 0xe0, 0x46, 0xb4, 0xd6, 0xa0, 0x96, 0xd4, 0x86, 0xe5, 0x04, - 0x6f, 0x1b, 0xc6, 0xcc, 0x81, 0x50, 0xa4, 0xe6, 0x50, 0xda, 0xb6, 0x1c, 0x39, 0x66, 0x08, 0x99, - 0x0e, 0x51, 0x1a, 0xe7, 0xed, 0xe3, 0xb0, 0x21, 0xe4, 0x6d, 0xcb, 0x29, 0x49, 0x9f, 0x08, 0x7c, - 0xd7, 0x0a, 0x17, 0x54, 0x42, 0x15, 0x0f, 0x21, 0x52, 0x2b, 0x3a, 0x5f, 0x5f, 0x11, 0xa7, 0x50, - 0x74, 0xfc, 0x77, 0x01, 0x56, 0xa9, 0x0c, 0x34, 0xa9, 0x2b, 0x1b, 0x4e, 0xbd, 0x63, 0x78, 0x9b, - 0x0e, 0xd6, 0x3e, 0xc6, 0x4e, 0xd9, 0xc1, 0xba, 0xe1, 0xa1, 0x75, 0xc8, 0xb2, 0x37, 0x34, 0xc1, - 0xc2, 0x1e, 0x79, 0x0e, 0x60, 0x8f, 0x6e, 0xf6, 0x74, 0xb4, 0x03, 0x8b, 0xc4, 0x0b, 0x0d, 0xab, - 0xe3, 0xaa, 0x35, 0x76, 0x2f, 0x93, 0x28, 0x87, 0xbb, 0xea, 0x73, 0xf1, 0xcb, 0x1c, 0xf4, 0x0d, - 0x98, 0x33, 0xf1, 0x69, 0x80, 0x91, 0x64, 0x11, 0x83, 0x89, 0x4f, 0x39, 0xbb, 0xf4, 0x85, 0x00, - 0x37, 0x87, 0xa9, 0x59, 0xc1, 0xb5, 0x17, 0x44, 0xcb, 0x1f, 0x0b, 0x90, 0xaf, 0xe0, 0x5e, 0x55, - 0x73, 0xb4, 0x36, 0xf6, 0xb0, 0xe3, 0xa2, 0x9b, 0x00, 0x86, 0xab, 0x62, 0x53, 0xab, 0x91, 0xbc, - 0x5e, 0xa0, 0x55, 0xb0, 0x9c, 0xe1, 0x6e, 0xb1, 0x0e, 0xf4, 0x2d, 0x58, 0x6c, 0x18, 0x3d, 0xac, - 0xab, 0x75, 0xcd, 0xd4, 0x0d, 0x5d, 0xf3, 0xb0, 0xcb, 0xab, 0x37, 0x23, 0x95, 0xbf, 0x4a, 0x19, - 0xcb, 0x01, 0x1f, 0xfa, 0x12, 0x64, 0xdb, 0x5a, 0x8f, 0x1c, 0x95, 0x5c, 0x2a, 0x78, 0x5e, 0xc9, - 0xb4, 0xb5, 0xde, 0xae, 0x65, 0xbb, 0xe8, 0x01, 0xdc, 0x20, 0x9f, 0xfc, 0x10, 0xef, 0xaa, 0x36, - 0x76, 0xfa, 0x15, 0xdd, 0xbc, 0xb2, 0xd4, 0xd6, 0x7a, 0x41, 0xd9, 0xa3, 0x8a, 0x1d, 0x1a, 0xb5, - 0xef, 0xc3, 0x32, 0x61, 0xea, 0xaf, 0xbf, 0x5a, 0x47, 0x3f, 0xc1, 0x1e, 0xcf, 0x57, 0x50, 0x5b, - 0xeb, 0x05, 0x5e, 0xbc, 0x49, 0xbf, 0x48, 0x1f, 0xc1, 0xc2, 0x0e, 0x36, 0xb1, 0x6b, 0xb8, 0x65, - 0x12, 0xa4, 0x4c, 0x0f, 0x3d, 0x06, 0xd0, 0x71, 0x4f, 0xb5, 0x89, 0x41, 0xdc, 0xa4, 0xe7, 0xa3, - 0x88, 0x05, 0x95, 0x9c, 0xce, 0x9b, 0xae, 0xf4, 0x99, 0x00, 0x57, 0x89, 0xc2, 0x2d, 0xec, 0x7a, - 0x46, 0xfd, 0x63, 0x1a, 0x89, 0x86, 0xad, 0x56, 0x04, 0x69, 0xcb, 0xc6, 0x6c, 0x8d, 0x0a, 0x0a, - 0xfd, 0x8d, 0x96, 0x61, 0x86, 0x96, 0x23, 0x79, 0x19, 0x80, 0x35, 0x08, 0x65, 0xd3, 0x38, 0x69, - 0xf2, 0xa3, 0x3d, 0xfd, 0x8d, 0x16, 0x21, 0xd5, 0xb2, 0x4e, 0xa9, 0xaa, 0x82, 0x42, 0x7e, 0xa2, - 0xbb, 0x90, 0xd7, 0x69, 0x38, 0x56, 0xbb, 0x56, 0xab, 0xd3, 0xc6, 0x74, 0x07, 0x10, 0x94, 0x79, - 0xd6, 0x79, 0x4c, 0xfb, 0x48, 0x66, 0xc7, 0x5e, 0x65, 0x32, 0x92, 0x0c, 0x25, 0xa1, 0xef, 0xf4, - 0x18, 0x81, 0xf4, 0xc7, 0x02, 0xdc, 0x18, 0xd0, 0xc0, 0x2f, 0x10, 0xec, 0xf0, 0xbb, 0x35, 0x61, - 0xf2, 0xbd, 0x81, 0xdd, 0xb1, 0x05, 0x25, 0x2e, 0x31, 0x54, 0xe2, 0x3a, 0x57, 0x79, 0x4e, 0x9d, - 0xab, 0x3c, 0x4b, 0x1f, 0xc1, 0x4b, 0xe7, 0x64, 0xe3, 0x67, 0xdc, 0x72, 0x50, 0xfa, 0x4a, 0x25, - 0x79, 0x2c, 0x33, 0x08, 0xc3, 0x0a, 0x7f, 0x27, 0xf0, 0xf2, 0xc0, 0x87, 0x43, 0xcf, 0xc1, 0x5a, - 0x7b, 0xda, 0x16, 0x90, 0x74, 0xb8, 0x39, 0x64, 0xa0, 0x73, 0xea, 0x08, 0x13, 0xab, 0x23, 0xff, - 0x76, 0x1e, 0xe6, 0xdf, 0xed, 0x60, 0xe7, 0xec, 0x10, 0x3b, 0x5d, 0xa3, 0x8e, 0xd1, 0xef, 0x0a, - 0xf1, 0x0f, 0x06, 0xd7, 0x27, 0xd9, 0x76, 0x99, 0x4d, 0x0a, 0x6f, 0x4d, 0xc4, 0xcb, 0xd5, 0xfc, - 0xc5, 0xc1, 0x2b, 0xf6, 0xd7, 0xc6, 0xdb, 0xaa, 0xb8, 0x0c, 0x0f, 0xc7, 0xe4, 0xe2, 0xa3, 0x9f, - 0xc1, 0x7c, 0x64, 0x5f, 0x1d, 0x39, 0xa1, 0x31, 0x97, 0x6f, 0x85, 0xd7, 0xc6, 0x63, 0xe2, 0x43, - 0x7f, 0x22, 0xc0, 0x42, 0xf4, 0x7e, 0x09, 0x8d, 0xa7, 0x84, 0x7f, 0x93, 0x51, 0x78, 0x7d, 0x5c, - 0x36, 0x26, 0xc1, 0x7d, 0x01, 0xfd, 0x32, 0xe4, 0x23, 0xf7, 0x34, 0x68, 0x2c, 0x55, 0xdc, 0xc4, - 0xc6, 0x8f, 0xbd, 0x0c, 0xba, 0x2f, 0xa0, 0xdf, 0x11, 0x00, 0x9d, 0xaf, 0x69, 0xa3, 0xaf, 0x8f, - 0xc2, 0x1b, 0x7a, 0xab, 0x53, 0x58, 0x9f, 0x84, 0x35, 0x90, 0xe7, 0x0f, 0x04, 0xb8, 0x1e, 0x7b, - 0x49, 0x82, 0x1e, 0x8d, 0x8d, 0x1b, 0xba, 0xfb, 0x28, 0x7c, 0x63, 0x42, 0x6e, 0xee, 0x2a, 0x9f, - 0x0a, 0x70, 0x23, 0xfe, 0xba, 0x03, 0x8d, 0x8f, 0x1c, 0xbe, 0x94, 0x29, 0xfc, 0xdc, 0xa4, 0xec, - 0x81, 0xc9, 0xbe, 0x2b, 0xc4, 0x5d, 0xb2, 0xf1, 0x6b, 0x09, 0xf4, 0xcd, 0x49, 0xf0, 0xc3, 0x97, - 0x2c, 0x85, 0x8d, 0x4b, 0x20, 0x04, 0x42, 0x9e, 0xc0, 0x2c, 0xbb, 0x39, 0x40, 0xa3, 0x13, 0xe1, - 0xf0, 0x1d, 0x46, 0xa1, 0x98, 0x94, 0x9c, 0xcf, 0xd4, 0xaf, 0xc6, 0xec, 0xfe, 0xaf, 0x8f, 0x1b, - 0xba, 0xf9, 0xd8, 0x6f, 0x8c, 0xcd, 0xc7, 0x85, 0xf8, 0x43, 0x01, 0xae, 0xc7, 0xee, 0x2d, 0xa3, - 0xbd, 0xf8, 0xa2, 0xbd, 0x6f, 0xb4, 0x17, 0x5f, 0xb8, 0xa1, 0xdd, 0x17, 0xe4, 0xdf, 0x13, 0xe0, - 0x1a, 0xaf, 0x4f, 0x1b, 0x96, 0xe9, 0x6f, 0x49, 0x64, 0x07, 0x08, 0x17, 0xad, 0x13, 0xec, 0x00, - 0x31, 0xe5, 0xf3, 0x04, 0x3b, 0x40, 0x5c, 0x65, 0x7c, 0xf3, 0x6f, 0xc4, 0xbf, 0xff, 0x7c, 0x55, - 0xf8, 0xc1, 0xe7, 0xab, 0xc2, 0xbf, 0x7d, 0xbe, 0x2a, 0x7c, 0xe7, 0x8b, 0xd5, 0x2b, 0x3f, 0xf8, - 0x62, 0xf5, 0xca, 0x3f, 0x7f, 0xb1, 0x7a, 0x05, 0xa4, 0xba, 0xd5, 0x1e, 0x01, 0xba, 0x99, 0x25, - 0x89, 0xa0, 0x63, 0x79, 0x56, 0x55, 0xf8, 0xf0, 0xe9, 0x89, 0xe1, 0x35, 0x3b, 0x35, 0x42, 0xb4, - 0xe6, 0x7a, 0x8e, 0x66, 0x9e, 0xe0, 0x96, 0xd5, 0xc5, 0xaf, 0x92, 0x23, 0x45, 0xc7, 0xc1, 0xee, - 0x9a, 0x61, 0x7a, 0xd8, 0xa9, 0x37, 0xe9, 0xbf, 0x6d, 0x73, 0xbd, 0xb5, 0xee, 0x9b, 0x6b, 0xb4, - 0xb1, 0x76, 0xf1, 0xff, 0x36, 0xf1, 0x96, 0x8e, 0x7b, 0xdd, 0xd2, 0x77, 0xc5, 0x74, 0xb5, 0x5c, - 0xae, 0xfc, 0xb9, 0xb8, 0x5a, 0xf5, 0x25, 0x2a, 0x13, 0x89, 0xca, 0x81, 0x44, 0x15, 0xdc, 0x2b, - 0x1e, 0x97, 0xbe, 0xdf, 0x27, 0x78, 0x4a, 0x08, 0x9e, 0x06, 0x04, 0x4f, 0x2b, 0xb8, 0xf7, 0xf4, - 0xb8, 0xf4, 0xb9, 0xf8, 0xca, 0xc5, 0x04, 0x4f, 0x77, 0xaa, 0x9b, 0xfe, 0xbf, 0xe1, 0xf9, 0x4f, - 0x51, 0xf2, 0x89, 0xd7, 0xd7, 0x09, 0x35, 0xf9, 0x93, 0x93, 0xaf, 0xaf, 0x57, 0x70, 0x6f, 0x7d, - 0xfd, 0xb8, 0x54, 0x9b, 0xa5, 0xff, 0x57, 0xc3, 0x83, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x03, - 0x86, 0xe8, 0x7e, 0x37, 0x43, 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // Get the batch clearing prices for a specific block height and trading pair. - BatchSwapOutputData(ctx context.Context, in *BatchSwapOutputDataRequest, opts ...grpc.CallOption) (*BatchSwapOutputDataResponse, error) - // Get the precise swap execution used for a specific batch swap. - SwapExecution(ctx context.Context, in *SwapExecutionRequest, opts ...grpc.CallOption) (*SwapExecutionResponse, error) - // Get the precise execution used to perform on-chain arbitrage. - ArbExecution(ctx context.Context, in *ArbExecutionRequest, opts ...grpc.CallOption) (*ArbExecutionResponse, error) - // Stream all swap executions over a range of heights, optionally subscribing to future executions. - SwapExecutions(ctx context.Context, in *SwapExecutionsRequest, opts ...grpc.CallOption) (QueryService_SwapExecutionsClient, error) - // Stream all arbitrage executions over a range of heights, optionally subscribing to future executions. - ArbExecutions(ctx context.Context, in *ArbExecutionsRequest, opts ...grpc.CallOption) (QueryService_ArbExecutionsClient, error) - // Query all liquidity positions on the DEX. - LiquidityPositions(ctx context.Context, in *LiquidityPositionsRequest, opts ...grpc.CallOption) (QueryService_LiquidityPositionsClient, error) - // Query liquidity positions by ID. - // - // To get multiple positions, use `LiquidityPositionsById`. - LiquidityPositionById(ctx context.Context, in *LiquidityPositionByIdRequest, opts ...grpc.CallOption) (*LiquidityPositionByIdResponse, error) - // Query multiple liquidity positions by ID. - LiquidityPositionsById(ctx context.Context, in *LiquidityPositionsByIdRequest, opts ...grpc.CallOption) (QueryService_LiquidityPositionsByIdClient, error) - // Query liquidity positions on a specific pair, sorted by effective price. - LiquidityPositionsByPrice(ctx context.Context, in *LiquidityPositionsByPriceRequest, opts ...grpc.CallOption) (QueryService_LiquidityPositionsByPriceClient, error) - // Get the current (direct) spread on a trading pair. - // - // This method doesn't do simulation, so actually executing might result in a - // better price (if the chain takes a different route to the target asset). - Spread(ctx context.Context, in *SpreadRequest, opts ...grpc.CallOption) (*SpreadResponse, error) - // Get historical candlestick data for a given trading pair. - // - // Note that this RPC is directional, to get data for both directions, make a second request. - CandlestickData(ctx context.Context, in *CandlestickDataRequest, opts ...grpc.CallOption) (*CandlestickDataResponse, error) - // Subscribe to candlestick data updates. - CandlestickDataStream(ctx context.Context, in *CandlestickDataStreamRequest, opts ...grpc.CallOption) (QueryService_CandlestickDataStreamClient, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) BatchSwapOutputData(ctx context.Context, in *BatchSwapOutputDataRequest, opts ...grpc.CallOption) (*BatchSwapOutputDataResponse, error) { - out := new(BatchSwapOutputDataResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.dex.v1.QueryService/BatchSwapOutputData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) SwapExecution(ctx context.Context, in *SwapExecutionRequest, opts ...grpc.CallOption) (*SwapExecutionResponse, error) { - out := new(SwapExecutionResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.dex.v1.QueryService/SwapExecution", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) ArbExecution(ctx context.Context, in *ArbExecutionRequest, opts ...grpc.CallOption) (*ArbExecutionResponse, error) { - out := new(ArbExecutionResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.dex.v1.QueryService/ArbExecution", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) SwapExecutions(ctx context.Context, in *SwapExecutionsRequest, opts ...grpc.CallOption) (QueryService_SwapExecutionsClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/penumbra.core.component.dex.v1.QueryService/SwapExecutions", opts...) - if err != nil { - return nil, err - } - x := &queryServiceSwapExecutionsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_SwapExecutionsClient interface { - Recv() (*SwapExecutionsResponse, error) - grpc.ClientStream -} - -type queryServiceSwapExecutionsClient struct { - grpc.ClientStream -} - -func (x *queryServiceSwapExecutionsClient) Recv() (*SwapExecutionsResponse, error) { - m := new(SwapExecutionsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) ArbExecutions(ctx context.Context, in *ArbExecutionsRequest, opts ...grpc.CallOption) (QueryService_ArbExecutionsClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[1], "/penumbra.core.component.dex.v1.QueryService/ArbExecutions", opts...) - if err != nil { - return nil, err - } - x := &queryServiceArbExecutionsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_ArbExecutionsClient interface { - Recv() (*ArbExecutionsResponse, error) - grpc.ClientStream -} - -type queryServiceArbExecutionsClient struct { - grpc.ClientStream -} - -func (x *queryServiceArbExecutionsClient) Recv() (*ArbExecutionsResponse, error) { - m := new(ArbExecutionsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) LiquidityPositions(ctx context.Context, in *LiquidityPositionsRequest, opts ...grpc.CallOption) (QueryService_LiquidityPositionsClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[2], "/penumbra.core.component.dex.v1.QueryService/LiquidityPositions", opts...) - if err != nil { - return nil, err - } - x := &queryServiceLiquidityPositionsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_LiquidityPositionsClient interface { - Recv() (*LiquidityPositionsResponse, error) - grpc.ClientStream -} - -type queryServiceLiquidityPositionsClient struct { - grpc.ClientStream -} - -func (x *queryServiceLiquidityPositionsClient) Recv() (*LiquidityPositionsResponse, error) { - m := new(LiquidityPositionsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) LiquidityPositionById(ctx context.Context, in *LiquidityPositionByIdRequest, opts ...grpc.CallOption) (*LiquidityPositionByIdResponse, error) { - out := new(LiquidityPositionByIdResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.dex.v1.QueryService/LiquidityPositionById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) LiquidityPositionsById(ctx context.Context, in *LiquidityPositionsByIdRequest, opts ...grpc.CallOption) (QueryService_LiquidityPositionsByIdClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[3], "/penumbra.core.component.dex.v1.QueryService/LiquidityPositionsById", opts...) - if err != nil { - return nil, err - } - x := &queryServiceLiquidityPositionsByIdClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_LiquidityPositionsByIdClient interface { - Recv() (*LiquidityPositionsByIdResponse, error) - grpc.ClientStream -} - -type queryServiceLiquidityPositionsByIdClient struct { - grpc.ClientStream -} - -func (x *queryServiceLiquidityPositionsByIdClient) Recv() (*LiquidityPositionsByIdResponse, error) { - m := new(LiquidityPositionsByIdResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) LiquidityPositionsByPrice(ctx context.Context, in *LiquidityPositionsByPriceRequest, opts ...grpc.CallOption) (QueryService_LiquidityPositionsByPriceClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[4], "/penumbra.core.component.dex.v1.QueryService/LiquidityPositionsByPrice", opts...) - if err != nil { - return nil, err - } - x := &queryServiceLiquidityPositionsByPriceClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_LiquidityPositionsByPriceClient interface { - Recv() (*LiquidityPositionsByPriceResponse, error) - grpc.ClientStream -} - -type queryServiceLiquidityPositionsByPriceClient struct { - grpc.ClientStream -} - -func (x *queryServiceLiquidityPositionsByPriceClient) Recv() (*LiquidityPositionsByPriceResponse, error) { - m := new(LiquidityPositionsByPriceResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) Spread(ctx context.Context, in *SpreadRequest, opts ...grpc.CallOption) (*SpreadResponse, error) { - out := new(SpreadResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.dex.v1.QueryService/Spread", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) CandlestickData(ctx context.Context, in *CandlestickDataRequest, opts ...grpc.CallOption) (*CandlestickDataResponse, error) { - out := new(CandlestickDataResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.dex.v1.QueryService/CandlestickData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) CandlestickDataStream(ctx context.Context, in *CandlestickDataStreamRequest, opts ...grpc.CallOption) (QueryService_CandlestickDataStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[5], "/penumbra.core.component.dex.v1.QueryService/CandlestickDataStream", opts...) - if err != nil { - return nil, err - } - x := &queryServiceCandlestickDataStreamClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_CandlestickDataStreamClient interface { - Recv() (*CandlestickDataStreamResponse, error) - grpc.ClientStream -} - -type queryServiceCandlestickDataStreamClient struct { - grpc.ClientStream -} - -func (x *queryServiceCandlestickDataStreamClient) Recv() (*CandlestickDataStreamResponse, error) { - m := new(CandlestickDataStreamResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // Get the batch clearing prices for a specific block height and trading pair. - BatchSwapOutputData(context.Context, *BatchSwapOutputDataRequest) (*BatchSwapOutputDataResponse, error) - // Get the precise swap execution used for a specific batch swap. - SwapExecution(context.Context, *SwapExecutionRequest) (*SwapExecutionResponse, error) - // Get the precise execution used to perform on-chain arbitrage. - ArbExecution(context.Context, *ArbExecutionRequest) (*ArbExecutionResponse, error) - // Stream all swap executions over a range of heights, optionally subscribing to future executions. - SwapExecutions(*SwapExecutionsRequest, QueryService_SwapExecutionsServer) error - // Stream all arbitrage executions over a range of heights, optionally subscribing to future executions. - ArbExecutions(*ArbExecutionsRequest, QueryService_ArbExecutionsServer) error - // Query all liquidity positions on the DEX. - LiquidityPositions(*LiquidityPositionsRequest, QueryService_LiquidityPositionsServer) error - // Query liquidity positions by ID. - // - // To get multiple positions, use `LiquidityPositionsById`. - LiquidityPositionById(context.Context, *LiquidityPositionByIdRequest) (*LiquidityPositionByIdResponse, error) - // Query multiple liquidity positions by ID. - LiquidityPositionsById(*LiquidityPositionsByIdRequest, QueryService_LiquidityPositionsByIdServer) error - // Query liquidity positions on a specific pair, sorted by effective price. - LiquidityPositionsByPrice(*LiquidityPositionsByPriceRequest, QueryService_LiquidityPositionsByPriceServer) error - // Get the current (direct) spread on a trading pair. - // - // This method doesn't do simulation, so actually executing might result in a - // better price (if the chain takes a different route to the target asset). - Spread(context.Context, *SpreadRequest) (*SpreadResponse, error) - // Get historical candlestick data for a given trading pair. - // - // Note that this RPC is directional, to get data for both directions, make a second request. - CandlestickData(context.Context, *CandlestickDataRequest) (*CandlestickDataResponse, error) - // Subscribe to candlestick data updates. - CandlestickDataStream(*CandlestickDataStreamRequest, QueryService_CandlestickDataStreamServer) error -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) BatchSwapOutputData(ctx context.Context, req *BatchSwapOutputDataRequest) (*BatchSwapOutputDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BatchSwapOutputData not implemented") -} -func (*UnimplementedQueryServiceServer) SwapExecution(ctx context.Context, req *SwapExecutionRequest) (*SwapExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SwapExecution not implemented") -} -func (*UnimplementedQueryServiceServer) ArbExecution(ctx context.Context, req *ArbExecutionRequest) (*ArbExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ArbExecution not implemented") -} -func (*UnimplementedQueryServiceServer) SwapExecutions(req *SwapExecutionsRequest, srv QueryService_SwapExecutionsServer) error { - return status.Errorf(codes.Unimplemented, "method SwapExecutions not implemented") -} -func (*UnimplementedQueryServiceServer) ArbExecutions(req *ArbExecutionsRequest, srv QueryService_ArbExecutionsServer) error { - return status.Errorf(codes.Unimplemented, "method ArbExecutions not implemented") -} -func (*UnimplementedQueryServiceServer) LiquidityPositions(req *LiquidityPositionsRequest, srv QueryService_LiquidityPositionsServer) error { - return status.Errorf(codes.Unimplemented, "method LiquidityPositions not implemented") -} -func (*UnimplementedQueryServiceServer) LiquidityPositionById(ctx context.Context, req *LiquidityPositionByIdRequest) (*LiquidityPositionByIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LiquidityPositionById not implemented") -} -func (*UnimplementedQueryServiceServer) LiquidityPositionsById(req *LiquidityPositionsByIdRequest, srv QueryService_LiquidityPositionsByIdServer) error { - return status.Errorf(codes.Unimplemented, "method LiquidityPositionsById not implemented") -} -func (*UnimplementedQueryServiceServer) LiquidityPositionsByPrice(req *LiquidityPositionsByPriceRequest, srv QueryService_LiquidityPositionsByPriceServer) error { - return status.Errorf(codes.Unimplemented, "method LiquidityPositionsByPrice not implemented") -} -func (*UnimplementedQueryServiceServer) Spread(ctx context.Context, req *SpreadRequest) (*SpreadResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Spread not implemented") -} -func (*UnimplementedQueryServiceServer) CandlestickData(ctx context.Context, req *CandlestickDataRequest) (*CandlestickDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CandlestickData not implemented") -} -func (*UnimplementedQueryServiceServer) CandlestickDataStream(req *CandlestickDataStreamRequest, srv QueryService_CandlestickDataStreamServer) error { - return status.Errorf(codes.Unimplemented, "method CandlestickDataStream not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_BatchSwapOutputData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BatchSwapOutputDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).BatchSwapOutputData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.dex.v1.QueryService/BatchSwapOutputData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).BatchSwapOutputData(ctx, req.(*BatchSwapOutputDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_SwapExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SwapExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).SwapExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.dex.v1.QueryService/SwapExecution", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).SwapExecution(ctx, req.(*SwapExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_ArbExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArbExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).ArbExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.dex.v1.QueryService/ArbExecution", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).ArbExecution(ctx, req.(*ArbExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_SwapExecutions_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SwapExecutionsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).SwapExecutions(m, &queryServiceSwapExecutionsServer{stream}) -} - -type QueryService_SwapExecutionsServer interface { - Send(*SwapExecutionsResponse) error - grpc.ServerStream -} - -type queryServiceSwapExecutionsServer struct { - grpc.ServerStream -} - -func (x *queryServiceSwapExecutionsServer) Send(m *SwapExecutionsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_ArbExecutions_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ArbExecutionsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).ArbExecutions(m, &queryServiceArbExecutionsServer{stream}) -} - -type QueryService_ArbExecutionsServer interface { - Send(*ArbExecutionsResponse) error - grpc.ServerStream -} - -type queryServiceArbExecutionsServer struct { - grpc.ServerStream -} - -func (x *queryServiceArbExecutionsServer) Send(m *ArbExecutionsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_LiquidityPositions_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(LiquidityPositionsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).LiquidityPositions(m, &queryServiceLiquidityPositionsServer{stream}) -} - -type QueryService_LiquidityPositionsServer interface { - Send(*LiquidityPositionsResponse) error - grpc.ServerStream -} - -type queryServiceLiquidityPositionsServer struct { - grpc.ServerStream -} - -func (x *queryServiceLiquidityPositionsServer) Send(m *LiquidityPositionsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_LiquidityPositionById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LiquidityPositionByIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).LiquidityPositionById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.dex.v1.QueryService/LiquidityPositionById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).LiquidityPositionById(ctx, req.(*LiquidityPositionByIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_LiquidityPositionsById_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(LiquidityPositionsByIdRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).LiquidityPositionsById(m, &queryServiceLiquidityPositionsByIdServer{stream}) -} - -type QueryService_LiquidityPositionsByIdServer interface { - Send(*LiquidityPositionsByIdResponse) error - grpc.ServerStream -} - -type queryServiceLiquidityPositionsByIdServer struct { - grpc.ServerStream -} - -func (x *queryServiceLiquidityPositionsByIdServer) Send(m *LiquidityPositionsByIdResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_LiquidityPositionsByPrice_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(LiquidityPositionsByPriceRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).LiquidityPositionsByPrice(m, &queryServiceLiquidityPositionsByPriceServer{stream}) -} - -type QueryService_LiquidityPositionsByPriceServer interface { - Send(*LiquidityPositionsByPriceResponse) error - grpc.ServerStream -} - -type queryServiceLiquidityPositionsByPriceServer struct { - grpc.ServerStream -} - -func (x *queryServiceLiquidityPositionsByPriceServer) Send(m *LiquidityPositionsByPriceResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_Spread_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SpreadRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).Spread(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.dex.v1.QueryService/Spread", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).Spread(ctx, req.(*SpreadRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_CandlestickData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CandlestickDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).CandlestickData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.dex.v1.QueryService/CandlestickData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).CandlestickData(ctx, req.(*CandlestickDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_CandlestickDataStream_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(CandlestickDataStreamRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).CandlestickDataStream(m, &queryServiceCandlestickDataStreamServer{stream}) -} - -type QueryService_CandlestickDataStreamServer interface { - Send(*CandlestickDataStreamResponse) error - grpc.ServerStream -} - -type queryServiceCandlestickDataStreamServer struct { - grpc.ServerStream -} - -func (x *queryServiceCandlestickDataStreamServer) Send(m *CandlestickDataStreamResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.dex.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "BatchSwapOutputData", - Handler: _QueryService_BatchSwapOutputData_Handler, - }, - { - MethodName: "SwapExecution", - Handler: _QueryService_SwapExecution_Handler, - }, - { - MethodName: "ArbExecution", - Handler: _QueryService_ArbExecution_Handler, - }, - { - MethodName: "LiquidityPositionById", - Handler: _QueryService_LiquidityPositionById_Handler, - }, - { - MethodName: "Spread", - Handler: _QueryService_Spread_Handler, - }, - { - MethodName: "CandlestickData", - Handler: _QueryService_CandlestickData_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "SwapExecutions", - Handler: _QueryService_SwapExecutions_Handler, - ServerStreams: true, - }, - { - StreamName: "ArbExecutions", - Handler: _QueryService_ArbExecutions_Handler, - ServerStreams: true, - }, - { - StreamName: "LiquidityPositions", - Handler: _QueryService_LiquidityPositions_Handler, - ServerStreams: true, - }, - { - StreamName: "LiquidityPositionsById", - Handler: _QueryService_LiquidityPositionsById_Handler, - ServerStreams: true, - }, - { - StreamName: "LiquidityPositionsByPrice", - Handler: _QueryService_LiquidityPositionsByPrice_Handler, - ServerStreams: true, - }, - { - StreamName: "CandlestickDataStream", - Handler: _QueryService_CandlestickDataStream_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/core/component/dex/v1/dex.proto", -} - -// SimulationServiceClient is the client API for SimulationService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SimulationServiceClient interface { - // Simulate routing and trade execution. - SimulateTrade(ctx context.Context, in *SimulateTradeRequest, opts ...grpc.CallOption) (*SimulateTradeResponse, error) -} - -type simulationServiceClient struct { - cc grpc1.ClientConn -} - -func NewSimulationServiceClient(cc grpc1.ClientConn) SimulationServiceClient { - return &simulationServiceClient{cc} -} - -func (c *simulationServiceClient) SimulateTrade(ctx context.Context, in *SimulateTradeRequest, opts ...grpc.CallOption) (*SimulateTradeResponse, error) { - out := new(SimulateTradeResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.dex.v1.SimulationService/SimulateTrade", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SimulationServiceServer is the server API for SimulationService service. -type SimulationServiceServer interface { - // Simulate routing and trade execution. - SimulateTrade(context.Context, *SimulateTradeRequest) (*SimulateTradeResponse, error) -} - -// UnimplementedSimulationServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSimulationServiceServer struct { -} - -func (*UnimplementedSimulationServiceServer) SimulateTrade(ctx context.Context, req *SimulateTradeRequest) (*SimulateTradeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimulateTrade not implemented") -} - -func RegisterSimulationServiceServer(s grpc1.Server, srv SimulationServiceServer) { - s.RegisterService(&_SimulationService_serviceDesc, srv) -} - -func _SimulationService_SimulateTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SimulateTradeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SimulationServiceServer).SimulateTrade(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.dex.v1.SimulationService/SimulateTrade", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SimulationServiceServer).SimulateTrade(ctx, req.(*SimulateTradeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SimulationService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.dex.v1.SimulationService", - HandlerType: (*SimulationServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SimulateTrade", - Handler: _SimulationService_SimulateTrade_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "penumbra/core/component/dex/v1/dex.proto", -} - -func (m *ZKSwapProof) Marshal() (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 *ZKSwapProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ZKSwapProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintDex(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ZKSwapClaimProof) Marshal() (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 *ZKSwapClaimProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ZKSwapClaimProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintDex(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Swap) Marshal() (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 *Swap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Swap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapClaim) Marshal() (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 *SwapClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochDuration != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.EpochDuration)) - i-- - dAtA[i] = 0x38 - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapClaimBody) Marshal() (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 *SwapClaimBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaimBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OutputData != nil { - { - size, err := m.OutputData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Output_2Commitment != nil { - { - size, err := m.Output_2Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Output_1Commitment != nil { - { - size, err := m.Output_1Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapBody) Marshal() (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 *SwapBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Payload != nil { - { - size, err := m.Payload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.FeeCommitment != nil { - { - size, err := m.FeeCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Delta_2I != nil { - { - size, err := m.Delta_2I.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Delta_1I != nil { - { - size, err := m.Delta_1I.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapPayload) Marshal() (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 *SwapPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EncryptedSwap) > 0 { - i -= len(m.EncryptedSwap) - copy(dAtA[i:], m.EncryptedSwap) - i = encodeVarintDex(dAtA, i, uint64(len(m.EncryptedSwap))) - i-- - dAtA[i] = 0x12 - } - if m.Commitment != nil { - { - size, err := m.Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapPlaintext) Marshal() (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 *SwapPlaintext) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapPlaintext) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Rseed) > 0 { - i -= len(m.Rseed) - copy(dAtA[i:], m.Rseed) - i = encodeVarintDex(dAtA, i, uint64(len(m.Rseed))) - i-- - dAtA[i] = 0x32 - } - if m.ClaimAddress != nil { - { - size, err := m.ClaimAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.ClaimFee != nil { - { - size, err := m.ClaimFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Delta_2I != nil { - { - size, err := m.Delta_2I.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Delta_1I != nil { - { - size, err := m.Delta_1I.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapPlan) Marshal() (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 *SwapPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProofBlindingS) > 0 { - i -= len(m.ProofBlindingS) - copy(dAtA[i:], m.ProofBlindingS) - i = encodeVarintDex(dAtA, i, uint64(len(m.ProofBlindingS))) - i-- - dAtA[i] = 0x22 - } - if len(m.ProofBlindingR) > 0 { - i -= len(m.ProofBlindingR) - copy(dAtA[i:], m.ProofBlindingR) - i = encodeVarintDex(dAtA, i, uint64(len(m.ProofBlindingR))) - i-- - dAtA[i] = 0x1a - } - if len(m.FeeBlinding) > 0 { - i -= len(m.FeeBlinding) - copy(dAtA[i:], m.FeeBlinding) - i = encodeVarintDex(dAtA, i, uint64(len(m.FeeBlinding))) - i-- - dAtA[i] = 0x12 - } - if m.SwapPlaintext != nil { - { - size, err := m.SwapPlaintext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapClaimPlan) Marshal() (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 *SwapClaimPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaimPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProofBlindingS) > 0 { - i -= len(m.ProofBlindingS) - copy(dAtA[i:], m.ProofBlindingS) - i = encodeVarintDex(dAtA, i, uint64(len(m.ProofBlindingS))) - i-- - dAtA[i] = 0x32 - } - if len(m.ProofBlindingR) > 0 { - i -= len(m.ProofBlindingR) - copy(dAtA[i:], m.ProofBlindingR) - i = encodeVarintDex(dAtA, i, uint64(len(m.ProofBlindingR))) - i-- - dAtA[i] = 0x2a - } - if m.EpochDuration != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.EpochDuration)) - i-- - dAtA[i] = 0x20 - } - if m.OutputData != nil { - { - size, err := m.OutputData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Position != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Position)) - i-- - dAtA[i] = 0x10 - } - if m.SwapPlaintext != nil { - { - size, err := m.SwapPlaintext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapView) Marshal() (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 *SwapView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapView != nil { - { - size := m.SwapView.Size() - i -= size - if _, err := m.SwapView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SwapView_Visible_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapView_Visible_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Visible != nil { - { - size, err := m.Visible.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SwapView_Opaque_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapView_Opaque_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Opaque != nil { - { - size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SwapView_Visible) Marshal() (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 *SwapView_Visible) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapView_Visible) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Asset_2Metadata != nil { - { - size, err := m.Asset_2Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - if m.Asset_1Metadata != nil { - { - size, err := m.Asset_1Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc2 - } - if m.Output_2 != nil { - { - size, err := m.Output_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - if m.Output_1 != nil { - { - size, err := m.Output_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if m.BatchSwapOutputData != nil { - { - size, err := m.BatchSwapOutputData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.ClaimTx != nil { - { - size, err := m.ClaimTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.SwapPlaintext != nil { - { - size, err := m.SwapPlaintext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapView_Opaque) Marshal() (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 *SwapView_Opaque) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapView_Opaque) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Asset_2Metadata != nil { - { - size, err := m.Asset_2Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - if m.Asset_1Metadata != nil { - { - size, err := m.Asset_1Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc2 - } - if m.Output_2Value != nil { - { - size, err := m.Output_2Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - if m.Output_1Value != nil { - { - size, err := m.Output_1Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if m.BatchSwapOutputData != nil { - { - size, err := m.BatchSwapOutputData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapClaimView) Marshal() (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 *SwapClaimView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaimView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapClaimView != nil { - { - size := m.SwapClaimView.Size() - i -= size - if _, err := m.SwapClaimView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SwapClaimView_Visible_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaimView_Visible_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Visible != nil { - { - size, err := m.Visible.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SwapClaimView_Opaque_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaimView_Opaque_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Opaque != nil { - { - size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SwapClaimView_Visible) Marshal() (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 *SwapClaimView_Visible) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaimView_Visible) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapTx != nil { - { - size, err := m.SwapTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Output_2 != nil { - { - size, err := m.Output_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Output_1 != nil { - { - size, err := m.Output_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.SwapClaim != nil { - { - size, err := m.SwapClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapClaimView_Opaque) Marshal() (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 *SwapClaimView_Opaque) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapClaimView_Opaque) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapClaim != nil { - { - size, err := m.SwapClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TradingPair) Marshal() (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 *TradingPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TradingPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Asset_2 != nil { - { - size, err := m.Asset_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Asset_1 != nil { - { - size, err := m.Asset_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DirectedTradingPair) Marshal() (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 *DirectedTradingPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DirectedTradingPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.End != nil { - { - size, err := m.End.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Start != nil { - { - size, err := m.Start.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchSwapOutputData) Marshal() (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 *BatchSwapOutputData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchSwapOutputData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SctPositionPrefix != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.SctPositionPrefix)) - i-- - dAtA[i] = 0x50 - } - if m.EpochStartingHeight != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.EpochStartingHeight)) - i-- - dAtA[i] = 0x48 - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x38 - } - if m.Unfilled_2 != nil { - { - size, err := m.Unfilled_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Unfilled_1 != nil { - { - size, err := m.Unfilled_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Lambda_2 != nil { - { - size, err := m.Lambda_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Lambda_1 != nil { - { - size, err := m.Lambda_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Delta_2 != nil { - { - size, err := m.Delta_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Delta_1 != nil { - { - size, err := m.Delta_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TradingFunction) Marshal() (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 *TradingFunction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TradingFunction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pair != nil { - { - size, err := m.Pair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Component != nil { - { - size, err := m.Component.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BareTradingFunction) Marshal() (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 *BareTradingFunction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BareTradingFunction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Q != nil { - { - size, err := m.Q.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.P != nil { - { - size, err := m.P.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Fee != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Fee)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Reserves) Marshal() (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 *Reserves) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Reserves) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.R2 != nil { - { - size, err := m.R2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.R1 != nil { - { - size, err := m.R1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Position) Marshal() (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 *Position) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CloseOnFill { - i-- - if m.CloseOnFill { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Reserves != nil { - { - size, err := m.Reserves.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Nonce) > 0 { - i -= len(m.Nonce) - copy(dAtA[i:], m.Nonce) - i = encodeVarintDex(dAtA, i, uint64(len(m.Nonce))) - i-- - dAtA[i] = 0x12 - } - if m.Phi != nil { - { - size, err := m.Phi.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionId) Marshal() (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 *PositionId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AltBech32M) > 0 { - i -= len(m.AltBech32M) - copy(dAtA[i:], m.AltBech32M) - i = encodeVarintDex(dAtA, i, uint64(len(m.AltBech32M))) - i-- - dAtA[i] = 0x12 - } - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintDex(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionState) Marshal() (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 *PositionState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sequence != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x10 - } - if m.State != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LpNft) Marshal() (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 *LpNft) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LpNft) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionOpen) Marshal() (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 *PositionOpen) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionOpen) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Position != nil { - { - size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionClose) Marshal() (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 *PositionClose) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionWithdraw) Marshal() (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 *PositionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sequence != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x18 - } - if m.ReservesCommitment != nil { - { - size, err := m.ReservesCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionRewardClaim) Marshal() (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 *PositionRewardClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionRewardClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RewardsCommitment != nil { - { - size, err := m.RewardsCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapExecution) Marshal() (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 *SwapExecution) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Traces) > 0 { - for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Traces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SwapExecution_Trace) Marshal() (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 *SwapExecution_Trace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapExecution_Trace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *PositionWithdrawPlan) Marshal() (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 *PositionWithdrawPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionWithdrawPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Rewards) > 0 { - for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.Sequence != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x20 - } - if m.Pair != nil { - { - size, err := m.Pair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Reserves != nil { - { - size, err := m.Reserves.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionRewardClaimPlan) Marshal() (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 *PositionRewardClaimPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionRewardClaimPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Reserves != nil { - { - size, err := m.Reserves.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BatchSwapOutputDataRequest) Marshal() (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 *BatchSwapOutputDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchSwapOutputDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *BatchSwapOutputDataResponse) Marshal() (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 *BatchSwapOutputDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BatchSwapOutputDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapExecutionRequest) Marshal() (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 *SwapExecutionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapExecutionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *SwapExecutionResponse) Marshal() (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 *SwapExecutionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapExecution != nil { - { - size, err := m.SwapExecution.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ArbExecutionRequest) Marshal() (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 *ArbExecutionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArbExecutionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ArbExecutionResponse) Marshal() (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 *ArbExecutionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArbExecutionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.SwapExecution != nil { - { - size, err := m.SwapExecution.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapExecutionsRequest) Marshal() (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 *SwapExecutionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapExecutionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.EndHeight != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.EndHeight)) - i-- - dAtA[i] = 0x18 - } - if m.StartHeight != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *SwapExecutionsResponse) Marshal() (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 *SwapExecutionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapExecutionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.SwapExecution != nil { - { - size, err := m.SwapExecution.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ArbExecutionsRequest) Marshal() (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 *ArbExecutionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArbExecutionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EndHeight != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.EndHeight)) - i-- - dAtA[i] = 0x18 - } - if m.StartHeight != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ArbExecutionsResponse) Marshal() (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 *ArbExecutionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArbExecutionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.SwapExecution != nil { - { - size, err := m.SwapExecution.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionsRequest) Marshal() (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 *LiquidityPositionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IncludeClosed { - i-- - if m.IncludeClosed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionsResponse) Marshal() (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 *LiquidityPositionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionByIdRequest) Marshal() (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 *LiquidityPositionByIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionByIdResponse) Marshal() (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 *LiquidityPositionByIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionsByIdRequest) Marshal() (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 *LiquidityPositionsByIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionsByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PositionId) > 0 { - for iNdEx := len(m.PositionId) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PositionId[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionsByIdResponse) Marshal() (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 *LiquidityPositionsByIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionsByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionsByPriceRequest) Marshal() (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 *LiquidityPositionsByPriceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionsByPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Limit != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x28 - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *LiquidityPositionsByPriceResponse) Marshal() (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 *LiquidityPositionsByPriceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LiquidityPositionsByPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpreadRequest) Marshal() (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 *SpreadRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpreadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *SpreadResponse) Marshal() (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 *SpreadResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpreadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ApproxEffectivePrice_2To_1 != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ApproxEffectivePrice_2To_1)))) - i-- - dAtA[i] = 0x21 - } - if m.ApproxEffectivePrice_1To_2 != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ApproxEffectivePrice_1To_2)))) - i-- - dAtA[i] = 0x19 - } - if m.Best_2To_1Position != nil { - { - size, err := m.Best_2To_1Position.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Best_1To_2Position != nil { - { - size, err := m.Best_1To_2Position.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SimulateTradeRequest) Marshal() (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 *SimulateTradeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateTradeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Routing != nil { - { - size, err := m.Routing.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Input != nil { - { - size, err := m.Input.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SimulateTradeRequest_Routing) Marshal() (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 *SimulateTradeRequest_Routing) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateTradeRequest_Routing) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Setting != nil { - { - size := m.Setting.Size() - i -= size - if _, err := m.Setting.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SimulateTradeRequest_Routing_Default_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateTradeRequest_Routing_Default_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Default != nil { - { - size, err := m.Default.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SimulateTradeRequest_Routing_SingleHop_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateTradeRequest_Routing_SingleHop_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SingleHop != nil { - { - size, err := m.SingleHop.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SimulateTradeRequest_Routing_SingleHop) Marshal() (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 *SimulateTradeRequest_Routing_SingleHop) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateTradeRequest_Routing_SingleHop) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *SimulateTradeRequest_Routing_Default) Marshal() (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 *SimulateTradeRequest_Routing_Default) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateTradeRequest_Routing_Default) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *SimulateTradeResponse) Marshal() (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 *SimulateTradeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SimulateTradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Unfilled != nil { - { - size, err := m.Unfilled.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventSwap) Marshal() (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 *EventSwap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventSwap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapCommitment != nil { - { - size, err := m.SwapCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Delta_2I != nil { - { - size, err := m.Delta_2I.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Delta_1I != nil { - { - size, err := m.Delta_1I.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventSwapClaim) Marshal() (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 *EventSwapClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventSwapClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Output_2Commitment != nil { - { - size, err := m.Output_2Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Output_1Commitment != nil { - { - size, err := m.Output_1Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventPositionOpen) Marshal() (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 *EventPositionOpen) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventPositionOpen) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingFee != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.TradingFee)) - i-- - dAtA[i] = 0x28 - } - if m.Reserves_2 != nil { - { - size, err := m.Reserves_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Reserves_1 != nil { - { - size, err := m.Reserves_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventPositionClose) Marshal() (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 *EventPositionClose) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventPositionClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventQueuePositionClose) Marshal() (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 *EventQueuePositionClose) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventQueuePositionClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventPositionWithdraw) Marshal() (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 *EventPositionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventPositionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sequence != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x28 - } - if m.Reserves_2 != nil { - { - size, err := m.Reserves_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Reserves_1 != nil { - { - size, err := m.Reserves_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventPositionExecution) Marshal() (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 *EventPositionExecution) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventPositionExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Context != nil { - { - size, err := m.Context.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.PrevReserves_2 != nil { - { - size, err := m.PrevReserves_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.PrevReserves_1 != nil { - { - size, err := m.PrevReserves_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Reserves_2 != nil { - { - size, err := m.Reserves_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Reserves_1 != nil { - { - size, err := m.Reserves_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventBatchSwap) Marshal() (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 *EventBatchSwap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBatchSwap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapExecution_2For_1 != nil { - { - size, err := m.SwapExecution_2For_1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.SwapExecution_1For_2 != nil { - { - size, err := m.SwapExecution_1For_2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BatchSwapOutputData != nil { - { - size, err := m.BatchSwapOutputData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventArbExecution) Marshal() (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 *EventArbExecution) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventArbExecution) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapExecution != nil { - { - size, err := m.SwapExecution.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EventValueCircuitBreakerCredit) Marshal() (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 *EventValueCircuitBreakerCredit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValueCircuitBreakerCredit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NewBalance != nil { - { - size, err := m.NewBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PreviousBalance != nil { - { - size, err := m.PreviousBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValueCircuitBreakerDebit) Marshal() (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 *EventValueCircuitBreakerDebit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValueCircuitBreakerDebit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NewBalance != nil { - { - size, err := m.NewBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.PreviousBalance != nil { - { - size, err := m.PreviousBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DexParameters) Marshal() (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 *DexParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DexParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MaxExecutionBudget != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.MaxExecutionBudget)) - i-- - dAtA[i] = 0x28 - } - if m.MaxPositionsPerPair != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.MaxPositionsPerPair)) - i-- - dAtA[i] = 0x20 - } - if m.MaxHops != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.MaxHops)) - i-- - dAtA[i] = 0x18 - } - if len(m.FixedCandidates) > 0 { - for iNdEx := len(m.FixedCandidates) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FixedCandidates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.IsEnabled { - i-- - if m.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DexParams != nil { - { - size, err := m.DexParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CandlestickData) Marshal() (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 *CandlestickData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CandlestickData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapVolume != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SwapVolume)))) - i-- - dAtA[i] = 0x39 - } - if m.DirectVolume != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DirectVolume)))) - i-- - dAtA[i] = 0x31 - } - if m.Low != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Low)))) - i-- - dAtA[i] = 0x29 - } - if m.High != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.High)))) - i-- - dAtA[i] = 0x21 - } - if m.Close != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Close)))) - i-- - dAtA[i] = 0x19 - } - if m.Open != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Open)))) - i-- - dAtA[i] = 0x11 - } - if m.Height != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CandlestickDataRequest) Marshal() (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 *CandlestickDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CandlestickDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StartHeight != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x18 - } - if m.Limit != 0 { - i = encodeVarintDex(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x10 - } - if m.Pair != nil { - { - size, err := m.Pair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CandlestickDataResponse) Marshal() (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 *CandlestickDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CandlestickDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CandlestickDataStreamRequest) Marshal() (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 *CandlestickDataStreamRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CandlestickDataStreamRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pair != nil { - { - size, err := m.Pair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CandlestickDataStreamResponse) Marshal() (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 *CandlestickDataStreamResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CandlestickDataStreamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDex(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintDex(dAtA []byte, offset int, v uint64) int { - offset -= sovDex(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ZKSwapProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *ZKSwapClaimProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *Swap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.EpochDuration != 0 { - n += 1 + sovDex(uint64(m.EpochDuration)) - } - return n -} - -func (m *SwapClaimBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output_1Commitment != nil { - l = m.Output_1Commitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output_2Commitment != nil { - l = m.Output_2Commitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.OutputData != nil { - l = m.OutputData.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Delta_1I != nil { - l = m.Delta_1I.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Delta_2I != nil { - l = m.Delta_2I.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.FeeCommitment != nil { - l = m.FeeCommitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Payload != nil { - l = m.Payload.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Commitment != nil { - l = m.Commitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.EncryptedSwap) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapPlaintext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Delta_1I != nil { - l = m.Delta_1I.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Delta_2I != nil { - l = m.Delta_2I.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.ClaimFee != nil { - l = m.ClaimFee.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.ClaimAddress != nil { - l = m.ClaimAddress.Size() - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.Rseed) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapPlaintext != nil { - l = m.SwapPlaintext.Size() - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.FeeBlinding) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.ProofBlindingR) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.ProofBlindingS) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapClaimPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapPlaintext != nil { - l = m.SwapPlaintext.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Position != 0 { - n += 1 + sovDex(uint64(m.Position)) - } - if m.OutputData != nil { - l = m.OutputData.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.EpochDuration != 0 { - n += 1 + sovDex(uint64(m.EpochDuration)) - } - l = len(m.ProofBlindingR) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.ProofBlindingS) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapView != nil { - n += m.SwapView.Size() - } - return n -} - -func (m *SwapView_Visible_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Visible != nil { - l = m.Visible.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} -func (m *SwapView_Opaque_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} -func (m *SwapView_Visible) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.SwapPlaintext != nil { - l = m.SwapPlaintext.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.ClaimTx != nil { - l = m.ClaimTx.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.BatchSwapOutputData != nil { - l = m.BatchSwapOutputData.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Output_1 != nil { - l = m.Output_1.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Output_2 != nil { - l = m.Output_2.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Asset_1Metadata != nil { - l = m.Asset_1Metadata.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Asset_2Metadata != nil { - l = m.Asset_2Metadata.Size() - n += 2 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapView_Opaque) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.BatchSwapOutputData != nil { - l = m.BatchSwapOutputData.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Output_1Value != nil { - l = m.Output_1Value.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Output_2Value != nil { - l = m.Output_2Value.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Asset_1Metadata != nil { - l = m.Asset_1Metadata.Size() - n += 2 + l + sovDex(uint64(l)) - } - if m.Asset_2Metadata != nil { - l = m.Asset_2Metadata.Size() - n += 2 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapClaimView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapClaimView != nil { - n += m.SwapClaimView.Size() - } - return n -} - -func (m *SwapClaimView_Visible_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Visible != nil { - l = m.Visible.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} -func (m *SwapClaimView_Opaque_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} -func (m *SwapClaimView_Visible) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapClaim != nil { - l = m.SwapClaim.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output_1 != nil { - l = m.Output_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output_2 != nil { - l = m.Output_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.SwapTx != nil { - l = m.SwapTx.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapClaimView_Opaque) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapClaim != nil { - l = m.SwapClaim.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *TradingPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Asset_1 != nil { - l = m.Asset_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Asset_2 != nil { - l = m.Asset_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *DirectedTradingPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Start != nil { - l = m.Start.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.End != nil { - l = m.End.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *BatchSwapOutputData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Delta_1 != nil { - l = m.Delta_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Delta_2 != nil { - l = m.Delta_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Lambda_1 != nil { - l = m.Lambda_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Lambda_2 != nil { - l = m.Lambda_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Unfilled_1 != nil { - l = m.Unfilled_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Unfilled_2 != nil { - l = m.Unfilled_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.EpochStartingHeight != 0 { - n += 1 + sovDex(uint64(m.EpochStartingHeight)) - } - if m.SctPositionPrefix != 0 { - n += 1 + sovDex(uint64(m.SctPositionPrefix)) - } - return n -} - -func (m *TradingFunction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Component != nil { - l = m.Component.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Pair != nil { - l = m.Pair.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *BareTradingFunction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fee != 0 { - n += 1 + sovDex(uint64(m.Fee)) - } - if m.P != nil { - l = m.P.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Q != nil { - l = m.Q.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *Reserves) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.R1 != nil { - l = m.R1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.R2 != nil { - l = m.R2.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *Position) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Phi != nil { - l = m.Phi.Size() - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.Nonce) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Reserves != nil { - l = m.Reserves.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.CloseOnFill { - n += 2 - } - return n -} - -func (m *PositionId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - l = len(m.AltBech32M) - if l > 0 { - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *PositionState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != 0 { - n += 1 + sovDex(uint64(m.State)) - } - if m.Sequence != 0 { - n += 1 + sovDex(uint64(m.Sequence)) - } - return n -} - -func (m *LpNft) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *PositionOpen) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Position != nil { - l = m.Position.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *PositionClose) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *PositionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.ReservesCommitment != nil { - l = m.ReservesCommitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovDex(uint64(m.Sequence)) - } - return n -} - -func (m *PositionRewardClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.RewardsCommitment != nil { - l = m.RewardsCommitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapExecution) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Traces) > 0 { - for _, e := range m.Traces { - l = e.Size() - n += 1 + l + sovDex(uint64(l)) - } - } - if m.Input != nil { - l = m.Input.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapExecution_Trace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovDex(uint64(l)) - } - } - return n -} - -func (m *PositionWithdrawPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Reserves != nil { - l = m.Reserves.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Pair != nil { - l = m.Pair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovDex(uint64(m.Sequence)) - } - if len(m.Rewards) > 0 { - for _, e := range m.Rewards { - l = e.Size() - n += 1 + l + sovDex(uint64(l)) - } - } - return n -} - -func (m *PositionRewardClaimPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Reserves != nil { - l = m.Reserves.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *BatchSwapOutputDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *BatchSwapOutputDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapExecutionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapExecutionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapExecution != nil { - l = m.SwapExecution.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *ArbExecutionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - return n -} - -func (m *ArbExecutionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapExecution != nil { - l = m.SwapExecution.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - return n -} - -func (m *SwapExecutionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartHeight != 0 { - n += 1 + sovDex(uint64(m.StartHeight)) - } - if m.EndHeight != 0 { - n += 1 + sovDex(uint64(m.EndHeight)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SwapExecutionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapExecution != nil { - l = m.SwapExecution.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *ArbExecutionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartHeight != 0 { - n += 1 + sovDex(uint64(m.StartHeight)) - } - if m.EndHeight != 0 { - n += 1 + sovDex(uint64(m.EndHeight)) - } - return n -} - -func (m *ArbExecutionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapExecution != nil { - l = m.SwapExecution.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - return n -} - -func (m *LiquidityPositionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IncludeClosed { - n += 2 - } - return n -} - -func (m *LiquidityPositionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *LiquidityPositionByIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *LiquidityPositionByIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *LiquidityPositionsByIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PositionId) > 0 { - for _, e := range m.PositionId { - l = e.Size() - n += 1 + l + sovDex(uint64(l)) - } - } - return n -} - -func (m *LiquidityPositionsByIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *LiquidityPositionsByPriceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovDex(uint64(m.Limit)) - } - return n -} - -func (m *LiquidityPositionsByPriceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SpreadRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SpreadResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Best_1To_2Position != nil { - l = m.Best_1To_2Position.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Best_2To_1Position != nil { - l = m.Best_2To_1Position.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.ApproxEffectivePrice_1To_2 != 0 { - n += 9 - } - if m.ApproxEffectivePrice_2To_1 != 0 { - n += 9 - } - return n -} - -func (m *SimulateTradeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Input != nil { - l = m.Input.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Routing != nil { - l = m.Routing.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *SimulateTradeRequest_Routing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Setting != nil { - n += m.Setting.Size() - } - return n -} - -func (m *SimulateTradeRequest_Routing_Default_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Default != nil { - l = m.Default.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} -func (m *SimulateTradeRequest_Routing_SingleHop_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SingleHop != nil { - l = m.SingleHop.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} -func (m *SimulateTradeRequest_Routing_SingleHop) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *SimulateTradeRequest_Routing_Default) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *SimulateTradeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Unfilled != nil { - l = m.Unfilled.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventSwap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Delta_1I != nil { - l = m.Delta_1I.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Delta_2I != nil { - l = m.Delta_2I.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.SwapCommitment != nil { - l = m.SwapCommitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventSwapClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output_1Commitment != nil { - l = m.Output_1Commitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Output_2Commitment != nil { - l = m.Output_2Commitment.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventPositionOpen) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Reserves_1 != nil { - l = m.Reserves_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Reserves_2 != nil { - l = m.Reserves_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.TradingFee != 0 { - n += 1 + sovDex(uint64(m.TradingFee)) - } - return n -} - -func (m *EventPositionClose) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventQueuePositionClose) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventPositionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Reserves_1 != nil { - l = m.Reserves_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Reserves_2 != nil { - l = m.Reserves_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovDex(uint64(m.Sequence)) - } - return n -} - -func (m *EventPositionExecution) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Reserves_1 != nil { - l = m.Reserves_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Reserves_2 != nil { - l = m.Reserves_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.PrevReserves_1 != nil { - l = m.PrevReserves_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.PrevReserves_2 != nil { - l = m.PrevReserves_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Context != nil { - l = m.Context.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventBatchSwap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BatchSwapOutputData != nil { - l = m.BatchSwapOutputData.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.SwapExecution_1For_2 != nil { - l = m.SwapExecution_1For_2.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.SwapExecution_2For_1 != nil { - l = m.SwapExecution_2For_1.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventArbExecution) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - if m.SwapExecution != nil { - l = m.SwapExecution.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventValueCircuitBreakerCredit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.PreviousBalance != nil { - l = m.PreviousBalance.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.NewBalance != nil { - l = m.NewBalance.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *EventValueCircuitBreakerDebit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.PreviousBalance != nil { - l = m.PreviousBalance.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.NewBalance != nil { - l = m.NewBalance.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *DexParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IsEnabled { - n += 2 - } - if len(m.FixedCandidates) > 0 { - for _, e := range m.FixedCandidates { - l = e.Size() - n += 1 + l + sovDex(uint64(l)) - } - } - if m.MaxHops != 0 { - n += 1 + sovDex(uint64(m.MaxHops)) - } - if m.MaxPositionsPerPair != 0 { - n += 1 + sovDex(uint64(m.MaxPositionsPerPair)) - } - if m.MaxExecutionBudget != 0 { - n += 1 + sovDex(uint64(m.MaxExecutionBudget)) - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DexParams != nil { - l = m.DexParams.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *CandlestickData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovDex(uint64(m.Height)) - } - if m.Open != 0 { - n += 9 - } - if m.Close != 0 { - n += 9 - } - if m.High != 0 { - n += 9 - } - if m.Low != 0 { - n += 9 - } - if m.DirectVolume != 0 { - n += 9 - } - if m.SwapVolume != 0 { - n += 9 - } - return n -} - -func (m *CandlestickDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pair != nil { - l = m.Pair.Size() - n += 1 + l + sovDex(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovDex(uint64(m.Limit)) - } - if m.StartHeight != 0 { - n += 1 + sovDex(uint64(m.StartHeight)) - } - return n -} - -func (m *CandlestickDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Data) > 0 { - for _, e := range m.Data { - l = e.Size() - n += 1 + l + sovDex(uint64(l)) - } - } - return n -} - -func (m *CandlestickDataStreamRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pair != nil { - l = m.Pair.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func (m *CandlestickDataStreamResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovDex(uint64(l)) - } - return n -} - -func sovDex(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDex(x uint64) (n int) { - return sovDex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ZKSwapProof) 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 ErrIntOverflowDex - } - 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: ZKSwapProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZKSwapProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ZKSwapClaimProof) 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 ErrIntOverflowDex - } - 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: ZKSwapClaimProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZKSwapClaimProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Swap) 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 ErrIntOverflowDex - } - 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: Swap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Swap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &ZKSwapProof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &SwapBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapClaim) 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 ErrIntOverflowDex - } - 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: SwapClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &ZKSwapClaimProof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &SwapClaimBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochDuration", wireType) - } - m.EpochDuration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochDuration |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapClaimBody) 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 ErrIntOverflowDex - } - 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: SwapClaimBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapClaimBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v1.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &v11.Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_1Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_1Commitment == nil { - m.Output_1Commitment = &v12.StateCommitment{} - } - if err := m.Output_1Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_2Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_2Commitment == nil { - m.Output_2Commitment = &v12.StateCommitment{} - } - if err := m.Output_2Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutputData == nil { - m.OutputData = &BatchSwapOutputData{} - } - if err := m.OutputData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapBody) 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 ErrIntOverflowDex - } - 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: SwapBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delta_1I", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_1I == nil { - m.Delta_1I = &v13.Amount{} - } - if err := m.Delta_1I.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delta_2I", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_2I == nil { - m.Delta_2I = &v13.Amount{} - } - if err := m.Delta_2I.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeCommitment == nil { - m.FeeCommitment = &v14.BalanceCommitment{} - } - if err := m.FeeCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Payload == nil { - m.Payload = &SwapPayload{} - } - if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapPayload) 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 ErrIntOverflowDex - } - 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: SwapPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commitment == nil { - m.Commitment = &v12.StateCommitment{} - } - if err := m.Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedSwap", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedSwap = append(m.EncryptedSwap[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedSwap == nil { - m.EncryptedSwap = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapPlaintext) 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 ErrIntOverflowDex - } - 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: SwapPlaintext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapPlaintext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delta_1I", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_1I == nil { - m.Delta_1I = &v13.Amount{} - } - if err := m.Delta_1I.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delta_2I", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_2I == nil { - m.Delta_2I = &v13.Amount{} - } - if err := m.Delta_2I.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClaimFee == nil { - m.ClaimFee = &v11.Fee{} - } - if err := m.ClaimFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClaimAddress == nil { - m.ClaimAddress = &v15.Address{} - } - if err := m.ClaimAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rseed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rseed = append(m.Rseed[:0], dAtA[iNdEx:postIndex]...) - if m.Rseed == nil { - m.Rseed = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapPlan) 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 ErrIntOverflowDex - } - 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: SwapPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapPlaintext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapPlaintext == nil { - m.SwapPlaintext = &SwapPlaintext{} - } - if err := m.SwapPlaintext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeBlinding", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeeBlinding = append(m.FeeBlinding[:0], dAtA[iNdEx:postIndex]...) - if m.FeeBlinding == nil { - m.FeeBlinding = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingR", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingR = append(m.ProofBlindingR[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingR == nil { - m.ProofBlindingR = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingS", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingS = append(m.ProofBlindingS[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingS == nil { - m.ProofBlindingS = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapClaimPlan) 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 ErrIntOverflowDex - } - 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: SwapClaimPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapClaimPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapPlaintext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapPlaintext == nil { - m.SwapPlaintext = &SwapPlaintext{} - } - if err := m.SwapPlaintext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - m.Position = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Position |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutputData == nil { - m.OutputData = &BatchSwapOutputData{} - } - if err := m.OutputData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochDuration", wireType) - } - m.EpochDuration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochDuration |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingR", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingR = append(m.ProofBlindingR[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingR == nil { - m.ProofBlindingR = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingS", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingS = append(m.ProofBlindingS[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingS == nil { - m.ProofBlindingS = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapView) 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 ErrIntOverflowDex - } - 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: SwapView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Visible", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SwapView_Visible{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SwapView = &SwapView_Visible_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SwapView_Opaque{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SwapView = &SwapView_Opaque_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapView_Visible) 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 ErrIntOverflowDex - } - 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: Visible: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Visible: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Swap == nil { - m.Swap = &Swap{} - } - if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapPlaintext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapPlaintext == nil { - m.SwapPlaintext = &SwapPlaintext{} - } - if err := m.SwapPlaintext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimTx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClaimTx == nil { - m.ClaimTx = &v16.TransactionId{} - } - if err := m.ClaimTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchSwapOutputData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BatchSwapOutputData == nil { - m.BatchSwapOutputData = &BatchSwapOutputData{} - } - if err := m.BatchSwapOutputData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_1 == nil { - m.Output_1 = &v17.NoteView{} - } - if err := m.Output_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_2 == nil { - m.Output_2 = &v17.NoteView{} - } - if err := m.Output_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 40: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset_1Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Asset_1Metadata == nil { - m.Asset_1Metadata = &v14.Metadata{} - } - if err := m.Asset_1Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset_2Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Asset_2Metadata == nil { - m.Asset_2Metadata = &v14.Metadata{} - } - if err := m.Asset_2Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapView_Opaque) 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 ErrIntOverflowDex - } - 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: Opaque: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Opaque: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Swap == nil { - m.Swap = &Swap{} - } - if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchSwapOutputData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BatchSwapOutputData == nil { - m.BatchSwapOutputData = &BatchSwapOutputData{} - } - if err := m.BatchSwapOutputData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_1Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_1Value == nil { - m.Output_1Value = &v14.ValueView{} - } - if err := m.Output_1Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_2Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_2Value == nil { - m.Output_2Value = &v14.ValueView{} - } - if err := m.Output_2Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 40: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset_1Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Asset_1Metadata == nil { - m.Asset_1Metadata = &v14.Metadata{} - } - if err := m.Asset_1Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset_2Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Asset_2Metadata == nil { - m.Asset_2Metadata = &v14.Metadata{} - } - if err := m.Asset_2Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapClaimView) 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 ErrIntOverflowDex - } - 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: SwapClaimView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapClaimView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Visible", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SwapClaimView_Visible{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SwapClaimView = &SwapClaimView_Visible_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SwapClaimView_Opaque{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SwapClaimView = &SwapClaimView_Opaque_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapClaimView_Visible) 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 ErrIntOverflowDex - } - 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: Visible: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Visible: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapClaim == nil { - m.SwapClaim = &SwapClaim{} - } - if err := m.SwapClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_1 == nil { - m.Output_1 = &v17.NoteView{} - } - if err := m.Output_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_2 == nil { - m.Output_2 = &v17.NoteView{} - } - if err := m.Output_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapTx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapTx == nil { - m.SwapTx = &v16.TransactionId{} - } - if err := m.SwapTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapClaimView_Opaque) 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 ErrIntOverflowDex - } - 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: Opaque: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Opaque: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapClaim == nil { - m.SwapClaim = &SwapClaim{} - } - if err := m.SwapClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TradingPair) 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 ErrIntOverflowDex - } - 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: TradingPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TradingPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Asset_1 == nil { - m.Asset_1 = &v14.AssetId{} - } - if err := m.Asset_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 Asset_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Asset_2 == nil { - m.Asset_2 = &v14.AssetId{} - } - if err := m.Asset_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DirectedTradingPair) 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 ErrIntOverflowDex - } - 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: DirectedTradingPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DirectedTradingPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Start == nil { - m.Start = &v14.AssetId{} - } - if err := m.Start.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.End == nil { - m.End = &v14.AssetId{} - } - if err := m.End.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchSwapOutputData) 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 ErrIntOverflowDex - } - 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: BatchSwapOutputData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchSwapOutputData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delta_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_1 == nil { - m.Delta_1 = &v13.Amount{} - } - if err := m.Delta_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 Delta_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_2 == nil { - m.Delta_2 = &v13.Amount{} - } - if err := m.Delta_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lambda_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Lambda_1 == nil { - m.Lambda_1 = &v13.Amount{} - } - if err := m.Lambda_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lambda_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Lambda_2 == nil { - m.Lambda_2 = &v13.Amount{} - } - if err := m.Lambda_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unfilled_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Unfilled_1 == nil { - m.Unfilled_1 = &v13.Amount{} - } - if err := m.Unfilled_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unfilled_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Unfilled_2 == nil { - m.Unfilled_2 = &v13.Amount{} - } - if err := m.Unfilled_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochStartingHeight", wireType) - } - m.EpochStartingHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochStartingHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SctPositionPrefix", wireType) - } - m.SctPositionPrefix = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SctPositionPrefix |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TradingFunction) 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 ErrIntOverflowDex - } - 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: TradingFunction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TradingFunction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Component", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Component == nil { - m.Component = &BareTradingFunction{} - } - if err := m.Component.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pair == nil { - m.Pair = &TradingPair{} - } - if err := m.Pair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BareTradingFunction) 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 ErrIntOverflowDex - } - 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: BareTradingFunction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BareTradingFunction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - m.Fee = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Fee |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field P", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.P == nil { - m.P = &v13.Amount{} - } - if err := m.P.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Q", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Q == nil { - m.Q = &v13.Amount{} - } - if err := m.Q.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Reserves) 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 ErrIntOverflowDex - } - 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: Reserves: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Reserves: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field R1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.R1 == nil { - m.R1 = &v13.Amount{} - } - if err := m.R1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field R2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.R2 == nil { - m.R2 = &v13.Amount{} - } - if err := m.R2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Position) 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 ErrIntOverflowDex - } - 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: Position: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Position: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phi", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Phi == nil { - m.Phi = &TradingFunction{} - } - if err := m.Phi.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nonce = append(m.Nonce[:0], dAtA[iNdEx:postIndex]...) - if m.Nonce == nil { - m.Nonce = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &PositionState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves == nil { - m.Reserves = &Reserves{} - } - if err := m.Reserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CloseOnFill", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CloseOnFill = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionId) 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 ErrIntOverflowDex - } - 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: PositionId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltBech32M", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltBech32M = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionState) 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 ErrIntOverflowDex - } - 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: PositionState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= PositionState_PositionStateEnum(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LpNft) 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 ErrIntOverflowDex - } - 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: LpNft: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LpNft: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &PositionState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionOpen) 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 ErrIntOverflowDex - } - 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: PositionOpen: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionOpen: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Position == nil { - m.Position = &Position{} - } - if err := m.Position.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionClose) 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 ErrIntOverflowDex - } - 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: PositionClose: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionClose: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionWithdraw) 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 ErrIntOverflowDex - } - 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: PositionWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReservesCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReservesCommitment == nil { - m.ReservesCommitment = &v14.BalanceCommitment{} - } - if err := m.ReservesCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionRewardClaim) 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 ErrIntOverflowDex - } - 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: PositionRewardClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionRewardClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardsCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RewardsCommitment == nil { - m.RewardsCommitment = &v14.BalanceCommitment{} - } - if err := m.RewardsCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapExecution) 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 ErrIntOverflowDex - } - 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: SwapExecution: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapExecution: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Traces = append(m.Traces, &SwapExecution_Trace{}) - if err := m.Traces[len(m.Traces)-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 Input", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Input == nil { - m.Input = &v14.Value{} - } - if err := m.Input.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output == nil { - m.Output = &v14.Value{} - } - if err := m.Output.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapExecution_Trace) 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 ErrIntOverflowDex - } - 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: Trace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Trace: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value, &v14.Value{}) - if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionWithdrawPlan) 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 ErrIntOverflowDex - } - 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: PositionWithdrawPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionWithdrawPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves == nil { - m.Reserves = &Reserves{} - } - if err := m.Reserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pair == nil { - m.Pair = &TradingPair{} - } - if err := m.Pair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rewards = append(m.Rewards, &v14.Value{}) - if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionRewardClaimPlan) 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 ErrIntOverflowDex - } - 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: PositionRewardClaimPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionRewardClaimPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves == nil { - m.Reserves = &Reserves{} - } - if err := m.Reserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchSwapOutputDataRequest) 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 ErrIntOverflowDex - } - 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: BatchSwapOutputDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchSwapOutputDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BatchSwapOutputDataResponse) 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 ErrIntOverflowDex - } - 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: BatchSwapOutputDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BatchSwapOutputDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &BatchSwapOutputData{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapExecutionRequest) 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 ErrIntOverflowDex - } - 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: SwapExecutionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapExecutionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &DirectedTradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapExecutionResponse) 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 ErrIntOverflowDex - } - 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: SwapExecutionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapExecution", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapExecution == nil { - m.SwapExecution = &SwapExecution{} - } - if err := m.SwapExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArbExecutionRequest) 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 ErrIntOverflowDex - } - 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: ArbExecutionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArbExecutionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArbExecutionResponse) 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 ErrIntOverflowDex - } - 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: ArbExecutionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArbExecutionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapExecution", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapExecution == nil { - m.SwapExecution = &SwapExecution{} - } - if err := m.SwapExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapExecutionsRequest) 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 ErrIntOverflowDex - } - 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: SwapExecutionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapExecutionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - m.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) - } - m.EndHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &DirectedTradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapExecutionsResponse) 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 ErrIntOverflowDex - } - 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: SwapExecutionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapExecutionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapExecution", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapExecution == nil { - m.SwapExecution = &SwapExecution{} - } - if err := m.SwapExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &DirectedTradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArbExecutionsRequest) 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 ErrIntOverflowDex - } - 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: ArbExecutionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArbExecutionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - m.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) - } - m.EndHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArbExecutionsResponse) 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 ErrIntOverflowDex - } - 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: ArbExecutionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArbExecutionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapExecution", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapExecution == nil { - m.SwapExecution = &SwapExecution{} - } - if err := m.SwapExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionsRequest) 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 ErrIntOverflowDex - } - 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: LiquidityPositionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeClosed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeClosed = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionsResponse) 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 ErrIntOverflowDex - } - 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: LiquidityPositionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &Position{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionByIdRequest) 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 ErrIntOverflowDex - } - 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: LiquidityPositionByIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionByIdResponse) 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 ErrIntOverflowDex - } - 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: LiquidityPositionByIdResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &Position{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionsByIdRequest) 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 ErrIntOverflowDex - } - 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: LiquidityPositionsByIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionsByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PositionId = append(m.PositionId, &PositionId{}) - if err := m.PositionId[len(m.PositionId)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionsByIdResponse) 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 ErrIntOverflowDex - } - 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: LiquidityPositionsByIdResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionsByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &Position{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionsByPriceRequest) 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 ErrIntOverflowDex - } - 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: LiquidityPositionsByPriceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionsByPriceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &DirectedTradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LiquidityPositionsByPriceResponse) 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 ErrIntOverflowDex - } - 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: LiquidityPositionsByPriceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LiquidityPositionsByPriceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &Position{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &PositionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpreadRequest) 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 ErrIntOverflowDex - } - 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: SpreadRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpreadRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpreadResponse) 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 ErrIntOverflowDex - } - 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: SpreadResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpreadResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Best_1To_2Position", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Best_1To_2Position == nil { - m.Best_1To_2Position = &Position{} - } - if err := m.Best_1To_2Position.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Best_2To_1Position", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Best_2To_1Position == nil { - m.Best_2To_1Position = &Position{} - } - if err := m.Best_2To_1Position.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ApproxEffectivePrice_1To_2", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ApproxEffectivePrice_1To_2 = float64(math.Float64frombits(v)) - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ApproxEffectivePrice_2To_1", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ApproxEffectivePrice_2To_1 = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SimulateTradeRequest) 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 ErrIntOverflowDex - } - 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: SimulateTradeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SimulateTradeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Input == nil { - m.Input = &v14.Value{} - } - if err := m.Input.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output == nil { - m.Output = &v14.AssetId{} - } - if err := m.Output.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Routing", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Routing == nil { - m.Routing = &SimulateTradeRequest_Routing{} - } - if err := m.Routing.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SimulateTradeRequest_Routing) 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 ErrIntOverflowDex - } - 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: Routing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Routing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SimulateTradeRequest_Routing_Default{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Setting = &SimulateTradeRequest_Routing_Default_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SingleHop", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SimulateTradeRequest_Routing_SingleHop{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Setting = &SimulateTradeRequest_Routing_SingleHop_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SimulateTradeRequest_Routing_SingleHop) 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 ErrIntOverflowDex - } - 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: SingleHop: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SingleHop: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SimulateTradeRequest_Routing_Default) 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 ErrIntOverflowDex - } - 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: Default: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Default: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SimulateTradeResponse) 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 ErrIntOverflowDex - } - 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: SimulateTradeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SimulateTradeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output == nil { - m.Output = &SwapExecution{} - } - if err := m.Output.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unfilled", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Unfilled == nil { - m.Unfilled = &v14.Value{} - } - if err := m.Unfilled.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventSwap) 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 ErrIntOverflowDex - } - 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: EventSwap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventSwap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delta_1I", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_1I == nil { - m.Delta_1I = &v13.Amount{} - } - if err := m.Delta_1I.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delta_2I", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delta_2I == nil { - m.Delta_2I = &v13.Amount{} - } - if err := m.Delta_2I.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapCommitment == nil { - m.SwapCommitment = &v12.StateCommitment{} - } - if err := m.SwapCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventSwapClaim) 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 ErrIntOverflowDex - } - 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: EventSwapClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventSwapClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_1Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_1Commitment == nil { - m.Output_1Commitment = &v12.StateCommitment{} - } - if err := m.Output_1Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output_2Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output_2Commitment == nil { - m.Output_2Commitment = &v12.StateCommitment{} - } - if err := m.Output_2Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v1.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventPositionOpen) 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 ErrIntOverflowDex - } - 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: EventPositionOpen: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventPositionOpen: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves_1 == nil { - m.Reserves_1 = &v13.Amount{} - } - if err := m.Reserves_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves_2 == nil { - m.Reserves_2 = &v13.Amount{} - } - if err := m.Reserves_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingFee", wireType) - } - m.TradingFee = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TradingFee |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventPositionClose) 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 ErrIntOverflowDex - } - 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: EventPositionClose: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventPositionClose: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventQueuePositionClose) 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 ErrIntOverflowDex - } - 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: EventQueuePositionClose: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventQueuePositionClose: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventPositionWithdraw) 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 ErrIntOverflowDex - } - 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: EventPositionWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventPositionWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves_1 == nil { - m.Reserves_1 = &v13.Amount{} - } - if err := m.Reserves_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves_2 == nil { - m.Reserves_2 = &v13.Amount{} - } - if err := m.Reserves_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventPositionExecution) 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 ErrIntOverflowDex - } - 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: EventPositionExecution: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventPositionExecution: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves_1 == nil { - m.Reserves_1 = &v13.Amount{} - } - if err := m.Reserves_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves_2 == nil { - m.Reserves_2 = &v13.Amount{} - } - if err := m.Reserves_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevReserves_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrevReserves_1 == nil { - m.PrevReserves_1 = &v13.Amount{} - } - if err := m.PrevReserves_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevReserves_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrevReserves_2 == nil { - m.PrevReserves_2 = &v13.Amount{} - } - if err := m.PrevReserves_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Context == nil { - m.Context = &DirectedTradingPair{} - } - if err := m.Context.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBatchSwap) 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 ErrIntOverflowDex - } - 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: EventBatchSwap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBatchSwap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchSwapOutputData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BatchSwapOutputData == nil { - m.BatchSwapOutputData = &BatchSwapOutputData{} - } - if err := m.BatchSwapOutputData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapExecution_1For_2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapExecution_1For_2 == nil { - m.SwapExecution_1For_2 = &SwapExecution{} - } - if err := m.SwapExecution_1For_2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapExecution_2For_1", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapExecution_2For_1 == nil { - m.SwapExecution_2For_1 = &SwapExecution{} - } - if err := m.SwapExecution_2For_1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventArbExecution) 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 ErrIntOverflowDex - } - 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: EventArbExecution: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventArbExecution: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapExecution", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapExecution == nil { - m.SwapExecution = &SwapExecution{} - } - if err := m.SwapExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValueCircuitBreakerCredit) 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 ErrIntOverflowDex - } - 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: EventValueCircuitBreakerCredit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValueCircuitBreakerCredit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v14.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PreviousBalance == nil { - m.PreviousBalance = &v13.Amount{} - } - if err := m.PreviousBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NewBalance == nil { - m.NewBalance = &v13.Amount{} - } - if err := m.NewBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValueCircuitBreakerDebit) 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 ErrIntOverflowDex - } - 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: EventValueCircuitBreakerDebit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValueCircuitBreakerDebit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v14.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreviousBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PreviousBalance == nil { - m.PreviousBalance = &v13.Amount{} - } - if err := m.PreviousBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NewBalance == nil { - m.NewBalance = &v13.Amount{} - } - if err := m.NewBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DexParameters) 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 ErrIntOverflowDex - } - 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: DexParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DexParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsEnabled = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedCandidates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FixedCandidates = append(m.FixedCandidates, &v14.AssetId{}) - if err := m.FixedCandidates[len(m.FixedCandidates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxHops", wireType) - } - m.MaxHops = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxHops |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxPositionsPerPair", wireType) - } - m.MaxPositionsPerPair = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxPositionsPerPair |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxExecutionBudget", wireType) - } - m.MaxExecutionBudget = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxExecutionBudget |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowDex - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DexParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DexParams == nil { - m.DexParams = &DexParameters{} - } - if err := m.DexParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CandlestickData) 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 ErrIntOverflowDex - } - 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: CandlestickData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CandlestickData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Open", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Open = float64(math.Float64frombits(v)) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Close", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Close = float64(math.Float64frombits(v)) - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field High", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.High = float64(math.Float64frombits(v)) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Low", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Low = float64(math.Float64frombits(v)) - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DirectVolume", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.DirectVolume = float64(math.Float64frombits(v)) - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapVolume", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.SwapVolume = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CandlestickDataRequest) 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 ErrIntOverflowDex - } - 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: CandlestickDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CandlestickDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pair == nil { - m.Pair = &DirectedTradingPair{} - } - if err := m.Pair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - m.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CandlestickDataResponse) 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 ErrIntOverflowDex - } - 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: CandlestickDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CandlestickDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, &CandlestickData{}) - if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CandlestickDataStreamRequest) 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 ErrIntOverflowDex - } - 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: CandlestickDataStreamRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CandlestickDataStreamRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pair == nil { - m.Pair = &DirectedTradingPair{} - } - if err := m.Pair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CandlestickDataStreamResponse) 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 ErrIntOverflowDex - } - 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: CandlestickDataStreamResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CandlestickDataStreamResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDex - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDex - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDex - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &CandlestickData{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDex(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDex - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDex(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDex - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDex - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDex - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDex - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDex = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDex = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDex = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/distributions/v1/distributions.pb.go b/chain/penumbra/core/component/distributions/v1/distributions.pb.go deleted file mode 100644 index 6d06d720..00000000 --- a/chain/penumbra/core/component/distributions/v1/distributions.pb.go +++ /dev/null @@ -1,496 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/distributions/v1/distributions.proto - -package distributionsv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Distribution configuration data. -type DistributionsParameters struct { - // The amount of staking token issued per block. - StakingIssuancePerBlock uint64 `protobuf:"varint,1,opt,name=staking_issuance_per_block,json=stakingIssuancePerBlock,proto3" json:"staking_issuance_per_block,omitempty"` -} - -func (m *DistributionsParameters) Reset() { *m = DistributionsParameters{} } -func (m *DistributionsParameters) String() string { return proto.CompactTextString(m) } -func (*DistributionsParameters) ProtoMessage() {} -func (*DistributionsParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_3e86d892e577363a, []int{0} -} -func (m *DistributionsParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DistributionsParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DistributionsParameters.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 *DistributionsParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_DistributionsParameters.Merge(m, src) -} -func (m *DistributionsParameters) XXX_Size() int { - return m.Size() -} -func (m *DistributionsParameters) XXX_DiscardUnknown() { - xxx_messageInfo_DistributionsParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_DistributionsParameters proto.InternalMessageInfo - -func (m *DistributionsParameters) GetStakingIssuancePerBlock() uint64 { - if m != nil { - return m.StakingIssuancePerBlock - } - return 0 -} - -// Genesis data for the distributions module. -type GenesisContent struct { - DistributionsParams *DistributionsParameters `protobuf:"bytes,1,opt,name=distributions_params,json=distributionsParams,proto3" json:"distributions_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_3e86d892e577363a, []int{1} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetDistributionsParams() *DistributionsParameters { - if m != nil { - return m.DistributionsParams - } - return nil -} - -func init() { - proto.RegisterType((*DistributionsParameters)(nil), "penumbra.core.component.distributions.v1.DistributionsParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.distributions.v1.GenesisContent") -} - -func init() { - proto.RegisterFile("penumbra/core/component/distributions/v1/distributions.proto", fileDescriptor_3e86d892e577363a) -} - -var fileDescriptor_3e86d892e577363a = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x8a, 0xdb, 0x40, - 0x14, 0x86, 0x2d, 0xc5, 0xa4, 0x50, 0x20, 0x85, 0x12, 0x70, 0x48, 0x21, 0x82, 0x2b, 0x17, 0x8e, - 0x06, 0x25, 0x29, 0x82, 0x9c, 0x26, 0x92, 0xc1, 0xa4, 0x08, 0x08, 0x17, 0x2a, 0x82, 0x40, 0x8c, - 0xe4, 0x87, 0x3d, 0xd8, 0x9a, 0x11, 0x33, 0x4f, 0x3a, 0x42, 0xea, 0xe4, 0x0a, 0x29, 0x73, 0x92, - 0x65, 0x2b, 0x97, 0x5b, 0x2e, 0x72, 0xb7, 0xa7, 0x58, 0xc6, 0xd8, 0xde, 0x1d, 0x96, 0x05, 0x35, - 0x12, 0x7a, 0xef, 0xfb, 0xf4, 0xff, 0x48, 0xe3, 0x7c, 0xab, 0x81, 0x37, 0x55, 0x21, 0x29, 0x29, - 0x85, 0x04, 0x52, 0x8a, 0xaa, 0x16, 0x1c, 0x38, 0x92, 0x15, 0x53, 0x28, 0x59, 0xd1, 0x20, 0x13, - 0x5c, 0x91, 0x36, 0x30, 0x07, 0x7e, 0x2d, 0x05, 0x0a, 0x77, 0x72, 0xb6, 0x7d, 0x6d, 0xfb, 0x17, - 0xdb, 0x37, 0xe1, 0x36, 0x18, 0xa7, 0xce, 0x68, 0xfe, 0x78, 0x96, 0x50, 0x49, 0x2b, 0x40, 0x90, - 0xca, 0x9d, 0x39, 0xef, 0x15, 0xd2, 0x2d, 0xe3, 0xeb, 0x9c, 0x29, 0xd5, 0x50, 0x5e, 0x42, 0x5e, - 0x83, 0xcc, 0x8b, 0x9d, 0x28, 0xb7, 0xef, 0xac, 0x0f, 0xd6, 0x64, 0xb8, 0x1c, 0x9d, 0x88, 0x1f, - 0x27, 0x20, 0x01, 0x19, 0xe9, 0xf5, 0xf8, 0xb7, 0xe5, 0xbc, 0x5e, 0x00, 0x07, 0xc5, 0x54, 0x2c, - 0x38, 0x02, 0x47, 0x17, 0x9d, 0xb7, 0x46, 0x7c, 0x5e, 0xeb, 0x2c, 0x75, 0x7c, 0xd3, 0xab, 0x4f, - 0xdf, 0xfd, 0xbe, 0x9d, 0xfd, 0x67, 0x0a, 0x2f, 0xdf, 0xac, 0x9e, 0x2c, 0x54, 0xf4, 0xf7, 0xc5, - 0x55, 0xe7, 0x59, 0xfb, 0xce, 0xb3, 0x6e, 0x3b, 0xcf, 0xfa, 0x73, 0xf0, 0x06, 0xfb, 0x83, 0x37, - 0xb8, 0x39, 0x78, 0x03, 0x67, 0x5a, 0x8a, 0xaa, 0x77, 0x6a, 0xe4, 0x9a, 0xb1, 0xfa, 0x3b, 0x27, - 0xd6, 0xaf, 0x7a, 0xcd, 0x70, 0xd3, 0x14, 0x5a, 0x24, 0x0a, 0x25, 0xe5, 0x6b, 0xd8, 0x89, 0x16, - 0x3e, 0xb6, 0xc0, 0xb1, 0x91, 0xa0, 0x08, 0xe3, 0x08, 0xb2, 0xdc, 0x50, 0x7d, 0x57, 0x48, 0xda, - 0xaf, 0xe4, 0xf8, 0x40, 0xfa, 0xfe, 0xdf, 0x99, 0x31, 0x68, 0x83, 0x7f, 0xf6, 0x30, 0x89, 0xe3, - 0xf9, 0x7f, 0x7b, 0x92, 0x9c, 0x9b, 0xc7, 0xba, 0x79, 0x7c, 0x69, 0x6e, 0xf4, 0xf4, 0xd3, 0xe0, - 0xfa, 0x01, 0xcd, 0x34, 0x9a, 0x5d, 0xd0, 0xcc, 0x40, 0xb3, 0x34, 0xe8, 0xec, 0x2f, 0x7d, 0xd1, - 0x6c, 0x91, 0x44, 0x3f, 0x01, 0xe9, 0x8a, 0x22, 0xbd, 0xb3, 0xa7, 0x67, 0x2d, 0x0c, 0xb5, 0xa7, - 0xaf, 0x27, 0x31, 0x0c, 0x0d, 0x33, 0x0c, 0xd3, 0xa0, 0x78, 0x79, 0x3c, 0xa5, 0x9f, 0xef, 0x03, - 0x00, 0x00, 0xff, 0xff, 0x28, 0x0c, 0x96, 0x3c, 0xe5, 0x02, 0x00, 0x00, -} - -func (m *DistributionsParameters) Marshal() (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 *DistributionsParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DistributionsParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StakingIssuancePerBlock != 0 { - i = encodeVarintDistributions(dAtA, i, uint64(m.StakingIssuancePerBlock)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DistributionsParams != nil { - { - size, err := m.DistributionsParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDistributions(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintDistributions(dAtA []byte, offset int, v uint64) int { - offset -= sovDistributions(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *DistributionsParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StakingIssuancePerBlock != 0 { - n += 1 + sovDistributions(uint64(m.StakingIssuancePerBlock)) - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DistributionsParams != nil { - l = m.DistributionsParams.Size() - n += 1 + l + sovDistributions(uint64(l)) - } - return n -} - -func sovDistributions(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDistributions(x uint64) (n int) { - return sovDistributions(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DistributionsParameters) 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 ErrIntOverflowDistributions - } - 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: DistributionsParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DistributionsParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StakingIssuancePerBlock", wireType) - } - m.StakingIssuancePerBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDistributions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StakingIssuancePerBlock |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDistributions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDistributions - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowDistributions - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistributionsParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDistributions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDistributions - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDistributions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DistributionsParams == nil { - m.DistributionsParams = &DistributionsParameters{} - } - if err := m.DistributionsParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDistributions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDistributions - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDistributions(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDistributions - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDistributions - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDistributions - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDistributions - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDistributions - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDistributions - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDistributions = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDistributions = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDistributions = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/fee/v1/fee.pb.go b/chain/penumbra/core/component/fee/v1/fee.pb.go deleted file mode 100644 index 6dceb230..00000000 --- a/chain/penumbra/core/component/fee/v1/fee.pb.go +++ /dev/null @@ -1,1827 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/fee/v1/fee.proto - -package feev1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// The tier for the fee. -type FeeTier_Tier int32 - -const ( - FeeTier_TIER_UNSPECIFIED FeeTier_Tier = 0 - FeeTier_TIER_LOW FeeTier_Tier = 1 - FeeTier_TIER_MEDIUM FeeTier_Tier = 2 - FeeTier_TIER_HIGH FeeTier_Tier = 3 -) - -var FeeTier_Tier_name = map[int32]string{ - 0: "TIER_UNSPECIFIED", - 1: "TIER_LOW", - 2: "TIER_MEDIUM", - 3: "TIER_HIGH", -} - -var FeeTier_Tier_value = map[string]int32{ - "TIER_UNSPECIFIED": 0, - "TIER_LOW": 1, - "TIER_MEDIUM": 2, - "TIER_HIGH": 3, -} - -func (x FeeTier_Tier) String() string { - return proto.EnumName(FeeTier_Tier_name, int32(x)) -} - -func (FeeTier_Tier) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{2, 0} -} - -// Specifies fees paid by a transaction. -type Fee struct { - // The amount of the token used to pay fees. - Amount *v1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - // If present, the asset ID of the token used to pay fees. - // If absent, specifies the staking token implicitly. - AssetId *v11.AssetId `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` -} - -func (m *Fee) Reset() { *m = Fee{} } -func (m *Fee) String() string { return proto.CompactTextString(m) } -func (*Fee) ProtoMessage() {} -func (*Fee) Descriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{0} -} -func (m *Fee) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Fee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Fee.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 *Fee) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fee.Merge(m, src) -} -func (m *Fee) XXX_Size() int { - return m.Size() -} -func (m *Fee) XXX_DiscardUnknown() { - xxx_messageInfo_Fee.DiscardUnknown(m) -} - -var xxx_messageInfo_Fee proto.InternalMessageInfo - -func (m *Fee) GetAmount() *v1.Amount { - if m != nil { - return m.Amount - } - return nil -} - -func (m *Fee) GetAssetId() *v11.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -type GasPrices struct { - // The asset ID of the fee token these prices are for. - // - // If absent, specifies the staking token implicitly. - AssetId *v11.AssetId `protobuf:"bytes,15,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - // The price per unit block space in terms of the staking token, with an implicit 1,000 denominator. - BlockSpacePrice uint64 `protobuf:"varint,1,opt,name=block_space_price,json=blockSpacePrice,proto3" json:"block_space_price,omitempty"` - // The price per unit compact block space in terms of the staking token, with an implicit 1,000 denominator. - CompactBlockSpacePrice uint64 `protobuf:"varint,2,opt,name=compact_block_space_price,json=compactBlockSpacePrice,proto3" json:"compact_block_space_price,omitempty"` - // The price per unit verification cost in terms of the staking token, with an implicit 1,000 denominator. - VerificationPrice uint64 `protobuf:"varint,3,opt,name=verification_price,json=verificationPrice,proto3" json:"verification_price,omitempty"` - // The price per unit execution cost in terms of the staking token, with an implicit 1,000 denominator. - ExecutionPrice uint64 `protobuf:"varint,4,opt,name=execution_price,json=executionPrice,proto3" json:"execution_price,omitempty"` -} - -func (m *GasPrices) Reset() { *m = GasPrices{} } -func (m *GasPrices) String() string { return proto.CompactTextString(m) } -func (*GasPrices) ProtoMessage() {} -func (*GasPrices) Descriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{1} -} -func (m *GasPrices) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GasPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GasPrices.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 *GasPrices) XXX_Merge(src proto.Message) { - xxx_messageInfo_GasPrices.Merge(m, src) -} -func (m *GasPrices) XXX_Size() int { - return m.Size() -} -func (m *GasPrices) XXX_DiscardUnknown() { - xxx_messageInfo_GasPrices.DiscardUnknown(m) -} - -var xxx_messageInfo_GasPrices proto.InternalMessageInfo - -func (m *GasPrices) GetAssetId() *v11.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -func (m *GasPrices) GetBlockSpacePrice() uint64 { - if m != nil { - return m.BlockSpacePrice - } - return 0 -} - -func (m *GasPrices) GetCompactBlockSpacePrice() uint64 { - if m != nil { - return m.CompactBlockSpacePrice - } - return 0 -} - -func (m *GasPrices) GetVerificationPrice() uint64 { - if m != nil { - return m.VerificationPrice - } - return 0 -} - -func (m *GasPrices) GetExecutionPrice() uint64 { - if m != nil { - return m.ExecutionPrice - } - return 0 -} - -type FeeTier struct { - // The selected fee tier. - FeeTier FeeTier_Tier `protobuf:"varint,1,opt,name=fee_tier,json=feeTier,proto3,enum=penumbra.core.component.fee.v1.FeeTier_Tier" json:"fee_tier,omitempty"` -} - -func (m *FeeTier) Reset() { *m = FeeTier{} } -func (m *FeeTier) String() string { return proto.CompactTextString(m) } -func (*FeeTier) ProtoMessage() {} -func (*FeeTier) Descriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{2} -} -func (m *FeeTier) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FeeTier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FeeTier.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 *FeeTier) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeeTier.Merge(m, src) -} -func (m *FeeTier) XXX_Size() int { - return m.Size() -} -func (m *FeeTier) XXX_DiscardUnknown() { - xxx_messageInfo_FeeTier.DiscardUnknown(m) -} - -var xxx_messageInfo_FeeTier proto.InternalMessageInfo - -func (m *FeeTier) GetFeeTier() FeeTier_Tier { - if m != nil { - return m.FeeTier - } - return FeeTier_TIER_UNSPECIFIED -} - -// Fee component configuration data. -type FeeParameters struct { - // Fixed gas prices in the native token used to compute transactions' base - // fees. - // - // In the future, this should be removed and replaced with parameters for - // dynamic gas pricing. - FixedGasPrices *GasPrices `protobuf:"bytes,1,opt,name=fixed_gas_prices,json=fixedGasPrices,proto3" json:"fixed_gas_prices,omitempty"` - // Fixed gas prices in other tokens used to compute transactions' base fees. - // - // In the future, this should be removed and replaced with fixed multiples of - // the native token's price (so that there is one set of dynamically - // determined gas prices in the native token, and derived gas prices in other - // alternative tokens). - // - // If this is empty, no other tokens are accepted for gas. - FixedAltGasPrices []*GasPrices `protobuf:"bytes,2,rep,name=fixed_alt_gas_prices,json=fixedAltGasPrices,proto3" json:"fixed_alt_gas_prices,omitempty"` -} - -func (m *FeeParameters) Reset() { *m = FeeParameters{} } -func (m *FeeParameters) String() string { return proto.CompactTextString(m) } -func (*FeeParameters) ProtoMessage() {} -func (*FeeParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{3} -} -func (m *FeeParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FeeParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FeeParameters.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 *FeeParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeeParameters.Merge(m, src) -} -func (m *FeeParameters) XXX_Size() int { - return m.Size() -} -func (m *FeeParameters) XXX_DiscardUnknown() { - xxx_messageInfo_FeeParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_FeeParameters proto.InternalMessageInfo - -func (m *FeeParameters) GetFixedGasPrices() *GasPrices { - if m != nil { - return m.FixedGasPrices - } - return nil -} - -func (m *FeeParameters) GetFixedAltGasPrices() []*GasPrices { - if m != nil { - return m.FixedAltGasPrices - } - return nil -} - -// Fee-specific genesis content. -type GenesisContent struct { - // The FeeParameters present at genesis. - FeeParams *FeeParameters `protobuf:"bytes,1,opt,name=fee_params,json=feeParams,proto3" json:"fee_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{4} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetFeeParams() *FeeParameters { - if m != nil { - return m.FeeParams - } - return nil -} - -type CurrentGasPricesRequest struct { -} - -func (m *CurrentGasPricesRequest) Reset() { *m = CurrentGasPricesRequest{} } -func (m *CurrentGasPricesRequest) String() string { return proto.CompactTextString(m) } -func (*CurrentGasPricesRequest) ProtoMessage() {} -func (*CurrentGasPricesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{5} -} -func (m *CurrentGasPricesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CurrentGasPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CurrentGasPricesRequest.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 *CurrentGasPricesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CurrentGasPricesRequest.Merge(m, src) -} -func (m *CurrentGasPricesRequest) XXX_Size() int { - return m.Size() -} -func (m *CurrentGasPricesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CurrentGasPricesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CurrentGasPricesRequest proto.InternalMessageInfo - -type CurrentGasPricesResponse struct { - // The current gas prices, in the preferred (native) token. - GasPrices *GasPrices `protobuf:"bytes,1,opt,name=gas_prices,json=gasPrices,proto3" json:"gas_prices,omitempty"` - // Other gas prices for other accepted tokens. - AltGasPrices []*GasPrices `protobuf:"bytes,2,rep,name=alt_gas_prices,json=altGasPrices,proto3" json:"alt_gas_prices,omitempty"` -} - -func (m *CurrentGasPricesResponse) Reset() { *m = CurrentGasPricesResponse{} } -func (m *CurrentGasPricesResponse) String() string { return proto.CompactTextString(m) } -func (*CurrentGasPricesResponse) ProtoMessage() {} -func (*CurrentGasPricesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_80e267509eb0355f, []int{6} -} -func (m *CurrentGasPricesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CurrentGasPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CurrentGasPricesResponse.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 *CurrentGasPricesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CurrentGasPricesResponse.Merge(m, src) -} -func (m *CurrentGasPricesResponse) XXX_Size() int { - return m.Size() -} -func (m *CurrentGasPricesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CurrentGasPricesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CurrentGasPricesResponse proto.InternalMessageInfo - -func (m *CurrentGasPricesResponse) GetGasPrices() *GasPrices { - if m != nil { - return m.GasPrices - } - return nil -} - -func (m *CurrentGasPricesResponse) GetAltGasPrices() []*GasPrices { - if m != nil { - return m.AltGasPrices - } - return nil -} - -func init() { - proto.RegisterEnum("penumbra.core.component.fee.v1.FeeTier_Tier", FeeTier_Tier_name, FeeTier_Tier_value) - proto.RegisterType((*Fee)(nil), "penumbra.core.component.fee.v1.Fee") - proto.RegisterType((*GasPrices)(nil), "penumbra.core.component.fee.v1.GasPrices") - proto.RegisterType((*FeeTier)(nil), "penumbra.core.component.fee.v1.FeeTier") - proto.RegisterType((*FeeParameters)(nil), "penumbra.core.component.fee.v1.FeeParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.fee.v1.GenesisContent") - proto.RegisterType((*CurrentGasPricesRequest)(nil), "penumbra.core.component.fee.v1.CurrentGasPricesRequest") - proto.RegisterType((*CurrentGasPricesResponse)(nil), "penumbra.core.component.fee.v1.CurrentGasPricesResponse") -} - -func init() { - proto.RegisterFile("penumbra/core/component/fee/v1/fee.proto", fileDescriptor_80e267509eb0355f) -} - -var fileDescriptor_80e267509eb0355f = []byte{ - // 742 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x4f, 0x4f, 0xdb, 0x48, - 0x18, 0xc6, 0x63, 0x27, 0x82, 0x64, 0x80, 0x24, 0x58, 0x68, 0x17, 0xd0, 0xca, 0x8b, 0x7c, 0x59, - 0x16, 0x15, 0x5b, 0xa1, 0x95, 0x4a, 0xd3, 0x13, 0x09, 0x71, 0x48, 0x05, 0x25, 0x75, 0x80, 0x4a, - 0x28, 0x6a, 0x34, 0x71, 0xde, 0x04, 0xab, 0x89, 0x9d, 0xce, 0x8c, 0x5d, 0xfa, 0x01, 0xda, 0x73, - 0x4f, 0x3d, 0xf6, 0xd0, 0x63, 0xef, 0xbd, 0xb7, 0xb7, 0xaa, 0x27, 0x8e, 0x3d, 0x56, 0xe1, 0xd6, - 0x4f, 0x51, 0xcd, 0x38, 0x7f, 0x41, 0x85, 0x22, 0x2e, 0xb6, 0x67, 0xe6, 0xf7, 0x3c, 0xf3, 0xbe, - 0x8f, 0x47, 0x83, 0x56, 0xbb, 0xe0, 0xfa, 0x9d, 0x3a, 0xc1, 0x86, 0xed, 0x11, 0x30, 0x6c, 0xaf, - 0xd3, 0xf5, 0x5c, 0x70, 0x99, 0xd1, 0x04, 0x30, 0x82, 0x0c, 0x7f, 0xe9, 0x5d, 0xe2, 0x31, 0x4f, - 0x51, 0x07, 0xa4, 0xce, 0x49, 0x7d, 0x48, 0xea, 0x1c, 0x09, 0x32, 0xcb, 0xda, 0xa4, 0x13, 0xa6, - 0x14, 0x18, 0x77, 0x10, 0x1f, 0xa1, 0xc7, 0xb2, 0x3a, 0xc9, 0xb8, 0x7e, 0x87, 0x13, 0xae, 0xdf, - 0x09, 0xd7, 0xb5, 0x97, 0x28, 0x6a, 0x02, 0x28, 0xf7, 0xd0, 0x14, 0xee, 0x78, 0xbe, 0xcb, 0x16, - 0xa5, 0x15, 0x69, 0x75, 0x66, 0xe3, 0x1f, 0x7d, 0x72, 0x6f, 0x2e, 0x08, 0x32, 0xfa, 0x96, 0x60, - 0xac, 0x3e, 0xab, 0x64, 0x51, 0x5c, 0xec, 0x55, 0x73, 0x1a, 0x8b, 0xb2, 0xd0, 0xfd, 0x7b, 0x41, - 0x17, 0x96, 0xc2, 0x95, 0xfc, 0xa3, 0xd4, 0xb0, 0xa6, 0x71, 0xf8, 0xa1, 0xbd, 0x91, 0x51, 0xa2, - 0x88, 0x69, 0x99, 0x38, 0x36, 0xd0, 0x09, 0xa7, 0xd4, 0xcd, 0x9c, 0x94, 0x35, 0x34, 0x5f, 0x6f, - 0x7b, 0xf6, 0xf3, 0x1a, 0xed, 0x62, 0x1b, 0x6a, 0x5d, 0xee, 0x28, 0xda, 0x88, 0x59, 0x29, 0xb1, - 0x50, 0xe1, 0xf3, 0x62, 0x23, 0xe5, 0x01, 0x5a, 0xe2, 0x31, 0x62, 0x9b, 0xd5, 0x2e, 0x6b, 0x64, - 0xa1, 0xf9, 0xab, 0x0f, 0xe4, 0x2e, 0x48, 0xd7, 0x91, 0x12, 0x00, 0x71, 0x9a, 0x8e, 0x8d, 0x99, - 0xe3, 0xb9, 0x7d, 0x4d, 0x54, 0x68, 0xe6, 0xc7, 0x57, 0x42, 0xfc, 0x3f, 0x94, 0x82, 0x53, 0xb0, - 0xfd, 0x31, 0x36, 0x26, 0xd8, 0xe4, 0x70, 0x5a, 0x80, 0xda, 0x7b, 0x09, 0x4d, 0x9b, 0x00, 0x07, - 0x0e, 0x10, 0xa5, 0x88, 0xe2, 0x4d, 0x80, 0x1a, 0x73, 0x80, 0x88, 0x0e, 0x92, 0x1b, 0x77, 0xf4, - 0xab, 0x0f, 0x81, 0xde, 0x97, 0xea, 0xfc, 0x61, 0x4d, 0x37, 0xc3, 0x91, 0xf6, 0x08, 0xc5, 0x84, - 0xe1, 0x02, 0x4a, 0x1f, 0x94, 0x0a, 0x56, 0xed, 0xf0, 0x71, 0xa5, 0x5c, 0xc8, 0x97, 0xcc, 0x52, - 0x61, 0x3b, 0x1d, 0x51, 0x66, 0x51, 0x5c, 0xcc, 0xee, 0xee, 0x3f, 0x4d, 0x4b, 0x4a, 0x0a, 0xcd, - 0x88, 0xd1, 0x5e, 0x61, 0xbb, 0x74, 0xb8, 0x97, 0x96, 0x95, 0x39, 0x94, 0x10, 0x13, 0x3b, 0xa5, - 0xe2, 0x4e, 0x3a, 0xaa, 0x7d, 0x96, 0xd0, 0x9c, 0x09, 0x50, 0xc6, 0x04, 0x77, 0x80, 0x01, 0xa1, - 0x4a, 0x05, 0xa5, 0x9b, 0xce, 0x29, 0x34, 0x6a, 0x2d, 0x4c, 0xc3, 0xde, 0x68, 0xff, 0xdc, 0xfc, - 0x7f, 0x5d, 0xb9, 0xc3, 0x5f, 0x6e, 0x25, 0x85, 0xc5, 0xe8, 0x08, 0x1c, 0xa3, 0x85, 0xd0, 0x14, - 0xb7, 0xd9, 0xb8, 0xb1, 0xbc, 0x12, 0xbd, 0x99, 0xf1, 0xbc, 0xb0, 0xd9, 0x6a, 0xb3, 0xe1, 0x94, - 0xf6, 0x0c, 0x25, 0x8b, 0xe0, 0x02, 0x75, 0x68, 0xde, 0x73, 0x19, 0xb8, 0x4c, 0xd9, 0x45, 0x88, - 0x27, 0xdd, 0xe5, 0x4d, 0x0d, 0x8a, 0x5f, 0xff, 0x83, 0xac, 0x47, 0x29, 0x58, 0x89, 0x66, 0x7f, - 0x48, 0xb5, 0x25, 0xf4, 0x77, 0xde, 0x27, 0x04, 0xdc, 0xd1, 0x9e, 0x16, 0xbc, 0xf0, 0x81, 0x32, - 0xed, 0x93, 0x84, 0x16, 0x2f, 0xaf, 0xd1, 0xae, 0xe7, 0x52, 0x50, 0x76, 0x10, 0xba, 0x4d, 0x84, - 0x89, 0xd6, 0x30, 0xbd, 0x7d, 0x94, 0xbc, 0x6d, 0x6e, 0xb3, 0x78, 0x2c, 0xb2, 0x8d, 0x77, 0x12, - 0x9a, 0x7d, 0xe2, 0x03, 0x79, 0x55, 0x01, 0x12, 0xf0, 0x03, 0xfd, 0x5a, 0x42, 0xe9, 0x8b, 0x8d, - 0x28, 0xf7, 0xaf, 0xb3, 0xff, 0x4d, 0x2c, 0xcb, 0x9b, 0x37, 0x17, 0x86, 0x99, 0xe5, 0xbe, 0xc8, - 0x5f, 0x7b, 0xaa, 0x74, 0xd6, 0x53, 0xa5, 0x1f, 0x3d, 0x55, 0x7a, 0x7b, 0xae, 0x46, 0xce, 0xce, - 0xd5, 0xc8, 0xf7, 0x73, 0x35, 0x82, 0x34, 0xdb, 0xeb, 0x5c, 0xe3, 0x9b, 0x8b, 0xf3, 0x9f, 0xc8, - 0xaf, 0xbe, 0xb2, 0x74, 0x5c, 0x6d, 0x39, 0xec, 0xc4, 0xaf, 0x73, 0xc8, 0xa0, 0x8c, 0x60, 0xb7, - 0x05, 0x6d, 0x2f, 0x80, 0xf5, 0x00, 0x5c, 0xe6, 0x13, 0xa0, 0x86, 0xe3, 0x32, 0x20, 0xf6, 0x09, - 0xe6, 0x6f, 0xca, 0x8c, 0x60, 0xd3, 0x10, 0x03, 0xe3, 0xea, 0x2b, 0xfc, 0x61, 0x13, 0x20, 0xc8, - 0x7c, 0x90, 0x63, 0xe5, 0x7c, 0xde, 0xfc, 0x28, 0xab, 0xe5, 0x41, 0x45, 0x79, 0x5e, 0x51, 0x7e, - 0x58, 0x91, 0x09, 0xa0, 0x1f, 0x65, 0xbe, 0x8d, 0x80, 0x2a, 0x07, 0xaa, 0x43, 0xa0, 0x6a, 0x02, - 0x54, 0x8f, 0x32, 0x3d, 0x79, 0xed, 0x6a, 0xa0, 0x5a, 0x2c, 0xe7, 0xf6, 0x80, 0xe1, 0x06, 0x66, - 0xf8, 0xa7, 0xac, 0x0d, 0xe0, 0x6c, 0x96, 0xd3, 0xfc, 0xd9, 0xc7, 0xb3, 0x59, 0x13, 0x20, 0x9b, - 0x3d, 0xca, 0xd4, 0xa7, 0xc4, 0xe5, 0x7f, 0xf7, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x82, 0x0e, - 0x84, 0x9a, 0x8c, 0x06, 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // Get the current gas prices. - CurrentGasPrices(ctx context.Context, in *CurrentGasPricesRequest, opts ...grpc.CallOption) (*CurrentGasPricesResponse, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) CurrentGasPrices(ctx context.Context, in *CurrentGasPricesRequest, opts ...grpc.CallOption) (*CurrentGasPricesResponse, error) { - out := new(CurrentGasPricesResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.fee.v1.QueryService/CurrentGasPrices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // Get the current gas prices. - CurrentGasPrices(context.Context, *CurrentGasPricesRequest) (*CurrentGasPricesResponse, error) -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) CurrentGasPrices(ctx context.Context, req *CurrentGasPricesRequest) (*CurrentGasPricesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrentGasPrices not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_CurrentGasPrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CurrentGasPricesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).CurrentGasPrices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.fee.v1.QueryService/CurrentGasPrices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).CurrentGasPrices(ctx, req.(*CurrentGasPricesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.fee.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CurrentGasPrices", - Handler: _QueryService_CurrentGasPrices_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "penumbra/core/component/fee/v1/fee.proto", -} - -func (m *Fee) Marshal() (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 *Fee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Fee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GasPrices) Marshal() (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 *GasPrices) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GasPrices) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - if m.ExecutionPrice != 0 { - i = encodeVarintFee(dAtA, i, uint64(m.ExecutionPrice)) - i-- - dAtA[i] = 0x20 - } - if m.VerificationPrice != 0 { - i = encodeVarintFee(dAtA, i, uint64(m.VerificationPrice)) - i-- - dAtA[i] = 0x18 - } - if m.CompactBlockSpacePrice != 0 { - i = encodeVarintFee(dAtA, i, uint64(m.CompactBlockSpacePrice)) - i-- - dAtA[i] = 0x10 - } - if m.BlockSpacePrice != 0 { - i = encodeVarintFee(dAtA, i, uint64(m.BlockSpacePrice)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *FeeTier) Marshal() (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 *FeeTier) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FeeTier) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FeeTier != 0 { - i = encodeVarintFee(dAtA, i, uint64(m.FeeTier)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *FeeParameters) Marshal() (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 *FeeParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FeeParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FixedAltGasPrices) > 0 { - for iNdEx := len(m.FixedAltGasPrices) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FixedAltGasPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.FixedGasPrices != nil { - { - size, err := m.FixedGasPrices.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FeeParams != nil { - { - size, err := m.FeeParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CurrentGasPricesRequest) Marshal() (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 *CurrentGasPricesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CurrentGasPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *CurrentGasPricesResponse) Marshal() (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 *CurrentGasPricesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CurrentGasPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AltGasPrices) > 0 { - for iNdEx := len(m.AltGasPrices) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AltGasPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.GasPrices != nil { - { - size, err := m.GasPrices.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFee(dAtA []byte, offset int, v uint64) int { - offset -= sovFee(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Fee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovFee(uint64(l)) - } - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovFee(uint64(l)) - } - return n -} - -func (m *GasPrices) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockSpacePrice != 0 { - n += 1 + sovFee(uint64(m.BlockSpacePrice)) - } - if m.CompactBlockSpacePrice != 0 { - n += 1 + sovFee(uint64(m.CompactBlockSpacePrice)) - } - if m.VerificationPrice != 0 { - n += 1 + sovFee(uint64(m.VerificationPrice)) - } - if m.ExecutionPrice != 0 { - n += 1 + sovFee(uint64(m.ExecutionPrice)) - } - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovFee(uint64(l)) - } - return n -} - -func (m *FeeTier) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FeeTier != 0 { - n += 1 + sovFee(uint64(m.FeeTier)) - } - return n -} - -func (m *FeeParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FixedGasPrices != nil { - l = m.FixedGasPrices.Size() - n += 1 + l + sovFee(uint64(l)) - } - if len(m.FixedAltGasPrices) > 0 { - for _, e := range m.FixedAltGasPrices { - l = e.Size() - n += 1 + l + sovFee(uint64(l)) - } - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FeeParams != nil { - l = m.FeeParams.Size() - n += 1 + l + sovFee(uint64(l)) - } - return n -} - -func (m *CurrentGasPricesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *CurrentGasPricesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GasPrices != nil { - l = m.GasPrices.Size() - n += 1 + l + sovFee(uint64(l)) - } - if len(m.AltGasPrices) > 0 { - for _, e := range m.AltGasPrices { - l = e.Size() - n += 1 + l + sovFee(uint64(l)) - } - } - return n -} - -func sovFee(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFee(x uint64) (n int) { - return sovFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Fee) 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 ErrIntOverflowFee - } - 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: Fee: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Fee: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v1.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v11.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GasPrices) 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 ErrIntOverflowFee - } - 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: GasPrices: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GasPrices: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockSpacePrice", wireType) - } - m.BlockSpacePrice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockSpacePrice |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompactBlockSpacePrice", wireType) - } - m.CompactBlockSpacePrice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompactBlockSpacePrice |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationPrice", wireType) - } - m.VerificationPrice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VerificationPrice |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutionPrice", wireType) - } - m.ExecutionPrice = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExecutionPrice |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v11.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FeeTier) 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 ErrIntOverflowFee - } - 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: FeeTier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FeeTier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeTier", wireType) - } - m.FeeTier = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeTier |= FeeTier_Tier(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FeeParameters) 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 ErrIntOverflowFee - } - 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: FeeParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FeeParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedGasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FixedGasPrices == nil { - m.FixedGasPrices = &GasPrices{} - } - if err := m.FixedGasPrices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedAltGasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FixedAltGasPrices = append(m.FixedAltGasPrices, &GasPrices{}) - if err := m.FixedAltGasPrices[len(m.FixedAltGasPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowFee - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeParams == nil { - m.FeeParams = &FeeParameters{} - } - if err := m.FeeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CurrentGasPricesRequest) 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 ErrIntOverflowFee - } - 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: CurrentGasPricesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CurrentGasPricesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CurrentGasPricesResponse) 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 ErrIntOverflowFee - } - 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: CurrentGasPricesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CurrentGasPricesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GasPrices == nil { - m.GasPrices = &GasPrices{} - } - if err := m.GasPrices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltGasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFee - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltGasPrices = append(m.AltGasPrices, &GasPrices{}) - if err := m.AltGasPrices[len(m.AltGasPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFee(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFee - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFee - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFee - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFee = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFee = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFee = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/funding/v1/funding.pb.go b/chain/penumbra/core/component/funding/v1/funding.pb.go deleted file mode 100644 index ffcc0b71..00000000 --- a/chain/penumbra/core/component/funding/v1/funding.pb.go +++ /dev/null @@ -1,737 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/funding/v1/funding.proto - -package fundingv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Funding component configuration data. -type FundingParameters struct { -} - -func (m *FundingParameters) Reset() { *m = FundingParameters{} } -func (m *FundingParameters) String() string { return proto.CompactTextString(m) } -func (*FundingParameters) ProtoMessage() {} -func (*FundingParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_586f7399b4e8a469, []int{0} -} -func (m *FundingParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FundingParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FundingParameters.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 *FundingParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_FundingParameters.Merge(m, src) -} -func (m *FundingParameters) XXX_Size() int { - return m.Size() -} -func (m *FundingParameters) XXX_DiscardUnknown() { - xxx_messageInfo_FundingParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_FundingParameters proto.InternalMessageInfo - -// Genesis data for the funding component. -type GenesisContent struct { - FundingParams *FundingParameters `protobuf:"bytes,1,opt,name=funding_params,json=fundingParams,proto3" json:"funding_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_586f7399b4e8a469, []int{1} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetFundingParams() *FundingParameters { - if m != nil { - return m.FundingParams - } - return nil -} - -// Indicates that a funding stream reward was paid. -type EventFundingStreamReward struct { - // The recipient of the funding stream reward. - // This is a string value for future extensibility. - // Currently it will be either "community-pool" - // or an address. - Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` - // The epoch for which the reward was paid. - EpochIndex uint64 `protobuf:"varint,2,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` - // The amount of the reward, in staking tokens. - RewardAmount *v1.Amount `protobuf:"bytes,3,opt,name=reward_amount,json=rewardAmount,proto3" json:"reward_amount,omitempty"` -} - -func (m *EventFundingStreamReward) Reset() { *m = EventFundingStreamReward{} } -func (m *EventFundingStreamReward) String() string { return proto.CompactTextString(m) } -func (*EventFundingStreamReward) ProtoMessage() {} -func (*EventFundingStreamReward) Descriptor() ([]byte, []int) { - return fileDescriptor_586f7399b4e8a469, []int{2} -} -func (m *EventFundingStreamReward) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventFundingStreamReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventFundingStreamReward.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 *EventFundingStreamReward) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventFundingStreamReward.Merge(m, src) -} -func (m *EventFundingStreamReward) XXX_Size() int { - return m.Size() -} -func (m *EventFundingStreamReward) XXX_DiscardUnknown() { - xxx_messageInfo_EventFundingStreamReward.DiscardUnknown(m) -} - -var xxx_messageInfo_EventFundingStreamReward proto.InternalMessageInfo - -func (m *EventFundingStreamReward) GetRecipient() string { - if m != nil { - return m.Recipient - } - return "" -} - -func (m *EventFundingStreamReward) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -func (m *EventFundingStreamReward) GetRewardAmount() *v1.Amount { - if m != nil { - return m.RewardAmount - } - return nil -} - -func init() { - proto.RegisterType((*FundingParameters)(nil), "penumbra.core.component.funding.v1.FundingParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.funding.v1.GenesisContent") - proto.RegisterType((*EventFundingStreamReward)(nil), "penumbra.core.component.funding.v1.EventFundingStreamReward") -} - -func init() { - proto.RegisterFile("penumbra/core/component/funding/v1/funding.proto", fileDescriptor_586f7399b4e8a469) -} - -var fileDescriptor_586f7399b4e8a469 = []byte{ - // 438 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x8a, 0xd4, 0x40, - 0x14, 0x85, 0x3b, 0x71, 0x10, 0xa6, 0xe6, 0x07, 0x8c, 0x9b, 0x46, 0x86, 0x38, 0x64, 0x31, 0xcc, - 0xc6, 0x2a, 0xa3, 0x08, 0x12, 0x57, 0xd3, 0xc1, 0x19, 0x5c, 0x08, 0x21, 0x42, 0x2f, 0x24, 0xd0, - 0x54, 0x27, 0x77, 0xba, 0x03, 0xd6, 0xad, 0x50, 0x55, 0x89, 0x3e, 0x86, 0x0f, 0xe0, 0xca, 0xa5, - 0x4f, 0x22, 0xae, 0x66, 0xe9, 0x52, 0xbb, 0x77, 0x3e, 0x85, 0x54, 0x7e, 0xba, 0xfd, 0x59, 0xf4, - 0x6c, 0x92, 0xaa, 0xcb, 0x77, 0x4e, 0x1d, 0x0e, 0x97, 0x3c, 0xae, 0x00, 0x6b, 0x31, 0x57, 0x9c, - 0xe5, 0x52, 0x01, 0xcb, 0xa5, 0xa8, 0x24, 0x02, 0x1a, 0x76, 0x5d, 0x63, 0x51, 0xe2, 0x82, 0x35, - 0xe1, 0x70, 0xa4, 0x95, 0x92, 0x46, 0x7a, 0xc1, 0xa0, 0xa0, 0x56, 0x41, 0x37, 0x0a, 0x3a, 0x60, - 0x4d, 0xf8, 0xc0, 0xff, 0xdb, 0x15, 0x6b, 0x61, 0x7d, 0xb0, 0x16, 0x9d, 0x47, 0x70, 0x9f, 0xdc, - 0xbb, 0xec, 0xe8, 0x84, 0x2b, 0x2e, 0xc0, 0x80, 0xd2, 0x01, 0x92, 0xe3, 0x2b, 0x40, 0xd0, 0xa5, - 0x8e, 0x25, 0x1a, 0x40, 0xe3, 0x65, 0xe4, 0xb8, 0x37, 0x9d, 0x55, 0x96, 0xd3, 0x63, 0xe7, 0xd4, - 0x39, 0x3f, 0x78, 0xf2, 0x8c, 0xee, 0xce, 0x40, 0xff, 0x7b, 0x20, 0x3d, 0xba, 0xfe, 0x63, 0xa4, - 0x83, 0x4f, 0x0e, 0x19, 0xbf, 0x6c, 0x00, 0x4d, 0x4f, 0xbe, 0x31, 0x0a, 0xb8, 0x48, 0xe1, 0x3d, - 0x57, 0x85, 0x77, 0x42, 0xf6, 0x15, 0xe4, 0x65, 0x55, 0x02, 0x9a, 0xf6, 0xd5, 0xfd, 0x74, 0x3b, - 0xf0, 0x1e, 0x92, 0x03, 0xa8, 0x64, 0xbe, 0x9c, 0x95, 0x58, 0xc0, 0x87, 0xb1, 0x7b, 0xea, 0x9c, - 0xef, 0xa5, 0xa4, 0x1d, 0xbd, 0xb2, 0x13, 0xef, 0x82, 0x1c, 0xa9, 0xd6, 0x68, 0xc6, 0x85, 0xac, - 0xd1, 0x8c, 0xef, 0xb4, 0xc1, 0x4f, 0xfe, 0x09, 0x6e, 0x1b, 0x69, 0x42, 0x7a, 0xd1, 0x32, 0xe9, - 0x61, 0x27, 0xe9, 0x6e, 0x93, 0x9f, 0xee, 0xd7, 0x95, 0xef, 0xdc, 0xac, 0x7c, 0xe7, 0xc7, 0xca, - 0x77, 0x3e, 0xae, 0xfd, 0xd1, 0xcd, 0xda, 0x1f, 0x7d, 0x5f, 0xfb, 0x23, 0x72, 0x96, 0x4b, 0x71, - 0x8b, 0x0a, 0x26, 0x87, 0x43, 0x07, 0xb6, 0xf4, 0xc4, 0x79, 0x5b, 0x2c, 0x4a, 0xb3, 0xac, 0xe7, - 0x16, 0x66, 0xda, 0x28, 0x8e, 0x0b, 0x78, 0x27, 0x1b, 0x78, 0x64, 0x4b, 0xa8, 0x15, 0x68, 0x56, - 0xa2, 0x01, 0x95, 0x2f, 0xb9, 0xfd, 0x6b, 0xc3, 0x9a, 0xe7, 0xac, 0xbd, 0xb0, 0xdd, 0x4b, 0xf2, - 0xa2, 0x3f, 0x36, 0xe1, 0x67, 0x77, 0x2f, 0x89, 0xe3, 0xcb, 0x2f, 0x6e, 0x90, 0x0c, 0x09, 0x63, - 0x9b, 0x30, 0xde, 0x24, 0xec, 0x53, 0xd1, 0x69, 0xf8, 0x6d, 0x0b, 0x65, 0x16, 0xca, 0x36, 0x50, - 0xd6, 0x43, 0xd9, 0x34, 0x5c, 0xb9, 0x74, 0x37, 0x94, 0x5d, 0x25, 0x93, 0xd7, 0x60, 0x78, 0xc1, - 0x0d, 0xff, 0xe5, 0x9e, 0x0d, 0x82, 0x28, 0xb2, 0x0a, 0xfb, 0xed, 0x25, 0x51, 0xd4, 0x6b, 0xa2, - 0x68, 0x1a, 0xce, 0xef, 0xb6, 0xeb, 0xf8, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xc1, - 0x57, 0xd3, 0x06, 0x03, 0x00, 0x00, -} - -func (m *FundingParameters) Marshal() (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 *FundingParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FundingParams != nil { - { - size, err := m.FundingParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFunding(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventFundingStreamReward) Marshal() (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 *EventFundingStreamReward) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventFundingStreamReward) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RewardAmount != nil { - { - size, err := m.RewardAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintFunding(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.EpochIndex != 0 { - i = encodeVarintFunding(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0x10 - } - if len(m.Recipient) > 0 { - i -= len(m.Recipient) - copy(dAtA[i:], m.Recipient) - i = encodeVarintFunding(dAtA, i, uint64(len(m.Recipient))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFunding(dAtA []byte, offset int, v uint64) int { - offset -= sovFunding(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *FundingParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FundingParams != nil { - l = m.FundingParams.Size() - n += 1 + l + sovFunding(uint64(l)) - } - return n -} - -func (m *EventFundingStreamReward) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Recipient) - if l > 0 { - n += 1 + l + sovFunding(uint64(l)) - } - if m.EpochIndex != 0 { - n += 1 + sovFunding(uint64(m.EpochIndex)) - } - if m.RewardAmount != nil { - l = m.RewardAmount.Size() - n += 1 + l + sovFunding(uint64(l)) - } - return n -} - -func sovFunding(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFunding(x uint64) (n int) { - return sovFunding(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FundingParameters) 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 ErrIntOverflowFunding - } - 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: FundingParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FundingParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFunding(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFunding - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowFunding - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FundingParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFunding - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFunding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FundingParams == nil { - m.FundingParams = &FundingParameters{} - } - if err := m.FundingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFunding(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFunding - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventFundingStreamReward) 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 ErrIntOverflowFunding - } - 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: EventFundingStreamReward: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventFundingStreamReward: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFunding - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFunding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFunding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthFunding - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthFunding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RewardAmount == nil { - m.RewardAmount = &v1.Amount{} - } - if err := m.RewardAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFunding(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFunding - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFunding(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFunding - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFunding - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFunding - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFunding - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFunding - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFunding - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFunding = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFunding = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFunding = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/governance/v1/governance.pb.go b/chain/penumbra/core/component/governance/v1/governance.pb.go deleted file mode 100644 index 8e839406..00000000 --- a/chain/penumbra/core/component/governance/v1/governance.pb.go +++ /dev/null @@ -1,16802 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/governance/v1/governance.proto - -package governancev1 - -import ( - context "context" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v113 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/auction/v1" - v17 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/community_pool/v1" - v112 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/dex/v1" - v110 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/distributions/v1" - v19 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/fee/v1" - v111 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/funding/v1" - v18 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/ibc/v1" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v15 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/shielded_pool/v1" - v16 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/stake/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/decaf377_rdsa/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A vote. -type Vote_Vote int32 - -const ( - Vote_VOTE_UNSPECIFIED Vote_Vote = 0 - Vote_VOTE_ABSTAIN Vote_Vote = 1 - Vote_VOTE_YES Vote_Vote = 2 - Vote_VOTE_NO Vote_Vote = 3 -) - -var Vote_Vote_name = map[int32]string{ - 0: "VOTE_UNSPECIFIED", - 1: "VOTE_ABSTAIN", - 2: "VOTE_YES", - 3: "VOTE_NO", -} - -var Vote_Vote_value = map[string]int32{ - "VOTE_UNSPECIFIED": 0, - "VOTE_ABSTAIN": 1, - "VOTE_YES": 2, - "VOTE_NO": 3, -} - -func (x Vote_Vote) String() string { - return proto.EnumName(Vote_Vote_name, int32(x)) -} - -func (Vote_Vote) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{14, 0} -} - -// A Penumbra ZK delegator vote proof. -type ZKDelegatorVoteProof struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ZKDelegatorVoteProof) Reset() { *m = ZKDelegatorVoteProof{} } -func (m *ZKDelegatorVoteProof) String() string { return proto.CompactTextString(m) } -func (*ZKDelegatorVoteProof) ProtoMessage() {} -func (*ZKDelegatorVoteProof) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{0} -} -func (m *ZKDelegatorVoteProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ZKDelegatorVoteProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ZKDelegatorVoteProof.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 *ZKDelegatorVoteProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_ZKDelegatorVoteProof.Merge(m, src) -} -func (m *ZKDelegatorVoteProof) XXX_Size() int { - return m.Size() -} -func (m *ZKDelegatorVoteProof) XXX_DiscardUnknown() { - xxx_messageInfo_ZKDelegatorVoteProof.DiscardUnknown(m) -} - -var xxx_messageInfo_ZKDelegatorVoteProof proto.InternalMessageInfo - -func (m *ZKDelegatorVoteProof) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type ProposalSubmit struct { - // The proposal to be submitted. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The amount of the proposal deposit. - DepositAmount *v1.Amount `protobuf:"bytes,3,opt,name=deposit_amount,json=depositAmount,proto3" json:"deposit_amount,omitempty"` -} - -func (m *ProposalSubmit) Reset() { *m = ProposalSubmit{} } -func (m *ProposalSubmit) String() string { return proto.CompactTextString(m) } -func (*ProposalSubmit) ProtoMessage() {} -func (*ProposalSubmit) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{1} -} -func (m *ProposalSubmit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalSubmit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalSubmit.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 *ProposalSubmit) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalSubmit.Merge(m, src) -} -func (m *ProposalSubmit) XXX_Size() int { - return m.Size() -} -func (m *ProposalSubmit) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalSubmit.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalSubmit proto.InternalMessageInfo - -func (m *ProposalSubmit) GetProposal() *Proposal { - if m != nil { - return m.Proposal - } - return nil -} - -func (m *ProposalSubmit) GetDepositAmount() *v1.Amount { - if m != nil { - return m.DepositAmount - } - return nil -} - -type ProposalWithdraw struct { - // The proposal to be withdrawn. - Proposal uint64 `protobuf:"varint,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The reason for the proposal being withdrawn. - Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (m *ProposalWithdraw) Reset() { *m = ProposalWithdraw{} } -func (m *ProposalWithdraw) String() string { return proto.CompactTextString(m) } -func (*ProposalWithdraw) ProtoMessage() {} -func (*ProposalWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{2} -} -func (m *ProposalWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalWithdraw.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 *ProposalWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalWithdraw.Merge(m, src) -} -func (m *ProposalWithdraw) XXX_Size() int { - return m.Size() -} -func (m *ProposalWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalWithdraw proto.InternalMessageInfo - -func (m *ProposalWithdraw) GetProposal() uint64 { - if m != nil { - return m.Proposal - } - return 0 -} - -func (m *ProposalWithdraw) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - -type ProposalDepositClaim struct { - // The proposal to claim the deposit for. - Proposal uint64 `protobuf:"varint,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The expected deposit amount. - DepositAmount *v1.Amount `protobuf:"bytes,2,opt,name=deposit_amount,json=depositAmount,proto3" json:"deposit_amount,omitempty"` - // The outcome of the proposal. - Outcome *ProposalOutcome `protobuf:"bytes,3,opt,name=outcome,proto3" json:"outcome,omitempty"` -} - -func (m *ProposalDepositClaim) Reset() { *m = ProposalDepositClaim{} } -func (m *ProposalDepositClaim) String() string { return proto.CompactTextString(m) } -func (*ProposalDepositClaim) ProtoMessage() {} -func (*ProposalDepositClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{3} -} -func (m *ProposalDepositClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalDepositClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalDepositClaim.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 *ProposalDepositClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalDepositClaim.Merge(m, src) -} -func (m *ProposalDepositClaim) XXX_Size() int { - return m.Size() -} -func (m *ProposalDepositClaim) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalDepositClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalDepositClaim proto.InternalMessageInfo - -func (m *ProposalDepositClaim) GetProposal() uint64 { - if m != nil { - return m.Proposal - } - return 0 -} - -func (m *ProposalDepositClaim) GetDepositAmount() *v1.Amount { - if m != nil { - return m.DepositAmount - } - return nil -} - -func (m *ProposalDepositClaim) GetOutcome() *ProposalOutcome { - if m != nil { - return m.Outcome - } - return nil -} - -type ValidatorVote struct { - // The effecting data for the vote. - Body *ValidatorVoteBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // The vote authorization signature is authorizing data. - AuthSig *v11.SpendAuthSignature `protobuf:"bytes,2,opt,name=auth_sig,json=authSig,proto3" json:"auth_sig,omitempty"` -} - -func (m *ValidatorVote) Reset() { *m = ValidatorVote{} } -func (m *ValidatorVote) String() string { return proto.CompactTextString(m) } -func (*ValidatorVote) ProtoMessage() {} -func (*ValidatorVote) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{4} -} -func (m *ValidatorVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorVote.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 *ValidatorVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorVote.Merge(m, src) -} -func (m *ValidatorVote) XXX_Size() int { - return m.Size() -} -func (m *ValidatorVote) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorVote.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorVote proto.InternalMessageInfo - -func (m *ValidatorVote) GetBody() *ValidatorVoteBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *ValidatorVote) GetAuthSig() *v11.SpendAuthSignature { - if m != nil { - return m.AuthSig - } - return nil -} - -type ValidatorVoteReason struct { - Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (m *ValidatorVoteReason) Reset() { *m = ValidatorVoteReason{} } -func (m *ValidatorVoteReason) String() string { return proto.CompactTextString(m) } -func (*ValidatorVoteReason) ProtoMessage() {} -func (*ValidatorVoteReason) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{5} -} -func (m *ValidatorVoteReason) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorVoteReason) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorVoteReason.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 *ValidatorVoteReason) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorVoteReason.Merge(m, src) -} -func (m *ValidatorVoteReason) XXX_Size() int { - return m.Size() -} -func (m *ValidatorVoteReason) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorVoteReason.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorVoteReason proto.InternalMessageInfo - -func (m *ValidatorVoteReason) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - -type ValidatorVoteBody struct { - // The proposal being voted on. - Proposal uint64 `protobuf:"varint,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The vote. - Vote *Vote `protobuf:"bytes,2,opt,name=vote,proto3" json:"vote,omitempty"` - // The validator identity. - IdentityKey *v12.IdentityKey `protobuf:"bytes,3,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The validator governance key. - GovernanceKey *v12.GovernanceKey `protobuf:"bytes,4,opt,name=governance_key,json=governanceKey,proto3" json:"governance_key,omitempty"` - // A justification of the vote. - Reason *ValidatorVoteReason `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (m *ValidatorVoteBody) Reset() { *m = ValidatorVoteBody{} } -func (m *ValidatorVoteBody) String() string { return proto.CompactTextString(m) } -func (*ValidatorVoteBody) ProtoMessage() {} -func (*ValidatorVoteBody) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{6} -} -func (m *ValidatorVoteBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorVoteBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorVoteBody.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 *ValidatorVoteBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorVoteBody.Merge(m, src) -} -func (m *ValidatorVoteBody) XXX_Size() int { - return m.Size() -} -func (m *ValidatorVoteBody) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorVoteBody.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorVoteBody proto.InternalMessageInfo - -func (m *ValidatorVoteBody) GetProposal() uint64 { - if m != nil { - return m.Proposal - } - return 0 -} - -func (m *ValidatorVoteBody) GetVote() *Vote { - if m != nil { - return m.Vote - } - return nil -} - -func (m *ValidatorVoteBody) GetIdentityKey() *v12.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *ValidatorVoteBody) GetGovernanceKey() *v12.GovernanceKey { - if m != nil { - return m.GovernanceKey - } - return nil -} - -func (m *ValidatorVoteBody) GetReason() *ValidatorVoteReason { - if m != nil { - return m.Reason - } - return nil -} - -type DelegatorVote struct { - // The effecting data for the vote. - Body *DelegatorVoteBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // The vote authorization signature is authorizing data. - AuthSig *v11.SpendAuthSignature `protobuf:"bytes,2,opt,name=auth_sig,json=authSig,proto3" json:"auth_sig,omitempty"` - // The vote proof is authorizing data. - Proof *ZKDelegatorVoteProof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (m *DelegatorVote) Reset() { *m = DelegatorVote{} } -func (m *DelegatorVote) String() string { return proto.CompactTextString(m) } -func (*DelegatorVote) ProtoMessage() {} -func (*DelegatorVote) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{7} -} -func (m *DelegatorVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegatorVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegatorVote.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 *DelegatorVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorVote.Merge(m, src) -} -func (m *DelegatorVote) XXX_Size() int { - return m.Size() -} -func (m *DelegatorVote) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorVote.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatorVote proto.InternalMessageInfo - -func (m *DelegatorVote) GetBody() *DelegatorVoteBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *DelegatorVote) GetAuthSig() *v11.SpendAuthSignature { - if m != nil { - return m.AuthSig - } - return nil -} - -func (m *DelegatorVote) GetProof() *ZKDelegatorVoteProof { - if m != nil { - return m.Proof - } - return nil -} - -type DelegatorVoteBody struct { - // The proposal being voted on. - Proposal uint64 `protobuf:"varint,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The start position of the proposal in the TCT. - StartPosition uint64 `protobuf:"varint,2,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` - // The vote. - Vote *Vote `protobuf:"bytes,3,opt,name=vote,proto3" json:"vote,omitempty"` - // The value of the delegation note. - Value *v13.Value `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` - // The amount of the delegation note, in unbonded penumbra. - UnbondedAmount *v1.Amount `protobuf:"bytes,5,opt,name=unbonded_amount,json=unbondedAmount,proto3" json:"unbonded_amount,omitempty"` - // The nullifier of the input note. - Nullifier *v14.Nullifier `protobuf:"bytes,6,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - // The randomized validating key for the spend authorization signature. - Rk *v11.SpendVerificationKey `protobuf:"bytes,7,opt,name=rk,proto3" json:"rk,omitempty"` -} - -func (m *DelegatorVoteBody) Reset() { *m = DelegatorVoteBody{} } -func (m *DelegatorVoteBody) String() string { return proto.CompactTextString(m) } -func (*DelegatorVoteBody) ProtoMessage() {} -func (*DelegatorVoteBody) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{8} -} -func (m *DelegatorVoteBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegatorVoteBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegatorVoteBody.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 *DelegatorVoteBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorVoteBody.Merge(m, src) -} -func (m *DelegatorVoteBody) XXX_Size() int { - return m.Size() -} -func (m *DelegatorVoteBody) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorVoteBody.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatorVoteBody proto.InternalMessageInfo - -func (m *DelegatorVoteBody) GetProposal() uint64 { - if m != nil { - return m.Proposal - } - return 0 -} - -func (m *DelegatorVoteBody) GetStartPosition() uint64 { - if m != nil { - return m.StartPosition - } - return 0 -} - -func (m *DelegatorVoteBody) GetVote() *Vote { - if m != nil { - return m.Vote - } - return nil -} - -func (m *DelegatorVoteBody) GetValue() *v13.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *DelegatorVoteBody) GetUnbondedAmount() *v1.Amount { - if m != nil { - return m.UnbondedAmount - } - return nil -} - -func (m *DelegatorVoteBody) GetNullifier() *v14.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *DelegatorVoteBody) GetRk() *v11.SpendVerificationKey { - if m != nil { - return m.Rk - } - return nil -} - -type DelegatorVoteView struct { - // Types that are valid to be assigned to DelegatorVote: - // *DelegatorVoteView_Visible_ - // *DelegatorVoteView_Opaque_ - DelegatorVote isDelegatorVoteView_DelegatorVote `protobuf_oneof:"delegator_vote"` -} - -func (m *DelegatorVoteView) Reset() { *m = DelegatorVoteView{} } -func (m *DelegatorVoteView) String() string { return proto.CompactTextString(m) } -func (*DelegatorVoteView) ProtoMessage() {} -func (*DelegatorVoteView) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{9} -} -func (m *DelegatorVoteView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegatorVoteView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegatorVoteView.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 *DelegatorVoteView) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorVoteView.Merge(m, src) -} -func (m *DelegatorVoteView) XXX_Size() int { - return m.Size() -} -func (m *DelegatorVoteView) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorVoteView.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatorVoteView proto.InternalMessageInfo - -type isDelegatorVoteView_DelegatorVote interface { - isDelegatorVoteView_DelegatorVote() - MarshalTo([]byte) (int, error) - Size() int -} - -type DelegatorVoteView_Visible_ struct { - Visible *DelegatorVoteView_Visible `protobuf:"bytes,1,opt,name=visible,proto3,oneof" json:"visible,omitempty"` -} -type DelegatorVoteView_Opaque_ struct { - Opaque *DelegatorVoteView_Opaque `protobuf:"bytes,2,opt,name=opaque,proto3,oneof" json:"opaque,omitempty"` -} - -func (*DelegatorVoteView_Visible_) isDelegatorVoteView_DelegatorVote() {} -func (*DelegatorVoteView_Opaque_) isDelegatorVoteView_DelegatorVote() {} - -func (m *DelegatorVoteView) GetDelegatorVote() isDelegatorVoteView_DelegatorVote { - if m != nil { - return m.DelegatorVote - } - return nil -} - -func (m *DelegatorVoteView) GetVisible() *DelegatorVoteView_Visible { - if x, ok := m.GetDelegatorVote().(*DelegatorVoteView_Visible_); ok { - return x.Visible - } - return nil -} - -func (m *DelegatorVoteView) GetOpaque() *DelegatorVoteView_Opaque { - if x, ok := m.GetDelegatorVote().(*DelegatorVoteView_Opaque_); ok { - return x.Opaque - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*DelegatorVoteView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*DelegatorVoteView_Visible_)(nil), - (*DelegatorVoteView_Opaque_)(nil), - } -} - -type DelegatorVoteView_Visible struct { - DelegatorVote *DelegatorVote `protobuf:"bytes,1,opt,name=delegator_vote,json=delegatorVote,proto3" json:"delegator_vote,omitempty"` - Note *v15.NoteView `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` -} - -func (m *DelegatorVoteView_Visible) Reset() { *m = DelegatorVoteView_Visible{} } -func (m *DelegatorVoteView_Visible) String() string { return proto.CompactTextString(m) } -func (*DelegatorVoteView_Visible) ProtoMessage() {} -func (*DelegatorVoteView_Visible) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{9, 0} -} -func (m *DelegatorVoteView_Visible) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegatorVoteView_Visible) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegatorVoteView_Visible.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 *DelegatorVoteView_Visible) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorVoteView_Visible.Merge(m, src) -} -func (m *DelegatorVoteView_Visible) XXX_Size() int { - return m.Size() -} -func (m *DelegatorVoteView_Visible) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorVoteView_Visible.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatorVoteView_Visible proto.InternalMessageInfo - -func (m *DelegatorVoteView_Visible) GetDelegatorVote() *DelegatorVote { - if m != nil { - return m.DelegatorVote - } - return nil -} - -func (m *DelegatorVoteView_Visible) GetNote() *v15.NoteView { - if m != nil { - return m.Note - } - return nil -} - -type DelegatorVoteView_Opaque struct { - DelegatorVote *DelegatorVote `protobuf:"bytes,1,opt,name=delegator_vote,json=delegatorVote,proto3" json:"delegator_vote,omitempty"` -} - -func (m *DelegatorVoteView_Opaque) Reset() { *m = DelegatorVoteView_Opaque{} } -func (m *DelegatorVoteView_Opaque) String() string { return proto.CompactTextString(m) } -func (*DelegatorVoteView_Opaque) ProtoMessage() {} -func (*DelegatorVoteView_Opaque) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{9, 1} -} -func (m *DelegatorVoteView_Opaque) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegatorVoteView_Opaque) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegatorVoteView_Opaque.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 *DelegatorVoteView_Opaque) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorVoteView_Opaque.Merge(m, src) -} -func (m *DelegatorVoteView_Opaque) XXX_Size() int { - return m.Size() -} -func (m *DelegatorVoteView_Opaque) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorVoteView_Opaque.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatorVoteView_Opaque proto.InternalMessageInfo - -func (m *DelegatorVoteView_Opaque) GetDelegatorVote() *DelegatorVote { - if m != nil { - return m.DelegatorVote - } - return nil -} - -type DelegatorVotePlan struct { - // The proposal to vote on. - Proposal uint64 `protobuf:"varint,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The start position of the proposal in the TCT. - StartPosition uint64 `protobuf:"varint,2,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` - // The vote to cast. - Vote *Vote `protobuf:"bytes,3,opt,name=vote,proto3" json:"vote,omitempty"` - // The delegation note to prove that we can vote. - StakedNote *v15.Note `protobuf:"bytes,4,opt,name=staked_note,json=stakedNote,proto3" json:"staked_note,omitempty"` - // The position of that delegation note. - StakedNotePosition uint64 `protobuf:"varint,5,opt,name=staked_note_position,json=stakedNotePosition,proto3" json:"staked_note_position,omitempty"` - // The unbonded amount equivalent to the delegation note. - UnbondedAmount *v1.Amount `protobuf:"bytes,6,opt,name=unbonded_amount,json=unbondedAmount,proto3" json:"unbonded_amount,omitempty"` - // The randomizer to use for the proof of spend capability. - Randomizer []byte `protobuf:"bytes,7,opt,name=randomizer,proto3" json:"randomizer,omitempty"` - // The first blinding factor to use for the ZK delegator vote proof. - ProofBlindingR []byte `protobuf:"bytes,8,opt,name=proof_blinding_r,json=proofBlindingR,proto3" json:"proof_blinding_r,omitempty"` - // The second blinding factor to use for the ZK delegator vote proof. - ProofBlindingS []byte `protobuf:"bytes,9,opt,name=proof_blinding_s,json=proofBlindingS,proto3" json:"proof_blinding_s,omitempty"` -} - -func (m *DelegatorVotePlan) Reset() { *m = DelegatorVotePlan{} } -func (m *DelegatorVotePlan) String() string { return proto.CompactTextString(m) } -func (*DelegatorVotePlan) ProtoMessage() {} -func (*DelegatorVotePlan) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{10} -} -func (m *DelegatorVotePlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegatorVotePlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegatorVotePlan.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 *DelegatorVotePlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorVotePlan.Merge(m, src) -} -func (m *DelegatorVotePlan) XXX_Size() int { - return m.Size() -} -func (m *DelegatorVotePlan) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorVotePlan.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatorVotePlan proto.InternalMessageInfo - -func (m *DelegatorVotePlan) GetProposal() uint64 { - if m != nil { - return m.Proposal - } - return 0 -} - -func (m *DelegatorVotePlan) GetStartPosition() uint64 { - if m != nil { - return m.StartPosition - } - return 0 -} - -func (m *DelegatorVotePlan) GetVote() *Vote { - if m != nil { - return m.Vote - } - return nil -} - -func (m *DelegatorVotePlan) GetStakedNote() *v15.Note { - if m != nil { - return m.StakedNote - } - return nil -} - -func (m *DelegatorVotePlan) GetStakedNotePosition() uint64 { - if m != nil { - return m.StakedNotePosition - } - return 0 -} - -func (m *DelegatorVotePlan) GetUnbondedAmount() *v1.Amount { - if m != nil { - return m.UnbondedAmount - } - return nil -} - -func (m *DelegatorVotePlan) GetRandomizer() []byte { - if m != nil { - return m.Randomizer - } - return nil -} - -func (m *DelegatorVotePlan) GetProofBlindingR() []byte { - if m != nil { - return m.ProofBlindingR - } - return nil -} - -func (m *DelegatorVotePlan) GetProofBlindingS() []byte { - if m != nil { - return m.ProofBlindingS - } - return nil -} - -type CommunityPoolDeposit struct { - // The value to deposit into the Community Pool. - Value *v13.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *CommunityPoolDeposit) Reset() { *m = CommunityPoolDeposit{} } -func (m *CommunityPoolDeposit) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolDeposit) ProtoMessage() {} -func (*CommunityPoolDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{11} -} -func (m *CommunityPoolDeposit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolDeposit.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 *CommunityPoolDeposit) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolDeposit.Merge(m, src) -} -func (m *CommunityPoolDeposit) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolDeposit) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolDeposit.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolDeposit proto.InternalMessageInfo - -func (m *CommunityPoolDeposit) GetValue() *v13.Value { - if m != nil { - return m.Value - } - return nil -} - -type CommunityPoolSpend struct { - // The value to spend from the Community Pool. - Value *v13.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *CommunityPoolSpend) Reset() { *m = CommunityPoolSpend{} } -func (m *CommunityPoolSpend) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolSpend) ProtoMessage() {} -func (*CommunityPoolSpend) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{12} -} -func (m *CommunityPoolSpend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolSpend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolSpend.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 *CommunityPoolSpend) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolSpend.Merge(m, src) -} -func (m *CommunityPoolSpend) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolSpend) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolSpend.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolSpend proto.InternalMessageInfo - -func (m *CommunityPoolSpend) GetValue() *v13.Value { - if m != nil { - return m.Value - } - return nil -} - -type CommunityPoolOutput struct { - // The value to output from the Community Pool. - Value *v13.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // The address to send the output to. - Address *v12.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *CommunityPoolOutput) Reset() { *m = CommunityPoolOutput{} } -func (m *CommunityPoolOutput) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolOutput) ProtoMessage() {} -func (*CommunityPoolOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{13} -} -func (m *CommunityPoolOutput) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolOutput.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 *CommunityPoolOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolOutput.Merge(m, src) -} -func (m *CommunityPoolOutput) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolOutput) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolOutput.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolOutput proto.InternalMessageInfo - -func (m *CommunityPoolOutput) GetValue() *v13.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *CommunityPoolOutput) GetAddress() *v12.Address { - if m != nil { - return m.Address - } - return nil -} - -// A vote on a proposal. -type Vote struct { - // The vote. - Vote Vote_Vote `protobuf:"varint,1,opt,name=vote,proto3,enum=penumbra.core.component.governance.v1.Vote_Vote" json:"vote,omitempty"` -} - -func (m *Vote) Reset() { *m = Vote{} } -func (m *Vote) String() string { return proto.CompactTextString(m) } -func (*Vote) ProtoMessage() {} -func (*Vote) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{14} -} -func (m *Vote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Vote.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 *Vote) XXX_Merge(src proto.Message) { - xxx_messageInfo_Vote.Merge(m, src) -} -func (m *Vote) XXX_Size() int { - return m.Size() -} -func (m *Vote) XXX_DiscardUnknown() { - xxx_messageInfo_Vote.DiscardUnknown(m) -} - -var xxx_messageInfo_Vote proto.InternalMessageInfo - -func (m *Vote) GetVote() Vote_Vote { - if m != nil { - return m.Vote - } - return Vote_VOTE_UNSPECIFIED -} - -// The current state of a proposal. -type ProposalState struct { - // The state of the proposal. - // - // Types that are valid to be assigned to State: - // *ProposalState_Voting_ - // *ProposalState_Withdrawn_ - // *ProposalState_Finished_ - // *ProposalState_Claimed_ - State isProposalState_State `protobuf_oneof:"state"` -} - -func (m *ProposalState) Reset() { *m = ProposalState{} } -func (m *ProposalState) String() string { return proto.CompactTextString(m) } -func (*ProposalState) ProtoMessage() {} -func (*ProposalState) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{15} -} -func (m *ProposalState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalState.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 *ProposalState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalState.Merge(m, src) -} -func (m *ProposalState) XXX_Size() int { - return m.Size() -} -func (m *ProposalState) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalState.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalState proto.InternalMessageInfo - -type isProposalState_State interface { - isProposalState_State() - MarshalTo([]byte) (int, error) - Size() int -} - -type ProposalState_Voting_ struct { - Voting *ProposalState_Voting `protobuf:"bytes,2,opt,name=voting,proto3,oneof" json:"voting,omitempty"` -} -type ProposalState_Withdrawn_ struct { - Withdrawn *ProposalState_Withdrawn `protobuf:"bytes,3,opt,name=withdrawn,proto3,oneof" json:"withdrawn,omitempty"` -} -type ProposalState_Finished_ struct { - Finished *ProposalState_Finished `protobuf:"bytes,4,opt,name=finished,proto3,oneof" json:"finished,omitempty"` -} -type ProposalState_Claimed_ struct { - Claimed *ProposalState_Claimed `protobuf:"bytes,5,opt,name=claimed,proto3,oneof" json:"claimed,omitempty"` -} - -func (*ProposalState_Voting_) isProposalState_State() {} -func (*ProposalState_Withdrawn_) isProposalState_State() {} -func (*ProposalState_Finished_) isProposalState_State() {} -func (*ProposalState_Claimed_) isProposalState_State() {} - -func (m *ProposalState) GetState() isProposalState_State { - if m != nil { - return m.State - } - return nil -} - -func (m *ProposalState) GetVoting() *ProposalState_Voting { - if x, ok := m.GetState().(*ProposalState_Voting_); ok { - return x.Voting - } - return nil -} - -func (m *ProposalState) GetWithdrawn() *ProposalState_Withdrawn { - if x, ok := m.GetState().(*ProposalState_Withdrawn_); ok { - return x.Withdrawn - } - return nil -} - -func (m *ProposalState) GetFinished() *ProposalState_Finished { - if x, ok := m.GetState().(*ProposalState_Finished_); ok { - return x.Finished - } - return nil -} - -func (m *ProposalState) GetClaimed() *ProposalState_Claimed { - if x, ok := m.GetState().(*ProposalState_Claimed_); ok { - return x.Claimed - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ProposalState) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ProposalState_Voting_)(nil), - (*ProposalState_Withdrawn_)(nil), - (*ProposalState_Finished_)(nil), - (*ProposalState_Claimed_)(nil), - } -} - -// Voting is in progress and the proposal has not yet concluded voting or been withdrawn. -type ProposalState_Voting struct { -} - -func (m *ProposalState_Voting) Reset() { *m = ProposalState_Voting{} } -func (m *ProposalState_Voting) String() string { return proto.CompactTextString(m) } -func (*ProposalState_Voting) ProtoMessage() {} -func (*ProposalState_Voting) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{15, 0} -} -func (m *ProposalState_Voting) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalState_Voting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalState_Voting.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 *ProposalState_Voting) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalState_Voting.Merge(m, src) -} -func (m *ProposalState_Voting) XXX_Size() int { - return m.Size() -} -func (m *ProposalState_Voting) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalState_Voting.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalState_Voting proto.InternalMessageInfo - -// The proposal has been withdrawn but the voting period is not yet concluded. -type ProposalState_Withdrawn struct { - // The reason for the withdrawal. - Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (m *ProposalState_Withdrawn) Reset() { *m = ProposalState_Withdrawn{} } -func (m *ProposalState_Withdrawn) String() string { return proto.CompactTextString(m) } -func (*ProposalState_Withdrawn) ProtoMessage() {} -func (*ProposalState_Withdrawn) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{15, 1} -} -func (m *ProposalState_Withdrawn) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalState_Withdrawn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalState_Withdrawn.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 *ProposalState_Withdrawn) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalState_Withdrawn.Merge(m, src) -} -func (m *ProposalState_Withdrawn) XXX_Size() int { - return m.Size() -} -func (m *ProposalState_Withdrawn) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalState_Withdrawn.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalState_Withdrawn proto.InternalMessageInfo - -func (m *ProposalState_Withdrawn) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - -// The voting period has ended, and the proposal has been assigned an outcome. -type ProposalState_Finished struct { - Outcome *ProposalOutcome `protobuf:"bytes,1,opt,name=outcome,proto3" json:"outcome,omitempty"` -} - -func (m *ProposalState_Finished) Reset() { *m = ProposalState_Finished{} } -func (m *ProposalState_Finished) String() string { return proto.CompactTextString(m) } -func (*ProposalState_Finished) ProtoMessage() {} -func (*ProposalState_Finished) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{15, 2} -} -func (m *ProposalState_Finished) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalState_Finished) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalState_Finished.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 *ProposalState_Finished) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalState_Finished.Merge(m, src) -} -func (m *ProposalState_Finished) XXX_Size() int { - return m.Size() -} -func (m *ProposalState_Finished) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalState_Finished.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalState_Finished proto.InternalMessageInfo - -func (m *ProposalState_Finished) GetOutcome() *ProposalOutcome { - if m != nil { - return m.Outcome - } - return nil -} - -// The voting period has ended, and the original proposer has claimed their deposit. -type ProposalState_Claimed struct { - Outcome *ProposalOutcome `protobuf:"bytes,1,opt,name=outcome,proto3" json:"outcome,omitempty"` -} - -func (m *ProposalState_Claimed) Reset() { *m = ProposalState_Claimed{} } -func (m *ProposalState_Claimed) String() string { return proto.CompactTextString(m) } -func (*ProposalState_Claimed) ProtoMessage() {} -func (*ProposalState_Claimed) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{15, 3} -} -func (m *ProposalState_Claimed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalState_Claimed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalState_Claimed.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 *ProposalState_Claimed) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalState_Claimed.Merge(m, src) -} -func (m *ProposalState_Claimed) XXX_Size() int { - return m.Size() -} -func (m *ProposalState_Claimed) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalState_Claimed.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalState_Claimed proto.InternalMessageInfo - -func (m *ProposalState_Claimed) GetOutcome() *ProposalOutcome { - if m != nil { - return m.Outcome - } - return nil -} - -// The outcome of a concluded proposal. -type ProposalOutcome struct { - // Types that are valid to be assigned to Outcome: - // *ProposalOutcome_Passed_ - // *ProposalOutcome_Failed_ - // *ProposalOutcome_Slashed_ - Outcome isProposalOutcome_Outcome `protobuf_oneof:"outcome"` -} - -func (m *ProposalOutcome) Reset() { *m = ProposalOutcome{} } -func (m *ProposalOutcome) String() string { return proto.CompactTextString(m) } -func (*ProposalOutcome) ProtoMessage() {} -func (*ProposalOutcome) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{16} -} -func (m *ProposalOutcome) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalOutcome) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalOutcome.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 *ProposalOutcome) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalOutcome.Merge(m, src) -} -func (m *ProposalOutcome) XXX_Size() int { - return m.Size() -} -func (m *ProposalOutcome) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalOutcome.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalOutcome proto.InternalMessageInfo - -type isProposalOutcome_Outcome interface { - isProposalOutcome_Outcome() - MarshalTo([]byte) (int, error) - Size() int -} - -type ProposalOutcome_Passed_ struct { - Passed *ProposalOutcome_Passed `protobuf:"bytes,1,opt,name=passed,proto3,oneof" json:"passed,omitempty"` -} -type ProposalOutcome_Failed_ struct { - Failed *ProposalOutcome_Failed `protobuf:"bytes,2,opt,name=failed,proto3,oneof" json:"failed,omitempty"` -} -type ProposalOutcome_Slashed_ struct { - Slashed *ProposalOutcome_Slashed `protobuf:"bytes,3,opt,name=slashed,proto3,oneof" json:"slashed,omitempty"` -} - -func (*ProposalOutcome_Passed_) isProposalOutcome_Outcome() {} -func (*ProposalOutcome_Failed_) isProposalOutcome_Outcome() {} -func (*ProposalOutcome_Slashed_) isProposalOutcome_Outcome() {} - -func (m *ProposalOutcome) GetOutcome() isProposalOutcome_Outcome { - if m != nil { - return m.Outcome - } - return nil -} - -func (m *ProposalOutcome) GetPassed() *ProposalOutcome_Passed { - if x, ok := m.GetOutcome().(*ProposalOutcome_Passed_); ok { - return x.Passed - } - return nil -} - -func (m *ProposalOutcome) GetFailed() *ProposalOutcome_Failed { - if x, ok := m.GetOutcome().(*ProposalOutcome_Failed_); ok { - return x.Failed - } - return nil -} - -func (m *ProposalOutcome) GetSlashed() *ProposalOutcome_Slashed { - if x, ok := m.GetOutcome().(*ProposalOutcome_Slashed_); ok { - return x.Slashed - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ProposalOutcome) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ProposalOutcome_Passed_)(nil), - (*ProposalOutcome_Failed_)(nil), - (*ProposalOutcome_Slashed_)(nil), - } -} - -// Whether or not the proposal was withdrawn. -type ProposalOutcome_Withdrawn struct { - // The reason for withdrawing the proposal during the voting period. - Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (m *ProposalOutcome_Withdrawn) Reset() { *m = ProposalOutcome_Withdrawn{} } -func (m *ProposalOutcome_Withdrawn) String() string { return proto.CompactTextString(m) } -func (*ProposalOutcome_Withdrawn) ProtoMessage() {} -func (*ProposalOutcome_Withdrawn) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{16, 0} -} -func (m *ProposalOutcome_Withdrawn) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalOutcome_Withdrawn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalOutcome_Withdrawn.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 *ProposalOutcome_Withdrawn) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalOutcome_Withdrawn.Merge(m, src) -} -func (m *ProposalOutcome_Withdrawn) XXX_Size() int { - return m.Size() -} -func (m *ProposalOutcome_Withdrawn) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalOutcome_Withdrawn.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalOutcome_Withdrawn proto.InternalMessageInfo - -func (m *ProposalOutcome_Withdrawn) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - -// The proposal was passed. -type ProposalOutcome_Passed struct { -} - -func (m *ProposalOutcome_Passed) Reset() { *m = ProposalOutcome_Passed{} } -func (m *ProposalOutcome_Passed) String() string { return proto.CompactTextString(m) } -func (*ProposalOutcome_Passed) ProtoMessage() {} -func (*ProposalOutcome_Passed) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{16, 1} -} -func (m *ProposalOutcome_Passed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalOutcome_Passed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalOutcome_Passed.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 *ProposalOutcome_Passed) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalOutcome_Passed.Merge(m, src) -} -func (m *ProposalOutcome_Passed) XXX_Size() int { - return m.Size() -} -func (m *ProposalOutcome_Passed) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalOutcome_Passed.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalOutcome_Passed proto.InternalMessageInfo - -// The proposal did not pass. -type ProposalOutcome_Failed struct { - // Present if the proposal was withdrawn during the voting period. - Withdrawn *ProposalOutcome_Withdrawn `protobuf:"bytes,1,opt,name=withdrawn,proto3" json:"withdrawn,omitempty"` -} - -func (m *ProposalOutcome_Failed) Reset() { *m = ProposalOutcome_Failed{} } -func (m *ProposalOutcome_Failed) String() string { return proto.CompactTextString(m) } -func (*ProposalOutcome_Failed) ProtoMessage() {} -func (*ProposalOutcome_Failed) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{16, 2} -} -func (m *ProposalOutcome_Failed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalOutcome_Failed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalOutcome_Failed.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 *ProposalOutcome_Failed) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalOutcome_Failed.Merge(m, src) -} -func (m *ProposalOutcome_Failed) XXX_Size() int { - return m.Size() -} -func (m *ProposalOutcome_Failed) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalOutcome_Failed.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalOutcome_Failed proto.InternalMessageInfo - -func (m *ProposalOutcome_Failed) GetWithdrawn() *ProposalOutcome_Withdrawn { - if m != nil { - return m.Withdrawn - } - return nil -} - -// The proposal did not pass, and was slashed. -type ProposalOutcome_Slashed struct { - // Present if the proposal was withdrawn during the voting period. - Withdrawn *ProposalOutcome_Withdrawn `protobuf:"bytes,1,opt,name=withdrawn,proto3" json:"withdrawn,omitempty"` -} - -func (m *ProposalOutcome_Slashed) Reset() { *m = ProposalOutcome_Slashed{} } -func (m *ProposalOutcome_Slashed) String() string { return proto.CompactTextString(m) } -func (*ProposalOutcome_Slashed) ProtoMessage() {} -func (*ProposalOutcome_Slashed) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{16, 3} -} -func (m *ProposalOutcome_Slashed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalOutcome_Slashed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalOutcome_Slashed.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 *ProposalOutcome_Slashed) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalOutcome_Slashed.Merge(m, src) -} -func (m *ProposalOutcome_Slashed) XXX_Size() int { - return m.Size() -} -func (m *ProposalOutcome_Slashed) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalOutcome_Slashed.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalOutcome_Slashed proto.InternalMessageInfo - -func (m *ProposalOutcome_Slashed) GetWithdrawn() *ProposalOutcome_Withdrawn { - if m != nil { - return m.Withdrawn - } - return nil -} - -// A tally of votes on a proposal. -type Tally struct { - // The number of votes in favor of the proposal. - Yes uint64 `protobuf:"varint,1,opt,name=yes,proto3" json:"yes,omitempty"` - // The number of votes against the proposal. - No uint64 `protobuf:"varint,2,opt,name=no,proto3" json:"no,omitempty"` - // The number of abstentions. - Abstain uint64 `protobuf:"varint,3,opt,name=abstain,proto3" json:"abstain,omitempty"` -} - -func (m *Tally) Reset() { *m = Tally{} } -func (m *Tally) String() string { return proto.CompactTextString(m) } -func (*Tally) ProtoMessage() {} -func (*Tally) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{17} -} -func (m *Tally) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tally) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tally.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 *Tally) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tally.Merge(m, src) -} -func (m *Tally) XXX_Size() int { - return m.Size() -} -func (m *Tally) XXX_DiscardUnknown() { - xxx_messageInfo_Tally.DiscardUnknown(m) -} - -var xxx_messageInfo_Tally proto.InternalMessageInfo - -func (m *Tally) GetYes() uint64 { - if m != nil { - return m.Yes - } - return 0 -} - -func (m *Tally) GetNo() uint64 { - if m != nil { - return m.No - } - return 0 -} - -func (m *Tally) GetAbstain() uint64 { - if m != nil { - return m.Abstain - } - return 0 -} - -// A proposal to be voted upon. -type Proposal struct { - // The unique identifier of the proposal. - Id uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"` - // A short title for the proposal. - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - // A natural-language description of the effect of the proposal and its justification. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The proposal's payload. - // - // Types that are valid to be assigned to Payload: - // *Proposal_Signaling_ - // *Proposal_Emergency_ - // *Proposal_ParameterChange_ - // *Proposal_CommunityPoolSpend_ - // *Proposal_UpgradePlan_ - // *Proposal_FreezeIbcClient_ - // *Proposal_UnfreezeIbcClient_ - Payload isProposal_Payload `protobuf_oneof:"payload"` -} - -func (m *Proposal) Reset() { *m = Proposal{} } -func (m *Proposal) String() string { return proto.CompactTextString(m) } -func (*Proposal) ProtoMessage() {} -func (*Proposal) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18} -} -func (m *Proposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal.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 *Proposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal.Merge(m, src) -} -func (m *Proposal) XXX_Size() int { - return m.Size() -} -func (m *Proposal) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal proto.InternalMessageInfo - -type isProposal_Payload interface { - isProposal_Payload() - MarshalTo([]byte) (int, error) - Size() int -} - -type Proposal_Signaling_ struct { - Signaling *Proposal_Signaling `protobuf:"bytes,5,opt,name=signaling,proto3,oneof" json:"signaling,omitempty"` -} -type Proposal_Emergency_ struct { - Emergency *Proposal_Emergency `protobuf:"bytes,6,opt,name=emergency,proto3,oneof" json:"emergency,omitempty"` -} -type Proposal_ParameterChange_ struct { - ParameterChange *Proposal_ParameterChange `protobuf:"bytes,7,opt,name=parameter_change,json=parameterChange,proto3,oneof" json:"parameter_change,omitempty"` -} -type Proposal_CommunityPoolSpend_ struct { - CommunityPoolSpend *Proposal_CommunityPoolSpend `protobuf:"bytes,8,opt,name=community_pool_spend,json=communityPoolSpend,proto3,oneof" json:"community_pool_spend,omitempty"` -} -type Proposal_UpgradePlan_ struct { - UpgradePlan *Proposal_UpgradePlan `protobuf:"bytes,9,opt,name=upgrade_plan,json=upgradePlan,proto3,oneof" json:"upgrade_plan,omitempty"` -} -type Proposal_FreezeIbcClient_ struct { - FreezeIbcClient *Proposal_FreezeIbcClient `protobuf:"bytes,10,opt,name=freeze_ibc_client,json=freezeIbcClient,proto3,oneof" json:"freeze_ibc_client,omitempty"` -} -type Proposal_UnfreezeIbcClient_ struct { - UnfreezeIbcClient *Proposal_UnfreezeIbcClient `protobuf:"bytes,11,opt,name=unfreeze_ibc_client,json=unfreezeIbcClient,proto3,oneof" json:"unfreeze_ibc_client,omitempty"` -} - -func (*Proposal_Signaling_) isProposal_Payload() {} -func (*Proposal_Emergency_) isProposal_Payload() {} -func (*Proposal_ParameterChange_) isProposal_Payload() {} -func (*Proposal_CommunityPoolSpend_) isProposal_Payload() {} -func (*Proposal_UpgradePlan_) isProposal_Payload() {} -func (*Proposal_FreezeIbcClient_) isProposal_Payload() {} -func (*Proposal_UnfreezeIbcClient_) isProposal_Payload() {} - -func (m *Proposal) GetPayload() isProposal_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *Proposal) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *Proposal) GetTitle() string { - if m != nil { - return m.Title - } - return "" -} - -func (m *Proposal) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Proposal) GetSignaling() *Proposal_Signaling { - if x, ok := m.GetPayload().(*Proposal_Signaling_); ok { - return x.Signaling - } - return nil -} - -func (m *Proposal) GetEmergency() *Proposal_Emergency { - if x, ok := m.GetPayload().(*Proposal_Emergency_); ok { - return x.Emergency - } - return nil -} - -func (m *Proposal) GetParameterChange() *Proposal_ParameterChange { - if x, ok := m.GetPayload().(*Proposal_ParameterChange_); ok { - return x.ParameterChange - } - return nil -} - -func (m *Proposal) GetCommunityPoolSpend() *Proposal_CommunityPoolSpend { - if x, ok := m.GetPayload().(*Proposal_CommunityPoolSpend_); ok { - return x.CommunityPoolSpend - } - return nil -} - -func (m *Proposal) GetUpgradePlan() *Proposal_UpgradePlan { - if x, ok := m.GetPayload().(*Proposal_UpgradePlan_); ok { - return x.UpgradePlan - } - return nil -} - -func (m *Proposal) GetFreezeIbcClient() *Proposal_FreezeIbcClient { - if x, ok := m.GetPayload().(*Proposal_FreezeIbcClient_); ok { - return x.FreezeIbcClient - } - return nil -} - -func (m *Proposal) GetUnfreezeIbcClient() *Proposal_UnfreezeIbcClient { - if x, ok := m.GetPayload().(*Proposal_UnfreezeIbcClient_); ok { - return x.UnfreezeIbcClient - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Proposal) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Proposal_Signaling_)(nil), - (*Proposal_Emergency_)(nil), - (*Proposal_ParameterChange_)(nil), - (*Proposal_CommunityPoolSpend_)(nil), - (*Proposal_UpgradePlan_)(nil), - (*Proposal_FreezeIbcClient_)(nil), - (*Proposal_UnfreezeIbcClient_)(nil), - } -} - -// A signaling proposal is meant to register a vote on-chain, but does not have an automatic -// effect when passed. -// -// It optionally contains a reference to a commit which contains code to upgrade the chain. -type Proposal_Signaling struct { - // The commit to be voted upon, if any is relevant. - Commit string `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"` -} - -func (m *Proposal_Signaling) Reset() { *m = Proposal_Signaling{} } -func (m *Proposal_Signaling) String() string { return proto.CompactTextString(m) } -func (*Proposal_Signaling) ProtoMessage() {} -func (*Proposal_Signaling) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18, 0} -} -func (m *Proposal_Signaling) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal_Signaling) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal_Signaling.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 *Proposal_Signaling) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal_Signaling.Merge(m, src) -} -func (m *Proposal_Signaling) XXX_Size() int { - return m.Size() -} -func (m *Proposal_Signaling) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal_Signaling.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal_Signaling proto.InternalMessageInfo - -func (m *Proposal_Signaling) GetCommit() string { - if m != nil { - return m.Commit - } - return "" -} - -// An emergency proposal can be passed instantaneously by a 1/3 majority of validators, without -// waiting for the voting period to expire. -// -// If the boolean `halt_chain` is set to `true`, then the chain will halt immediately when the -// proposal is passed. -type Proposal_Emergency struct { - // If `true`, the chain will halt immediately when the proposal is passed. - HaltChain bool `protobuf:"varint,1,opt,name=halt_chain,json=haltChain,proto3" json:"halt_chain,omitempty"` -} - -func (m *Proposal_Emergency) Reset() { *m = Proposal_Emergency{} } -func (m *Proposal_Emergency) String() string { return proto.CompactTextString(m) } -func (*Proposal_Emergency) ProtoMessage() {} -func (*Proposal_Emergency) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18, 1} -} -func (m *Proposal_Emergency) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal_Emergency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal_Emergency.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 *Proposal_Emergency) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal_Emergency.Merge(m, src) -} -func (m *Proposal_Emergency) XXX_Size() int { - return m.Size() -} -func (m *Proposal_Emergency) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal_Emergency.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal_Emergency proto.InternalMessageInfo - -func (m *Proposal_Emergency) GetHaltChain() bool { - if m != nil { - return m.HaltChain - } - return false -} - -// A parameter change proposal describes a replacement of the app parameters, which should take -// effect when the proposal is passed. -type Proposal_ParameterChange struct { - // DEPRECATED - OldParameters *ChangedAppParameters `protobuf:"bytes,1,opt,name=old_parameters,json=oldParameters,proto3" json:"old_parameters,omitempty"` // Deprecated: Do not use. - // DEPRECATED - NewParameters *ChangedAppParameters `protobuf:"bytes,2,opt,name=new_parameters,json=newParameters,proto3" json:"new_parameters,omitempty"` // Deprecated: Do not use. - // A list of encoded preconditions for the parameter change: even if the - // proposal passes, the update will not be applied if the value of the - // precondition does not match the proposal at the time it is enacted. - // - // This can be empty, in which case the changes will be applied - // unconditionally. - Preconditions []*EncodedParameter `protobuf:"bytes,3,rep,name=preconditions,proto3" json:"preconditions,omitempty"` - // A list of encoded changes to the application parameters. - Changes []*EncodedParameter `protobuf:"bytes,4,rep,name=changes,proto3" json:"changes,omitempty"` -} - -func (m *Proposal_ParameterChange) Reset() { *m = Proposal_ParameterChange{} } -func (m *Proposal_ParameterChange) String() string { return proto.CompactTextString(m) } -func (*Proposal_ParameterChange) ProtoMessage() {} -func (*Proposal_ParameterChange) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18, 2} -} -func (m *Proposal_ParameterChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal_ParameterChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal_ParameterChange.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 *Proposal_ParameterChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal_ParameterChange.Merge(m, src) -} -func (m *Proposal_ParameterChange) XXX_Size() int { - return m.Size() -} -func (m *Proposal_ParameterChange) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal_ParameterChange.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal_ParameterChange proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *Proposal_ParameterChange) GetOldParameters() *ChangedAppParameters { - if m != nil { - return m.OldParameters - } - return nil -} - -// Deprecated: Do not use. -func (m *Proposal_ParameterChange) GetNewParameters() *ChangedAppParameters { - if m != nil { - return m.NewParameters - } - return nil -} - -func (m *Proposal_ParameterChange) GetPreconditions() []*EncodedParameter { - if m != nil { - return m.Preconditions - } - return nil -} - -func (m *Proposal_ParameterChange) GetChanges() []*EncodedParameter { - if m != nil { - return m.Changes - } - return nil -} - -// A Community Pool spend proposal describes zero or more transactions to execute on behalf of the Community Pool, with -// access to its funds, and zero or more scheduled transactions from previous passed proposals to -// cancel. -type Proposal_CommunityPoolSpend struct { - // The transaction plan to be executed at the time the proposal is passed. This must be a - // transaction plan which can be executed by the Community Pool, which means it can't require any witness - // data or authorization signatures, but it may use the `CommunityPoolSpend` action. - TransactionPlan *types.Any `protobuf:"bytes,2,opt,name=transaction_plan,json=transactionPlan,proto3" json:"transaction_plan,omitempty"` -} - -func (m *Proposal_CommunityPoolSpend) Reset() { *m = Proposal_CommunityPoolSpend{} } -func (m *Proposal_CommunityPoolSpend) String() string { return proto.CompactTextString(m) } -func (*Proposal_CommunityPoolSpend) ProtoMessage() {} -func (*Proposal_CommunityPoolSpend) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18, 3} -} -func (m *Proposal_CommunityPoolSpend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal_CommunityPoolSpend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal_CommunityPoolSpend.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 *Proposal_CommunityPoolSpend) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal_CommunityPoolSpend.Merge(m, src) -} -func (m *Proposal_CommunityPoolSpend) XXX_Size() int { - return m.Size() -} -func (m *Proposal_CommunityPoolSpend) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal_CommunityPoolSpend.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal_CommunityPoolSpend proto.InternalMessageInfo - -func (m *Proposal_CommunityPoolSpend) GetTransactionPlan() *types.Any { - if m != nil { - return m.TransactionPlan - } - return nil -} - -// An upgrade plan describes a candidate upgrade to be executed at a certain height. If passed, the chain -// will halt at the specified height. -type Proposal_UpgradePlan struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *Proposal_UpgradePlan) Reset() { *m = Proposal_UpgradePlan{} } -func (m *Proposal_UpgradePlan) String() string { return proto.CompactTextString(m) } -func (*Proposal_UpgradePlan) ProtoMessage() {} -func (*Proposal_UpgradePlan) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18, 4} -} -func (m *Proposal_UpgradePlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal_UpgradePlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal_UpgradePlan.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 *Proposal_UpgradePlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal_UpgradePlan.Merge(m, src) -} -func (m *Proposal_UpgradePlan) XXX_Size() int { - return m.Size() -} -func (m *Proposal_UpgradePlan) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal_UpgradePlan.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal_UpgradePlan proto.InternalMessageInfo - -func (m *Proposal_UpgradePlan) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -// Freeze an existing IBC client. -// Like `Emergency` proposals, it is enacted immediately after receiving -// +2/3 of validator votes. -type Proposal_FreezeIbcClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` -} - -func (m *Proposal_FreezeIbcClient) Reset() { *m = Proposal_FreezeIbcClient{} } -func (m *Proposal_FreezeIbcClient) String() string { return proto.CompactTextString(m) } -func (*Proposal_FreezeIbcClient) ProtoMessage() {} -func (*Proposal_FreezeIbcClient) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18, 5} -} -func (m *Proposal_FreezeIbcClient) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal_FreezeIbcClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal_FreezeIbcClient.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 *Proposal_FreezeIbcClient) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal_FreezeIbcClient.Merge(m, src) -} -func (m *Proposal_FreezeIbcClient) XXX_Size() int { - return m.Size() -} -func (m *Proposal_FreezeIbcClient) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal_FreezeIbcClient.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal_FreezeIbcClient proto.InternalMessageInfo - -func (m *Proposal_FreezeIbcClient) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -// Unfreeze an existing IBC client. -// Like `Emergency` proposals, it is enacted immediately after receiving -// +2/3 of validator votes. -type Proposal_UnfreezeIbcClient struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` -} - -func (m *Proposal_UnfreezeIbcClient) Reset() { *m = Proposal_UnfreezeIbcClient{} } -func (m *Proposal_UnfreezeIbcClient) String() string { return proto.CompactTextString(m) } -func (*Proposal_UnfreezeIbcClient) ProtoMessage() {} -func (*Proposal_UnfreezeIbcClient) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{18, 6} -} -func (m *Proposal_UnfreezeIbcClient) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proposal_UnfreezeIbcClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Proposal_UnfreezeIbcClient.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 *Proposal_UnfreezeIbcClient) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proposal_UnfreezeIbcClient.Merge(m, src) -} -func (m *Proposal_UnfreezeIbcClient) XXX_Size() int { - return m.Size() -} -func (m *Proposal_UnfreezeIbcClient) XXX_DiscardUnknown() { - xxx_messageInfo_Proposal_UnfreezeIbcClient.DiscardUnknown(m) -} - -var xxx_messageInfo_Proposal_UnfreezeIbcClient proto.InternalMessageInfo - -func (m *Proposal_UnfreezeIbcClient) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -type ProposalInfoRequest struct { - // The proposal id to request information on. - ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (m *ProposalInfoRequest) Reset() { *m = ProposalInfoRequest{} } -func (m *ProposalInfoRequest) String() string { return proto.CompactTextString(m) } -func (*ProposalInfoRequest) ProtoMessage() {} -func (*ProposalInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{19} -} -func (m *ProposalInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalInfoRequest.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 *ProposalInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalInfoRequest.Merge(m, src) -} -func (m *ProposalInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *ProposalInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalInfoRequest proto.InternalMessageInfo - -func (m *ProposalInfoRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -type ProposalInfoResponse struct { - // The block height at which the proposal started voting. - StartBlockHeight uint64 `protobuf:"varint,1,opt,name=start_block_height,json=startBlockHeight,proto3" json:"start_block_height,omitempty"` - // The position of the state commitment tree at which the proposal is considered to have started voting. - StartPosition uint64 `protobuf:"varint,2,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` -} - -func (m *ProposalInfoResponse) Reset() { *m = ProposalInfoResponse{} } -func (m *ProposalInfoResponse) String() string { return proto.CompactTextString(m) } -func (*ProposalInfoResponse) ProtoMessage() {} -func (*ProposalInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{20} -} -func (m *ProposalInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalInfoResponse.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 *ProposalInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalInfoResponse.Merge(m, src) -} -func (m *ProposalInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *ProposalInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalInfoResponse proto.InternalMessageInfo - -func (m *ProposalInfoResponse) GetStartBlockHeight() uint64 { - if m != nil { - return m.StartBlockHeight - } - return 0 -} - -func (m *ProposalInfoResponse) GetStartPosition() uint64 { - if m != nil { - return m.StartPosition - } - return 0 -} - -type ProposalDataRequest struct { - // The proposal id to request information on. - ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (m *ProposalDataRequest) Reset() { *m = ProposalDataRequest{} } -func (m *ProposalDataRequest) String() string { return proto.CompactTextString(m) } -func (*ProposalDataRequest) ProtoMessage() {} -func (*ProposalDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{21} -} -func (m *ProposalDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalDataRequest.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 *ProposalDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalDataRequest.Merge(m, src) -} -func (m *ProposalDataRequest) XXX_Size() int { - return m.Size() -} -func (m *ProposalDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalDataRequest proto.InternalMessageInfo - -func (m *ProposalDataRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -type ProposalDataResponse struct { - // The proposal metadata. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The block height at which the proposal started voting. - StartBlockHeight uint64 `protobuf:"varint,2,opt,name=start_block_height,json=startBlockHeight,proto3" json:"start_block_height,omitempty"` - // The block height at which the proposal ends voting. - EndBlockHeight uint64 `protobuf:"varint,3,opt,name=end_block_height,json=endBlockHeight,proto3" json:"end_block_height,omitempty"` - // The position of the state commitment tree at which the proposal is considered to have started voting. - StartPosition uint64 `protobuf:"varint,4,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` - // The current state of the proposal. - State *ProposalState `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` - // The deposit amount paid for the proposal. - ProposalDepositAmount *v1.Amount `protobuf:"bytes,6,opt,name=proposal_deposit_amount,json=proposalDepositAmount,proto3" json:"proposal_deposit_amount,omitempty"` -} - -func (m *ProposalDataResponse) Reset() { *m = ProposalDataResponse{} } -func (m *ProposalDataResponse) String() string { return proto.CompactTextString(m) } -func (*ProposalDataResponse) ProtoMessage() {} -func (*ProposalDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{22} -} -func (m *ProposalDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalDataResponse.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 *ProposalDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalDataResponse.Merge(m, src) -} -func (m *ProposalDataResponse) XXX_Size() int { - return m.Size() -} -func (m *ProposalDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalDataResponse proto.InternalMessageInfo - -func (m *ProposalDataResponse) GetProposal() *Proposal { - if m != nil { - return m.Proposal - } - return nil -} - -func (m *ProposalDataResponse) GetStartBlockHeight() uint64 { - if m != nil { - return m.StartBlockHeight - } - return 0 -} - -func (m *ProposalDataResponse) GetEndBlockHeight() uint64 { - if m != nil { - return m.EndBlockHeight - } - return 0 -} - -func (m *ProposalDataResponse) GetStartPosition() uint64 { - if m != nil { - return m.StartPosition - } - return 0 -} - -func (m *ProposalDataResponse) GetState() *ProposalState { - if m != nil { - return m.State - } - return nil -} - -func (m *ProposalDataResponse) GetProposalDepositAmount() *v1.Amount { - if m != nil { - return m.ProposalDepositAmount - } - return nil -} - -// Requests the validator rate data for a proposal. -type ProposalRateDataRequest struct { - // The proposal id to request information on. - ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (m *ProposalRateDataRequest) Reset() { *m = ProposalRateDataRequest{} } -func (m *ProposalRateDataRequest) String() string { return proto.CompactTextString(m) } -func (*ProposalRateDataRequest) ProtoMessage() {} -func (*ProposalRateDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{23} -} -func (m *ProposalRateDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalRateDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalRateDataRequest.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 *ProposalRateDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalRateDataRequest.Merge(m, src) -} -func (m *ProposalRateDataRequest) XXX_Size() int { - return m.Size() -} -func (m *ProposalRateDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalRateDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalRateDataRequest proto.InternalMessageInfo - -func (m *ProposalRateDataRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -// The rate data for a single validator. -type ProposalRateDataResponse struct { - RateData *v16.RateData `protobuf:"bytes,1,opt,name=rate_data,json=rateData,proto3" json:"rate_data,omitempty"` -} - -func (m *ProposalRateDataResponse) Reset() { *m = ProposalRateDataResponse{} } -func (m *ProposalRateDataResponse) String() string { return proto.CompactTextString(m) } -func (*ProposalRateDataResponse) ProtoMessage() {} -func (*ProposalRateDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{24} -} -func (m *ProposalRateDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalRateDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalRateDataResponse.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 *ProposalRateDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalRateDataResponse.Merge(m, src) -} -func (m *ProposalRateDataResponse) XXX_Size() int { - return m.Size() -} -func (m *ProposalRateDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalRateDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalRateDataResponse proto.InternalMessageInfo - -func (m *ProposalRateDataResponse) GetRateData() *v16.RateData { - if m != nil { - return m.RateData - } - return nil -} - -// Requests the list of all proposals. -type ProposalListRequest struct { - // Whether to include proposals that are no longer active.; - Inactive bool `protobuf:"varint,2,opt,name=inactive,proto3" json:"inactive,omitempty"` -} - -func (m *ProposalListRequest) Reset() { *m = ProposalListRequest{} } -func (m *ProposalListRequest) String() string { return proto.CompactTextString(m) } -func (*ProposalListRequest) ProtoMessage() {} -func (*ProposalListRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{25} -} -func (m *ProposalListRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalListRequest.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 *ProposalListRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalListRequest.Merge(m, src) -} -func (m *ProposalListRequest) XXX_Size() int { - return m.Size() -} -func (m *ProposalListRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalListRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalListRequest proto.InternalMessageInfo - -func (m *ProposalListRequest) GetInactive() bool { - if m != nil { - return m.Inactive - } - return false -} - -// The data for a single proposal. -type ProposalListResponse struct { - // The proposal metadata. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // The block height at which the proposal started voting. - StartBlockHeight uint64 `protobuf:"varint,2,opt,name=start_block_height,json=startBlockHeight,proto3" json:"start_block_height,omitempty"` - // The block height at which the proposal ends voting. - EndBlockHeight uint64 `protobuf:"varint,3,opt,name=end_block_height,json=endBlockHeight,proto3" json:"end_block_height,omitempty"` - // The position of the state commitment tree at which the proposal is considered to have started voting. - StartPosition uint64 `protobuf:"varint,4,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` - // The current state of the proposal. - State *ProposalState `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"` -} - -func (m *ProposalListResponse) Reset() { *m = ProposalListResponse{} } -func (m *ProposalListResponse) String() string { return proto.CompactTextString(m) } -func (*ProposalListResponse) ProtoMessage() {} -func (*ProposalListResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{26} -} -func (m *ProposalListResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalListResponse.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 *ProposalListResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalListResponse.Merge(m, src) -} -func (m *ProposalListResponse) XXX_Size() int { - return m.Size() -} -func (m *ProposalListResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalListResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposalListResponse proto.InternalMessageInfo - -func (m *ProposalListResponse) GetProposal() *Proposal { - if m != nil { - return m.Proposal - } - return nil -} - -func (m *ProposalListResponse) GetStartBlockHeight() uint64 { - if m != nil { - return m.StartBlockHeight - } - return 0 -} - -func (m *ProposalListResponse) GetEndBlockHeight() uint64 { - if m != nil { - return m.EndBlockHeight - } - return 0 -} - -func (m *ProposalListResponse) GetStartPosition() uint64 { - if m != nil { - return m.StartPosition - } - return 0 -} - -func (m *ProposalListResponse) GetState() *ProposalState { - if m != nil { - return m.State - } - return nil -} - -// Requests the list of all validator votes for a given proposal. -type ValidatorVotesRequest struct { - // The proposal id to request information on. - ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (m *ValidatorVotesRequest) Reset() { *m = ValidatorVotesRequest{} } -func (m *ValidatorVotesRequest) String() string { return proto.CompactTextString(m) } -func (*ValidatorVotesRequest) ProtoMessage() {} -func (*ValidatorVotesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{27} -} -func (m *ValidatorVotesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorVotesRequest.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 *ValidatorVotesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorVotesRequest.Merge(m, src) -} -func (m *ValidatorVotesRequest) XXX_Size() int { - return m.Size() -} -func (m *ValidatorVotesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorVotesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorVotesRequest proto.InternalMessageInfo - -func (m *ValidatorVotesRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -// The data for a single validator vote. -type ValidatorVotesResponse struct { - // The vote. - Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` - // The validator identity. - IdentityKey *v12.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *ValidatorVotesResponse) Reset() { *m = ValidatorVotesResponse{} } -func (m *ValidatorVotesResponse) String() string { return proto.CompactTextString(m) } -func (*ValidatorVotesResponse) ProtoMessage() {} -func (*ValidatorVotesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{28} -} -func (m *ValidatorVotesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorVotesResponse.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 *ValidatorVotesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorVotesResponse.Merge(m, src) -} -func (m *ValidatorVotesResponse) XXX_Size() int { - return m.Size() -} -func (m *ValidatorVotesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorVotesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorVotesResponse proto.InternalMessageInfo - -func (m *ValidatorVotesResponse) GetVote() *Vote { - if m != nil { - return m.Vote - } - return nil -} - -func (m *ValidatorVotesResponse) GetIdentityKey() *v12.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -// Governance configuration data. -type GovernanceParameters struct { - // The number of blocks during which a proposal is voted on. - ProposalVotingBlocks uint64 `protobuf:"varint,1,opt,name=proposal_voting_blocks,json=proposalVotingBlocks,proto3" json:"proposal_voting_blocks,omitempty"` - // The deposit required to create a proposal. - ProposalDepositAmount *v1.Amount `protobuf:"bytes,2,opt,name=proposal_deposit_amount,json=proposalDepositAmount,proto3" json:"proposal_deposit_amount,omitempty"` - // The quorum required for a proposal to be considered valid, as a fraction of the total stake - // weight of the network. - ProposalValidQuorum string `protobuf:"bytes,3,opt,name=proposal_valid_quorum,json=proposalValidQuorum,proto3" json:"proposal_valid_quorum,omitempty"` - // The threshold for a proposal to pass voting, as a ratio of "yes" votes over "no" votes. - ProposalPassThreshold string `protobuf:"bytes,4,opt,name=proposal_pass_threshold,json=proposalPassThreshold,proto3" json:"proposal_pass_threshold,omitempty"` - // The threshold for a proposal to be slashed, regardless of whether the "yes" and "no" votes - // would have passed it, as a ratio of "no" votes over all total votes. - ProposalSlashThreshold string `protobuf:"bytes,5,opt,name=proposal_slash_threshold,json=proposalSlashThreshold,proto3" json:"proposal_slash_threshold,omitempty"` -} - -func (m *GovernanceParameters) Reset() { *m = GovernanceParameters{} } -func (m *GovernanceParameters) String() string { return proto.CompactTextString(m) } -func (*GovernanceParameters) ProtoMessage() {} -func (*GovernanceParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{29} -} -func (m *GovernanceParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GovernanceParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GovernanceParameters.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 *GovernanceParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_GovernanceParameters.Merge(m, src) -} -func (m *GovernanceParameters) XXX_Size() int { - return m.Size() -} -func (m *GovernanceParameters) XXX_DiscardUnknown() { - xxx_messageInfo_GovernanceParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_GovernanceParameters proto.InternalMessageInfo - -func (m *GovernanceParameters) GetProposalVotingBlocks() uint64 { - if m != nil { - return m.ProposalVotingBlocks - } - return 0 -} - -func (m *GovernanceParameters) GetProposalDepositAmount() *v1.Amount { - if m != nil { - return m.ProposalDepositAmount - } - return nil -} - -func (m *GovernanceParameters) GetProposalValidQuorum() string { - if m != nil { - return m.ProposalValidQuorum - } - return "" -} - -func (m *GovernanceParameters) GetProposalPassThreshold() string { - if m != nil { - return m.ProposalPassThreshold - } - return "" -} - -func (m *GovernanceParameters) GetProposalSlashThreshold() string { - if m != nil { - return m.ProposalSlashThreshold - } - return "" -} - -// Governance genesis state. -type GenesisContent struct { - // Governance parameters. - GovernanceParams *GovernanceParameters `protobuf:"bytes,1,opt,name=governance_params,json=governanceParams,proto3" json:"governance_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{30} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetGovernanceParams() *GovernanceParameters { - if m != nil { - return m.GovernanceParams - } - return nil -} - -type EncodedParameter struct { - // The component name in the `AppParameters`. - // - // This is the ProtoJSON-produced key in the `AppParameters` structure. - Component string `protobuf:"bytes,1,opt,name=component,proto3" json:"component,omitempty"` - // The parameter key in the component parameters. - // - // This is the ProtoJSON-produced field name in the component's substructure. - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // The parameter value. - // - // This is the ProtoJSON-encoded value of the parameter. - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *EncodedParameter) Reset() { *m = EncodedParameter{} } -func (m *EncodedParameter) String() string { return proto.CompactTextString(m) } -func (*EncodedParameter) ProtoMessage() {} -func (*EncodedParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{31} -} -func (m *EncodedParameter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EncodedParameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EncodedParameter.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 *EncodedParameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_EncodedParameter.Merge(m, src) -} -func (m *EncodedParameter) XXX_Size() int { - return m.Size() -} -func (m *EncodedParameter) XXX_DiscardUnknown() { - xxx_messageInfo_EncodedParameter.DiscardUnknown(m) -} - -var xxx_messageInfo_EncodedParameter proto.InternalMessageInfo - -func (m *EncodedParameter) GetComponent() string { - if m != nil { - return m.Component - } - return "" -} - -func (m *EncodedParameter) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *EncodedParameter) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// DEPRECATED -// -// Deprecated: Do not use. -type ChangedAppParameters struct { - // Sct module parameters. - SctParams *v14.SctParameters `protobuf:"bytes,1,opt,name=sct_params,json=sctParams,proto3" json:"sct_params,omitempty"` - // Community Pool module parameters. - CommunityPoolParams *v17.CommunityPoolParameters `protobuf:"bytes,2,opt,name=community_pool_params,json=communityPoolParams,proto3" json:"community_pool_params,omitempty"` - // Governance module parameters. - GovernanceParams *GovernanceParameters `protobuf:"bytes,3,opt,name=governance_params,json=governanceParams,proto3" json:"governance_params,omitempty"` - // IBC module parameters. - IbcParams *v18.IbcParameters `protobuf:"bytes,4,opt,name=ibc_params,json=ibcParams,proto3" json:"ibc_params,omitempty"` - // Stake module parameters. - StakeParams *v16.StakeParameters `protobuf:"bytes,5,opt,name=stake_params,json=stakeParams,proto3" json:"stake_params,omitempty"` - // Fee module parameters. - FeeParams *v19.FeeParameters `protobuf:"bytes,6,opt,name=fee_params,json=feeParams,proto3" json:"fee_params,omitempty"` - // Distributions module parameters. - DistributionsParams *v110.DistributionsParameters `protobuf:"bytes,7,opt,name=distributions_params,json=distributionsParams,proto3" json:"distributions_params,omitempty"` - // Funding module parameters. - FundingParams *v111.FundingParameters `protobuf:"bytes,8,opt,name=funding_params,json=fundingParams,proto3" json:"funding_params,omitempty"` - // Shielded pool module parameters - ShieldedPoolParams *v15.ShieldedPoolParameters `protobuf:"bytes,9,opt,name=shielded_pool_params,json=shieldedPoolParams,proto3" json:"shielded_pool_params,omitempty"` - // DEX component parameters - DexParams *v112.DexParameters `protobuf:"bytes,10,opt,name=dex_params,json=dexParams,proto3" json:"dex_params,omitempty"` - // Auction module parameters. - AuctionParams *v113.AuctionParameters `protobuf:"bytes,11,opt,name=auction_params,json=auctionParams,proto3" json:"auction_params,omitempty"` -} - -func (m *ChangedAppParameters) Reset() { *m = ChangedAppParameters{} } -func (m *ChangedAppParameters) String() string { return proto.CompactTextString(m) } -func (*ChangedAppParameters) ProtoMessage() {} -func (*ChangedAppParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{32} -} -func (m *ChangedAppParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChangedAppParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChangedAppParameters.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 *ChangedAppParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangedAppParameters.Merge(m, src) -} -func (m *ChangedAppParameters) XXX_Size() int { - return m.Size() -} -func (m *ChangedAppParameters) XXX_DiscardUnknown() { - xxx_messageInfo_ChangedAppParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_ChangedAppParameters proto.InternalMessageInfo - -func (m *ChangedAppParameters) GetSctParams() *v14.SctParameters { - if m != nil { - return m.SctParams - } - return nil -} - -func (m *ChangedAppParameters) GetCommunityPoolParams() *v17.CommunityPoolParameters { - if m != nil { - return m.CommunityPoolParams - } - return nil -} - -func (m *ChangedAppParameters) GetGovernanceParams() *GovernanceParameters { - if m != nil { - return m.GovernanceParams - } - return nil -} - -func (m *ChangedAppParameters) GetIbcParams() *v18.IbcParameters { - if m != nil { - return m.IbcParams - } - return nil -} - -func (m *ChangedAppParameters) GetStakeParams() *v16.StakeParameters { - if m != nil { - return m.StakeParams - } - return nil -} - -func (m *ChangedAppParameters) GetFeeParams() *v19.FeeParameters { - if m != nil { - return m.FeeParams - } - return nil -} - -func (m *ChangedAppParameters) GetDistributionsParams() *v110.DistributionsParameters { - if m != nil { - return m.DistributionsParams - } - return nil -} - -func (m *ChangedAppParameters) GetFundingParams() *v111.FundingParameters { - if m != nil { - return m.FundingParams - } - return nil -} - -func (m *ChangedAppParameters) GetShieldedPoolParams() *v15.ShieldedPoolParameters { - if m != nil { - return m.ShieldedPoolParams - } - return nil -} - -func (m *ChangedAppParameters) GetDexParams() *v112.DexParameters { - if m != nil { - return m.DexParams - } - return nil -} - -func (m *ChangedAppParameters) GetAuctionParams() *v113.AuctionParameters { - if m != nil { - return m.AuctionParams - } - return nil -} - -// DEPRECATED -// -// Deprecated: Do not use. -type ChangedAppParametersSet struct { - // The set of app parameters at the time the proposal was submitted. - Old *ChangedAppParameters `protobuf:"bytes,1,opt,name=old,proto3" json:"old,omitempty"` - // The new set of parameters the proposal is trying to enact. - New *ChangedAppParameters `protobuf:"bytes,2,opt,name=new,proto3" json:"new,omitempty"` -} - -func (m *ChangedAppParametersSet) Reset() { *m = ChangedAppParametersSet{} } -func (m *ChangedAppParametersSet) String() string { return proto.CompactTextString(m) } -func (*ChangedAppParametersSet) ProtoMessage() {} -func (*ChangedAppParametersSet) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{33} -} -func (m *ChangedAppParametersSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChangedAppParametersSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChangedAppParametersSet.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 *ChangedAppParametersSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangedAppParametersSet.Merge(m, src) -} -func (m *ChangedAppParametersSet) XXX_Size() int { - return m.Size() -} -func (m *ChangedAppParametersSet) XXX_DiscardUnknown() { - xxx_messageInfo_ChangedAppParametersSet.DiscardUnknown(m) -} - -var xxx_messageInfo_ChangedAppParametersSet proto.InternalMessageInfo - -func (m *ChangedAppParametersSet) GetOld() *ChangedAppParameters { - if m != nil { - return m.Old - } - return nil -} - -func (m *ChangedAppParametersSet) GetNew() *ChangedAppParameters { - if m != nil { - return m.New - } - return nil -} - -type VotingPowerAtProposalStartRequest struct { - // The proposal id to request information on. - ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` - // The validator identity key to request information on. - IdentityKey *v12.IdentityKey `protobuf:"bytes,3,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *VotingPowerAtProposalStartRequest) Reset() { *m = VotingPowerAtProposalStartRequest{} } -func (m *VotingPowerAtProposalStartRequest) String() string { return proto.CompactTextString(m) } -func (*VotingPowerAtProposalStartRequest) ProtoMessage() {} -func (*VotingPowerAtProposalStartRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{34} -} -func (m *VotingPowerAtProposalStartRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VotingPowerAtProposalStartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VotingPowerAtProposalStartRequest.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 *VotingPowerAtProposalStartRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VotingPowerAtProposalStartRequest.Merge(m, src) -} -func (m *VotingPowerAtProposalStartRequest) XXX_Size() int { - return m.Size() -} -func (m *VotingPowerAtProposalStartRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VotingPowerAtProposalStartRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_VotingPowerAtProposalStartRequest proto.InternalMessageInfo - -func (m *VotingPowerAtProposalStartRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -func (m *VotingPowerAtProposalStartRequest) GetIdentityKey() *v12.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -type VotingPowerAtProposalStartResponse struct { - // The voting power for the given identity key at the start of the proposal. - // TODO: since we don't support optional fields in our protos any more, - // this will be set to 0 if the validator was not active at the start of the proposal. - // Is this potentially an issue? - VotingPower uint64 `protobuf:"varint,1,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` -} - -func (m *VotingPowerAtProposalStartResponse) Reset() { *m = VotingPowerAtProposalStartResponse{} } -func (m *VotingPowerAtProposalStartResponse) String() string { return proto.CompactTextString(m) } -func (*VotingPowerAtProposalStartResponse) ProtoMessage() {} -func (*VotingPowerAtProposalStartResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{35} -} -func (m *VotingPowerAtProposalStartResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VotingPowerAtProposalStartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VotingPowerAtProposalStartResponse.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 *VotingPowerAtProposalStartResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VotingPowerAtProposalStartResponse.Merge(m, src) -} -func (m *VotingPowerAtProposalStartResponse) XXX_Size() int { - return m.Size() -} -func (m *VotingPowerAtProposalStartResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VotingPowerAtProposalStartResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VotingPowerAtProposalStartResponse proto.InternalMessageInfo - -func (m *VotingPowerAtProposalStartResponse) GetVotingPower() uint64 { - if m != nil { - return m.VotingPower - } - return 0 -} - -type AllTalliedDelegatorVotesForProposalRequest struct { - // The proposal id to request information on. - ProposalId uint64 `protobuf:"varint,2,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` -} - -func (m *AllTalliedDelegatorVotesForProposalRequest) Reset() { - *m = AllTalliedDelegatorVotesForProposalRequest{} -} -func (m *AllTalliedDelegatorVotesForProposalRequest) String() string { - return proto.CompactTextString(m) -} -func (*AllTalliedDelegatorVotesForProposalRequest) ProtoMessage() {} -func (*AllTalliedDelegatorVotesForProposalRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{36} -} -func (m *AllTalliedDelegatorVotesForProposalRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllTalliedDelegatorVotesForProposalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllTalliedDelegatorVotesForProposalRequest.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 *AllTalliedDelegatorVotesForProposalRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTalliedDelegatorVotesForProposalRequest.Merge(m, src) -} -func (m *AllTalliedDelegatorVotesForProposalRequest) XXX_Size() int { - return m.Size() -} -func (m *AllTalliedDelegatorVotesForProposalRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllTalliedDelegatorVotesForProposalRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AllTalliedDelegatorVotesForProposalRequest proto.InternalMessageInfo - -func (m *AllTalliedDelegatorVotesForProposalRequest) GetProposalId() uint64 { - if m != nil { - return m.ProposalId - } - return 0 -} - -type AllTalliedDelegatorVotesForProposalResponse struct { - // The tally of delegator votes for a given validator for the proposal. - Tally *Tally `protobuf:"bytes,1,opt,name=tally,proto3" json:"tally,omitempty"` - // The validator identity associated with the tally. - IdentityKey *v12.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *AllTalliedDelegatorVotesForProposalResponse) Reset() { - *m = AllTalliedDelegatorVotesForProposalResponse{} -} -func (m *AllTalliedDelegatorVotesForProposalResponse) String() string { - return proto.CompactTextString(m) -} -func (*AllTalliedDelegatorVotesForProposalResponse) ProtoMessage() {} -func (*AllTalliedDelegatorVotesForProposalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{37} -} -func (m *AllTalliedDelegatorVotesForProposalResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllTalliedDelegatorVotesForProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllTalliedDelegatorVotesForProposalResponse.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 *AllTalliedDelegatorVotesForProposalResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTalliedDelegatorVotesForProposalResponse.Merge(m, src) -} -func (m *AllTalliedDelegatorVotesForProposalResponse) XXX_Size() int { - return m.Size() -} -func (m *AllTalliedDelegatorVotesForProposalResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllTalliedDelegatorVotesForProposalResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AllTalliedDelegatorVotesForProposalResponse proto.InternalMessageInfo - -func (m *AllTalliedDelegatorVotesForProposalResponse) GetTally() *Tally { - if m != nil { - return m.Tally - } - return nil -} - -func (m *AllTalliedDelegatorVotesForProposalResponse) GetIdentityKey() *v12.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -type NextProposalIdRequest struct { -} - -func (m *NextProposalIdRequest) Reset() { *m = NextProposalIdRequest{} } -func (m *NextProposalIdRequest) String() string { return proto.CompactTextString(m) } -func (*NextProposalIdRequest) ProtoMessage() {} -func (*NextProposalIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{38} -} -func (m *NextProposalIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NextProposalIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NextProposalIdRequest.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 *NextProposalIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextProposalIdRequest.Merge(m, src) -} -func (m *NextProposalIdRequest) XXX_Size() int { - return m.Size() -} -func (m *NextProposalIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NextProposalIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NextProposalIdRequest proto.InternalMessageInfo - -type NextProposalIdResponse struct { - // The next proposal ID. - NextProposalId uint64 `protobuf:"varint,1,opt,name=next_proposal_id,json=nextProposalId,proto3" json:"next_proposal_id,omitempty"` -} - -func (m *NextProposalIdResponse) Reset() { *m = NextProposalIdResponse{} } -func (m *NextProposalIdResponse) String() string { return proto.CompactTextString(m) } -func (*NextProposalIdResponse) ProtoMessage() {} -func (*NextProposalIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{39} -} -func (m *NextProposalIdResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NextProposalIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NextProposalIdResponse.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 *NextProposalIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NextProposalIdResponse.Merge(m, src) -} -func (m *NextProposalIdResponse) XXX_Size() int { - return m.Size() -} -func (m *NextProposalIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NextProposalIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NextProposalIdResponse proto.InternalMessageInfo - -func (m *NextProposalIdResponse) GetNextProposalId() uint64 { - if m != nil { - return m.NextProposalId - } - return 0 -} - -// The ratio between two numbers, used in governance to describe vote thresholds and quorums. -type Ratio struct { - // The numerator. - Numerator uint64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` - // The denominator. - Denominator uint64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"` -} - -func (m *Ratio) Reset() { *m = Ratio{} } -func (m *Ratio) String() string { return proto.CompactTextString(m) } -func (*Ratio) ProtoMessage() {} -func (*Ratio) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{40} -} -func (m *Ratio) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ratio) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ratio.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 *Ratio) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ratio.Merge(m, src) -} -func (m *Ratio) XXX_Size() int { - return m.Size() -} -func (m *Ratio) XXX_DiscardUnknown() { - xxx_messageInfo_Ratio.DiscardUnknown(m) -} - -var xxx_messageInfo_Ratio proto.InternalMessageInfo - -func (m *Ratio) GetNumerator() uint64 { - if m != nil { - return m.Numerator - } - return 0 -} - -func (m *Ratio) GetDenominator() uint64 { - if m != nil { - return m.Denominator - } - return 0 -} - -type EventDelegatorVote struct { - // The delegator vote. - Vote *DelegatorVote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` -} - -func (m *EventDelegatorVote) Reset() { *m = EventDelegatorVote{} } -func (m *EventDelegatorVote) String() string { return proto.CompactTextString(m) } -func (*EventDelegatorVote) ProtoMessage() {} -func (*EventDelegatorVote) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{41} -} -func (m *EventDelegatorVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDelegatorVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDelegatorVote.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 *EventDelegatorVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDelegatorVote.Merge(m, src) -} -func (m *EventDelegatorVote) XXX_Size() int { - return m.Size() -} -func (m *EventDelegatorVote) XXX_DiscardUnknown() { - xxx_messageInfo_EventDelegatorVote.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDelegatorVote proto.InternalMessageInfo - -func (m *EventDelegatorVote) GetVote() *DelegatorVote { - if m != nil { - return m.Vote - } - return nil -} - -type EventProposalDepositClaim struct { - // The deposit claim body. - DepositClaim *ProposalDepositClaim `protobuf:"bytes,1,opt,name=deposit_claim,json=depositClaim,proto3" json:"deposit_claim,omitempty"` -} - -func (m *EventProposalDepositClaim) Reset() { *m = EventProposalDepositClaim{} } -func (m *EventProposalDepositClaim) String() string { return proto.CompactTextString(m) } -func (*EventProposalDepositClaim) ProtoMessage() {} -func (*EventProposalDepositClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{42} -} -func (m *EventProposalDepositClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventProposalDepositClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventProposalDepositClaim.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 *EventProposalDepositClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventProposalDepositClaim.Merge(m, src) -} -func (m *EventProposalDepositClaim) XXX_Size() int { - return m.Size() -} -func (m *EventProposalDepositClaim) XXX_DiscardUnknown() { - xxx_messageInfo_EventProposalDepositClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_EventProposalDepositClaim proto.InternalMessageInfo - -func (m *EventProposalDepositClaim) GetDepositClaim() *ProposalDepositClaim { - if m != nil { - return m.DepositClaim - } - return nil -} - -type EventValidatorVote struct { - // The validator vote. - Vote *ValidatorVote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` -} - -func (m *EventValidatorVote) Reset() { *m = EventValidatorVote{} } -func (m *EventValidatorVote) String() string { return proto.CompactTextString(m) } -func (*EventValidatorVote) ProtoMessage() {} -func (*EventValidatorVote) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{43} -} -func (m *EventValidatorVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValidatorVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValidatorVote.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 *EventValidatorVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValidatorVote.Merge(m, src) -} -func (m *EventValidatorVote) XXX_Size() int { - return m.Size() -} -func (m *EventValidatorVote) XXX_DiscardUnknown() { - xxx_messageInfo_EventValidatorVote.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValidatorVote proto.InternalMessageInfo - -func (m *EventValidatorVote) GetVote() *ValidatorVote { - if m != nil { - return m.Vote - } - return nil -} - -type EventProposalWithdraw struct { - // Details on the withdrawn proposal. - Withdraw *ProposalWithdraw `protobuf:"bytes,1,opt,name=withdraw,proto3" json:"withdraw,omitempty"` -} - -func (m *EventProposalWithdraw) Reset() { *m = EventProposalWithdraw{} } -func (m *EventProposalWithdraw) String() string { return proto.CompactTextString(m) } -func (*EventProposalWithdraw) ProtoMessage() {} -func (*EventProposalWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{44} -} -func (m *EventProposalWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventProposalWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventProposalWithdraw.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 *EventProposalWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventProposalWithdraw.Merge(m, src) -} -func (m *EventProposalWithdraw) XXX_Size() int { - return m.Size() -} -func (m *EventProposalWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_EventProposalWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_EventProposalWithdraw proto.InternalMessageInfo - -func (m *EventProposalWithdraw) GetWithdraw() *ProposalWithdraw { - if m != nil { - return m.Withdraw - } - return nil -} - -type EventProposalSubmit struct { - // Details on the submitted proposal. - Submit *ProposalSubmit `protobuf:"bytes,1,opt,name=submit,proto3" json:"submit,omitempty"` -} - -func (m *EventProposalSubmit) Reset() { *m = EventProposalSubmit{} } -func (m *EventProposalSubmit) String() string { return proto.CompactTextString(m) } -func (*EventProposalSubmit) ProtoMessage() {} -func (*EventProposalSubmit) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{45} -} -func (m *EventProposalSubmit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventProposalSubmit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventProposalSubmit.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 *EventProposalSubmit) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventProposalSubmit.Merge(m, src) -} -func (m *EventProposalSubmit) XXX_Size() int { - return m.Size() -} -func (m *EventProposalSubmit) XXX_DiscardUnknown() { - xxx_messageInfo_EventProposalSubmit.DiscardUnknown(m) -} - -var xxx_messageInfo_EventProposalSubmit proto.InternalMessageInfo - -func (m *EventProposalSubmit) GetSubmit() *ProposalSubmit { - if m != nil { - return m.Submit - } - return nil -} - -type EventEnactProposal struct { - // The enacted proposal. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` -} - -func (m *EventEnactProposal) Reset() { *m = EventEnactProposal{} } -func (m *EventEnactProposal) String() string { return proto.CompactTextString(m) } -func (*EventEnactProposal) ProtoMessage() {} -func (*EventEnactProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{46} -} -func (m *EventEnactProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventEnactProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventEnactProposal.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 *EventEnactProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventEnactProposal.Merge(m, src) -} -func (m *EventEnactProposal) XXX_Size() int { - return m.Size() -} -func (m *EventEnactProposal) XXX_DiscardUnknown() { - xxx_messageInfo_EventEnactProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_EventEnactProposal proto.InternalMessageInfo - -func (m *EventEnactProposal) GetProposal() *Proposal { - if m != nil { - return m.Proposal - } - return nil -} - -type EventProposalFailed struct { - // The failed proposal. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` -} - -func (m *EventProposalFailed) Reset() { *m = EventProposalFailed{} } -func (m *EventProposalFailed) String() string { return proto.CompactTextString(m) } -func (*EventProposalFailed) ProtoMessage() {} -func (*EventProposalFailed) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{47} -} -func (m *EventProposalFailed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventProposalFailed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventProposalFailed.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 *EventProposalFailed) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventProposalFailed.Merge(m, src) -} -func (m *EventProposalFailed) XXX_Size() int { - return m.Size() -} -func (m *EventProposalFailed) XXX_DiscardUnknown() { - xxx_messageInfo_EventProposalFailed.DiscardUnknown(m) -} - -var xxx_messageInfo_EventProposalFailed proto.InternalMessageInfo - -func (m *EventProposalFailed) GetProposal() *Proposal { - if m != nil { - return m.Proposal - } - return nil -} - -type EventProposalSlashed struct { - // The slashed proposal. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` -} - -func (m *EventProposalSlashed) Reset() { *m = EventProposalSlashed{} } -func (m *EventProposalSlashed) String() string { return proto.CompactTextString(m) } -func (*EventProposalSlashed) ProtoMessage() {} -func (*EventProposalSlashed) Descriptor() ([]byte, []int) { - return fileDescriptor_a9098f9e68b782a3, []int{48} -} -func (m *EventProposalSlashed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventProposalSlashed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventProposalSlashed.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 *EventProposalSlashed) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventProposalSlashed.Merge(m, src) -} -func (m *EventProposalSlashed) XXX_Size() int { - return m.Size() -} -func (m *EventProposalSlashed) XXX_DiscardUnknown() { - xxx_messageInfo_EventProposalSlashed.DiscardUnknown(m) -} - -var xxx_messageInfo_EventProposalSlashed proto.InternalMessageInfo - -func (m *EventProposalSlashed) GetProposal() *Proposal { - if m != nil { - return m.Proposal - } - return nil -} - -func init() { - proto.RegisterEnum("penumbra.core.component.governance.v1.Vote_Vote", Vote_Vote_name, Vote_Vote_value) - proto.RegisterType((*ZKDelegatorVoteProof)(nil), "penumbra.core.component.governance.v1.ZKDelegatorVoteProof") - proto.RegisterType((*ProposalSubmit)(nil), "penumbra.core.component.governance.v1.ProposalSubmit") - proto.RegisterType((*ProposalWithdraw)(nil), "penumbra.core.component.governance.v1.ProposalWithdraw") - proto.RegisterType((*ProposalDepositClaim)(nil), "penumbra.core.component.governance.v1.ProposalDepositClaim") - proto.RegisterType((*ValidatorVote)(nil), "penumbra.core.component.governance.v1.ValidatorVote") - proto.RegisterType((*ValidatorVoteReason)(nil), "penumbra.core.component.governance.v1.ValidatorVoteReason") - proto.RegisterType((*ValidatorVoteBody)(nil), "penumbra.core.component.governance.v1.ValidatorVoteBody") - proto.RegisterType((*DelegatorVote)(nil), "penumbra.core.component.governance.v1.DelegatorVote") - proto.RegisterType((*DelegatorVoteBody)(nil), "penumbra.core.component.governance.v1.DelegatorVoteBody") - proto.RegisterType((*DelegatorVoteView)(nil), "penumbra.core.component.governance.v1.DelegatorVoteView") - proto.RegisterType((*DelegatorVoteView_Visible)(nil), "penumbra.core.component.governance.v1.DelegatorVoteView.Visible") - proto.RegisterType((*DelegatorVoteView_Opaque)(nil), "penumbra.core.component.governance.v1.DelegatorVoteView.Opaque") - proto.RegisterType((*DelegatorVotePlan)(nil), "penumbra.core.component.governance.v1.DelegatorVotePlan") - proto.RegisterType((*CommunityPoolDeposit)(nil), "penumbra.core.component.governance.v1.CommunityPoolDeposit") - proto.RegisterType((*CommunityPoolSpend)(nil), "penumbra.core.component.governance.v1.CommunityPoolSpend") - proto.RegisterType((*CommunityPoolOutput)(nil), "penumbra.core.component.governance.v1.CommunityPoolOutput") - proto.RegisterType((*Vote)(nil), "penumbra.core.component.governance.v1.Vote") - proto.RegisterType((*ProposalState)(nil), "penumbra.core.component.governance.v1.ProposalState") - proto.RegisterType((*ProposalState_Voting)(nil), "penumbra.core.component.governance.v1.ProposalState.Voting") - proto.RegisterType((*ProposalState_Withdrawn)(nil), "penumbra.core.component.governance.v1.ProposalState.Withdrawn") - proto.RegisterType((*ProposalState_Finished)(nil), "penumbra.core.component.governance.v1.ProposalState.Finished") - proto.RegisterType((*ProposalState_Claimed)(nil), "penumbra.core.component.governance.v1.ProposalState.Claimed") - proto.RegisterType((*ProposalOutcome)(nil), "penumbra.core.component.governance.v1.ProposalOutcome") - proto.RegisterType((*ProposalOutcome_Withdrawn)(nil), "penumbra.core.component.governance.v1.ProposalOutcome.Withdrawn") - proto.RegisterType((*ProposalOutcome_Passed)(nil), "penumbra.core.component.governance.v1.ProposalOutcome.Passed") - proto.RegisterType((*ProposalOutcome_Failed)(nil), "penumbra.core.component.governance.v1.ProposalOutcome.Failed") - proto.RegisterType((*ProposalOutcome_Slashed)(nil), "penumbra.core.component.governance.v1.ProposalOutcome.Slashed") - proto.RegisterType((*Tally)(nil), "penumbra.core.component.governance.v1.Tally") - proto.RegisterType((*Proposal)(nil), "penumbra.core.component.governance.v1.Proposal") - proto.RegisterType((*Proposal_Signaling)(nil), "penumbra.core.component.governance.v1.Proposal.Signaling") - proto.RegisterType((*Proposal_Emergency)(nil), "penumbra.core.component.governance.v1.Proposal.Emergency") - proto.RegisterType((*Proposal_ParameterChange)(nil), "penumbra.core.component.governance.v1.Proposal.ParameterChange") - proto.RegisterType((*Proposal_CommunityPoolSpend)(nil), "penumbra.core.component.governance.v1.Proposal.CommunityPoolSpend") - proto.RegisterType((*Proposal_UpgradePlan)(nil), "penumbra.core.component.governance.v1.Proposal.UpgradePlan") - proto.RegisterType((*Proposal_FreezeIbcClient)(nil), "penumbra.core.component.governance.v1.Proposal.FreezeIbcClient") - proto.RegisterType((*Proposal_UnfreezeIbcClient)(nil), "penumbra.core.component.governance.v1.Proposal.UnfreezeIbcClient") - proto.RegisterType((*ProposalInfoRequest)(nil), "penumbra.core.component.governance.v1.ProposalInfoRequest") - proto.RegisterType((*ProposalInfoResponse)(nil), "penumbra.core.component.governance.v1.ProposalInfoResponse") - proto.RegisterType((*ProposalDataRequest)(nil), "penumbra.core.component.governance.v1.ProposalDataRequest") - proto.RegisterType((*ProposalDataResponse)(nil), "penumbra.core.component.governance.v1.ProposalDataResponse") - proto.RegisterType((*ProposalRateDataRequest)(nil), "penumbra.core.component.governance.v1.ProposalRateDataRequest") - proto.RegisterType((*ProposalRateDataResponse)(nil), "penumbra.core.component.governance.v1.ProposalRateDataResponse") - proto.RegisterType((*ProposalListRequest)(nil), "penumbra.core.component.governance.v1.ProposalListRequest") - proto.RegisterType((*ProposalListResponse)(nil), "penumbra.core.component.governance.v1.ProposalListResponse") - proto.RegisterType((*ValidatorVotesRequest)(nil), "penumbra.core.component.governance.v1.ValidatorVotesRequest") - proto.RegisterType((*ValidatorVotesResponse)(nil), "penumbra.core.component.governance.v1.ValidatorVotesResponse") - proto.RegisterType((*GovernanceParameters)(nil), "penumbra.core.component.governance.v1.GovernanceParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.governance.v1.GenesisContent") - proto.RegisterType((*EncodedParameter)(nil), "penumbra.core.component.governance.v1.EncodedParameter") - proto.RegisterType((*ChangedAppParameters)(nil), "penumbra.core.component.governance.v1.ChangedAppParameters") - proto.RegisterType((*ChangedAppParametersSet)(nil), "penumbra.core.component.governance.v1.ChangedAppParametersSet") - proto.RegisterType((*VotingPowerAtProposalStartRequest)(nil), "penumbra.core.component.governance.v1.VotingPowerAtProposalStartRequest") - proto.RegisterType((*VotingPowerAtProposalStartResponse)(nil), "penumbra.core.component.governance.v1.VotingPowerAtProposalStartResponse") - proto.RegisterType((*AllTalliedDelegatorVotesForProposalRequest)(nil), "penumbra.core.component.governance.v1.AllTalliedDelegatorVotesForProposalRequest") - proto.RegisterType((*AllTalliedDelegatorVotesForProposalResponse)(nil), "penumbra.core.component.governance.v1.AllTalliedDelegatorVotesForProposalResponse") - proto.RegisterType((*NextProposalIdRequest)(nil), "penumbra.core.component.governance.v1.NextProposalIdRequest") - proto.RegisterType((*NextProposalIdResponse)(nil), "penumbra.core.component.governance.v1.NextProposalIdResponse") - proto.RegisterType((*Ratio)(nil), "penumbra.core.component.governance.v1.Ratio") - proto.RegisterType((*EventDelegatorVote)(nil), "penumbra.core.component.governance.v1.EventDelegatorVote") - proto.RegisterType((*EventProposalDepositClaim)(nil), "penumbra.core.component.governance.v1.EventProposalDepositClaim") - proto.RegisterType((*EventValidatorVote)(nil), "penumbra.core.component.governance.v1.EventValidatorVote") - proto.RegisterType((*EventProposalWithdraw)(nil), "penumbra.core.component.governance.v1.EventProposalWithdraw") - proto.RegisterType((*EventProposalSubmit)(nil), "penumbra.core.component.governance.v1.EventProposalSubmit") - proto.RegisterType((*EventEnactProposal)(nil), "penumbra.core.component.governance.v1.EventEnactProposal") - proto.RegisterType((*EventProposalFailed)(nil), "penumbra.core.component.governance.v1.EventProposalFailed") - proto.RegisterType((*EventProposalSlashed)(nil), "penumbra.core.component.governance.v1.EventProposalSlashed") -} - -func init() { - proto.RegisterFile("penumbra/core/component/governance/v1/governance.proto", fileDescriptor_a9098f9e68b782a3) -} - -var fileDescriptor_a9098f9e68b782a3 = []byte{ - // 3276 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xdd, 0x6f, 0x1b, 0xc7, - 0xb5, 0xd7, 0x52, 0x94, 0x48, 0x1e, 0x49, 0x34, 0x3d, 0xa6, 0x6d, 0x86, 0x37, 0xd1, 0x75, 0x36, - 0xd7, 0x80, 0x93, 0x38, 0x94, 0xe9, 0x38, 0xb6, 0xaf, 0x9c, 0xc4, 0x57, 0x92, 0xf5, 0x75, 0x1d, - 0xdb, 0xf2, 0xd2, 0x56, 0xbe, 0x74, 0xc3, 0x0c, 0x77, 0x87, 0xd4, 0x5e, 0x2f, 0x67, 0x99, 0xdd, - 0x59, 0xda, 0x0a, 0x70, 0x1f, 0x2e, 0x10, 0xdc, 0x8b, 0xa2, 0x28, 0x5a, 0xa0, 0x28, 0xfa, 0x5a, - 0x04, 0x7d, 0xea, 0x83, 0xd1, 0xbe, 0x15, 0xe8, 0x3f, 0x90, 0xf6, 0xa1, 0xc8, 0x4b, 0x81, 0x3c, - 0x16, 0xce, 0x5b, 0x81, 0x02, 0x7d, 0x2a, 0xd0, 0xb7, 0x62, 0x3e, 0x76, 0xb9, 0x4b, 0x51, 0x12, - 0xc9, 0xc8, 0x40, 0x1f, 0xfa, 0x62, 0x73, 0x66, 0xcf, 0xf9, 0x9d, 0x33, 0x67, 0xce, 0x9c, 0x39, - 0x67, 0x66, 0x04, 0x57, 0x3b, 0x84, 0x06, 0xed, 0x86, 0x87, 0x17, 0x4c, 0xd7, 0x23, 0x0b, 0xa6, - 0xdb, 0xee, 0xb8, 0x94, 0x50, 0xb6, 0xd0, 0x72, 0xbb, 0xc4, 0xa3, 0x98, 0x9a, 0x64, 0xa1, 0x5b, - 0x8d, 0xb5, 0x2a, 0x1d, 0xcf, 0x65, 0x2e, 0x3a, 0x1f, 0xf2, 0x55, 0x38, 0x5f, 0x25, 0xe2, 0xab, - 0xc4, 0x28, 0xbb, 0xd5, 0xf2, 0x0b, 0x2d, 0xd7, 0x6d, 0x39, 0x64, 0x41, 0x30, 0x35, 0x82, 0xe6, - 0x02, 0xa6, 0x7b, 0x12, 0xa1, 0xac, 0x27, 0x25, 0x63, 0xdf, 0x27, 0x8c, 0x8b, 0x12, 0x3f, 0x14, - 0xcd, 0xa5, 0x83, 0xb4, 0xc3, 0x81, 0xc9, 0x6c, 0x97, 0x0a, 0x7a, 0xf9, 0x53, 0x71, 0xbc, 0x7b, - 0x10, 0x87, 0xe9, 0xb6, 0xdb, 0x01, 0xb5, 0xd9, 0x5e, 0xbd, 0xe3, 0xba, 0x0e, 0x67, 0x4c, 0xf6, - 0x28, 0xfe, 0x0b, 0x07, 0xf1, 0x5b, 0xe4, 0x09, 0x67, 0xb2, 0xc8, 0x13, 0x45, 0xf9, 0xf6, 0x81, - 0x94, 0xb6, 0xcf, 0x3c, 0xbb, 0x11, 0x70, 0xad, 0x7c, 0xc1, 0x13, 0xef, 0x38, 0x4a, 0x4e, 0x93, - 0x08, 0x83, 0x37, 0x09, 0x39, 0xca, 0x06, 0xcd, 0x80, 0x5a, 0x36, 0x6d, 0x09, 0x6a, 0xf9, 0xf3, - 0x28, 0x6c, 0xbb, 0x61, 0x72, 0x6a, 0xbb, 0x61, 0x1e, 0x45, 0xe9, 0x9b, 0x62, 0x2e, 0x7c, 0x93, - 0x1d, 0x35, 0x5a, 0x7f, 0xd7, 0x26, 0x8e, 0x45, 0xac, 0xc8, 0xac, 0x89, 0x0e, 0xc5, 0x7d, 0xf1, - 0x40, 0x6e, 0x86, 0x1f, 0x89, 0xf1, 0x8a, 0x1f, 0x8a, 0xfa, 0x5c, 0x92, 0xfa, 0x11, 0xd9, 0x13, - 0x66, 0xe4, 0xff, 0x2b, 0x8a, 0xf9, 0x24, 0x05, 0x0d, 0xda, 0x9c, 0x80, 0x06, 0x6d, 0xf5, 0xfd, - 0x4a, 0xef, 0xbb, 0xb7, 0xd7, 0x61, 0xee, 0x82, 0x45, 0x4c, 0xdc, 0x7c, 0xf3, 0xda, 0xb5, 0xba, - 0x67, 0xf9, 0x58, 0xce, 0x63, 0xac, 0x43, 0x72, 0xe9, 0x17, 0xa1, 0xf8, 0xd1, 0xed, 0x5b, 0xc4, - 0x21, 0x2d, 0xcc, 0x5c, 0x6f, 0xdb, 0x65, 0x64, 0xcb, 0x73, 0xdd, 0x26, 0x2a, 0xc2, 0x94, 0x4d, - 0x29, 0xf1, 0x4a, 0xda, 0x39, 0xed, 0xc2, 0xac, 0x21, 0x1b, 0xfa, 0x97, 0x1a, 0xe4, 0xb7, 0x3c, - 0xb7, 0xe3, 0xfa, 0xd8, 0xa9, 0x05, 0x8d, 0xb6, 0xcd, 0xd0, 0x6d, 0xc8, 0x76, 0x54, 0x8f, 0xa0, - 0x9d, 0xb9, 0xbc, 0x50, 0x19, 0x6a, 0x9d, 0x54, 0x42, 0x20, 0x23, 0x02, 0x40, 0x2b, 0x90, 0xb7, - 0x48, 0xc7, 0xf5, 0x6d, 0x56, 0xc7, 0x6d, 0x37, 0xa0, 0xac, 0x34, 0x29, 0x20, 0x5f, 0xec, 0x83, - 0xe4, 0xa3, 0xee, 0x56, 0x2b, 0x4b, 0x82, 0xc6, 0x98, 0x53, 0x3c, 0xb2, 0xa9, 0xaf, 0x41, 0x21, - 0x84, 0x7e, 0xdf, 0x66, 0xbb, 0x96, 0x87, 0x1f, 0xa3, 0x72, 0x9f, 0x96, 0xe9, 0x98, 0xd0, 0x33, - 0x30, 0xed, 0x11, 0xec, 0xbb, 0xb4, 0x94, 0x3a, 0xa7, 0x5d, 0xc8, 0x19, 0xaa, 0xa5, 0xff, 0x56, - 0x83, 0x62, 0x08, 0x74, 0x4b, 0x4a, 0x58, 0x71, 0xb0, 0xdd, 0x3e, 0x14, 0x6c, 0xff, 0x08, 0x52, - 0x23, 0x8f, 0x00, 0x6d, 0x41, 0xc6, 0x0d, 0x98, 0xe9, 0xb6, 0x89, 0x1a, 0xff, 0xd5, 0x11, 0x4d, - 0x7a, 0x4f, 0x72, 0x1b, 0x21, 0x8c, 0xfe, 0x54, 0x83, 0xb9, 0x6d, 0xec, 0xd8, 0x56, 0x38, 0xcb, - 0xe8, 0x3d, 0x48, 0x37, 0x5c, 0x6b, 0x4f, 0xcd, 0xd9, 0xf5, 0x21, 0x05, 0x24, 0x30, 0x96, 0x5d, - 0x6b, 0xcf, 0x10, 0x28, 0xe8, 0x1e, 0x64, 0x71, 0xc0, 0x76, 0xeb, 0xbe, 0xdd, 0x52, 0x03, 0xbe, - 0x12, 0x43, 0x14, 0xfe, 0x58, 0x49, 0xba, 0x5f, 0xb7, 0x5a, 0xa9, 0x75, 0x08, 0xb5, 0x96, 0x02, - 0xb6, 0x5b, 0xb3, 0x5b, 0x14, 0xb3, 0xc0, 0x23, 0x46, 0x06, 0xcb, 0xa6, 0xfe, 0x06, 0x9c, 0x4a, - 0xc8, 0x32, 0xc4, 0x9c, 0xc4, 0xe6, 0x4a, 0x4b, 0xcc, 0xd5, 0x37, 0x29, 0x38, 0xb9, 0x4f, 0xb7, - 0x43, 0x27, 0xea, 0x26, 0xa4, 0xbb, 0x2e, 0x23, 0x4a, 0xdb, 0xd7, 0x87, 0x1d, 0x3f, 0x57, 0x45, - 0x30, 0xa2, 0x55, 0x98, 0xb5, 0x2d, 0x42, 0x19, 0x0f, 0xa6, 0x8f, 0xc8, 0x9e, 0x9a, 0x29, 0xbd, - 0x0f, 0x48, 0x2c, 0xe0, 0x6e, 0xb5, 0xb2, 0xa9, 0x48, 0x6f, 0x93, 0x3d, 0x63, 0xc6, 0xee, 0x35, - 0xd0, 0x6d, 0xc8, 0xf7, 0x44, 0x08, 0xa0, 0xb4, 0x00, 0xfa, 0xb7, 0x03, 0x80, 0xd6, 0x23, 0x62, - 0x0e, 0x35, 0xd7, 0x8a, 0x37, 0x91, 0x11, 0x99, 0x67, 0x4a, 0x80, 0x2c, 0x8e, 0x33, 0xad, 0xd2, - 0xd4, 0x91, 0x69, 0xff, 0x37, 0x05, 0x73, 0x89, 0x00, 0x31, 0xa6, 0xeb, 0x24, 0x30, 0x9e, 0xa3, - 0xeb, 0xa0, 0xfb, 0x30, 0xd5, 0xe1, 0x31, 0x4c, 0xcd, 0xc8, 0x8d, 0x21, 0xf5, 0x1b, 0x14, 0x06, - 0x0d, 0x89, 0xa4, 0xff, 0x7c, 0x12, 0x4e, 0xee, 0xd3, 0xff, 0x50, 0xf7, 0x3a, 0x0f, 0x79, 0x9f, - 0x61, 0x8f, 0xd5, 0xc5, 0xba, 0xb6, 0x55, 0x70, 0x49, 0x1b, 0x73, 0xa2, 0x77, 0x4b, 0x75, 0x46, - 0x5e, 0x38, 0x39, 0xae, 0x17, 0xbe, 0x09, 0x53, 0x5d, 0xec, 0x04, 0x44, 0x79, 0xcd, 0x4b, 0x7d, - 0x08, 0x32, 0xb1, 0x90, 0x33, 0x1c, 0x10, 0x43, 0xd2, 0xa2, 0x55, 0x38, 0x11, 0xd0, 0x86, 0x4b, - 0xf9, 0x8e, 0xa5, 0xa2, 0xd4, 0xd4, 0x10, 0x51, 0x2a, 0x1f, 0x32, 0xa9, 0x30, 0xb5, 0x0e, 0x39, - 0x1a, 0x38, 0x8e, 0xdd, 0xb4, 0x89, 0x57, 0x9a, 0x16, 0x00, 0xaf, 0x1e, 0x38, 0x02, 0xbe, 0xad, - 0x76, 0xab, 0x95, 0xbb, 0x21, 0x83, 0xd1, 0xe3, 0x45, 0x6b, 0x90, 0xf2, 0x1e, 0x95, 0x32, 0xfb, - 0x42, 0xdd, 0x61, 0x93, 0xbf, 0x4d, 0x3c, 0xbb, 0x69, 0x9b, 0x98, 0x9b, 0x91, 0xaf, 0x84, 0x94, - 0xf7, 0x48, 0xff, 0x6b, 0xff, 0x34, 0x6d, 0xdb, 0xe4, 0x31, 0xda, 0x81, 0x4c, 0xd7, 0xf6, 0xed, - 0x86, 0x43, 0x94, 0xc7, 0xfe, 0xc7, 0x38, 0x1e, 0xcb, 0xa1, 0x2a, 0xdb, 0x12, 0x67, 0x63, 0xc2, - 0x08, 0x21, 0xd1, 0x87, 0x30, 0xed, 0x76, 0xf0, 0x67, 0x41, 0x18, 0x49, 0x6e, 0x8e, 0x0d, 0x7e, - 0x4f, 0xc0, 0x6c, 0x4c, 0x18, 0x0a, 0xb0, 0xfc, 0x54, 0x83, 0x8c, 0x92, 0x88, 0x3e, 0xe6, 0xfb, - 0x8a, 0xe2, 0xa8, 0x0b, 0x97, 0xd1, 0xf6, 0xad, 0x95, 0xa1, 0xc5, 0xf1, 0xfd, 0x26, 0xbe, 0xa0, - 0xd7, 0x20, 0x4d, 0x7b, 0xb1, 0xf0, 0xf2, 0xc1, 0x73, 0x98, 0x48, 0x73, 0xf8, 0x6c, 0x2a, 0xdd, - 0x0d, 0xc1, 0x5f, 0x26, 0x30, 0x2d, 0x07, 0xf1, 0x5c, 0xd5, 0x5d, 0x2e, 0xf4, 0x83, 0xeb, 0x7f, - 0xe8, 0x9f, 0xf8, 0x2d, 0x07, 0xd3, 0x7f, 0x88, 0xf5, 0x79, 0x0f, 0x66, 0x44, 0x9a, 0x67, 0xd5, - 0x85, 0x85, 0xe5, 0x2a, 0xad, 0x8c, 0x66, 0x61, 0x03, 0x24, 0x04, 0xff, 0x8d, 0x2e, 0x41, 0x31, - 0x06, 0xd8, 0x53, 0x7f, 0x4a, 0xa8, 0x8f, 0x7a, 0x94, 0xd1, 0x18, 0x06, 0xac, 0xf6, 0xe9, 0x31, - 0x56, 0xfb, 0x3c, 0x80, 0x87, 0xa9, 0xe5, 0xb6, 0xed, 0xcf, 0x89, 0x27, 0x16, 0xeb, 0xac, 0x11, - 0xeb, 0x41, 0x17, 0xa0, 0x20, 0x82, 0x65, 0xbd, 0xe1, 0xd8, 0x22, 0x33, 0xaf, 0x7b, 0xa5, 0xac, - 0xa0, 0xca, 0x8b, 0xfe, 0x65, 0xd5, 0x6d, 0x0c, 0xa0, 0xf4, 0x4b, 0xb9, 0x01, 0x94, 0x35, 0xfd, - 0x36, 0x14, 0x57, 0xc2, 0x8a, 0x65, 0xcb, 0x75, 0xc3, 0x34, 0xac, 0x17, 0xf5, 0xb4, 0xe1, 0xa3, - 0x9e, 0xbe, 0x09, 0x28, 0x01, 0x26, 0xc2, 0xc8, 0x78, 0x50, 0x5f, 0x68, 0x70, 0x2a, 0x81, 0x75, - 0x2f, 0x60, 0x9d, 0x60, 0x3c, 0xbd, 0xd0, 0x75, 0xc8, 0x60, 0xcb, 0xf2, 0x88, 0xef, 0xab, 0x05, - 0x38, 0x7f, 0xc0, 0xd6, 0xbf, 0x24, 0xa9, 0x8c, 0x90, 0x5c, 0xff, 0xa9, 0x06, 0x69, 0xb1, 0x80, - 0x6f, 0x29, 0x37, 0xe5, 0x62, 0xf3, 0x97, 0x2f, 0x8d, 0xe0, 0xa6, 0x31, 0x5f, 0xd5, 0x37, 0x15, - 0x5a, 0x11, 0x0a, 0xdb, 0xf7, 0x1e, 0xac, 0xd6, 0x1f, 0xde, 0xad, 0x6d, 0xad, 0xae, 0x6c, 0xae, - 0x6d, 0xae, 0xde, 0x2a, 0x4c, 0xa0, 0x02, 0xcc, 0x8a, 0xde, 0xa5, 0xe5, 0xda, 0x83, 0xa5, 0xcd, - 0xbb, 0x05, 0x0d, 0xcd, 0x42, 0x56, 0xf4, 0x7c, 0xb8, 0x5a, 0x2b, 0xa4, 0xd0, 0x0c, 0x64, 0x44, - 0xeb, 0xee, 0xbd, 0xc2, 0xa4, 0xfe, 0x97, 0x34, 0xcc, 0x45, 0x85, 0x02, 0xc3, 0x8c, 0xa0, 0x87, - 0x30, 0xdd, 0x75, 0x99, 0x4d, 0xc3, 0x4d, 0xfe, 0xc6, 0x88, 0x29, 0xad, 0x40, 0xe1, 0xda, 0xda, - 0xb4, 0xc5, 0x63, 0xa4, 0x04, 0x43, 0x9f, 0x40, 0xee, 0xb1, 0x4a, 0xf2, 0xa9, 0x5a, 0xa5, 0xef, - 0x8e, 0x85, 0x1c, 0x96, 0x0a, 0x74, 0x63, 0xc2, 0xe8, 0x41, 0xa2, 0x8f, 0x21, 0xdb, 0xb4, 0xa9, - 0xed, 0xef, 0x12, 0x4b, 0x2d, 0xde, 0x77, 0xc6, 0x82, 0x5f, 0x53, 0x20, 0x1b, 0x13, 0x46, 0x04, - 0x88, 0x3e, 0x80, 0x8c, 0xc9, 0x2b, 0x0a, 0x62, 0xa9, 0xfd, 0xf7, 0xed, 0xb1, 0xb0, 0x57, 0x24, - 0x06, 0xdf, 0x95, 0x14, 0x5c, 0x39, 0x0b, 0xd3, 0xd2, 0x54, 0xe5, 0x57, 0x20, 0x17, 0x0d, 0xed, - 0xa0, 0xf4, 0xb9, 0xbc, 0x03, 0xd9, 0x50, 0xc1, 0x78, 0xf1, 0xa1, 0x1d, 0x4b, 0xf1, 0x51, 0xfe, - 0x18, 0x32, 0x4a, 0xc5, 0xe3, 0x07, 0x5f, 0xce, 0xc0, 0x94, 0xcf, 0xad, 0xa0, 0x3f, 0x4d, 0xc3, - 0x89, 0x3e, 0x2a, 0xf4, 0x3e, 0x4c, 0x77, 0xf8, 0xa2, 0xb3, 0x94, 0xb4, 0x77, 0xc6, 0x93, 0x56, - 0xd9, 0x12, 0x20, 0xdc, 0xed, 0x24, 0x1c, 0x07, 0x6e, 0x62, 0xdb, 0x21, 0x96, 0xf2, 0xe6, 0x71, - 0x81, 0xd7, 0x04, 0x08, 0x07, 0x96, 0x70, 0xe8, 0x23, 0xc8, 0xf8, 0x0e, 0x16, 0xee, 0x36, 0x9e, - 0x37, 0x87, 0xc8, 0x35, 0x89, 0xc2, 0x9d, 0x42, 0x01, 0x0e, 0xe7, 0x0a, 0x59, 0x98, 0x96, 0xa3, - 0x2d, 0xef, 0xc2, 0xb4, 0x54, 0x2f, 0xb9, 0xc8, 0x46, 0xcb, 0xa1, 0xfa, 0xd5, 0x8a, 0x14, 0x88, - 0x2d, 0xb2, 0xb2, 0x0d, 0x19, 0xa5, 0xee, 0xf3, 0x16, 0xb5, 0x9c, 0x8b, 0x1c, 0x50, 0x5f, 0x81, - 0xa9, 0x07, 0xd8, 0x71, 0xf6, 0x50, 0x01, 0x26, 0xf7, 0x88, 0xaf, 0x52, 0x04, 0xfe, 0x13, 0xe5, - 0x21, 0x45, 0x5d, 0x95, 0x11, 0xa4, 0xa8, 0x8b, 0x4a, 0x90, 0xc1, 0x0d, 0x9f, 0x61, 0x5b, 0xc6, - 0x98, 0xb4, 0x11, 0x36, 0xf5, 0xff, 0x9b, 0x85, 0x6c, 0x28, 0x98, 0xb3, 0xd9, 0x32, 0x4c, 0xa4, - 0x8d, 0x94, 0x6d, 0xa1, 0x22, 0x4c, 0x31, 0x9b, 0xa9, 0xbc, 0x33, 0x67, 0xc8, 0x06, 0x3a, 0x07, - 0x33, 0x16, 0xf1, 0x4d, 0xcf, 0xee, 0x44, 0x79, 0x47, 0xce, 0x88, 0x77, 0xa1, 0x0f, 0x21, 0xe7, - 0xf3, 0xba, 0xc6, 0xe1, 0xe1, 0x52, 0x46, 0x86, 0x7f, 0x1f, 0xd1, 0x08, 0x95, 0x5a, 0x08, 0xc0, - 0xe3, 0x59, 0x84, 0xc6, 0xa1, 0x49, 0x9b, 0x78, 0x2d, 0x42, 0xcd, 0x3d, 0x95, 0x06, 0x8c, 0x0c, - 0xbd, 0x1a, 0x02, 0x70, 0xe8, 0x08, 0x0d, 0x39, 0x50, 0xe8, 0x60, 0x0f, 0xb7, 0x09, 0x23, 0x5e, - 0xdd, 0xdc, 0xc5, 0xb4, 0x45, 0x54, 0x4e, 0x7f, 0x73, 0x54, 0x09, 0x5b, 0x21, 0xce, 0x8a, 0x80, - 0xd9, 0x98, 0x30, 0x4e, 0x74, 0x92, 0x5d, 0xa8, 0x0b, 0xc5, 0xe4, 0x61, 0x66, 0xdd, 0xe7, 0xfb, - 0xb9, 0x48, 0x39, 0x66, 0x2e, 0x2f, 0x8f, 0x2a, 0x71, 0x7f, 0x66, 0xb0, 0x31, 0x61, 0x20, 0x73, - 0x7f, 0xbe, 0xf0, 0x29, 0xcc, 0x06, 0x9d, 0x96, 0x87, 0x2d, 0x52, 0xef, 0x38, 0x98, 0x8a, 0xc4, - 0x65, 0xf4, 0xdd, 0xac, 0xf2, 0x50, 0x62, 0xf0, 0x3c, 0x75, 0x63, 0xc2, 0x98, 0x09, 0x7a, 0x4d, - 0xd4, 0x86, 0x93, 0x4d, 0x8f, 0x90, 0xcf, 0x49, 0xdd, 0x6e, 0x98, 0x75, 0xd3, 0xb1, 0x09, 0x65, - 0x25, 0x18, 0xcf, 0x90, 0x6b, 0x02, 0x68, 0xb3, 0x61, 0xae, 0x08, 0x18, 0x6e, 0xc8, 0x66, 0xb2, - 0x0b, 0xf9, 0x70, 0x2a, 0xa0, 0xfb, 0x05, 0xce, 0x08, 0x81, 0x4b, 0x23, 0x8f, 0x8b, 0x36, 0xf7, - 0x89, 0x3c, 0x19, 0xf4, 0x77, 0xf2, 0x50, 0x14, 0x39, 0x28, 0x0f, 0x45, 0xdc, 0xd0, 0x36, 0x0b, - 0x43, 0x91, 0x6c, 0x95, 0x5f, 0x83, 0x5c, 0xe4, 0x6a, 0xe8, 0x25, 0x80, 0x5d, 0xec, 0x30, 0xee, - 0x58, 0xb6, 0x8c, 0x0c, 0x59, 0x23, 0xc7, 0x7b, 0x56, 0x78, 0x47, 0xf9, 0xc7, 0x93, 0x70, 0xa2, - 0xcf, 0x6b, 0x50, 0x13, 0xf2, 0xae, 0x63, 0xd5, 0x23, 0xcf, 0xf1, 0x55, 0x40, 0x19, 0x76, 0xb2, - 0x24, 0x8c, 0xb5, 0xd4, 0xe9, 0x44, 0xc8, 0xfe, 0x72, 0xaa, 0xa4, 0x19, 0x73, 0xae, 0x63, 0xf5, - 0xba, 0xb8, 0x1c, 0x4a, 0x1e, 0xc7, 0xe5, 0xa4, 0x8e, 0x49, 0x0e, 0x25, 0x8f, 0x63, 0x72, 0xfe, - 0x0b, 0xe6, 0x3a, 0x1e, 0x31, 0x5d, 0x6a, 0x89, 0xc4, 0xde, 0x2f, 0x4d, 0x9e, 0x9b, 0xbc, 0x30, - 0x73, 0xf9, 0xda, 0x90, 0x62, 0x56, 0xa9, 0xe9, 0x5a, 0xa4, 0xa7, 0xb8, 0x91, 0x44, 0x43, 0xf7, - 0x21, 0x23, 0x57, 0xad, 0x5f, 0x4a, 0x7f, 0x37, 0xe0, 0x10, 0xa7, 0xfc, 0x70, 0x60, 0xca, 0x7d, - 0x13, 0x0a, 0xcc, 0xc3, 0xd4, 0xc7, 0xe2, 0x12, 0x43, 0x2e, 0x23, 0x69, 0xb1, 0x62, 0x45, 0xde, - 0x9d, 0x54, 0xc2, 0xbb, 0x93, 0xca, 0x12, 0xdd, 0x33, 0x4e, 0xc4, 0xa8, 0xf9, 0x0a, 0x29, 0x9f, - 0x87, 0x99, 0xd8, 0xfa, 0xe1, 0xfe, 0xb3, 0x4b, 0xec, 0xd6, 0x2e, 0x53, 0x21, 0x5c, 0xb5, 0xca, - 0x15, 0x38, 0xd1, 0xe7, 0xff, 0xe8, 0x5f, 0x20, 0x27, 0xfd, 0xbb, 0x6e, 0x5b, 0xca, 0xdb, 0xb2, - 0xb2, 0x63, 0xd3, 0x2a, 0x5f, 0x82, 0x93, 0xfb, 0xdc, 0xf7, 0x50, 0x0e, 0xbe, 0x9b, 0x74, 0xf0, - 0x9e, 0xe3, 0x62, 0x4b, 0xbf, 0x0a, 0xa7, 0xc2, 0x45, 0xb0, 0x49, 0x9b, 0xae, 0x41, 0x3e, 0x0b, - 0x88, 0xcf, 0xd0, 0xbf, 0xc2, 0x4c, 0x58, 0x73, 0x72, 0x00, 0xb9, 0xa5, 0x40, 0xd8, 0xb5, 0x69, - 0xe9, 0x8f, 0x7a, 0x87, 0xcc, 0x92, 0xcf, 0xef, 0xb8, 0xd4, 0x27, 0xe8, 0x22, 0x20, 0x59, 0xa0, - 0x36, 0x1c, 0xd7, 0x7c, 0x54, 0x4f, 0x0c, 0xb0, 0x20, 0xbe, 0x2c, 0xf3, 0x0f, 0x1b, 0xa2, 0x7f, - 0xc8, 0x72, 0x36, 0xae, 0xe4, 0x2d, 0xcc, 0xf0, 0xd0, 0x4a, 0x7e, 0x31, 0x19, 0x3b, 0x0a, 0x17, - 0x8c, 0x4a, 0xcb, 0x63, 0x3d, 0xfd, 0x1f, 0x3c, 0xe4, 0xd4, 0x01, 0x43, 0xbe, 0x00, 0x05, 0x42, - 0xad, 0x24, 0xad, 0xdc, 0x9c, 0xf3, 0x84, 0x5a, 0x87, 0x1b, 0x27, 0x3d, 0xa8, 0xd6, 0xff, 0x4f, - 0x95, 0x49, 0xaa, 0x1d, 0xf7, 0xca, 0x38, 0xb9, 0xb8, 0x21, 0x21, 0xd0, 0x03, 0x38, 0x1b, 0x59, - 0xb4, 0xef, 0x3e, 0x60, 0x98, 0xda, 0xfb, 0x74, 0x27, 0x79, 0xef, 0xa0, 0x6e, 0x36, 0x16, 0xe1, - 0x6c, 0x64, 0x36, 0xcc, 0xc8, 0x48, 0x53, 0x68, 0x42, 0x69, 0x3f, 0xaf, 0x9a, 0xc5, 0x75, 0xc8, - 0x79, 0x98, 0x91, 0xba, 0x85, 0x19, 0x56, 0xd3, 0xf8, 0xda, 0xc1, 0x47, 0x14, 0xe2, 0xd6, 0xaa, - 0x5b, 0xad, 0x44, 0x30, 0x59, 0x4f, 0xfd, 0xd2, 0xab, 0x3d, 0xff, 0x7a, 0xcf, 0xf6, 0x59, 0xa8, - 0x5c, 0x19, 0xb2, 0x36, 0xe5, 0xeb, 0xb7, 0x2b, 0xcf, 0x98, 0xb2, 0x46, 0xd4, 0xd6, 0x9f, 0xa6, - 0x7a, 0xae, 0x25, 0x79, 0xfe, 0xe9, 0x5a, 0x87, 0xb9, 0x96, 0x7e, 0x1d, 0x4e, 0x27, 0x8e, 0xeb, - 0xfd, 0xa1, 0x5d, 0xe0, 0x67, 0x1a, 0x9c, 0xe9, 0x67, 0x55, 0xc6, 0xbe, 0x19, 0x3b, 0x40, 0x38, - 0x96, 0xdb, 0x90, 0xd4, 0x58, 0xb7, 0x21, 0xfa, 0x57, 0x29, 0x28, 0xf6, 0x6e, 0x38, 0x62, 0x7b, - 0xdf, 0x15, 0x38, 0x13, 0x0d, 0x4e, 0x96, 0xfe, 0x72, 0x7a, 0xc2, 0xb4, 0xbd, 0x18, 0x7e, 0x95, - 0x65, 0xaf, 0x98, 0x23, 0xff, 0xb0, 0x65, 0x98, 0x1a, 0x7b, 0x19, 0xa2, 0xcb, 0x70, 0xba, 0xa7, - 0x0b, 0xb7, 0x67, 0xfd, 0xb3, 0xc0, 0xf5, 0x82, 0xb6, 0xf0, 0x91, 0x9c, 0x71, 0x2a, 0x52, 0x85, - 0x7f, 0xbb, 0x2f, 0x3e, 0xa1, 0xab, 0x31, 0x4d, 0x78, 0x0d, 0x59, 0x67, 0xbb, 0x1e, 0xf1, 0x77, - 0x5d, 0x47, 0xd6, 0x0b, 0xb9, 0x9e, 0x2c, 0x5e, 0x7d, 0x3d, 0x08, 0x3f, 0xa2, 0xeb, 0x50, 0x8a, - 0xf8, 0x44, 0x1d, 0x17, 0x63, 0x9c, 0x12, 0x8c, 0x91, 0x5d, 0x44, 0x09, 0x15, 0x71, 0xea, 0x9f, - 0x43, 0x7e, 0x9d, 0x50, 0xe2, 0xdb, 0xfe, 0x8a, 0x4b, 0x19, 0xdf, 0xca, 0x76, 0xe1, 0x64, 0xec, - 0xaa, 0x49, 0xa4, 0x2b, 0xa3, 0xa6, 0x44, 0x83, 0xe6, 0xc6, 0x28, 0xb4, 0x92, 0xbd, 0xbe, 0xfe, - 0x01, 0x14, 0xfa, 0x93, 0x02, 0xf4, 0x22, 0xe4, 0x22, 0x54, 0xb5, 0x91, 0xf6, 0x3a, 0x78, 0x0d, - 0x16, 0xba, 0x4d, 0xce, 0xe0, 0x3f, 0x79, 0xf1, 0x24, 0xcf, 0xd2, 0xa4, 0x55, 0xd5, 0xc9, 0xdb, - 0x2f, 0xb3, 0x50, 0x1c, 0x94, 0x2f, 0xa1, 0xf7, 0x00, 0x7c, 0x93, 0x25, 0x47, 0xf5, 0xc6, 0x51, - 0xb7, 0x11, 0x35, 0x93, 0xc5, 0xc6, 0x91, 0xf3, 0x55, 0xd3, 0x47, 0x5d, 0x38, 0xdd, 0x57, 0x5d, - 0x28, 0xe0, 0xd4, 0x11, 0xe5, 0x45, 0xdf, 0x03, 0x0b, 0x9e, 0xdd, 0xc5, 0x13, 0xa0, 0x98, 0xb4, - 0x53, 0xe6, 0xbe, 0x0f, 0xfe, 0xe0, 0x29, 0x9a, 0x7c, 0x0e, 0x53, 0xc4, 0xed, 0xc5, 0xb3, 0x7d, - 0x25, 0x22, 0x7d, 0x84, 0xbd, 0xec, 0x86, 0x29, 0xd6, 0x6d, 0xc3, 0x8c, 0xdb, 0xcb, 0x56, 0x4d, - 0xbe, 0xd0, 0x66, 0xc5, 0xbe, 0x10, 0xe2, 0xc9, 0x38, 0x57, 0x3d, 0x7a, 0x13, 0xa9, 0xf1, 0x1f, - 0x31, 0x4c, 0x79, 0x5a, 0xde, 0xd3, 0xb1, 0x49, 0x22, 0xcc, 0xe9, 0x23, 0x74, 0x6c, 0x12, 0x81, - 0xb8, 0x46, 0xe2, 0x78, 0xb9, 0x26, 0x09, 0xd1, 0x18, 0x14, 0x13, 0xaf, 0x52, 0x42, 0xdc, 0xcc, - 0x11, 0x95, 0x4e, 0xf2, 0x29, 0x4b, 0xb7, 0x5a, 0xb9, 0x15, 0xef, 0x88, 0xcf, 0xa8, 0xb5, 0xef, - 0x83, 0x8f, 0x76, 0x20, 0xaf, 0x5e, 0xaa, 0x84, 0xf2, 0x64, 0x85, 0xfa, 0xd6, 0xc1, 0xe3, 0x50, - 0x0f, 0x5b, 0xf8, 0x58, 0xe4, 0xcf, 0x98, 0x8c, 0xb9, 0x66, 0xac, 0xcb, 0x47, 0x1e, 0x14, 0x13, - 0x57, 0x06, 0xa1, 0x8c, 0xdc, 0x11, 0x27, 0x27, 0xfb, 0xee, 0x19, 0x6a, 0xaa, 0xa3, 0xcf, 0x49, - 0x91, 0xdf, 0xdf, 0x2f, 0x66, 0xc5, 0x22, 0x4f, 0x42, 0x49, 0x70, 0xc4, 0xac, 0x58, 0xe4, 0x89, - 0xbc, 0xd0, 0x79, 0x12, 0x9f, 0x15, 0x4b, 0x35, 0x85, 0x7d, 0xd4, 0x6b, 0xa6, 0x10, 0x71, 0xe6, - 0x08, 0xfb, 0x84, 0x8f, 0x9f, 0x78, 0x9c, 0x96, 0x3f, 0xe3, 0xf6, 0xc1, 0xb1, 0x2e, 0x7f, 0x31, - 0x55, 0xd2, 0xf4, 0xdf, 0x68, 0x70, 0x76, 0x50, 0xc8, 0xa8, 0x11, 0x86, 0xee, 0xc0, 0x24, 0x8f, - 0xa4, 0xdf, 0xbd, 0x2e, 0x34, 0x38, 0x0e, 0x87, 0xa3, 0xe4, 0xf1, 0x31, 0x94, 0x7f, 0x06, 0xc7, - 0x11, 0xda, 0x7f, 0x5f, 0x83, 0x97, 0xe5, 0x9e, 0xb6, 0xe5, 0x3e, 0x26, 0xde, 0x12, 0x8b, 0x25, - 0x05, 0x1e, 0x1b, 0x76, 0xef, 0x3f, 0xa6, 0xd7, 0x0a, 0xfa, 0x3a, 0xe8, 0x87, 0x29, 0xa3, 0xb2, - 0x89, 0x97, 0x61, 0x56, 0xed, 0xd1, 0x1d, 0x4e, 0xa6, 0xb6, 0xe8, 0x99, 0x6e, 0x8f, 0x53, 0xbf, - 0x03, 0xaf, 0x2d, 0x39, 0xce, 0x03, 0xec, 0x38, 0x36, 0xb1, 0x12, 0x57, 0x77, 0xfe, 0x9a, 0xeb, - 0x45, 0x19, 0xdc, 0xb0, 0xa9, 0xcd, 0xaf, 0x35, 0x78, 0x7d, 0x28, 0x3c, 0xa5, 0xe1, 0x32, 0x4c, - 0x31, 0xec, 0x38, 0xe1, 0x1b, 0x86, 0x8b, 0x43, 0x4e, 0x95, 0x38, 0x2f, 0x34, 0x24, 0xeb, 0x71, - 0xa5, 0x3c, 0x67, 0xe1, 0xf4, 0x5d, 0xf2, 0x24, 0xb2, 0xe4, 0xa6, 0xa5, 0x06, 0xad, 0x2f, 0xc3, - 0x99, 0xfe, 0x0f, 0x4a, 0xfb, 0x0b, 0x50, 0xa0, 0xe4, 0x09, 0xab, 0xc7, 0x6d, 0x22, 0x6d, 0x9c, - 0xa7, 0x09, 0x0e, 0x7d, 0x1d, 0xa6, 0x0c, 0xcc, 0x6c, 0x97, 0xef, 0xbe, 0x34, 0x68, 0x13, 0x8f, - 0x5b, 0x45, 0xd1, 0xf6, 0x3a, 0xe4, 0x91, 0x24, 0x75, 0xdb, 0x36, 0x15, 0xdf, 0xa5, 0x7d, 0xe3, - 0x5d, 0xfa, 0x27, 0x80, 0x56, 0xbb, 0x84, 0xb2, 0xe4, 0x4b, 0x90, 0x8d, 0x44, 0xda, 0x38, 0xde, - 0xe5, 0xae, 0xbc, 0x7b, 0xfa, 0x1f, 0x78, 0x41, 0xe0, 0x0f, 0x7c, 0x70, 0xf5, 0x29, 0x84, 0x0f, - 0xa4, 0xea, 0xe2, 0x82, 0x63, 0xc4, 0xf5, 0x3a, 0x08, 0xd3, 0x98, 0xb5, 0x62, 0xad, 0x68, 0x78, - 0xc9, 0x37, 0x52, 0xe3, 0x0d, 0x2f, 0xf9, 0x98, 0x46, 0x0e, 0xcf, 0x81, 0xd3, 0x89, 0xe1, 0x45, - 0x0f, 0xd3, 0x6a, 0x90, 0x0d, 0x0f, 0xa7, 0x95, 0x98, 0x6b, 0x23, 0x8e, 0x2a, 0x84, 0x32, 0x22, - 0x20, 0xdd, 0x82, 0x53, 0x09, 0x69, 0xea, 0xa9, 0xde, 0x1d, 0x98, 0xf6, 0xc5, 0x2f, 0x25, 0xe9, - 0xad, 0x51, 0xcb, 0x10, 0xc1, 0x6c, 0x28, 0x10, 0x1d, 0x2b, 0x9b, 0xad, 0xf2, 0x52, 0x2e, 0x3a, - 0x03, 0x3f, 0xce, 0xb2, 0x4d, 0x6f, 0xf4, 0x0d, 0x44, 0xdd, 0x47, 0x1c, 0xab, 0x0c, 0x13, 0x8a, - 0x49, 0x63, 0xa9, 0x9b, 0x88, 0xe3, 0x14, 0x72, 0xf9, 0xcf, 0x39, 0x98, 0xbd, 0x1f, 0x10, 0x6f, - 0xaf, 0x46, 0xbc, 0xae, 0x6d, 0x12, 0xf4, 0xff, 0x1a, 0xcc, 0xc6, 0xcf, 0x7d, 0xd0, 0xe2, 0x88, - 0xe0, 0xb1, 0x43, 0xa6, 0xf2, 0x8d, 0xb1, 0x78, 0x55, 0x30, 0xf9, 0x5e, 0x4c, 0x13, 0x5e, 0x80, - 0x8f, 0xac, 0x49, 0xac, 0xd2, 0x1f, 0x59, 0x93, 0x78, 0xc5, 0x7f, 0x49, 0x4b, 0x58, 0xe5, 0x16, - 0x66, 0x78, 0x64, 0x5d, 0x62, 0x47, 0x22, 0x23, 0xeb, 0x92, 0x38, 0x12, 0xf9, 0x81, 0x06, 0xf9, - 0x64, 0xf4, 0x45, 0xc3, 0x5e, 0xce, 0x0e, 0x8c, 0xe6, 0xe5, 0x77, 0xc6, 0xe4, 0x56, 0xfa, 0xfc, - 0x50, 0x83, 0x7c, 0xb2, 0x76, 0x1f, 0x5a, 0x9f, 0x81, 0xa7, 0x05, 0x43, 0xeb, 0x33, 0xf8, 0xc0, - 0xe0, 0x92, 0x86, 0x7e, 0xa5, 0x41, 0xf9, 0xe0, 0x5c, 0x00, 0x6d, 0x0c, 0x7f, 0x86, 0x70, 0x78, - 0x6e, 0x53, 0xde, 0x3c, 0x06, 0x24, 0x65, 0xc5, 0xdf, 0x6b, 0xf0, 0xca, 0x10, 0x69, 0x02, 0xba, - 0x3f, 0xa4, 0xc8, 0xe1, 0x53, 0x98, 0xb2, 0x71, 0x9c, 0x90, 0xd1, 0x24, 0xfc, 0x44, 0xeb, 0x3d, - 0x76, 0x0e, 0xcf, 0xe3, 0xd0, 0xa8, 0x57, 0xc6, 0x7d, 0x67, 0x89, 0xe5, 0x9b, 0x63, 0xf3, 0x87, - 0x7a, 0x2d, 0xff, 0x2d, 0xf5, 0xd5, 0xb3, 0x79, 0xed, 0xeb, 0x67, 0xf3, 0xda, 0x1f, 0x9f, 0xcd, - 0x6b, 0x3f, 0xfa, 0x76, 0x7e, 0xe2, 0xeb, 0x6f, 0xe7, 0x27, 0xbe, 0xf9, 0x76, 0x7e, 0x02, 0x5e, - 0x35, 0xdd, 0xf6, 0x70, 0x02, 0x96, 0x4f, 0xc4, 0x6a, 0x59, 0xcf, 0x65, 0xee, 0x96, 0xf6, 0xd1, - 0x7f, 0xb7, 0x6c, 0xb6, 0x1b, 0x34, 0x38, 0xcb, 0x82, 0xcf, 0x3c, 0x9e, 0x39, 0x3b, 0x6e, 0x97, - 0xbc, 0xc1, 0x23, 0x78, 0xe0, 0x11, 0x7f, 0xc1, 0xa6, 0x8c, 0x78, 0xe2, 0x92, 0x88, 0x11, 0x9f, - 0x2d, 0x74, 0xaf, 0x2f, 0x88, 0xc6, 0xc2, 0x50, 0x7f, 0xf3, 0x71, 0xa3, 0xd7, 0xea, 0x56, 0xbf, - 0x4c, 0xa5, 0xb7, 0x56, 0x56, 0xd6, 0x7f, 0x91, 0x3a, 0xbf, 0x15, 0x6a, 0xbb, 0xc2, 0xb5, 0x5d, - 0x89, 0xb4, 0xed, 0xa9, 0x57, 0xd9, 0xae, 0xfe, 0xae, 0x47, 0xb7, 0xc3, 0xe9, 0x76, 0x22, 0xba, - 0x9d, 0x1e, 0xdd, 0xce, 0x76, 0xf5, 0x59, 0xaa, 0x3a, 0x14, 0xdd, 0xce, 0xfa, 0xd6, 0xf2, 0x1d, - 0xc2, 0xb0, 0x85, 0x19, 0xfe, 0x53, 0xea, 0xd5, 0x90, 0x67, 0x71, 0x91, 0x33, 0xf1, 0x7f, 0x15, - 0xd7, 0xe2, 0x62, 0x8f, 0x6d, 0x71, 0x71, 0xbb, 0xda, 0x98, 0x16, 0x97, 0x27, 0x6f, 0xfe, 0x3d, - 0x00, 0x00, 0xff, 0xff, 0x2a, 0xa9, 0xfc, 0x58, 0xe7, 0x32, 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - ProposalInfo(ctx context.Context, in *ProposalInfoRequest, opts ...grpc.CallOption) (*ProposalInfoResponse, error) - ProposalList(ctx context.Context, in *ProposalListRequest, opts ...grpc.CallOption) (QueryService_ProposalListClient, error) - ProposalData(ctx context.Context, in *ProposalDataRequest, opts ...grpc.CallOption) (*ProposalDataResponse, error) - NextProposalId(ctx context.Context, in *NextProposalIdRequest, opts ...grpc.CallOption) (*NextProposalIdResponse, error) - ValidatorVotes(ctx context.Context, in *ValidatorVotesRequest, opts ...grpc.CallOption) (QueryService_ValidatorVotesClient, error) - VotingPowerAtProposalStart(ctx context.Context, in *VotingPowerAtProposalStartRequest, opts ...grpc.CallOption) (*VotingPowerAtProposalStartResponse, error) - AllTalliedDelegatorVotesForProposal(ctx context.Context, in *AllTalliedDelegatorVotesForProposalRequest, opts ...grpc.CallOption) (QueryService_AllTalliedDelegatorVotesForProposalClient, error) - // Used for computing voting power ? - ProposalRateData(ctx context.Context, in *ProposalRateDataRequest, opts ...grpc.CallOption) (QueryService_ProposalRateDataClient, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) ProposalInfo(ctx context.Context, in *ProposalInfoRequest, opts ...grpc.CallOption) (*ProposalInfoResponse, error) { - out := new(ProposalInfoResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.governance.v1.QueryService/ProposalInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) ProposalList(ctx context.Context, in *ProposalListRequest, opts ...grpc.CallOption) (QueryService_ProposalListClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/penumbra.core.component.governance.v1.QueryService/ProposalList", opts...) - if err != nil { - return nil, err - } - x := &queryServiceProposalListClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_ProposalListClient interface { - Recv() (*ProposalListResponse, error) - grpc.ClientStream -} - -type queryServiceProposalListClient struct { - grpc.ClientStream -} - -func (x *queryServiceProposalListClient) Recv() (*ProposalListResponse, error) { - m := new(ProposalListResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) ProposalData(ctx context.Context, in *ProposalDataRequest, opts ...grpc.CallOption) (*ProposalDataResponse, error) { - out := new(ProposalDataResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.governance.v1.QueryService/ProposalData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) NextProposalId(ctx context.Context, in *NextProposalIdRequest, opts ...grpc.CallOption) (*NextProposalIdResponse, error) { - out := new(NextProposalIdResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.governance.v1.QueryService/NextProposalId", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) ValidatorVotes(ctx context.Context, in *ValidatorVotesRequest, opts ...grpc.CallOption) (QueryService_ValidatorVotesClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[1], "/penumbra.core.component.governance.v1.QueryService/ValidatorVotes", opts...) - if err != nil { - return nil, err - } - x := &queryServiceValidatorVotesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_ValidatorVotesClient interface { - Recv() (*ValidatorVotesResponse, error) - grpc.ClientStream -} - -type queryServiceValidatorVotesClient struct { - grpc.ClientStream -} - -func (x *queryServiceValidatorVotesClient) Recv() (*ValidatorVotesResponse, error) { - m := new(ValidatorVotesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) VotingPowerAtProposalStart(ctx context.Context, in *VotingPowerAtProposalStartRequest, opts ...grpc.CallOption) (*VotingPowerAtProposalStartResponse, error) { - out := new(VotingPowerAtProposalStartResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.governance.v1.QueryService/VotingPowerAtProposalStart", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) AllTalliedDelegatorVotesForProposal(ctx context.Context, in *AllTalliedDelegatorVotesForProposalRequest, opts ...grpc.CallOption) (QueryService_AllTalliedDelegatorVotesForProposalClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[2], "/penumbra.core.component.governance.v1.QueryService/AllTalliedDelegatorVotesForProposal", opts...) - if err != nil { - return nil, err - } - x := &queryServiceAllTalliedDelegatorVotesForProposalClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_AllTalliedDelegatorVotesForProposalClient interface { - Recv() (*AllTalliedDelegatorVotesForProposalResponse, error) - grpc.ClientStream -} - -type queryServiceAllTalliedDelegatorVotesForProposalClient struct { - grpc.ClientStream -} - -func (x *queryServiceAllTalliedDelegatorVotesForProposalClient) Recv() (*AllTalliedDelegatorVotesForProposalResponse, error) { - m := new(AllTalliedDelegatorVotesForProposalResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) ProposalRateData(ctx context.Context, in *ProposalRateDataRequest, opts ...grpc.CallOption) (QueryService_ProposalRateDataClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[3], "/penumbra.core.component.governance.v1.QueryService/ProposalRateData", opts...) - if err != nil { - return nil, err - } - x := &queryServiceProposalRateDataClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_ProposalRateDataClient interface { - Recv() (*ProposalRateDataResponse, error) - grpc.ClientStream -} - -type queryServiceProposalRateDataClient struct { - grpc.ClientStream -} - -func (x *queryServiceProposalRateDataClient) Recv() (*ProposalRateDataResponse, error) { - m := new(ProposalRateDataResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - ProposalInfo(context.Context, *ProposalInfoRequest) (*ProposalInfoResponse, error) - ProposalList(*ProposalListRequest, QueryService_ProposalListServer) error - ProposalData(context.Context, *ProposalDataRequest) (*ProposalDataResponse, error) - NextProposalId(context.Context, *NextProposalIdRequest) (*NextProposalIdResponse, error) - ValidatorVotes(*ValidatorVotesRequest, QueryService_ValidatorVotesServer) error - VotingPowerAtProposalStart(context.Context, *VotingPowerAtProposalStartRequest) (*VotingPowerAtProposalStartResponse, error) - AllTalliedDelegatorVotesForProposal(*AllTalliedDelegatorVotesForProposalRequest, QueryService_AllTalliedDelegatorVotesForProposalServer) error - // Used for computing voting power ? - ProposalRateData(*ProposalRateDataRequest, QueryService_ProposalRateDataServer) error -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) ProposalInfo(ctx context.Context, req *ProposalInfoRequest) (*ProposalInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalInfo not implemented") -} -func (*UnimplementedQueryServiceServer) ProposalList(req *ProposalListRequest, srv QueryService_ProposalListServer) error { - return status.Errorf(codes.Unimplemented, "method ProposalList not implemented") -} -func (*UnimplementedQueryServiceServer) ProposalData(ctx context.Context, req *ProposalDataRequest) (*ProposalDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProposalData not implemented") -} -func (*UnimplementedQueryServiceServer) NextProposalId(ctx context.Context, req *NextProposalIdRequest) (*NextProposalIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NextProposalId not implemented") -} -func (*UnimplementedQueryServiceServer) ValidatorVotes(req *ValidatorVotesRequest, srv QueryService_ValidatorVotesServer) error { - return status.Errorf(codes.Unimplemented, "method ValidatorVotes not implemented") -} -func (*UnimplementedQueryServiceServer) VotingPowerAtProposalStart(ctx context.Context, req *VotingPowerAtProposalStartRequest) (*VotingPowerAtProposalStartResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VotingPowerAtProposalStart not implemented") -} -func (*UnimplementedQueryServiceServer) AllTalliedDelegatorVotesForProposal(req *AllTalliedDelegatorVotesForProposalRequest, srv QueryService_AllTalliedDelegatorVotesForProposalServer) error { - return status.Errorf(codes.Unimplemented, "method AllTalliedDelegatorVotesForProposal not implemented") -} -func (*UnimplementedQueryServiceServer) ProposalRateData(req *ProposalRateDataRequest, srv QueryService_ProposalRateDataServer) error { - return status.Errorf(codes.Unimplemented, "method ProposalRateData not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_ProposalInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ProposalInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).ProposalInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.governance.v1.QueryService/ProposalInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).ProposalInfo(ctx, req.(*ProposalInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_ProposalList_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ProposalListRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).ProposalList(m, &queryServiceProposalListServer{stream}) -} - -type QueryService_ProposalListServer interface { - Send(*ProposalListResponse) error - grpc.ServerStream -} - -type queryServiceProposalListServer struct { - grpc.ServerStream -} - -func (x *queryServiceProposalListServer) Send(m *ProposalListResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_ProposalData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ProposalDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).ProposalData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.governance.v1.QueryService/ProposalData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).ProposalData(ctx, req.(*ProposalDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_NextProposalId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NextProposalIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).NextProposalId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.governance.v1.QueryService/NextProposalId", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).NextProposalId(ctx, req.(*NextProposalIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_ValidatorVotes_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ValidatorVotesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).ValidatorVotes(m, &queryServiceValidatorVotesServer{stream}) -} - -type QueryService_ValidatorVotesServer interface { - Send(*ValidatorVotesResponse) error - grpc.ServerStream -} - -type queryServiceValidatorVotesServer struct { - grpc.ServerStream -} - -func (x *queryServiceValidatorVotesServer) Send(m *ValidatorVotesResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_VotingPowerAtProposalStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VotingPowerAtProposalStartRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).VotingPowerAtProposalStart(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.governance.v1.QueryService/VotingPowerAtProposalStart", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).VotingPowerAtProposalStart(ctx, req.(*VotingPowerAtProposalStartRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_AllTalliedDelegatorVotesForProposal_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(AllTalliedDelegatorVotesForProposalRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).AllTalliedDelegatorVotesForProposal(m, &queryServiceAllTalliedDelegatorVotesForProposalServer{stream}) -} - -type QueryService_AllTalliedDelegatorVotesForProposalServer interface { - Send(*AllTalliedDelegatorVotesForProposalResponse) error - grpc.ServerStream -} - -type queryServiceAllTalliedDelegatorVotesForProposalServer struct { - grpc.ServerStream -} - -func (x *queryServiceAllTalliedDelegatorVotesForProposalServer) Send(m *AllTalliedDelegatorVotesForProposalResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_ProposalRateData_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ProposalRateDataRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).ProposalRateData(m, &queryServiceProposalRateDataServer{stream}) -} - -type QueryService_ProposalRateDataServer interface { - Send(*ProposalRateDataResponse) error - grpc.ServerStream -} - -type queryServiceProposalRateDataServer struct { - grpc.ServerStream -} - -func (x *queryServiceProposalRateDataServer) Send(m *ProposalRateDataResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.governance.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ProposalInfo", - Handler: _QueryService_ProposalInfo_Handler, - }, - { - MethodName: "ProposalData", - Handler: _QueryService_ProposalData_Handler, - }, - { - MethodName: "NextProposalId", - Handler: _QueryService_NextProposalId_Handler, - }, - { - MethodName: "VotingPowerAtProposalStart", - Handler: _QueryService_VotingPowerAtProposalStart_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "ProposalList", - Handler: _QueryService_ProposalList_Handler, - ServerStreams: true, - }, - { - StreamName: "ValidatorVotes", - Handler: _QueryService_ValidatorVotes_Handler, - ServerStreams: true, - }, - { - StreamName: "AllTalliedDelegatorVotesForProposal", - Handler: _QueryService_AllTalliedDelegatorVotesForProposal_Handler, - ServerStreams: true, - }, - { - StreamName: "ProposalRateData", - Handler: _QueryService_ProposalRateData_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/core/component/governance/v1/governance.proto", -} - -func (m *ZKDelegatorVoteProof) Marshal() (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 *ZKDelegatorVoteProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ZKDelegatorVoteProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalSubmit) Marshal() (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 *ProposalSubmit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalSubmit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DepositAmount != nil { - { - size, err := m.DepositAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalWithdraw) Marshal() (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 *ProposalWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x12 - } - if m.Proposal != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Proposal)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ProposalDepositClaim) Marshal() (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 *ProposalDepositClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Outcome != nil { - { - size, err := m.Outcome.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.DepositAmount != nil { - { - size, err := m.DepositAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Proposal != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Proposal)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorVote) Marshal() (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 *ValidatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AuthSig != nil { - { - size, err := m.AuthSig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorVoteReason) Marshal() (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 *ValidatorVoteReason) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorVoteReason) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorVoteBody) Marshal() (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 *ValidatorVoteBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorVoteBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Reason != nil { - { - size, err := m.Reason.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.GovernanceKey != nil { - { - size, err := m.GovernanceKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Vote != nil { - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Proposal != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Proposal)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DelegatorVote) Marshal() (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 *DelegatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.AuthSig != nil { - { - size, err := m.AuthSig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegatorVoteBody) Marshal() (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 *DelegatorVoteBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVoteBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Rk != nil { - { - size, err := m.Rk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.UnbondedAmount != nil { - { - size, err := m.UnbondedAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Vote != nil { - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.StartPosition != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartPosition)) - i-- - dAtA[i] = 0x10 - } - if m.Proposal != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Proposal)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DelegatorVoteView) Marshal() (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 *DelegatorVoteView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVoteView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DelegatorVote != nil { - { - size := m.DelegatorVote.Size() - i -= size - if _, err := m.DelegatorVote.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *DelegatorVoteView_Visible_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVoteView_Visible_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Visible != nil { - { - size, err := m.Visible.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *DelegatorVoteView_Opaque_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVoteView_Opaque_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Opaque != nil { - { - size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *DelegatorVoteView_Visible) Marshal() (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 *DelegatorVoteView_Visible) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVoteView_Visible) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.DelegatorVote != nil { - { - size, err := m.DelegatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegatorVoteView_Opaque) Marshal() (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 *DelegatorVoteView_Opaque) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVoteView_Opaque) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DelegatorVote != nil { - { - size, err := m.DelegatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegatorVotePlan) Marshal() (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 *DelegatorVotePlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorVotePlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProofBlindingS) > 0 { - i -= len(m.ProofBlindingS) - copy(dAtA[i:], m.ProofBlindingS) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.ProofBlindingS))) - i-- - dAtA[i] = 0x4a - } - if len(m.ProofBlindingR) > 0 { - i -= len(m.ProofBlindingR) - copy(dAtA[i:], m.ProofBlindingR) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.ProofBlindingR))) - i-- - dAtA[i] = 0x42 - } - if len(m.Randomizer) > 0 { - i -= len(m.Randomizer) - copy(dAtA[i:], m.Randomizer) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Randomizer))) - i-- - dAtA[i] = 0x3a - } - if m.UnbondedAmount != nil { - { - size, err := m.UnbondedAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.StakedNotePosition != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StakedNotePosition)) - i-- - dAtA[i] = 0x28 - } - if m.StakedNote != nil { - { - size, err := m.StakedNote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Vote != nil { - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.StartPosition != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartPosition)) - i-- - dAtA[i] = 0x10 - } - if m.Proposal != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Proposal)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CommunityPoolDeposit) Marshal() (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 *CommunityPoolDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommunityPoolSpend) Marshal() (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 *CommunityPoolSpend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolSpend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommunityPoolOutput) Marshal() (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 *CommunityPoolOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Vote) Marshal() (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 *Vote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Vote != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Vote)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ProposalState) Marshal() (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 *ProposalState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size := m.State.Size() - i -= size - if _, err := m.State.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ProposalState_Voting_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Voting_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Voting != nil { - { - size, err := m.Voting.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ProposalState_Withdrawn_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Withdrawn_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Withdrawn != nil { - { - size, err := m.Withdrawn.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *ProposalState_Finished_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Finished_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Finished != nil { - { - size, err := m.Finished.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *ProposalState_Claimed_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Claimed_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Claimed != nil { - { - size, err := m.Claimed.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *ProposalState_Voting) Marshal() (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 *ProposalState_Voting) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Voting) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ProposalState_Withdrawn) Marshal() (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 *ProposalState_Withdrawn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Withdrawn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalState_Finished) Marshal() (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 *ProposalState_Finished) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Finished) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Outcome != nil { - { - size, err := m.Outcome.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalState_Claimed) Marshal() (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 *ProposalState_Claimed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalState_Claimed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Outcome != nil { - { - size, err := m.Outcome.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalOutcome) Marshal() (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 *ProposalOutcome) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Outcome != nil { - { - size := m.Outcome.Size() - i -= size - if _, err := m.Outcome.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ProposalOutcome_Passed_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome_Passed_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Passed != nil { - { - size, err := m.Passed.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *ProposalOutcome_Failed_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome_Failed_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Failed != nil { - { - size, err := m.Failed.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ProposalOutcome_Slashed_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome_Slashed_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Slashed != nil { - { - size, err := m.Slashed.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *ProposalOutcome_Withdrawn) Marshal() (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 *ProposalOutcome_Withdrawn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome_Withdrawn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalOutcome_Passed) Marshal() (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 *ProposalOutcome_Passed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome_Passed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ProposalOutcome_Failed) Marshal() (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 *ProposalOutcome_Failed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome_Failed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Withdrawn != nil { - { - size, err := m.Withdrawn.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalOutcome_Slashed) Marshal() (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 *ProposalOutcome_Slashed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalOutcome_Slashed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Withdrawn != nil { - { - size, err := m.Withdrawn.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Tally) Marshal() (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 *Tally) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tally) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Abstain != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Abstain)) - i-- - dAtA[i] = 0x18 - } - if m.No != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.No)) - i-- - dAtA[i] = 0x10 - } - if m.Yes != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Yes)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Proposal) Marshal() (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 *Proposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Payload != nil { - { - size := m.Payload.Size() - i -= size - if _, err := m.Payload.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Id != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x20 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Proposal_Signaling_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_Signaling_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Signaling != nil { - { - size, err := m.Signaling.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Proposal_Emergency_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_Emergency_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Emergency != nil { - { - size, err := m.Emergency.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *Proposal_ParameterChange_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_ParameterChange_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ParameterChange != nil { - { - size, err := m.ParameterChange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *Proposal_CommunityPoolSpend_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_CommunityPoolSpend_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolSpend != nil { - { - size, err := m.CommunityPoolSpend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *Proposal_UpgradePlan_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_UpgradePlan_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.UpgradePlan != nil { - { - size, err := m.UpgradePlan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *Proposal_FreezeIbcClient_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_FreezeIbcClient_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.FreezeIbcClient != nil { - { - size, err := m.FreezeIbcClient.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *Proposal_UnfreezeIbcClient_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_UnfreezeIbcClient_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.UnfreezeIbcClient != nil { - { - size, err := m.UnfreezeIbcClient.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *Proposal_Signaling) Marshal() (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 *Proposal_Signaling) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_Signaling) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Commit) > 0 { - i -= len(m.Commit) - copy(dAtA[i:], m.Commit) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Commit))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Proposal_Emergency) Marshal() (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 *Proposal_Emergency) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_Emergency) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HaltChain { - i-- - if m.HaltChain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Proposal_ParameterChange) Marshal() (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 *Proposal_ParameterChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_ParameterChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Changes) > 0 { - for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Preconditions) > 0 { - for iNdEx := len(m.Preconditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Preconditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.NewParameters != nil { - { - size, err := m.NewParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.OldParameters != nil { - { - size, err := m.OldParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Proposal_CommunityPoolSpend) Marshal() (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 *Proposal_CommunityPoolSpend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_CommunityPoolSpend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TransactionPlan != nil { - { - size, err := m.TransactionPlan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *Proposal_UpgradePlan) Marshal() (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 *Proposal_UpgradePlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_UpgradePlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Proposal_FreezeIbcClient) Marshal() (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 *Proposal_FreezeIbcClient) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_FreezeIbcClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Proposal_UnfreezeIbcClient) Marshal() (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 *Proposal_UnfreezeIbcClient) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Proposal_UnfreezeIbcClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalInfoRequest) Marshal() (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 *ProposalInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposalId != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.ProposalId)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ProposalInfoResponse) Marshal() (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 *ProposalInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StartPosition != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartPosition)) - i-- - dAtA[i] = 0x10 - } - if m.StartBlockHeight != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartBlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ProposalDataRequest) Marshal() (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 *ProposalDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposalId != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.ProposalId)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ProposalDataResponse) Marshal() (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 *ProposalDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposalDepositAmount != nil { - { - size, err := m.ProposalDepositAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.StartPosition != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartPosition)) - i-- - dAtA[i] = 0x20 - } - if m.EndBlockHeight != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.EndBlockHeight)) - i-- - dAtA[i] = 0x18 - } - if m.StartBlockHeight != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartBlockHeight)) - i-- - dAtA[i] = 0x10 - } - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalRateDataRequest) Marshal() (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 *ProposalRateDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalRateDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposalId != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.ProposalId)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ProposalRateDataResponse) Marshal() (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 *ProposalRateDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalRateDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RateData != nil { - { - size, err := m.RateData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalListRequest) Marshal() (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 *ProposalListRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Inactive { - i-- - if m.Inactive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ProposalListResponse) Marshal() (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 *ProposalListResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.StartPosition != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartPosition)) - i-- - dAtA[i] = 0x20 - } - if m.EndBlockHeight != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.EndBlockHeight)) - i-- - dAtA[i] = 0x18 - } - if m.StartBlockHeight != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.StartBlockHeight)) - i-- - dAtA[i] = 0x10 - } - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorVotesRequest) Marshal() (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 *ValidatorVotesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorVotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposalId != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.ProposalId)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorVotesResponse) Marshal() (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 *ValidatorVotesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Vote != nil { - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GovernanceParameters) Marshal() (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 *GovernanceParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GovernanceParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProposalSlashThreshold) > 0 { - i -= len(m.ProposalSlashThreshold) - copy(dAtA[i:], m.ProposalSlashThreshold) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.ProposalSlashThreshold))) - i-- - dAtA[i] = 0x2a - } - if len(m.ProposalPassThreshold) > 0 { - i -= len(m.ProposalPassThreshold) - copy(dAtA[i:], m.ProposalPassThreshold) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.ProposalPassThreshold))) - i-- - dAtA[i] = 0x22 - } - if len(m.ProposalValidQuorum) > 0 { - i -= len(m.ProposalValidQuorum) - copy(dAtA[i:], m.ProposalValidQuorum) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.ProposalValidQuorum))) - i-- - dAtA[i] = 0x1a - } - if m.ProposalDepositAmount != nil { - { - size, err := m.ProposalDepositAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ProposalVotingBlocks != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.ProposalVotingBlocks)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GovernanceParams != nil { - { - size, err := m.GovernanceParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EncodedParameter) Marshal() (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 *EncodedParameter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EncodedParameter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Component) > 0 { - i -= len(m.Component) - copy(dAtA[i:], m.Component) - i = encodeVarintGovernance(dAtA, i, uint64(len(m.Component))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChangedAppParameters) Marshal() (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 *ChangedAppParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChangedAppParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AuctionParams != nil { - { - size, err := m.AuctionParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.DexParams != nil { - { - size, err := m.DexParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.ShieldedPoolParams != nil { - { - size, err := m.ShieldedPoolParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.FundingParams != nil { - { - size, err := m.FundingParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.DistributionsParams != nil { - { - size, err := m.DistributionsParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.FeeParams != nil { - { - size, err := m.FeeParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.StakeParams != nil { - { - size, err := m.StakeParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.IbcParams != nil { - { - size, err := m.IbcParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.GovernanceParams != nil { - { - size, err := m.GovernanceParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CommunityPoolParams != nil { - { - size, err := m.CommunityPoolParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.SctParams != nil { - { - size, err := m.SctParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChangedAppParametersSet) Marshal() (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 *ChangedAppParametersSet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChangedAppParametersSet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.New != nil { - { - size, err := m.New.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Old != nil { - { - size, err := m.Old.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VotingPowerAtProposalStartRequest) Marshal() (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 *VotingPowerAtProposalStartRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VotingPowerAtProposalStartRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ProposalId != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.ProposalId)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *VotingPowerAtProposalStartResponse) Marshal() (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 *VotingPowerAtProposalStartResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VotingPowerAtProposalStartResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.VotingPower != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.VotingPower)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AllTalliedDelegatorVotesForProposalRequest) Marshal() (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 *AllTalliedDelegatorVotesForProposalRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllTalliedDelegatorVotesForProposalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposalId != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.ProposalId)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *AllTalliedDelegatorVotesForProposalResponse) Marshal() (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 *AllTalliedDelegatorVotesForProposalResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllTalliedDelegatorVotesForProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Tally != nil { - { - size, err := m.Tally.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NextProposalIdRequest) Marshal() (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 *NextProposalIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NextProposalIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *NextProposalIdResponse) Marshal() (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 *NextProposalIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NextProposalIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NextProposalId != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.NextProposalId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Ratio) Marshal() (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 *Ratio) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ratio) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Denominator != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Denominator)) - i-- - dAtA[i] = 0x10 - } - if m.Numerator != 0 { - i = encodeVarintGovernance(dAtA, i, uint64(m.Numerator)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EventDelegatorVote) Marshal() (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 *EventDelegatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDelegatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Vote != nil { - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventProposalDepositClaim) Marshal() (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 *EventProposalDepositClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventProposalDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DepositClaim != nil { - { - size, err := m.DepositClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValidatorVote) Marshal() (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 *EventValidatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValidatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Vote != nil { - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventProposalWithdraw) Marshal() (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 *EventProposalWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventProposalWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Withdraw != nil { - { - size, err := m.Withdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventProposalSubmit) Marshal() (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 *EventProposalSubmit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventProposalSubmit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Submit != nil { - { - size, err := m.Submit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventEnactProposal) Marshal() (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 *EventEnactProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventEnactProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventProposalFailed) Marshal() (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 *EventProposalFailed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventProposalFailed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventProposalSlashed) Marshal() (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 *EventProposalSlashed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventProposalSlashed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proposal != nil { - { - size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGovernance(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGovernance(dAtA []byte, offset int, v uint64) int { - offset -= sovGovernance(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ZKDelegatorVoteProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalSubmit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.DepositAmount != nil { - l = m.DepositAmount.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != 0 { - n += 1 + sovGovernance(uint64(m.Proposal)) - } - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalDepositClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != 0 { - n += 1 + sovGovernance(uint64(m.Proposal)) - } - if m.DepositAmount != nil { - l = m.DepositAmount.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Outcome != nil { - l = m.Outcome.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ValidatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.AuthSig != nil { - l = m.AuthSig.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ValidatorVoteReason) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ValidatorVoteBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != 0 { - n += 1 + sovGovernance(uint64(m.Proposal)) - } - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.GovernanceKey != nil { - l = m.GovernanceKey.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Reason != nil { - l = m.Reason.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *DelegatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.AuthSig != nil { - l = m.AuthSig.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *DelegatorVoteBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != 0 { - n += 1 + sovGovernance(uint64(m.Proposal)) - } - if m.StartPosition != 0 { - n += 1 + sovGovernance(uint64(m.StartPosition)) - } - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.UnbondedAmount != nil { - l = m.UnbondedAmount.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Rk != nil { - l = m.Rk.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *DelegatorVoteView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DelegatorVote != nil { - n += m.DelegatorVote.Size() - } - return n -} - -func (m *DelegatorVoteView_Visible_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Visible != nil { - l = m.Visible.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *DelegatorVoteView_Opaque_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *DelegatorVoteView_Visible) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DelegatorVote != nil { - l = m.DelegatorVote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *DelegatorVoteView_Opaque) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DelegatorVote != nil { - l = m.DelegatorVote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *DelegatorVotePlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != 0 { - n += 1 + sovGovernance(uint64(m.Proposal)) - } - if m.StartPosition != 0 { - n += 1 + sovGovernance(uint64(m.StartPosition)) - } - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.StakedNote != nil { - l = m.StakedNote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.StakedNotePosition != 0 { - n += 1 + sovGovernance(uint64(m.StakedNotePosition)) - } - if m.UnbondedAmount != nil { - l = m.UnbondedAmount.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.Randomizer) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.ProofBlindingR) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.ProofBlindingS) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *CommunityPoolDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *CommunityPoolSpend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *CommunityPoolOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *Vote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != 0 { - n += 1 + sovGovernance(uint64(m.Vote)) - } - return n -} - -func (m *ProposalState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != nil { - n += m.State.Size() - } - return n -} - -func (m *ProposalState_Voting_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Voting != nil { - l = m.Voting.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *ProposalState_Withdrawn_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Withdrawn != nil { - l = m.Withdrawn.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *ProposalState_Finished_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Finished != nil { - l = m.Finished.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *ProposalState_Claimed_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Claimed != nil { - l = m.Claimed.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *ProposalState_Voting) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ProposalState_Withdrawn) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalState_Finished) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Outcome != nil { - l = m.Outcome.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalState_Claimed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Outcome != nil { - l = m.Outcome.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalOutcome) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Outcome != nil { - n += m.Outcome.Size() - } - return n -} - -func (m *ProposalOutcome_Passed_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Passed != nil { - l = m.Passed.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *ProposalOutcome_Failed_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Failed != nil { - l = m.Failed.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *ProposalOutcome_Slashed_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Slashed != nil { - l = m.Slashed.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *ProposalOutcome_Withdrawn) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalOutcome_Passed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ProposalOutcome_Failed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Withdrawn != nil { - l = m.Withdrawn.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalOutcome_Slashed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Withdrawn != nil { - l = m.Withdrawn.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *Tally) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Yes != 0 { - n += 1 + sovGovernance(uint64(m.Yes)) - } - if m.No != 0 { - n += 1 + sovGovernance(uint64(m.No)) - } - if m.Abstain != 0 { - n += 1 + sovGovernance(uint64(m.Abstain)) - } - return n -} - -func (m *Proposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Title) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - if m.Id != 0 { - n += 1 + sovGovernance(uint64(m.Id)) - } - if m.Payload != nil { - n += m.Payload.Size() - } - return n -} - -func (m *Proposal_Signaling_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Signaling != nil { - l = m.Signaling.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *Proposal_Emergency_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Emergency != nil { - l = m.Emergency.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *Proposal_ParameterChange_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ParameterChange != nil { - l = m.ParameterChange.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *Proposal_CommunityPoolSpend_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolSpend != nil { - l = m.CommunityPoolSpend.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *Proposal_UpgradePlan_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UpgradePlan != nil { - l = m.UpgradePlan.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *Proposal_FreezeIbcClient_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FreezeIbcClient != nil { - l = m.FreezeIbcClient.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *Proposal_UnfreezeIbcClient_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UnfreezeIbcClient != nil { - l = m.UnfreezeIbcClient.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} -func (m *Proposal_Signaling) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Commit) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *Proposal_Emergency) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HaltChain { - n += 2 - } - return n -} - -func (m *Proposal_ParameterChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OldParameters != nil { - l = m.OldParameters.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.NewParameters != nil { - l = m.NewParameters.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if len(m.Preconditions) > 0 { - for _, e := range m.Preconditions { - l = e.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - } - if len(m.Changes) > 0 { - for _, e := range m.Changes { - l = e.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - } - return n -} - -func (m *Proposal_CommunityPoolSpend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TransactionPlan != nil { - l = m.TransactionPlan.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *Proposal_UpgradePlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovGovernance(uint64(m.Height)) - } - return n -} - -func (m *Proposal_FreezeIbcClient) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *Proposal_UnfreezeIbcClient) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalId != 0 { - n += 1 + sovGovernance(uint64(m.ProposalId)) - } - return n -} - -func (m *ProposalInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartBlockHeight != 0 { - n += 1 + sovGovernance(uint64(m.StartBlockHeight)) - } - if m.StartPosition != 0 { - n += 1 + sovGovernance(uint64(m.StartPosition)) - } - return n -} - -func (m *ProposalDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalId != 0 { - n += 1 + sovGovernance(uint64(m.ProposalId)) - } - return n -} - -func (m *ProposalDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.StartBlockHeight != 0 { - n += 1 + sovGovernance(uint64(m.StartBlockHeight)) - } - if m.EndBlockHeight != 0 { - n += 1 + sovGovernance(uint64(m.EndBlockHeight)) - } - if m.StartPosition != 0 { - n += 1 + sovGovernance(uint64(m.StartPosition)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.ProposalDepositAmount != nil { - l = m.ProposalDepositAmount.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalRateDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalId != 0 { - n += 1 + sovGovernance(uint64(m.ProposalId)) - } - return n -} - -func (m *ProposalRateDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RateData != nil { - l = m.RateData.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ProposalListRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Inactive { - n += 2 - } - return n -} - -func (m *ProposalListResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.StartBlockHeight != 0 { - n += 1 + sovGovernance(uint64(m.StartBlockHeight)) - } - if m.EndBlockHeight != 0 { - n += 1 + sovGovernance(uint64(m.EndBlockHeight)) - } - if m.StartPosition != 0 { - n += 1 + sovGovernance(uint64(m.StartPosition)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ValidatorVotesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalId != 0 { - n += 1 + sovGovernance(uint64(m.ProposalId)) - } - return n -} - -func (m *ValidatorVotesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *GovernanceParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalVotingBlocks != 0 { - n += 1 + sovGovernance(uint64(m.ProposalVotingBlocks)) - } - if m.ProposalDepositAmount != nil { - l = m.ProposalDepositAmount.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.ProposalValidQuorum) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.ProposalPassThreshold) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.ProposalSlashThreshold) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GovernanceParams != nil { - l = m.GovernanceParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EncodedParameter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Component) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ChangedAppParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SctParams != nil { - l = m.SctParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.CommunityPoolParams != nil { - l = m.CommunityPoolParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.GovernanceParams != nil { - l = m.GovernanceParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.IbcParams != nil { - l = m.IbcParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.StakeParams != nil { - l = m.StakeParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.FeeParams != nil { - l = m.FeeParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.DistributionsParams != nil { - l = m.DistributionsParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.FundingParams != nil { - l = m.FundingParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.ShieldedPoolParams != nil { - l = m.ShieldedPoolParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.DexParams != nil { - l = m.DexParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.AuctionParams != nil { - l = m.AuctionParams.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *ChangedAppParametersSet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Old != nil { - l = m.Old.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.New != nil { - l = m.New.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *VotingPowerAtProposalStartRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalId != 0 { - n += 1 + sovGovernance(uint64(m.ProposalId)) - } - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *VotingPowerAtProposalStartResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VotingPower != 0 { - n += 1 + sovGovernance(uint64(m.VotingPower)) - } - return n -} - -func (m *AllTalliedDelegatorVotesForProposalRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalId != 0 { - n += 1 + sovGovernance(uint64(m.ProposalId)) - } - return n -} - -func (m *AllTalliedDelegatorVotesForProposalResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tally != nil { - l = m.Tally.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *NextProposalIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *NextProposalIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NextProposalId != 0 { - n += 1 + sovGovernance(uint64(m.NextProposalId)) - } - return n -} - -func (m *Ratio) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Numerator != 0 { - n += 1 + sovGovernance(uint64(m.Numerator)) - } - if m.Denominator != 0 { - n += 1 + sovGovernance(uint64(m.Denominator)) - } - return n -} - -func (m *EventDelegatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EventProposalDepositClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DepositClaim != nil { - l = m.DepositClaim.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EventValidatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EventProposalWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Withdraw != nil { - l = m.Withdraw.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EventProposalSubmit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Submit != nil { - l = m.Submit.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EventEnactProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EventProposalFailed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func (m *EventProposalSlashed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposal != nil { - l = m.Proposal.Size() - n += 1 + l + sovGovernance(uint64(l)) - } - return n -} - -func sovGovernance(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGovernance(x uint64) (n int) { - return sovGovernance(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ZKDelegatorVoteProof) 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 ErrIntOverflowGovernance - } - 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: ZKDelegatorVoteProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZKDelegatorVoteProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalSubmit) 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 ErrIntOverflowGovernance - } - 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: ProposalSubmit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalSubmit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proposal == nil { - m.Proposal = &Proposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DepositAmount == nil { - m.DepositAmount = &v1.Amount{} - } - if err := m.DepositAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalWithdraw) 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 ErrIntOverflowGovernance - } - 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: ProposalWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - m.Proposal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Proposal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalDepositClaim) 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 ErrIntOverflowGovernance - } - 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: ProposalDepositClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalDepositClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - m.Proposal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Proposal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DepositAmount == nil { - m.DepositAmount = &v1.Amount{} - } - if err := m.DepositAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Outcome", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Outcome == nil { - m.Outcome = &ProposalOutcome{} - } - if err := m.Outcome.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorVote) 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 ErrIntOverflowGovernance - } - 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: ValidatorVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &ValidatorVoteBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthSig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthSig == nil { - m.AuthSig = &v11.SpendAuthSignature{} - } - if err := m.AuthSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorVoteReason) 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 ErrIntOverflowGovernance - } - 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: ValidatorVoteReason: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorVoteReason: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorVoteBody) 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 ErrIntOverflowGovernance - } - 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: ValidatorVoteBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorVoteBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - m.Proposal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Proposal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Vote == nil { - m.Vote = &Vote{} - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v12.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GovernanceKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GovernanceKey == nil { - m.GovernanceKey = &v12.GovernanceKey{} - } - if err := m.GovernanceKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reason == nil { - m.Reason = &ValidatorVoteReason{} - } - if err := m.Reason.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegatorVote) 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 ErrIntOverflowGovernance - } - 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: DelegatorVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegatorVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &DelegatorVoteBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthSig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthSig == nil { - m.AuthSig = &v11.SpendAuthSignature{} - } - if err := m.AuthSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &ZKDelegatorVoteProof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegatorVoteBody) 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 ErrIntOverflowGovernance - } - 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: DelegatorVoteBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegatorVoteBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - m.Proposal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Proposal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartPosition", wireType) - } - m.StartPosition = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartPosition |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Vote == nil { - m.Vote = &Vote{} - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v13.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondedAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnbondedAmount == nil { - m.UnbondedAmount = &v1.Amount{} - } - if err := m.UnbondedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v14.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rk", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Rk == nil { - m.Rk = &v11.SpendVerificationKey{} - } - if err := m.Rk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegatorVoteView) 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 ErrIntOverflowGovernance - } - 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: DelegatorVoteView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegatorVoteView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Visible", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DelegatorVoteView_Visible{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.DelegatorVote = &DelegatorVoteView_Visible_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &DelegatorVoteView_Opaque{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.DelegatorVote = &DelegatorVoteView_Opaque_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegatorVoteView_Visible) 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 ErrIntOverflowGovernance - } - 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: Visible: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Visible: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DelegatorVote == nil { - m.DelegatorVote = &DelegatorVote{} - } - if err := m.DelegatorVote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Note == nil { - m.Note = &v15.NoteView{} - } - if err := m.Note.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegatorVoteView_Opaque) 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 ErrIntOverflowGovernance - } - 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: Opaque: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Opaque: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DelegatorVote == nil { - m.DelegatorVote = &DelegatorVote{} - } - if err := m.DelegatorVote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegatorVotePlan) 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 ErrIntOverflowGovernance - } - 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: DelegatorVotePlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegatorVotePlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - m.Proposal = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Proposal |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartPosition", wireType) - } - m.StartPosition = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartPosition |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Vote == nil { - m.Vote = &Vote{} - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakedNote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StakedNote == nil { - m.StakedNote = &v15.Note{} - } - if err := m.StakedNote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StakedNotePosition", wireType) - } - m.StakedNotePosition = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StakedNotePosition |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondedAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnbondedAmount == nil { - m.UnbondedAmount = &v1.Amount{} - } - if err := m.UnbondedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Randomizer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Randomizer = append(m.Randomizer[:0], dAtA[iNdEx:postIndex]...) - if m.Randomizer == nil { - m.Randomizer = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingR", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingR = append(m.ProofBlindingR[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingR == nil { - m.ProofBlindingR = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingS", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingS = append(m.ProofBlindingS[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingS == nil { - m.ProofBlindingS = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommunityPoolDeposit) 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 ErrIntOverflowGovernance - } - 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: CommunityPoolDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolDeposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v13.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommunityPoolSpend) 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 ErrIntOverflowGovernance - } - 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: CommunityPoolSpend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolSpend: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v13.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommunityPoolOutput) 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 ErrIntOverflowGovernance - } - 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: CommunityPoolOutput: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolOutput: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v13.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v12.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Vote) 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 ErrIntOverflowGovernance - } - 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: Vote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - m.Vote = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Vote |= Vote_Vote(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalState) 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 ErrIntOverflowGovernance - } - 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: ProposalState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Voting", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ProposalState_Voting{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.State = &ProposalState_Voting_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Withdrawn", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ProposalState_Withdrawn{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.State = &ProposalState_Withdrawn_{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Finished", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ProposalState_Finished{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.State = &ProposalState_Finished_{v} - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Claimed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ProposalState_Claimed{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.State = &ProposalState_Claimed_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalState_Voting) 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 ErrIntOverflowGovernance - } - 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: Voting: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Voting: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalState_Withdrawn) 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 ErrIntOverflowGovernance - } - 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: Withdrawn: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Withdrawn: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalState_Finished) 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 ErrIntOverflowGovernance - } - 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: Finished: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Finished: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Outcome", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Outcome == nil { - m.Outcome = &ProposalOutcome{} - } - if err := m.Outcome.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalState_Claimed) 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 ErrIntOverflowGovernance - } - 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: Claimed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Claimed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Outcome", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Outcome == nil { - m.Outcome = &ProposalOutcome{} - } - if err := m.Outcome.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalOutcome) 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 ErrIntOverflowGovernance - } - 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: ProposalOutcome: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalOutcome: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Passed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ProposalOutcome_Passed{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Outcome = &ProposalOutcome_Passed_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Failed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ProposalOutcome_Failed{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Outcome = &ProposalOutcome_Failed_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Slashed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ProposalOutcome_Slashed{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Outcome = &ProposalOutcome_Slashed_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalOutcome_Withdrawn) 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 ErrIntOverflowGovernance - } - 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: Withdrawn: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Withdrawn: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalOutcome_Passed) 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 ErrIntOverflowGovernance - } - 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: Passed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Passed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalOutcome_Failed) 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 ErrIntOverflowGovernance - } - 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: Failed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Failed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Withdrawn", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Withdrawn == nil { - m.Withdrawn = &ProposalOutcome_Withdrawn{} - } - if err := m.Withdrawn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalOutcome_Slashed) 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 ErrIntOverflowGovernance - } - 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: Slashed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Slashed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Withdrawn", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Withdrawn == nil { - m.Withdrawn = &ProposalOutcome_Withdrawn{} - } - if err := m.Withdrawn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tally) 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 ErrIntOverflowGovernance - } - 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: Tally: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tally: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Yes", wireType) - } - m.Yes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Yes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field No", wireType) - } - m.No = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.No |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Abstain", wireType) - } - m.Abstain = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Abstain |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal) 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 ErrIntOverflowGovernance - } - 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: Proposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signaling", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Proposal_Signaling{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Payload = &Proposal_Signaling_{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Emergency", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Proposal_Emergency{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Payload = &Proposal_Emergency_{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParameterChange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Proposal_ParameterChange{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Payload = &Proposal_ParameterChange_{v} - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolSpend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Proposal_CommunityPoolSpend{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Payload = &Proposal_CommunityPoolSpend_{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpgradePlan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Proposal_UpgradePlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Payload = &Proposal_UpgradePlan_{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FreezeIbcClient", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Proposal_FreezeIbcClient{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Payload = &Proposal_FreezeIbcClient_{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnfreezeIbcClient", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Proposal_UnfreezeIbcClient{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Payload = &Proposal_UnfreezeIbcClient_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal_Signaling) 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 ErrIntOverflowGovernance - } - 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: Signaling: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Signaling: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Commit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal_Emergency) 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 ErrIntOverflowGovernance - } - 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: Emergency: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Emergency: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HaltChain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HaltChain = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal_ParameterChange) 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 ErrIntOverflowGovernance - } - 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: ParameterChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParameterChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OldParameters == nil { - m.OldParameters = &ChangedAppParameters{} - } - if err := m.OldParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NewParameters == nil { - m.NewParameters = &ChangedAppParameters{} - } - if err := m.NewParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Preconditions = append(m.Preconditions, &EncodedParameter{}) - if err := m.Preconditions[len(m.Preconditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Changes = append(m.Changes, &EncodedParameter{}) - if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal_CommunityPoolSpend) 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 ErrIntOverflowGovernance - } - 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: CommunityPoolSpend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolSpend: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionPlan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionPlan == nil { - m.TransactionPlan = &types.Any{} - } - if err := m.TransactionPlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal_UpgradePlan) 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 ErrIntOverflowGovernance - } - 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: UpgradePlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpgradePlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal_FreezeIbcClient) 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 ErrIntOverflowGovernance - } - 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: FreezeIbcClient: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FreezeIbcClient: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Proposal_UnfreezeIbcClient) 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 ErrIntOverflowGovernance - } - 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: UnfreezeIbcClient: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnfreezeIbcClient: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalInfoRequest) 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 ErrIntOverflowGovernance - } - 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: ProposalInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - m.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalInfoResponse) 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 ErrIntOverflowGovernance - } - 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: ProposalInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartBlockHeight", wireType) - } - m.StartBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartPosition", wireType) - } - m.StartPosition = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartPosition |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalDataRequest) 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 ErrIntOverflowGovernance - } - 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: ProposalDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - m.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalDataResponse) 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 ErrIntOverflowGovernance - } - 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: ProposalDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proposal == nil { - m.Proposal = &Proposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartBlockHeight", wireType) - } - m.StartBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndBlockHeight", wireType) - } - m.EndBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartPosition", wireType) - } - m.StartPosition = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartPosition |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &ProposalState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalDepositAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProposalDepositAmount == nil { - m.ProposalDepositAmount = &v1.Amount{} - } - if err := m.ProposalDepositAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalRateDataRequest) 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 ErrIntOverflowGovernance - } - 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: ProposalRateDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalRateDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - m.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalRateDataResponse) 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 ErrIntOverflowGovernance - } - 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: ProposalRateDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalRateDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RateData == nil { - m.RateData = &v16.RateData{} - } - if err := m.RateData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalListRequest) 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 ErrIntOverflowGovernance - } - 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: ProposalListRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalListRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Inactive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Inactive = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalListResponse) 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 ErrIntOverflowGovernance - } - 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: ProposalListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proposal == nil { - m.Proposal = &Proposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartBlockHeight", wireType) - } - m.StartBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndBlockHeight", wireType) - } - m.EndBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartPosition", wireType) - } - m.StartPosition = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartPosition |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &ProposalState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorVotesRequest) 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 ErrIntOverflowGovernance - } - 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: ValidatorVotesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorVotesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - m.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorVotesResponse) 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 ErrIntOverflowGovernance - } - 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: ValidatorVotesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorVotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Vote == nil { - m.Vote = &Vote{} - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v12.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GovernanceParameters) 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 ErrIntOverflowGovernance - } - 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: GovernanceParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GovernanceParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalVotingBlocks", wireType) - } - m.ProposalVotingBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalVotingBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalDepositAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProposalDepositAmount == nil { - m.ProposalDepositAmount = &v1.Amount{} - } - if err := m.ProposalDepositAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalValidQuorum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposalValidQuorum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalPassThreshold", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposalPassThreshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalSlashThreshold", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposalSlashThreshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowGovernance - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GovernanceParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GovernanceParams == nil { - m.GovernanceParams = &GovernanceParameters{} - } - if err := m.GovernanceParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EncodedParameter) 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 ErrIntOverflowGovernance - } - 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: EncodedParameter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EncodedParameter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Component", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Component = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChangedAppParameters) 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 ErrIntOverflowGovernance - } - 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: ChangedAppParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChangedAppParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SctParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SctParams == nil { - m.SctParams = &v14.SctParameters{} - } - if err := m.SctParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommunityPoolParams == nil { - m.CommunityPoolParams = &v17.CommunityPoolParameters{} - } - if err := m.CommunityPoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GovernanceParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GovernanceParams == nil { - m.GovernanceParams = &GovernanceParameters{} - } - if err := m.GovernanceParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IbcParams == nil { - m.IbcParams = &v18.IbcParameters{} - } - if err := m.IbcParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StakeParams == nil { - m.StakeParams = &v16.StakeParameters{} - } - if err := m.StakeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FeeParams == nil { - m.FeeParams = &v19.FeeParameters{} - } - if err := m.FeeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistributionsParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DistributionsParams == nil { - m.DistributionsParams = &v110.DistributionsParameters{} - } - if err := m.DistributionsParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FundingParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FundingParams == nil { - m.FundingParams = &v111.FundingParameters{} - } - if err := m.FundingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShieldedPoolParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ShieldedPoolParams == nil { - m.ShieldedPoolParams = &v15.ShieldedPoolParameters{} - } - if err := m.ShieldedPoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DexParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DexParams == nil { - m.DexParams = &v112.DexParameters{} - } - if err := m.DexParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionParams == nil { - m.AuctionParams = &v113.AuctionParameters{} - } - if err := m.AuctionParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ChangedAppParametersSet) 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 ErrIntOverflowGovernance - } - 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: ChangedAppParametersSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChangedAppParametersSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Old", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Old == nil { - m.Old = &ChangedAppParameters{} - } - if err := m.Old.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field New", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.New == nil { - m.New = &ChangedAppParameters{} - } - if err := m.New.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VotingPowerAtProposalStartRequest) 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 ErrIntOverflowGovernance - } - 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: VotingPowerAtProposalStartRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VotingPowerAtProposalStartRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - m.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v12.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VotingPowerAtProposalStartResponse) 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 ErrIntOverflowGovernance - } - 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: VotingPowerAtProposalStartResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VotingPowerAtProposalStartResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - m.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotingPower |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTalliedDelegatorVotesForProposalRequest) 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 ErrIntOverflowGovernance - } - 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: AllTalliedDelegatorVotesForProposalRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTalliedDelegatorVotesForProposalRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) - } - m.ProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTalliedDelegatorVotesForProposalResponse) 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 ErrIntOverflowGovernance - } - 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: AllTalliedDelegatorVotesForProposalResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTalliedDelegatorVotesForProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tally", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tally == nil { - m.Tally = &Tally{} - } - if err := m.Tally.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v12.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NextProposalIdRequest) 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 ErrIntOverflowGovernance - } - 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: NextProposalIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NextProposalIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NextProposalIdResponse) 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 ErrIntOverflowGovernance - } - 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: NextProposalIdResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NextProposalIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextProposalId", wireType) - } - m.NextProposalId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextProposalId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Ratio) 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 ErrIntOverflowGovernance - } - 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: Ratio: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ratio: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Numerator", wireType) - } - m.Numerator = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Numerator |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Denominator", wireType) - } - m.Denominator = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Denominator |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDelegatorVote) 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 ErrIntOverflowGovernance - } - 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: EventDelegatorVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDelegatorVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Vote == nil { - m.Vote = &DelegatorVote{} - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventProposalDepositClaim) 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 ErrIntOverflowGovernance - } - 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: EventProposalDepositClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventProposalDepositClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DepositClaim == nil { - m.DepositClaim = &ProposalDepositClaim{} - } - if err := m.DepositClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValidatorVote) 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 ErrIntOverflowGovernance - } - 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: EventValidatorVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValidatorVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Vote == nil { - m.Vote = &ValidatorVote{} - } - if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventProposalWithdraw) 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 ErrIntOverflowGovernance - } - 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: EventProposalWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventProposalWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Withdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Withdraw == nil { - m.Withdraw = &ProposalWithdraw{} - } - if err := m.Withdraw.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventProposalSubmit) 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 ErrIntOverflowGovernance - } - 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: EventProposalSubmit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventProposalSubmit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Submit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Submit == nil { - m.Submit = &ProposalSubmit{} - } - if err := m.Submit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventEnactProposal) 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 ErrIntOverflowGovernance - } - 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: EventEnactProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventEnactProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proposal == nil { - m.Proposal = &Proposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventProposalFailed) 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 ErrIntOverflowGovernance - } - 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: EventProposalFailed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventProposalFailed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proposal == nil { - m.Proposal = &Proposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventProposalSlashed) 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 ErrIntOverflowGovernance - } - 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: EventProposalSlashed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventProposalSlashed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGovernance - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGovernance - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGovernance - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proposal == nil { - m.Proposal = &Proposal{} - } - if err := m.Proposal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGovernance(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGovernance - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGovernance(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGovernance - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGovernance - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGovernance - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGovernance - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGovernance - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGovernance - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGovernance = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGovernance = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGovernance = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/ibc/v1/ibc.pb.go b/chain/penumbra/core/component/ibc/v1/ibc.pb.go deleted file mode 100644 index 8bd5d72e..00000000 --- a/chain/penumbra/core/component/ibc/v1/ibc.pb.go +++ /dev/null @@ -1,2851 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/ibc/v1/ibc.proto - -package ibcv1 - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" - types1 "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type IbcRelay struct { - RawAction *types.Any `protobuf:"bytes,1,opt,name=raw_action,json=rawAction,proto3" json:"raw_action,omitempty"` -} - -func (m *IbcRelay) Reset() { *m = IbcRelay{} } -func (m *IbcRelay) String() string { return proto.CompactTextString(m) } -func (*IbcRelay) ProtoMessage() {} -func (*IbcRelay) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{0} -} -func (m *IbcRelay) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IbcRelay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IbcRelay.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 *IbcRelay) XXX_Merge(src proto.Message) { - xxx_messageInfo_IbcRelay.Merge(m, src) -} -func (m *IbcRelay) XXX_Size() int { - return m.Size() -} -func (m *IbcRelay) XXX_DiscardUnknown() { - xxx_messageInfo_IbcRelay.DiscardUnknown(m) -} - -var xxx_messageInfo_IbcRelay proto.InternalMessageInfo - -func (m *IbcRelay) GetRawAction() *types.Any { - if m != nil { - return m.RawAction - } - return nil -} - -// FungibleTokenPacketData defines a struct for the packet payload -// See FungibleTokenPacketData spec: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures -type FungibleTokenPacketData struct { - // the token denomination to be transferred - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - // the token amount to be transferred - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - // the return address - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` - // the recipient address on the destination chain - Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` - // optional memo - Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` -} - -func (m *FungibleTokenPacketData) Reset() { *m = FungibleTokenPacketData{} } -func (m *FungibleTokenPacketData) String() string { return proto.CompactTextString(m) } -func (*FungibleTokenPacketData) ProtoMessage() {} -func (*FungibleTokenPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{1} -} -func (m *FungibleTokenPacketData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FungibleTokenPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FungibleTokenPacketData.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 *FungibleTokenPacketData) XXX_Merge(src proto.Message) { - xxx_messageInfo_FungibleTokenPacketData.Merge(m, src) -} -func (m *FungibleTokenPacketData) XXX_Size() int { - return m.Size() -} -func (m *FungibleTokenPacketData) XXX_DiscardUnknown() { - xxx_messageInfo_FungibleTokenPacketData.DiscardUnknown(m) -} - -var xxx_messageInfo_FungibleTokenPacketData proto.InternalMessageInfo - -func (m *FungibleTokenPacketData) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *FungibleTokenPacketData) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -func (m *FungibleTokenPacketData) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *FungibleTokenPacketData) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -func (m *FungibleTokenPacketData) GetMemo() string { - if m != nil { - return m.Memo - } - return "" -} - -// A Penumbra transaction action requesting an ICS20 transfer. -type Ics20Withdrawal struct { - Amount *v1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - Denom *v11.Denom `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - // the address on the destination chain to send the transfer to - DestinationChainAddress string `protobuf:"bytes,3,opt,name=destination_chain_address,json=destinationChainAddress,proto3" json:"destination_chain_address,omitempty"` - // a "sender" penumbra address to use to return funds from this withdrawal. - // this should be an ephemeral address - ReturnAddress *v12.Address `protobuf:"bytes,4,opt,name=return_address,json=returnAddress,proto3" json:"return_address,omitempty"` - // The height on the counterparty chain at which this transfer expires, and - // funds are sent back to the return address. - TimeoutHeight *types1.Height `protobuf:"bytes,5,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - // the timestamp at which this transfer expires. - TimeoutTime uint64 `protobuf:"varint,6,opt,name=timeout_time,json=timeoutTime,proto3" json:"timeout_time,omitempty"` - // the source channel used for the withdrawal - SourceChannel string `protobuf:"bytes,7,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty"` -} - -func (m *Ics20Withdrawal) Reset() { *m = Ics20Withdrawal{} } -func (m *Ics20Withdrawal) String() string { return proto.CompactTextString(m) } -func (*Ics20Withdrawal) ProtoMessage() {} -func (*Ics20Withdrawal) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{2} -} -func (m *Ics20Withdrawal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ics20Withdrawal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ics20Withdrawal.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 *Ics20Withdrawal) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ics20Withdrawal.Merge(m, src) -} -func (m *Ics20Withdrawal) XXX_Size() int { - return m.Size() -} -func (m *Ics20Withdrawal) XXX_DiscardUnknown() { - xxx_messageInfo_Ics20Withdrawal.DiscardUnknown(m) -} - -var xxx_messageInfo_Ics20Withdrawal proto.InternalMessageInfo - -func (m *Ics20Withdrawal) GetAmount() *v1.Amount { - if m != nil { - return m.Amount - } - return nil -} - -func (m *Ics20Withdrawal) GetDenom() *v11.Denom { - if m != nil { - return m.Denom - } - return nil -} - -func (m *Ics20Withdrawal) GetDestinationChainAddress() string { - if m != nil { - return m.DestinationChainAddress - } - return "" -} - -func (m *Ics20Withdrawal) GetReturnAddress() *v12.Address { - if m != nil { - return m.ReturnAddress - } - return nil -} - -func (m *Ics20Withdrawal) GetTimeoutHeight() *types1.Height { - if m != nil { - return m.TimeoutHeight - } - return nil -} - -func (m *Ics20Withdrawal) GetTimeoutTime() uint64 { - if m != nil { - return m.TimeoutTime - } - return 0 -} - -func (m *Ics20Withdrawal) GetSourceChannel() string { - if m != nil { - return m.SourceChannel - } - return "" -} - -type ClientData struct { - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - ClientState *types.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` - ProcessedTime string `protobuf:"bytes,3,opt,name=processed_time,json=processedTime,proto3" json:"processed_time,omitempty"` - ProcessedHeight uint64 `protobuf:"varint,4,opt,name=processed_height,json=processedHeight,proto3" json:"processed_height,omitempty"` -} - -func (m *ClientData) Reset() { *m = ClientData{} } -func (m *ClientData) String() string { return proto.CompactTextString(m) } -func (*ClientData) ProtoMessage() {} -func (*ClientData) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{3} -} -func (m *ClientData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClientData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClientData.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 *ClientData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientData.Merge(m, src) -} -func (m *ClientData) XXX_Size() int { - return m.Size() -} -func (m *ClientData) XXX_DiscardUnknown() { - xxx_messageInfo_ClientData.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientData proto.InternalMessageInfo - -func (m *ClientData) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *ClientData) GetClientState() *types.Any { - if m != nil { - return m.ClientState - } - return nil -} - -func (m *ClientData) GetProcessedTime() string { - if m != nil { - return m.ProcessedTime - } - return "" -} - -func (m *ClientData) GetProcessedHeight() uint64 { - if m != nil { - return m.ProcessedHeight - } - return 0 -} - -type ClientCounter struct { - Counter uint64 `protobuf:"varint,1,opt,name=counter,proto3" json:"counter,omitempty"` -} - -func (m *ClientCounter) Reset() { *m = ClientCounter{} } -func (m *ClientCounter) String() string { return proto.CompactTextString(m) } -func (*ClientCounter) ProtoMessage() {} -func (*ClientCounter) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{4} -} -func (m *ClientCounter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClientCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClientCounter.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 *ClientCounter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientCounter.Merge(m, src) -} -func (m *ClientCounter) XXX_Size() int { - return m.Size() -} -func (m *ClientCounter) XXX_DiscardUnknown() { - xxx_messageInfo_ClientCounter.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientCounter proto.InternalMessageInfo - -func (m *ClientCounter) GetCounter() uint64 { - if m != nil { - return m.Counter - } - return 0 -} - -type ConsensusState struct { - ConsensusState *types.Any `protobuf:"bytes,1,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` -} - -func (m *ConsensusState) Reset() { *m = ConsensusState{} } -func (m *ConsensusState) String() string { return proto.CompactTextString(m) } -func (*ConsensusState) ProtoMessage() {} -func (*ConsensusState) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{5} -} -func (m *ConsensusState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusState.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 *ConsensusState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusState.Merge(m, src) -} -func (m *ConsensusState) XXX_Size() int { - return m.Size() -} -func (m *ConsensusState) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusState.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusState proto.InternalMessageInfo - -func (m *ConsensusState) GetConsensusState() *types.Any { - if m != nil { - return m.ConsensusState - } - return nil -} - -type VerifiedHeights struct { - Heights []*types1.Height `protobuf:"bytes,1,rep,name=heights,proto3" json:"heights,omitempty"` -} - -func (m *VerifiedHeights) Reset() { *m = VerifiedHeights{} } -func (m *VerifiedHeights) String() string { return proto.CompactTextString(m) } -func (*VerifiedHeights) ProtoMessage() {} -func (*VerifiedHeights) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{6} -} -func (m *VerifiedHeights) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifiedHeights) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifiedHeights.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 *VerifiedHeights) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifiedHeights.Merge(m, src) -} -func (m *VerifiedHeights) XXX_Size() int { - return m.Size() -} -func (m *VerifiedHeights) XXX_DiscardUnknown() { - xxx_messageInfo_VerifiedHeights.DiscardUnknown(m) -} - -var xxx_messageInfo_VerifiedHeights proto.InternalMessageInfo - -func (m *VerifiedHeights) GetHeights() []*types1.Height { - if m != nil { - return m.Heights - } - return nil -} - -type ConnectionCounter struct { - Counter uint64 `protobuf:"varint,1,opt,name=counter,proto3" json:"counter,omitempty"` -} - -func (m *ConnectionCounter) Reset() { *m = ConnectionCounter{} } -func (m *ConnectionCounter) String() string { return proto.CompactTextString(m) } -func (*ConnectionCounter) ProtoMessage() {} -func (*ConnectionCounter) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{7} -} -func (m *ConnectionCounter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConnectionCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConnectionCounter.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 *ConnectionCounter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConnectionCounter.Merge(m, src) -} -func (m *ConnectionCounter) XXX_Size() int { - return m.Size() -} -func (m *ConnectionCounter) XXX_DiscardUnknown() { - xxx_messageInfo_ConnectionCounter.DiscardUnknown(m) -} - -var xxx_messageInfo_ConnectionCounter proto.InternalMessageInfo - -func (m *ConnectionCounter) GetCounter() uint64 { - if m != nil { - return m.Counter - } - return 0 -} - -type ClientConnections struct { - Connections []string `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"` -} - -func (m *ClientConnections) Reset() { *m = ClientConnections{} } -func (m *ClientConnections) String() string { return proto.CompactTextString(m) } -func (*ClientConnections) ProtoMessage() {} -func (*ClientConnections) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{8} -} -func (m *ClientConnections) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClientConnections) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClientConnections.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 *ClientConnections) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClientConnections.Merge(m, src) -} -func (m *ClientConnections) XXX_Size() int { - return m.Size() -} -func (m *ClientConnections) XXX_DiscardUnknown() { - xxx_messageInfo_ClientConnections.DiscardUnknown(m) -} - -var xxx_messageInfo_ClientConnections proto.InternalMessageInfo - -func (m *ClientConnections) GetConnections() []string { - if m != nil { - return m.Connections - } - return nil -} - -// IBC configuration data. -type IbcParameters struct { - // Whether IBC (forming connections, processing IBC packets) is enabled. - IbcEnabled bool `protobuf:"varint,1,opt,name=ibc_enabled,json=ibcEnabled,proto3" json:"ibc_enabled,omitempty"` - // Whether inbound ICS-20 transfers are enabled - InboundIcs20TransfersEnabled bool `protobuf:"varint,2,opt,name=inbound_ics20_transfers_enabled,json=inboundIcs20TransfersEnabled,proto3" json:"inbound_ics20_transfers_enabled,omitempty"` - // Whether outbound ICS-20 transfers are enabled - OutboundIcs20TransfersEnabled bool `protobuf:"varint,3,opt,name=outbound_ics20_transfers_enabled,json=outboundIcs20TransfersEnabled,proto3" json:"outbound_ics20_transfers_enabled,omitempty"` -} - -func (m *IbcParameters) Reset() { *m = IbcParameters{} } -func (m *IbcParameters) String() string { return proto.CompactTextString(m) } -func (*IbcParameters) ProtoMessage() {} -func (*IbcParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{9} -} -func (m *IbcParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IbcParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IbcParameters.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 *IbcParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_IbcParameters.Merge(m, src) -} -func (m *IbcParameters) XXX_Size() int { - return m.Size() -} -func (m *IbcParameters) XXX_DiscardUnknown() { - xxx_messageInfo_IbcParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_IbcParameters proto.InternalMessageInfo - -func (m *IbcParameters) GetIbcEnabled() bool { - if m != nil { - return m.IbcEnabled - } - return false -} - -func (m *IbcParameters) GetInboundIcs20TransfersEnabled() bool { - if m != nil { - return m.InboundIcs20TransfersEnabled - } - return false -} - -func (m *IbcParameters) GetOutboundIcs20TransfersEnabled() bool { - if m != nil { - return m.OutboundIcs20TransfersEnabled - } - return false -} - -// IBC genesis state. -type GenesisContent struct { - // IBC parameters. - IbcParams *IbcParameters `protobuf:"bytes,1,opt,name=ibc_params,json=ibcParams,proto3" json:"ibc_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_2bed36356ff7581e, []int{10} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetIbcParams() *IbcParameters { - if m != nil { - return m.IbcParams - } - return nil -} - -func init() { - proto.RegisterType((*IbcRelay)(nil), "penumbra.core.component.ibc.v1.IbcRelay") - proto.RegisterType((*FungibleTokenPacketData)(nil), "penumbra.core.component.ibc.v1.FungibleTokenPacketData") - proto.RegisterType((*Ics20Withdrawal)(nil), "penumbra.core.component.ibc.v1.Ics20Withdrawal") - proto.RegisterType((*ClientData)(nil), "penumbra.core.component.ibc.v1.ClientData") - proto.RegisterType((*ClientCounter)(nil), "penumbra.core.component.ibc.v1.ClientCounter") - proto.RegisterType((*ConsensusState)(nil), "penumbra.core.component.ibc.v1.ConsensusState") - proto.RegisterType((*VerifiedHeights)(nil), "penumbra.core.component.ibc.v1.VerifiedHeights") - proto.RegisterType((*ConnectionCounter)(nil), "penumbra.core.component.ibc.v1.ConnectionCounter") - proto.RegisterType((*ClientConnections)(nil), "penumbra.core.component.ibc.v1.ClientConnections") - proto.RegisterType((*IbcParameters)(nil), "penumbra.core.component.ibc.v1.IbcParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.ibc.v1.GenesisContent") -} - -func init() { - proto.RegisterFile("penumbra/core/component/ibc/v1/ibc.proto", fileDescriptor_2bed36356ff7581e) -} - -var fileDescriptor_2bed36356ff7581e = []byte{ - // 952 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x95, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0xc7, 0xd7, 0x69, 0xb6, 0x1f, 0x93, 0x4d, 0xca, 0x5a, 0x2b, 0x36, 0x5b, 0x76, 0xdd, 0x60, - 0x09, 0xa9, 0x8b, 0x54, 0x1b, 0xb7, 0x8b, 0x40, 0x41, 0x08, 0xb5, 0xde, 0x52, 0x22, 0x81, 0x88, - 0x4c, 0x55, 0x24, 0x14, 0x11, 0x8d, 0xc7, 0xa7, 0xe9, 0xa8, 0xf1, 0x4c, 0x34, 0x33, 0x76, 0xd5, - 0x77, 0x40, 0x82, 0x67, 0xe0, 0x92, 0x6b, 0x1e, 0x00, 0xee, 0x10, 0x57, 0x7b, 0xc9, 0x25, 0x6a, - 0xef, 0x78, 0x0a, 0x34, 0x33, 0x76, 0xba, 0x59, 0xad, 0xd2, 0x9b, 0xd8, 0xe7, 0xcc, 0xef, 0x9c, - 0xf9, 0x9f, 0x33, 0x67, 0x1c, 0xb4, 0x33, 0x03, 0x56, 0xe4, 0xa9, 0xc0, 0x21, 0xe1, 0x02, 0x42, - 0xc2, 0xf3, 0x19, 0x67, 0xc0, 0x54, 0x48, 0x53, 0x12, 0x96, 0x91, 0x7e, 0x04, 0x33, 0xc1, 0x15, - 0x77, 0xbd, 0x9a, 0x0c, 0x34, 0x19, 0xcc, 0xc9, 0x40, 0x23, 0x65, 0xb4, 0xf5, 0x64, 0xc2, 0xf9, - 0x64, 0x0a, 0xa1, 0xa1, 0xd3, 0xe2, 0x2c, 0xc4, 0xec, 0xca, 0x86, 0x6e, 0x6d, 0xeb, 0x64, 0x36, - 0xff, 0x94, 0xea, 0xe4, 0x65, 0x54, 0xbd, 0x55, 0x80, 0xbf, 0xa8, 0x02, 0x4b, 0x09, 0x06, 0x32, - 0x2f, 0x15, 0xd3, 0x5b, 0x64, 0x2e, 0xe0, 0x4a, 0x6a, 0x44, 0x3f, 0x2b, 0xc2, 0x5b, 0x24, 0x58, - 0x91, 0x6b, 0x80, 0x15, 0xb9, 0x5d, 0xf7, 0xbf, 0x40, 0xeb, 0x83, 0x94, 0x24, 0x30, 0xc5, 0x57, - 0xee, 0x3e, 0x42, 0x02, 0x5f, 0x8e, 0x31, 0x51, 0x94, 0xb3, 0xae, 0xd3, 0x73, 0x76, 0x5a, 0x7b, - 0x8f, 0x02, 0x5b, 0x42, 0x50, 0x97, 0x10, 0x1c, 0xb0, 0xab, 0x64, 0x43, 0xe0, 0xcb, 0x03, 0x83, - 0xf9, 0x3f, 0x3b, 0xe8, 0xf1, 0x97, 0x05, 0x9b, 0xd0, 0x74, 0x0a, 0x27, 0xfc, 0x02, 0xd8, 0x10, - 0x93, 0x0b, 0x50, 0x2f, 0xb1, 0xc2, 0xee, 0x23, 0x74, 0x3f, 0x03, 0xc6, 0x73, 0x93, 0x6b, 0x23, - 0xb1, 0x86, 0xfb, 0x2e, 0x5a, 0xc5, 0x39, 0x2f, 0x98, 0xea, 0x36, 0x8c, 0xbb, 0xb2, 0xb4, 0x5f, - 0x02, 0xcb, 0x40, 0x74, 0x57, 0xac, 0xdf, 0x5a, 0xee, 0x16, 0x5a, 0x17, 0x40, 0x80, 0x96, 0x20, - 0xba, 0x4d, 0xb3, 0x32, 0xb7, 0x5d, 0x17, 0x35, 0x73, 0xc8, 0x79, 0xf7, 0xbe, 0xf1, 0x9b, 0x77, - 0xff, 0xa7, 0x15, 0xb4, 0x39, 0x20, 0x72, 0xef, 0xa3, 0xef, 0xa9, 0x3a, 0xcf, 0x04, 0xbe, 0xc4, - 0x53, 0xf7, 0xc5, 0x7c, 0x4f, 0x5b, 0xd6, 0xd3, 0x60, 0xf1, 0xe4, 0x74, 0x43, 0xca, 0x28, 0x38, - 0x30, 0xcc, 0x5c, 0xd1, 0x7e, 0xad, 0xbf, 0x61, 0x82, 0x9e, 0xbd, 0x11, 0x64, 0x4f, 0xa2, 0x8c, - 0x82, 0x97, 0x1a, 0xaa, 0xcb, 0xeb, 0xa3, 0x27, 0x19, 0x48, 0x45, 0x19, 0xd6, 0xfd, 0x19, 0x93, - 0x73, 0x4c, 0xd9, 0x18, 0x67, 0x99, 0x00, 0x29, 0xab, 0xca, 0x1e, 0xbf, 0x06, 0xc4, 0x7a, 0xfd, - 0xc0, 0x2e, 0xbb, 0x47, 0xa8, 0x23, 0x40, 0x15, 0xe2, 0x36, 0xa0, 0x69, 0x76, 0xf6, 0xde, 0xd8, - 0xd9, 0x1c, 0xb0, 0xd6, 0x6b, 0xa9, 0xa4, 0x6d, 0xa3, 0xea, 0x34, 0x07, 0xa8, 0xa3, 0x68, 0x0e, - 0xbc, 0x50, 0xe3, 0x73, 0xa0, 0x93, 0x73, 0x65, 0xfa, 0xd3, 0xda, 0xdb, 0x32, 0x73, 0x69, 0x47, - 0xd5, 0x8e, 0x5a, 0x19, 0x05, 0x5f, 0x19, 0x22, 0x69, 0x57, 0x11, 0xd6, 0x74, 0xdf, 0x47, 0x0f, - 0xea, 0x14, 0xfa, 0xd9, 0x5d, 0xed, 0x39, 0x3b, 0xcd, 0xa4, 0x55, 0xf9, 0x4e, 0x68, 0x0e, 0xee, - 0x07, 0xa8, 0x23, 0x79, 0x21, 0x08, 0xe8, 0x1a, 0x19, 0x83, 0x69, 0x77, 0xcd, 0x54, 0xd7, 0xb6, - 0xde, 0xd8, 0x3a, 0xfd, 0xdf, 0x1d, 0x84, 0x62, 0xb3, 0x9b, 0x99, 0x89, 0xf7, 0xd0, 0x86, 0xdd, - 0x7b, 0x4c, 0xb3, 0x6a, 0x2e, 0xd6, 0xad, 0x63, 0x90, 0xb9, 0x9f, 0xa0, 0x07, 0xd5, 0xa2, 0x54, - 0x58, 0x41, 0xd5, 0xf7, 0xb7, 0xcf, 0x60, 0xcb, 0x92, 0xdf, 0x69, 0x50, 0x6b, 0x99, 0x09, 0x4e, - 0x40, 0x4a, 0xc8, 0xac, 0x60, 0xdb, 0xe9, 0xf6, 0xdc, 0x6b, 0x24, 0x3f, 0x47, 0xef, 0xdc, 0x62, - 0x55, 0x6b, 0x9a, 0xa6, 0xb2, 0xcd, 0xb9, 0xdf, 0x36, 0xc0, 0x7f, 0x8e, 0xda, 0x56, 0x75, 0xac, - 0x47, 0x01, 0x84, 0xdb, 0x45, 0x6b, 0xc4, 0xbe, 0x1a, 0xd9, 0xcd, 0xa4, 0x36, 0xfd, 0x6f, 0x51, - 0x27, 0xe6, 0x4c, 0x02, 0x93, 0x85, 0xb4, 0x72, 0x3e, 0x47, 0x9b, 0xa4, 0xf6, 0x54, 0xa5, 0x2c, - 0xbb, 0x4e, 0x1d, 0xb2, 0x10, 0xee, 0x1f, 0xa3, 0xcd, 0x53, 0x10, 0xf4, 0x8c, 0xd6, 0x6a, 0xa4, - 0xfb, 0x02, 0xad, 0x59, 0xbd, 0xb2, 0xeb, 0xf4, 0x56, 0xee, 0x38, 0xcb, 0x1a, 0xf5, 0x77, 0xd1, - 0xc3, 0x98, 0x33, 0x06, 0xe6, 0xaa, 0xde, 0x5d, 0xc8, 0xc7, 0xe8, 0x61, 0x5d, 0x73, 0x1d, 0x24, - 0xdd, 0x1e, 0x6a, 0x91, 0x5b, 0xd3, 0xec, 0xbe, 0x91, 0xbc, 0xee, 0xf2, 0xff, 0x70, 0x50, 0x7b, - 0x90, 0x92, 0x21, 0x16, 0x38, 0x07, 0x05, 0x42, 0xba, 0xdb, 0xa8, 0x45, 0x53, 0x32, 0x06, 0x86, - 0xd3, 0x29, 0xd8, 0x63, 0x5e, 0x4f, 0x10, 0x4d, 0xc9, 0x91, 0xf5, 0xb8, 0x47, 0x68, 0x9b, 0xb2, - 0x94, 0x17, 0x2c, 0x1b, 0x53, 0x7d, 0x55, 0xc7, 0x4a, 0x60, 0x26, 0xcf, 0x40, 0xc8, 0x79, 0x50, - 0xc3, 0x04, 0x3d, 0xad, 0x30, 0x73, 0xa1, 0x4f, 0x6a, 0xa8, 0x4e, 0x73, 0x8c, 0x7a, 0xbc, 0x50, - 0xcb, 0xf3, 0xac, 0x98, 0x3c, 0xcf, 0x6a, 0xee, 0xad, 0x89, 0xfc, 0x1f, 0x51, 0xe7, 0x18, 0x18, - 0x48, 0x2a, 0x63, 0xce, 0x14, 0x30, 0xe5, 0x7e, 0x8d, 0xb4, 0xde, 0xf1, 0x4c, 0x17, 0x25, 0xab, - 0xd3, 0xdb, 0x0d, 0x96, 0x7f, 0xef, 0x83, 0x85, 0x2e, 0x24, 0x1b, 0xb4, 0x32, 0xe5, 0xe1, 0x9f, - 0x8d, 0xbf, 0xae, 0x3d, 0xe7, 0xd5, 0xb5, 0xe7, 0xfc, 0x7b, 0xed, 0x39, 0xbf, 0xdc, 0x78, 0xf7, - 0x5e, 0xdd, 0x78, 0xf7, 0xfe, 0xb9, 0xf1, 0xee, 0x21, 0x9f, 0xf0, 0xfc, 0x8e, 0xbc, 0x87, 0xfa, - 0x1b, 0x3d, 0xd4, 0x13, 0x33, 0x74, 0x7e, 0x18, 0x4d, 0xa8, 0x3a, 0x2f, 0x52, 0x0d, 0x85, 0x52, - 0x97, 0x3b, 0x81, 0x29, 0x2f, 0x61, 0xb7, 0x04, 0xa6, 0x0a, 0x01, 0x32, 0xa4, 0xfa, 0x2c, 0xcd, - 0x67, 0x47, 0x81, 0x54, 0x61, 0xf9, 0x69, 0x68, 0x8c, 0x70, 0xf9, 0xbf, 0xda, 0x67, 0x34, 0x25, - 0x65, 0xf4, 0x6b, 0xa3, 0x39, 0x8c, 0xe3, 0xc1, 0x6f, 0x0d, 0x6f, 0x58, 0x2b, 0x8a, 0xb5, 0xa2, - 0x78, 0xae, 0x68, 0x90, 0x92, 0xe0, 0x34, 0xfa, 0xfb, 0x16, 0x18, 0x69, 0x60, 0x34, 0x07, 0x46, - 0x83, 0x94, 0x8c, 0x4e, 0xa3, 0xeb, 0xc6, 0x87, 0xcb, 0x81, 0xd1, 0xf1, 0xf0, 0xf0, 0x1b, 0x50, - 0x38, 0xc3, 0x0a, 0xff, 0xd7, 0xf0, 0x6b, 0xb8, 0xdf, 0xd7, 0xb4, 0xfe, 0xad, 0xf0, 0x7e, 0x7f, - 0x90, 0x92, 0x7e, 0xff, 0x34, 0x4a, 0x57, 0xcd, 0x9d, 0xd9, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, - 0x44, 0xb8, 0xfa, 0xb0, 0x9f, 0x07, 0x00, 0x00, -} - -func (m *IbcRelay) Marshal() (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 *IbcRelay) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IbcRelay) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RawAction != nil { - { - size, err := m.RawAction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FungibleTokenPacketData) Marshal() (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 *FungibleTokenPacketData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FungibleTokenPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Memo) > 0 { - i -= len(m.Memo) - copy(dAtA[i:], m.Memo) - i = encodeVarintIbc(dAtA, i, uint64(len(m.Memo))) - i-- - dAtA[i] = 0x2a - } - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintIbc(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x22 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintIbc(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x1a - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintIbc(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintIbc(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Ics20Withdrawal) Marshal() (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 *Ics20Withdrawal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ics20Withdrawal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SourceChannel) > 0 { - i -= len(m.SourceChannel) - copy(dAtA[i:], m.SourceChannel) - i = encodeVarintIbc(dAtA, i, uint64(len(m.SourceChannel))) - i-- - dAtA[i] = 0x3a - } - if m.TimeoutTime != 0 { - i = encodeVarintIbc(dAtA, i, uint64(m.TimeoutTime)) - i-- - dAtA[i] = 0x30 - } - if m.TimeoutHeight != nil { - { - size, err := m.TimeoutHeight.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.ReturnAddress != nil { - { - size, err := m.ReturnAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.DestinationChainAddress) > 0 { - i -= len(m.DestinationChainAddress) - copy(dAtA[i:], m.DestinationChainAddress) - i = encodeVarintIbc(dAtA, i, uint64(len(m.DestinationChainAddress))) - i-- - dAtA[i] = 0x1a - } - if m.Denom != nil { - { - size, err := m.Denom.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClientData) Marshal() (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 *ClientData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClientData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProcessedHeight != 0 { - i = encodeVarintIbc(dAtA, i, uint64(m.ProcessedHeight)) - i-- - dAtA[i] = 0x20 - } - if len(m.ProcessedTime) > 0 { - i -= len(m.ProcessedTime) - copy(dAtA[i:], m.ProcessedTime) - i = encodeVarintIbc(dAtA, i, uint64(len(m.ProcessedTime))) - i-- - dAtA[i] = 0x1a - } - if m.ClientState != nil { - { - size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ClientId) > 0 { - i -= len(m.ClientId) - copy(dAtA[i:], m.ClientId) - i = encodeVarintIbc(dAtA, i, uint64(len(m.ClientId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClientCounter) Marshal() (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 *ClientCounter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClientCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Counter != 0 { - i = encodeVarintIbc(dAtA, i, uint64(m.Counter)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ConsensusState) Marshal() (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 *ConsensusState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ConsensusState != nil { - { - size, err := m.ConsensusState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VerifiedHeights) Marshal() (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 *VerifiedHeights) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerifiedHeights) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Heights) > 0 { - for iNdEx := len(m.Heights) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Heights[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ConnectionCounter) Marshal() (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 *ConnectionCounter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConnectionCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Counter != 0 { - i = encodeVarintIbc(dAtA, i, uint64(m.Counter)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ClientConnections) Marshal() (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 *ClientConnections) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClientConnections) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Connections) > 0 { - for iNdEx := len(m.Connections) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Connections[iNdEx]) - copy(dAtA[i:], m.Connections[iNdEx]) - i = encodeVarintIbc(dAtA, i, uint64(len(m.Connections[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *IbcParameters) Marshal() (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 *IbcParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IbcParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OutboundIcs20TransfersEnabled { - i-- - if m.OutboundIcs20TransfersEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.InboundIcs20TransfersEnabled { - i-- - if m.InboundIcs20TransfersEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.IbcEnabled { - i-- - if m.IbcEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IbcParams != nil { - { - size, err := m.IbcParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintIbc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintIbc(dAtA []byte, offset int, v uint64) int { - offset -= sovIbc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *IbcRelay) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RawAction != nil { - l = m.RawAction.Size() - n += 1 + l + sovIbc(uint64(l)) - } - return n -} - -func (m *FungibleTokenPacketData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - l = len(m.Memo) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - return n -} - -func (m *Ics20Withdrawal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovIbc(uint64(l)) - } - if m.Denom != nil { - l = m.Denom.Size() - n += 1 + l + sovIbc(uint64(l)) - } - l = len(m.DestinationChainAddress) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - if m.ReturnAddress != nil { - l = m.ReturnAddress.Size() - n += 1 + l + sovIbc(uint64(l)) - } - if m.TimeoutHeight != nil { - l = m.TimeoutHeight.Size() - n += 1 + l + sovIbc(uint64(l)) - } - if m.TimeoutTime != 0 { - n += 1 + sovIbc(uint64(m.TimeoutTime)) - } - l = len(m.SourceChannel) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - return n -} - -func (m *ClientData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - if m.ClientState != nil { - l = m.ClientState.Size() - n += 1 + l + sovIbc(uint64(l)) - } - l = len(m.ProcessedTime) - if l > 0 { - n += 1 + l + sovIbc(uint64(l)) - } - if m.ProcessedHeight != 0 { - n += 1 + sovIbc(uint64(m.ProcessedHeight)) - } - return n -} - -func (m *ClientCounter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Counter != 0 { - n += 1 + sovIbc(uint64(m.Counter)) - } - return n -} - -func (m *ConsensusState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConsensusState != nil { - l = m.ConsensusState.Size() - n += 1 + l + sovIbc(uint64(l)) - } - return n -} - -func (m *VerifiedHeights) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Heights) > 0 { - for _, e := range m.Heights { - l = e.Size() - n += 1 + l + sovIbc(uint64(l)) - } - } - return n -} - -func (m *ConnectionCounter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Counter != 0 { - n += 1 + sovIbc(uint64(m.Counter)) - } - return n -} - -func (m *ClientConnections) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Connections) > 0 { - for _, s := range m.Connections { - l = len(s) - n += 1 + l + sovIbc(uint64(l)) - } - } - return n -} - -func (m *IbcParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IbcEnabled { - n += 2 - } - if m.InboundIcs20TransfersEnabled { - n += 2 - } - if m.OutboundIcs20TransfersEnabled { - n += 2 - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IbcParams != nil { - l = m.IbcParams.Size() - n += 1 + l + sovIbc(uint64(l)) - } - return n -} - -func sovIbc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozIbc(x uint64) (n int) { - return sovIbc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IbcRelay) 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 ErrIntOverflowIbc - } - 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: IbcRelay: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IbcRelay: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RawAction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RawAction == nil { - m.RawAction = &types.Any{} - } - if err := m.RawAction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FungibleTokenPacketData) 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 ErrIntOverflowIbc - } - 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: FungibleTokenPacketData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FungibleTokenPacketData: 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 ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Memo = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Ics20Withdrawal) 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 ErrIntOverflowIbc - } - 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: Ics20Withdrawal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ics20Withdrawal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v1.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Denom == nil { - m.Denom = &v11.Denom{} - } - if err := m.Denom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChainAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationChainAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReturnAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReturnAddress == nil { - m.ReturnAddress = &v12.Address{} - } - if err := m.ReturnAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TimeoutHeight == nil { - m.TimeoutHeight = &types1.Height{} - } - if err := m.TimeoutHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTime", wireType) - } - m.TimeoutTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeoutTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourceChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientData) 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 ErrIntOverflowIbc - } - 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: ClientData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClientState == nil { - m.ClientState = &types.Any{} - } - if err := m.ClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessedTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcessedTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessedHeight", wireType) - } - m.ProcessedHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProcessedHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientCounter) 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 ErrIntOverflowIbc - } - 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: ClientCounter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientCounter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) - } - m.Counter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Counter |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsensusState) 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 ErrIntOverflowIbc - } - 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: ConsensusState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConsensusState == nil { - m.ConsensusState = &types.Any{} - } - if err := m.ConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerifiedHeights) 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 ErrIntOverflowIbc - } - 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: VerifiedHeights: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifiedHeights: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Heights", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Heights = append(m.Heights, &types1.Height{}) - if err := m.Heights[len(m.Heights)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConnectionCounter) 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 ErrIntOverflowIbc - } - 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: ConnectionCounter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConnectionCounter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) - } - m.Counter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Counter |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientConnections) 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 ErrIntOverflowIbc - } - 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: ClientConnections: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientConnections: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Connections", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Connections = append(m.Connections, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IbcParameters) 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 ErrIntOverflowIbc - } - 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: IbcParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IbcParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IbcEnabled = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InboundIcs20TransfersEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InboundIcs20TransfersEnabled = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OutboundIcs20TransfersEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.OutboundIcs20TransfersEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowIbc - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIbc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIbc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthIbc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IbcParams == nil { - m.IbcParams = &IbcParameters{} - } - if err := m.IbcParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIbc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIbc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIbc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIbc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIbc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIbc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthIbc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupIbc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthIbc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthIbc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIbc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupIbc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/sct/v1/sct.pb.go b/chain/penumbra/core/component/sct/v1/sct.pb.go deleted file mode 100644 index e118bc6d..00000000 --- a/chain/penumbra/core/component/sct/v1/sct.pb.go +++ /dev/null @@ -1,4597 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/sct/v1/sct.proto - -package sctv1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - types "github.com/cosmos/gogoproto/types" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/tct/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Configuration data for the SCT component. -type SctParameters struct { - // The default duration of each epoch, in number of blocks. - EpochDuration uint64 `protobuf:"varint,1,opt,name=epoch_duration,json=epochDuration,proto3" json:"epoch_duration,omitempty"` -} - -func (m *SctParameters) Reset() { *m = SctParameters{} } -func (m *SctParameters) String() string { return proto.CompactTextString(m) } -func (*SctParameters) ProtoMessage() {} -func (*SctParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{0} -} -func (m *SctParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SctParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SctParameters.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 *SctParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_SctParameters.Merge(m, src) -} -func (m *SctParameters) XXX_Size() int { - return m.Size() -} -func (m *SctParameters) XXX_DiscardUnknown() { - xxx_messageInfo_SctParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_SctParameters proto.InternalMessageInfo - -func (m *SctParameters) GetEpochDuration() uint64 { - if m != nil { - return m.EpochDuration - } - return 0 -} - -// Sct-specific genesis content. -type GenesisContent struct { - // The SctParameters present at genesis. - SctParams *SctParameters `protobuf:"bytes,1,opt,name=sct_params,json=sctParams,proto3" json:"sct_params,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{1} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetSctParams() *SctParameters { - if m != nil { - return m.SctParams - } - return nil -} - -// An epoch is a sequentially numbered collection of contiguous blocks. -type Epoch struct { - // The unique index of the epoch. - Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - // The starting height for the epoch. - StartHeight uint64 `protobuf:"varint,2,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` -} - -func (m *Epoch) Reset() { *m = Epoch{} } -func (m *Epoch) String() string { return proto.CompactTextString(m) } -func (*Epoch) ProtoMessage() {} -func (*Epoch) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{2} -} -func (m *Epoch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Epoch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Epoch.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 *Epoch) XXX_Merge(src proto.Message) { - xxx_messageInfo_Epoch.Merge(m, src) -} -func (m *Epoch) XXX_Size() int { - return m.Size() -} -func (m *Epoch) XXX_DiscardUnknown() { - xxx_messageInfo_Epoch.DiscardUnknown(m) -} - -var xxx_messageInfo_Epoch proto.InternalMessageInfo - -func (m *Epoch) GetIndex() uint64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *Epoch) GetStartHeight() uint64 { - if m != nil { - return m.StartHeight - } - return 0 -} - -// Metadata describing the source of a commitment in the state commitment tree. -// -// This message allows clients to track provenance of state commitments, and to -// decide whether or not to download block data. -type CommitmentSource struct { - // Types that are valid to be assigned to Source: - // - // *CommitmentSource_Transaction_ - // *CommitmentSource_Ics_20Transfer - // *CommitmentSource_FundingStreamReward_ - // *CommitmentSource_CommunityPoolOutput_ - // *CommitmentSource_Genesis_ - Source isCommitmentSource_Source `protobuf_oneof:"source"` -} - -func (m *CommitmentSource) Reset() { *m = CommitmentSource{} } -func (m *CommitmentSource) String() string { return proto.CompactTextString(m) } -func (*CommitmentSource) ProtoMessage() {} -func (*CommitmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{3} -} -func (m *CommitmentSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitmentSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitmentSource.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 *CommitmentSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentSource.Merge(m, src) -} -func (m *CommitmentSource) XXX_Size() int { - return m.Size() -} -func (m *CommitmentSource) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentSource.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitmentSource proto.InternalMessageInfo - -type isCommitmentSource_Source interface { - isCommitmentSource_Source() - MarshalTo([]byte) (int, error) - Size() int -} - -type CommitmentSource_Transaction_ struct { - Transaction *CommitmentSource_Transaction `protobuf:"bytes,1,opt,name=transaction,proto3,oneof" json:"transaction,omitempty"` -} -type CommitmentSource_Ics_20Transfer struct { - Ics_20Transfer *CommitmentSource_Ics20Transfer `protobuf:"bytes,2,opt,name=ics_20_transfer,json=ics20Transfer,proto3,oneof" json:"ics_20_transfer,omitempty"` -} -type CommitmentSource_FundingStreamReward_ struct { - FundingStreamReward *CommitmentSource_FundingStreamReward `protobuf:"bytes,20,opt,name=funding_stream_reward,json=fundingStreamReward,proto3,oneof" json:"funding_stream_reward,omitempty"` -} -type CommitmentSource_CommunityPoolOutput_ struct { - CommunityPoolOutput *CommitmentSource_CommunityPoolOutput `protobuf:"bytes,30,opt,name=community_pool_output,json=communityPoolOutput,proto3,oneof" json:"community_pool_output,omitempty"` -} -type CommitmentSource_Genesis_ struct { - Genesis *CommitmentSource_Genesis `protobuf:"bytes,40,opt,name=genesis,proto3,oneof" json:"genesis,omitempty"` -} - -func (*CommitmentSource_Transaction_) isCommitmentSource_Source() {} -func (*CommitmentSource_Ics_20Transfer) isCommitmentSource_Source() {} -func (*CommitmentSource_FundingStreamReward_) isCommitmentSource_Source() {} -func (*CommitmentSource_CommunityPoolOutput_) isCommitmentSource_Source() {} -func (*CommitmentSource_Genesis_) isCommitmentSource_Source() {} - -func (m *CommitmentSource) GetSource() isCommitmentSource_Source { - if m != nil { - return m.Source - } - return nil -} - -func (m *CommitmentSource) GetTransaction() *CommitmentSource_Transaction { - if x, ok := m.GetSource().(*CommitmentSource_Transaction_); ok { - return x.Transaction - } - return nil -} - -func (m *CommitmentSource) GetIcs_20Transfer() *CommitmentSource_Ics20Transfer { - if x, ok := m.GetSource().(*CommitmentSource_Ics_20Transfer); ok { - return x.Ics_20Transfer - } - return nil -} - -func (m *CommitmentSource) GetFundingStreamReward() *CommitmentSource_FundingStreamReward { - if x, ok := m.GetSource().(*CommitmentSource_FundingStreamReward_); ok { - return x.FundingStreamReward - } - return nil -} - -func (m *CommitmentSource) GetCommunityPoolOutput() *CommitmentSource_CommunityPoolOutput { - if x, ok := m.GetSource().(*CommitmentSource_CommunityPoolOutput_); ok { - return x.CommunityPoolOutput - } - return nil -} - -func (m *CommitmentSource) GetGenesis() *CommitmentSource_Genesis { - if x, ok := m.GetSource().(*CommitmentSource_Genesis_); ok { - return x.Genesis - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*CommitmentSource) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*CommitmentSource_Transaction_)(nil), - (*CommitmentSource_Ics_20Transfer)(nil), - (*CommitmentSource_FundingStreamReward_)(nil), - (*CommitmentSource_CommunityPoolOutput_)(nil), - (*CommitmentSource_Genesis_)(nil), - } -} - -// The state commitment was included in the genesis state. -type CommitmentSource_Genesis struct { -} - -func (m *CommitmentSource_Genesis) Reset() { *m = CommitmentSource_Genesis{} } -func (m *CommitmentSource_Genesis) String() string { return proto.CompactTextString(m) } -func (*CommitmentSource_Genesis) ProtoMessage() {} -func (*CommitmentSource_Genesis) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{3, 0} -} -func (m *CommitmentSource_Genesis) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitmentSource_Genesis) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitmentSource_Genesis.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 *CommitmentSource_Genesis) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentSource_Genesis.Merge(m, src) -} -func (m *CommitmentSource_Genesis) XXX_Size() int { - return m.Size() -} -func (m *CommitmentSource_Genesis) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentSource_Genesis.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitmentSource_Genesis proto.InternalMessageInfo - -// The commitment was created by a transaction. -// -// When included in a `CompactBlock` via a `StatePayload`, the transaction source is "dehydrated" -// by stripping the `id` field and putting empty bytes in its place. When clients perform extended -// transaction fetch, they should match up transaction hashes to "rehydrate" the source info. -type CommitmentSource_Transaction struct { - // The transaction ID, if specified. - // - // This field may be omitted to save space, and should not be required to be present. - // If the bytes are missing, the message should be interpreted as "Transaction (Unknown)". - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *CommitmentSource_Transaction) Reset() { *m = CommitmentSource_Transaction{} } -func (m *CommitmentSource_Transaction) String() string { return proto.CompactTextString(m) } -func (*CommitmentSource_Transaction) ProtoMessage() {} -func (*CommitmentSource_Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{3, 1} -} -func (m *CommitmentSource_Transaction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitmentSource_Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitmentSource_Transaction.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 *CommitmentSource_Transaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentSource_Transaction.Merge(m, src) -} -func (m *CommitmentSource_Transaction) XXX_Size() int { - return m.Size() -} -func (m *CommitmentSource_Transaction) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentSource_Transaction.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitmentSource_Transaction proto.InternalMessageInfo - -func (m *CommitmentSource_Transaction) GetId() []byte { - if m != nil { - return m.Id - } - return nil -} - -// The commitment was created through a validator's funding stream. -type CommitmentSource_FundingStreamReward struct { - // The epoch index the rewards were issued in. - EpochIndex uint64 `protobuf:"varint,1,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` -} - -func (m *CommitmentSource_FundingStreamReward) Reset() { *m = CommitmentSource_FundingStreamReward{} } -func (m *CommitmentSource_FundingStreamReward) String() string { return proto.CompactTextString(m) } -func (*CommitmentSource_FundingStreamReward) ProtoMessage() {} -func (*CommitmentSource_FundingStreamReward) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{3, 2} -} -func (m *CommitmentSource_FundingStreamReward) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitmentSource_FundingStreamReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitmentSource_FundingStreamReward.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 *CommitmentSource_FundingStreamReward) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentSource_FundingStreamReward.Merge(m, src) -} -func (m *CommitmentSource_FundingStreamReward) XXX_Size() int { - return m.Size() -} -func (m *CommitmentSource_FundingStreamReward) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentSource_FundingStreamReward.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitmentSource_FundingStreamReward proto.InternalMessageInfo - -func (m *CommitmentSource_FundingStreamReward) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -// The commitment was created through a `CommunityPoolOutput` in a governance-initated transaction. -type CommitmentSource_CommunityPoolOutput struct { -} - -func (m *CommitmentSource_CommunityPoolOutput) Reset() { *m = CommitmentSource_CommunityPoolOutput{} } -func (m *CommitmentSource_CommunityPoolOutput) String() string { return proto.CompactTextString(m) } -func (*CommitmentSource_CommunityPoolOutput) ProtoMessage() {} -func (*CommitmentSource_CommunityPoolOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{3, 3} -} -func (m *CommitmentSource_CommunityPoolOutput) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitmentSource_CommunityPoolOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitmentSource_CommunityPoolOutput.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 *CommitmentSource_CommunityPoolOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentSource_CommunityPoolOutput.Merge(m, src) -} -func (m *CommitmentSource_CommunityPoolOutput) XXX_Size() int { - return m.Size() -} -func (m *CommitmentSource_CommunityPoolOutput) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentSource_CommunityPoolOutput.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitmentSource_CommunityPoolOutput proto.InternalMessageInfo - -// The commitment was created by an inbound ICS20 transfer. -type CommitmentSource_Ics20Transfer struct { - // The sequence number of the packet that triggered the transfer - PacketSeq uint64 `protobuf:"varint,1,opt,name=packet_seq,json=packetSeq,proto3" json:"packet_seq,omitempty"` - // The channel id the transfer happened on - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - // The sender address on the counterparty chain - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` -} - -func (m *CommitmentSource_Ics20Transfer) Reset() { *m = CommitmentSource_Ics20Transfer{} } -func (m *CommitmentSource_Ics20Transfer) String() string { return proto.CompactTextString(m) } -func (*CommitmentSource_Ics20Transfer) ProtoMessage() {} -func (*CommitmentSource_Ics20Transfer) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{3, 4} -} -func (m *CommitmentSource_Ics20Transfer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitmentSource_Ics20Transfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitmentSource_Ics20Transfer.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 *CommitmentSource_Ics20Transfer) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitmentSource_Ics20Transfer.Merge(m, src) -} -func (m *CommitmentSource_Ics20Transfer) XXX_Size() int { - return m.Size() -} -func (m *CommitmentSource_Ics20Transfer) XXX_DiscardUnknown() { - xxx_messageInfo_CommitmentSource_Ics20Transfer.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitmentSource_Ics20Transfer proto.InternalMessageInfo - -func (m *CommitmentSource_Ics20Transfer) GetPacketSeq() uint64 { - if m != nil { - return m.PacketSeq - } - return 0 -} - -func (m *CommitmentSource_Ics20Transfer) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *CommitmentSource_Ics20Transfer) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -type Nullifier struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *Nullifier) Reset() { *m = Nullifier{} } -func (m *Nullifier) String() string { return proto.CompactTextString(m) } -func (*Nullifier) ProtoMessage() {} -func (*Nullifier) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{4} -} -func (m *Nullifier) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Nullifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Nullifier.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 *Nullifier) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nullifier.Merge(m, src) -} -func (m *Nullifier) XXX_Size() int { - return m.Size() -} -func (m *Nullifier) XXX_DiscardUnknown() { - xxx_messageInfo_Nullifier.DiscardUnknown(m) -} - -var xxx_messageInfo_Nullifier proto.InternalMessageInfo - -func (m *Nullifier) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// Records information about what transaction spent a nullifier. -type NullificationInfo struct { - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SpendHeight uint64 `protobuf:"varint,2,opt,name=spend_height,json=spendHeight,proto3" json:"spend_height,omitempty"` -} - -func (m *NullificationInfo) Reset() { *m = NullificationInfo{} } -func (m *NullificationInfo) String() string { return proto.CompactTextString(m) } -func (*NullificationInfo) ProtoMessage() {} -func (*NullificationInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{5} -} -func (m *NullificationInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NullificationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NullificationInfo.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 *NullificationInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_NullificationInfo.Merge(m, src) -} -func (m *NullificationInfo) XXX_Size() int { - return m.Size() -} -func (m *NullificationInfo) XXX_DiscardUnknown() { - xxx_messageInfo_NullificationInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_NullificationInfo proto.InternalMessageInfo - -func (m *NullificationInfo) GetId() []byte { - if m != nil { - return m.Id - } - return nil -} - -func (m *NullificationInfo) GetSpendHeight() uint64 { - if m != nil { - return m.SpendHeight - } - return 0 -} - -// Event recording a new commitment added to the SCT. -type EventCommitment struct { - Commitment *v1.StateCommitment `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` - Position uint64 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"` - Source *CommitmentSource `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` -} - -func (m *EventCommitment) Reset() { *m = EventCommitment{} } -func (m *EventCommitment) String() string { return proto.CompactTextString(m) } -func (*EventCommitment) ProtoMessage() {} -func (*EventCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{6} -} -func (m *EventCommitment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventCommitment.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 *EventCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventCommitment.Merge(m, src) -} -func (m *EventCommitment) XXX_Size() int { - return m.Size() -} -func (m *EventCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_EventCommitment.DiscardUnknown(m) -} - -var xxx_messageInfo_EventCommitment proto.InternalMessageInfo - -func (m *EventCommitment) GetCommitment() *v1.StateCommitment { - if m != nil { - return m.Commitment - } - return nil -} - -func (m *EventCommitment) GetPosition() uint64 { - if m != nil { - return m.Position - } - return 0 -} - -func (m *EventCommitment) GetSource() *CommitmentSource { - if m != nil { - return m.Source - } - return nil -} - -// Event recording an SCT anchor (global root). -type EventAnchor struct { - Anchor *v1.MerkleRoot `protobuf:"bytes,1,opt,name=anchor,proto3" json:"anchor,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *EventAnchor) Reset() { *m = EventAnchor{} } -func (m *EventAnchor) String() string { return proto.CompactTextString(m) } -func (*EventAnchor) ProtoMessage() {} -func (*EventAnchor) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{7} -} -func (m *EventAnchor) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAnchor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAnchor.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 *EventAnchor) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAnchor.Merge(m, src) -} -func (m *EventAnchor) XXX_Size() int { - return m.Size() -} -func (m *EventAnchor) XXX_DiscardUnknown() { - xxx_messageInfo_EventAnchor.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAnchor proto.InternalMessageInfo - -func (m *EventAnchor) GetAnchor() *v1.MerkleRoot { - if m != nil { - return m.Anchor - } - return nil -} - -func (m *EventAnchor) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -// Event recording an SCT epoch root. -type EventEpochRoot struct { - Root *v1.MerkleRoot `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` - Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` -} - -func (m *EventEpochRoot) Reset() { *m = EventEpochRoot{} } -func (m *EventEpochRoot) String() string { return proto.CompactTextString(m) } -func (*EventEpochRoot) ProtoMessage() {} -func (*EventEpochRoot) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{8} -} -func (m *EventEpochRoot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventEpochRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventEpochRoot.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 *EventEpochRoot) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventEpochRoot.Merge(m, src) -} -func (m *EventEpochRoot) XXX_Size() int { - return m.Size() -} -func (m *EventEpochRoot) XXX_DiscardUnknown() { - xxx_messageInfo_EventEpochRoot.DiscardUnknown(m) -} - -var xxx_messageInfo_EventEpochRoot proto.InternalMessageInfo - -func (m *EventEpochRoot) GetRoot() *v1.MerkleRoot { - if m != nil { - return m.Root - } - return nil -} - -func (m *EventEpochRoot) GetIndex() uint64 { - if m != nil { - return m.Index - } - return 0 -} - -// Event recording an SCT block root. -type EventBlockRoot struct { - Root *v1.MerkleRoot `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *EventBlockRoot) Reset() { *m = EventBlockRoot{} } -func (m *EventBlockRoot) String() string { return proto.CompactTextString(m) } -func (*EventBlockRoot) ProtoMessage() {} -func (*EventBlockRoot) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{9} -} -func (m *EventBlockRoot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBlockRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBlockRoot.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 *EventBlockRoot) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBlockRoot.Merge(m, src) -} -func (m *EventBlockRoot) XXX_Size() int { - return m.Size() -} -func (m *EventBlockRoot) XXX_DiscardUnknown() { - xxx_messageInfo_EventBlockRoot.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBlockRoot proto.InternalMessageInfo - -func (m *EventBlockRoot) GetRoot() *v1.MerkleRoot { - if m != nil { - return m.Root - } - return nil -} - -func (m *EventBlockRoot) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type EpochByHeightRequest struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *EpochByHeightRequest) Reset() { *m = EpochByHeightRequest{} } -func (m *EpochByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*EpochByHeightRequest) ProtoMessage() {} -func (*EpochByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{10} -} -func (m *EpochByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EpochByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EpochByHeightRequest.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 *EpochByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochByHeightRequest.Merge(m, src) -} -func (m *EpochByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *EpochByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EpochByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EpochByHeightRequest proto.InternalMessageInfo - -func (m *EpochByHeightRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type EpochByHeightResponse struct { - Epoch *Epoch `protobuf:"bytes,1,opt,name=epoch,proto3" json:"epoch,omitempty"` -} - -func (m *EpochByHeightResponse) Reset() { *m = EpochByHeightResponse{} } -func (m *EpochByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*EpochByHeightResponse) ProtoMessage() {} -func (*EpochByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{11} -} -func (m *EpochByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EpochByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EpochByHeightResponse.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 *EpochByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochByHeightResponse.Merge(m, src) -} -func (m *EpochByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *EpochByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EpochByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EpochByHeightResponse proto.InternalMessageInfo - -func (m *EpochByHeightResponse) GetEpoch() *Epoch { - if m != nil { - return m.Epoch - } - return nil -} - -type AnchorByHeightRequest struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *AnchorByHeightRequest) Reset() { *m = AnchorByHeightRequest{} } -func (m *AnchorByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*AnchorByHeightRequest) ProtoMessage() {} -func (*AnchorByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{12} -} -func (m *AnchorByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AnchorByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AnchorByHeightRequest.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 *AnchorByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AnchorByHeightRequest.Merge(m, src) -} -func (m *AnchorByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *AnchorByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AnchorByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AnchorByHeightRequest proto.InternalMessageInfo - -func (m *AnchorByHeightRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type AnchorByHeightResponse struct { - Anchor *v1.MerkleRoot `protobuf:"bytes,1,opt,name=anchor,proto3" json:"anchor,omitempty"` -} - -func (m *AnchorByHeightResponse) Reset() { *m = AnchorByHeightResponse{} } -func (m *AnchorByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*AnchorByHeightResponse) ProtoMessage() {} -func (*AnchorByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{13} -} -func (m *AnchorByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AnchorByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AnchorByHeightResponse.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 *AnchorByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AnchorByHeightResponse.Merge(m, src) -} -func (m *AnchorByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *AnchorByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AnchorByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AnchorByHeightResponse proto.InternalMessageInfo - -func (m *AnchorByHeightResponse) GetAnchor() *v1.MerkleRoot { - if m != nil { - return m.Anchor - } - return nil -} - -type TimestampByHeightRequest struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *TimestampByHeightRequest) Reset() { *m = TimestampByHeightRequest{} } -func (m *TimestampByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*TimestampByHeightRequest) ProtoMessage() {} -func (*TimestampByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{14} -} -func (m *TimestampByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimestampByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimestampByHeightRequest.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 *TimestampByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimestampByHeightRequest.Merge(m, src) -} -func (m *TimestampByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *TimestampByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TimestampByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TimestampByHeightRequest proto.InternalMessageInfo - -func (m *TimestampByHeightRequest) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -type TimestampByHeightResponse struct { - Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` -} - -func (m *TimestampByHeightResponse) Reset() { *m = TimestampByHeightResponse{} } -func (m *TimestampByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*TimestampByHeightResponse) ProtoMessage() {} -func (*TimestampByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_85f1e312317b2642, []int{15} -} -func (m *TimestampByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimestampByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TimestampByHeightResponse.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 *TimestampByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimestampByHeightResponse.Merge(m, src) -} -func (m *TimestampByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *TimestampByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TimestampByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TimestampByHeightResponse proto.InternalMessageInfo - -func (m *TimestampByHeightResponse) GetTimestamp() *types.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func init() { - proto.RegisterType((*SctParameters)(nil), "penumbra.core.component.sct.v1.SctParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.sct.v1.GenesisContent") - proto.RegisterType((*Epoch)(nil), "penumbra.core.component.sct.v1.Epoch") - proto.RegisterType((*CommitmentSource)(nil), "penumbra.core.component.sct.v1.CommitmentSource") - proto.RegisterType((*CommitmentSource_Genesis)(nil), "penumbra.core.component.sct.v1.CommitmentSource.Genesis") - proto.RegisterType((*CommitmentSource_Transaction)(nil), "penumbra.core.component.sct.v1.CommitmentSource.Transaction") - proto.RegisterType((*CommitmentSource_FundingStreamReward)(nil), "penumbra.core.component.sct.v1.CommitmentSource.FundingStreamReward") - proto.RegisterType((*CommitmentSource_CommunityPoolOutput)(nil), "penumbra.core.component.sct.v1.CommitmentSource.CommunityPoolOutput") - proto.RegisterType((*CommitmentSource_Ics20Transfer)(nil), "penumbra.core.component.sct.v1.CommitmentSource.Ics20Transfer") - proto.RegisterType((*Nullifier)(nil), "penumbra.core.component.sct.v1.Nullifier") - proto.RegisterType((*NullificationInfo)(nil), "penumbra.core.component.sct.v1.NullificationInfo") - proto.RegisterType((*EventCommitment)(nil), "penumbra.core.component.sct.v1.EventCommitment") - proto.RegisterType((*EventAnchor)(nil), "penumbra.core.component.sct.v1.EventAnchor") - proto.RegisterType((*EventEpochRoot)(nil), "penumbra.core.component.sct.v1.EventEpochRoot") - proto.RegisterType((*EventBlockRoot)(nil), "penumbra.core.component.sct.v1.EventBlockRoot") - proto.RegisterType((*EpochByHeightRequest)(nil), "penumbra.core.component.sct.v1.EpochByHeightRequest") - proto.RegisterType((*EpochByHeightResponse)(nil), "penumbra.core.component.sct.v1.EpochByHeightResponse") - proto.RegisterType((*AnchorByHeightRequest)(nil), "penumbra.core.component.sct.v1.AnchorByHeightRequest") - proto.RegisterType((*AnchorByHeightResponse)(nil), "penumbra.core.component.sct.v1.AnchorByHeightResponse") - proto.RegisterType((*TimestampByHeightRequest)(nil), "penumbra.core.component.sct.v1.TimestampByHeightRequest") - proto.RegisterType((*TimestampByHeightResponse)(nil), "penumbra.core.component.sct.v1.TimestampByHeightResponse") -} - -func init() { - proto.RegisterFile("penumbra/core/component/sct/v1/sct.proto", fileDescriptor_85f1e312317b2642) -} - -var fileDescriptor_85f1e312317b2642 = []byte{ - // 1066 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xb6, 0xdd, 0x24, 0x8d, 0x9f, 0x93, 0x94, 0x4e, 0x92, 0xca, 0x58, 0xaa, 0xdb, 0xae, 0x54, - 0x11, 0x21, 0x75, 0x37, 0x36, 0x34, 0x0a, 0x2e, 0x42, 0x60, 0xb7, 0x8d, 0x23, 0x51, 0x30, 0xeb, - 0x90, 0x03, 0xb2, 0x70, 0x37, 0xe3, 0xb1, 0xbd, 0x8a, 0x77, 0x66, 0x33, 0x33, 0x6b, 0x08, 0x42, - 0xe2, 0xca, 0x91, 0x13, 0xe2, 0xcc, 0x91, 0xbf, 0x02, 0x6e, 0x88, 0x53, 0x8f, 0x1c, 0x51, 0x72, - 0xe3, 0xaf, 0xa8, 0x66, 0x76, 0xfc, 0x33, 0x3f, 0xdd, 0x5e, 0xe2, 0xbc, 0xb7, 0xdf, 0xfb, 0xde, - 0xf7, 0xde, 0x9b, 0x37, 0xbb, 0xb0, 0x11, 0x12, 0x1a, 0x05, 0x07, 0xdc, 0x73, 0x30, 0xe3, 0xc4, - 0xc1, 0x2c, 0x08, 0x19, 0x25, 0x54, 0x3a, 0x02, 0x4b, 0xa7, 0x5f, 0x50, 0x3f, 0x76, 0xc8, 0x99, - 0x64, 0x28, 0x3f, 0x40, 0xda, 0x0a, 0x69, 0x0f, 0x91, 0xb6, 0x82, 0xf4, 0x0b, 0xb9, 0xfb, 0x23, - 0x26, 0x7e, 0x1c, 0x4a, 0xe6, 0xc8, 0x98, 0x41, 0x0e, 0x18, 0x72, 0xf7, 0x3a, 0x8c, 0x75, 0x7a, - 0xc4, 0xd1, 0xd6, 0x41, 0xd4, 0x76, 0xa4, 0x1f, 0x10, 0x21, 0xbd, 0x20, 0x8c, 0x01, 0xd6, 0x16, - 0x2c, 0xd7, 0xb1, 0xac, 0x79, 0xdc, 0x0b, 0x88, 0x24, 0x5c, 0xa0, 0x87, 0xb0, 0x42, 0x42, 0x86, - 0xbb, 0xcd, 0x56, 0xc4, 0x3d, 0xe9, 0x33, 0x9a, 0x4d, 0xde, 0x4f, 0x6e, 0xcc, 0xb9, 0xcb, 0xda, - 0xfb, 0xd4, 0x38, 0xad, 0x6f, 0x61, 0x65, 0x87, 0x50, 0x22, 0x7c, 0x51, 0x61, 0x54, 0x12, 0x2a, - 0xd1, 0xe7, 0x00, 0x02, 0xcb, 0x66, 0xa8, 0xa8, 0x84, 0x0e, 0xca, 0x14, 0x1f, 0xd9, 0x97, 0x57, - 0x60, 0x4f, 0xe4, 0x76, 0xd3, 0xc2, 0x98, 0xc2, 0xfa, 0x14, 0xe6, 0x9f, 0xa9, 0x84, 0x68, 0x0d, - 0xe6, 0x7d, 0xda, 0x22, 0xdf, 0x1b, 0x19, 0xb1, 0x81, 0x1e, 0xc0, 0x92, 0x90, 0x1e, 0x97, 0xcd, - 0x2e, 0xf1, 0x3b, 0x5d, 0x99, 0x4d, 0xe9, 0x87, 0x19, 0xed, 0xab, 0x6a, 0x97, 0xf5, 0xeb, 0x02, - 0xbc, 0x53, 0x61, 0x41, 0xe0, 0xcb, 0x80, 0x50, 0x59, 0x67, 0x11, 0xc7, 0x04, 0xbd, 0x84, 0x8c, - 0xe4, 0x1e, 0x15, 0x1e, 0x1e, 0x96, 0x96, 0x29, 0x7e, 0x7c, 0x95, 0xca, 0x69, 0x1a, 0x7b, 0x6f, - 0xc4, 0x51, 0x4d, 0xb8, 0xe3, 0x94, 0xa8, 0x0b, 0xb7, 0x7c, 0x2c, 0x9a, 0xc5, 0xcd, 0xa6, 0xf6, - 0xb6, 0x09, 0xd7, 0xe2, 0x32, 0xc5, 0x4f, 0x66, 0xce, 0xb2, 0x8b, 0x45, 0x71, 0x73, 0xcf, 0xb0, - 0x54, 0x13, 0xee, 0xb2, 0x3f, 0xee, 0x40, 0x3f, 0xc0, 0x7a, 0x3b, 0xa2, 0x2d, 0x9f, 0x76, 0x9a, - 0x42, 0x72, 0xe2, 0x05, 0x4d, 0x4e, 0xbe, 0xf3, 0x78, 0x2b, 0xbb, 0xa6, 0xf3, 0x3d, 0x9d, 0x39, - 0xdf, 0xf3, 0x98, 0xad, 0xae, 0xc9, 0x5c, 0xcd, 0x55, 0x4d, 0xb8, 0xab, 0xed, 0xb3, 0x6e, 0x95, - 0x1b, 0xb3, 0x20, 0x88, 0xa8, 0x2f, 0x8f, 0x9b, 0x21, 0x63, 0xbd, 0x26, 0x8b, 0x64, 0x18, 0xc9, - 0x6c, 0xfe, 0x0d, 0x73, 0x57, 0x06, 0x6c, 0x35, 0xc6, 0x7a, 0x5f, 0x6a, 0x2e, 0x95, 0x1b, 0x9f, - 0x75, 0xa3, 0x3d, 0xb8, 0xd9, 0x89, 0x8f, 0x5e, 0x76, 0x43, 0x67, 0xdb, 0x9e, 0x39, 0x9b, 0x39, - 0xba, 0xd5, 0x84, 0x3b, 0xa0, 0xca, 0xa5, 0xe1, 0xa6, 0xf1, 0xe6, 0xee, 0x42, 0x66, 0x6c, 0xc0, - 0x68, 0x05, 0x52, 0x7e, 0x4b, 0x1f, 0x95, 0x25, 0x37, 0xe5, 0xb7, 0x72, 0x5b, 0xb0, 0x7a, 0x4e, - 0xa7, 0xd0, 0x3d, 0xc8, 0xc4, 0x8b, 0x33, 0x7e, 0x5c, 0x41, 0xbb, 0x76, 0x95, 0x27, 0xb7, 0x0e, - 0xab, 0xe7, 0x54, 0x99, 0x23, 0xb0, 0x3c, 0x31, 0x68, 0x74, 0x17, 0x20, 0xf4, 0xf0, 0x21, 0x91, - 0x4d, 0x41, 0x8e, 0x0c, 0x4f, 0x3a, 0xf6, 0xd4, 0xc9, 0x91, 0x7a, 0x8c, 0xbb, 0x1e, 0xa5, 0xa4, - 0xd7, 0xf4, 0x5b, 0xfa, 0x6c, 0xa5, 0xdd, 0xb4, 0xf1, 0xec, 0xb6, 0xd0, 0x1d, 0x58, 0x10, 0x84, - 0xb6, 0x08, 0xcf, 0xde, 0xd0, 0x8f, 0x8c, 0x55, 0x5e, 0x84, 0x05, 0xa1, 0x8b, 0xb7, 0x1e, 0x40, - 0xfa, 0x8b, 0xa8, 0xd7, 0xf3, 0xdb, 0x3e, 0xe1, 0xf1, 0x7a, 0x51, 0xc2, 0x4d, 0x7d, 0xb1, 0x61, - 0x3d, 0x87, 0xdb, 0x06, 0x82, 0xf5, 0xba, 0xef, 0xd2, 0x36, 0x9b, 0xee, 0x83, 0xde, 0xc1, 0x90, - 0xd0, 0xd6, 0xf4, 0x0e, 0x2a, 0x9f, 0xd9, 0xc1, 0x3f, 0x93, 0x70, 0xeb, 0x59, 0x9f, 0x50, 0x39, - 0x9a, 0x00, 0xda, 0x01, 0xc0, 0x43, 0xcb, 0x6c, 0xe0, 0x7b, 0x63, 0x13, 0xd4, 0x37, 0x99, 0x2d, - 0xcd, 0xfd, 0x20, 0x3d, 0x49, 0x46, 0xc1, 0xee, 0x58, 0x28, 0xca, 0xc1, 0x62, 0xc8, 0x84, 0xaf, - 0x17, 0x39, 0xce, 0x3d, 0xb4, 0x51, 0x75, 0x50, 0xad, 0xee, 0x42, 0xa6, 0xb8, 0x39, 0xeb, 0x11, - 0x71, 0x07, 0xdd, 0xf2, 0x20, 0xa3, 0x2b, 0xf8, 0x8c, 0xe2, 0x2e, 0xe3, 0xa8, 0x04, 0x0b, 0x9e, - 0xfe, 0xcf, 0x28, 0xb7, 0x2e, 0x52, 0xfe, 0x82, 0xf0, 0xc3, 0x1e, 0x71, 0x19, 0x93, 0xae, 0x89, - 0x50, 0xa3, 0x99, 0x68, 0x95, 0xb1, 0xd4, 0x5d, 0xaa, 0x53, 0xe8, 0x0b, 0x4f, 0x45, 0xa0, 0x2d, - 0x98, 0xe3, 0x8c, 0xc9, 0x19, 0x72, 0x68, 0xfc, 0xe8, 0xb2, 0x4c, 0x8d, 0x5d, 0x96, 0xd6, 0x4b, - 0xc3, 0x5f, 0xee, 0x31, 0x7c, 0xf8, 0x56, 0xfc, 0x17, 0x55, 0x60, 0xc3, 0x9a, 0x16, 0x5f, 0x3e, - 0x8e, 0x07, 0xef, 0x92, 0xa3, 0x88, 0x88, 0x71, 0x7c, 0x72, 0x02, 0xbf, 0x07, 0xeb, 0x53, 0x78, - 0x11, 0x32, 0x2a, 0x08, 0x7a, 0x02, 0xf3, 0x7a, 0x63, 0x8c, 0xb2, 0x87, 0x57, 0x8d, 0x2d, 0x6e, - 0x59, 0x1c, 0x63, 0x39, 0xb0, 0x1e, 0x4f, 0xe9, 0xfa, 0x32, 0xee, 0x4c, 0x07, 0x18, 0x1d, 0x6f, - 0x31, 0x66, 0xab, 0x08, 0xd9, 0xbd, 0xc1, 0x5b, 0xf6, 0xba, 0x4a, 0xbe, 0x86, 0x77, 0xcf, 0x89, - 0x31, 0x62, 0xb6, 0x21, 0x3d, 0x7c, 0x6d, 0x1b, 0x3d, 0x39, 0x3b, 0x7e, 0xb1, 0xdb, 0x83, 0x17, - 0xbb, 0x3d, 0x0c, 0x77, 0x47, 0xe0, 0xe2, 0x6f, 0x37, 0x60, 0xe9, 0xab, 0x88, 0xf0, 0xe3, 0x3a, - 0xe1, 0x7d, 0x1f, 0x13, 0xf4, 0x13, 0xac, 0x4c, 0x56, 0x8c, 0x1e, 0x5f, 0xd5, 0xe2, 0x73, 0x5b, - 0x9a, 0xdb, 0x9a, 0x35, 0xcc, 0xd4, 0xf2, 0x23, 0x2c, 0x4f, 0x4c, 0x1e, 0x7d, 0x78, 0xad, 0x11, - 0x4f, 0xa7, 0x7f, 0x3c, 0x63, 0x94, 0xc9, 0xfe, 0x73, 0x12, 0x6e, 0x9f, 0xe9, 0x33, 0xba, 0xf2, - 0xfd, 0x71, 0xd1, 0x38, 0x73, 0x1f, 0xbd, 0x41, 0x64, 0x2c, 0xa5, 0xfc, 0x57, 0xea, 0xef, 0x93, - 0x7c, 0xf2, 0xd5, 0x49, 0x3e, 0xf9, 0xdf, 0x49, 0x3e, 0xf9, 0xcb, 0x69, 0x3e, 0xf1, 0xea, 0x34, - 0x9f, 0xf8, 0xf7, 0x34, 0x9f, 0x00, 0x0b, 0xb3, 0xe0, 0x0a, 0xe2, 0xf2, 0xa2, 0xfa, 0x72, 0x52, - 0xb3, 0xaf, 0x25, 0xbf, 0x69, 0x74, 0x7c, 0xd9, 0x8d, 0x0e, 0x14, 0xc8, 0x11, 0xea, 0xab, 0xa3, - 0x43, 0x7a, 0xac, 0x4f, 0x1e, 0xa9, 0x9d, 0x8f, 0x38, 0x11, 0x8e, 0x4f, 0x25, 0xe1, 0xb8, 0xeb, - 0xa9, 0x5f, 0x21, 0x9d, 0xfe, 0xb6, 0xa3, 0x0d, 0xe7, 0xf2, 0x0f, 0xd1, 0x27, 0x02, 0xcb, 0x7e, - 0xe1, 0xf7, 0xd4, 0x5c, 0xad, 0x52, 0xa9, 0xff, 0x91, 0xca, 0xd7, 0x06, 0x8a, 0x2a, 0x4a, 0x51, - 0x65, 0xa8, 0xa8, 0x8e, 0xa5, 0xbd, 0x5f, 0xf8, 0x67, 0x04, 0x68, 0x28, 0x40, 0x63, 0x08, 0x68, - 0xd4, 0xb1, 0x6c, 0xec, 0x17, 0x4e, 0x52, 0xef, 0x5f, 0x0e, 0x68, 0xec, 0xd4, 0xca, 0x2f, 0x88, - 0xf4, 0x5a, 0x9e, 0xf4, 0xfe, 0x4f, 0x59, 0x03, 0x70, 0xa9, 0xa4, 0xd0, 0xea, 0xaf, 0x81, 0x97, - 0x4a, 0x75, 0x2c, 0x4b, 0xa5, 0xfd, 0xc2, 0xc1, 0x82, 0x3e, 0xfd, 0x1f, 0xbc, 0x0e, 0x00, 0x00, - 0xff, 0xff, 0x74, 0xb4, 0xc5, 0x48, 0x52, 0x0b, 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - AnchorByHeight(ctx context.Context, in *AnchorByHeightRequest, opts ...grpc.CallOption) (*AnchorByHeightResponse, error) - EpochByHeight(ctx context.Context, in *EpochByHeightRequest, opts ...grpc.CallOption) (*EpochByHeightResponse, error) - TimestampByHeight(ctx context.Context, in *TimestampByHeightRequest, opts ...grpc.CallOption) (*TimestampByHeightResponse, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) AnchorByHeight(ctx context.Context, in *AnchorByHeightRequest, opts ...grpc.CallOption) (*AnchorByHeightResponse, error) { - out := new(AnchorByHeightResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.sct.v1.QueryService/AnchorByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) EpochByHeight(ctx context.Context, in *EpochByHeightRequest, opts ...grpc.CallOption) (*EpochByHeightResponse, error) { - out := new(EpochByHeightResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.sct.v1.QueryService/EpochByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) TimestampByHeight(ctx context.Context, in *TimestampByHeightRequest, opts ...grpc.CallOption) (*TimestampByHeightResponse, error) { - out := new(TimestampByHeightResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.sct.v1.QueryService/TimestampByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - AnchorByHeight(context.Context, *AnchorByHeightRequest) (*AnchorByHeightResponse, error) - EpochByHeight(context.Context, *EpochByHeightRequest) (*EpochByHeightResponse, error) - TimestampByHeight(context.Context, *TimestampByHeightRequest) (*TimestampByHeightResponse, error) -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) AnchorByHeight(ctx context.Context, req *AnchorByHeightRequest) (*AnchorByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AnchorByHeight not implemented") -} -func (*UnimplementedQueryServiceServer) EpochByHeight(ctx context.Context, req *EpochByHeightRequest) (*EpochByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochByHeight not implemented") -} -func (*UnimplementedQueryServiceServer) TimestampByHeight(ctx context.Context, req *TimestampByHeightRequest) (*TimestampByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TimestampByHeight not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_AnchorByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AnchorByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).AnchorByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.sct.v1.QueryService/AnchorByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).AnchorByHeight(ctx, req.(*AnchorByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_EpochByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EpochByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).EpochByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.sct.v1.QueryService/EpochByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).EpochByHeight(ctx, req.(*EpochByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_TimestampByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TimestampByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).TimestampByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.sct.v1.QueryService/TimestampByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).TimestampByHeight(ctx, req.(*TimestampByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.sct.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AnchorByHeight", - Handler: _QueryService_AnchorByHeight_Handler, - }, - { - MethodName: "EpochByHeight", - Handler: _QueryService_EpochByHeight_Handler, - }, - { - MethodName: "TimestampByHeight", - Handler: _QueryService_TimestampByHeight_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "penumbra/core/component/sct/v1/sct.proto", -} - -func (m *SctParameters) Marshal() (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 *SctParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SctParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochDuration != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.EpochDuration)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SctParams != nil { - { - size, err := m.SctParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Epoch) Marshal() (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 *Epoch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Epoch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StartHeight != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x10 - } - if m.Index != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CommitmentSource) Marshal() (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 *CommitmentSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Source != nil { - { - size := m.Source.Size() - i -= size - if _, err := m.Source.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *CommitmentSource_Transaction_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_Transaction_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Transaction != nil { - { - size, err := m.Transaction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *CommitmentSource_Ics_20Transfer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_Ics_20Transfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Ics_20Transfer != nil { - { - size, err := m.Ics_20Transfer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *CommitmentSource_FundingStreamReward_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_FundingStreamReward_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.FundingStreamReward != nil { - { - size, err := m.FundingStreamReward.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *CommitmentSource_CommunityPoolOutput_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_CommunityPoolOutput_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolOutput != nil { - { - size, err := m.CommunityPoolOutput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - return len(dAtA) - i, nil -} -func (m *CommitmentSource_Genesis_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_Genesis_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Genesis != nil { - { - size, err := m.Genesis.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *CommitmentSource_Genesis) Marshal() (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 *CommitmentSource_Genesis) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_Genesis) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *CommitmentSource_Transaction) Marshal() (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 *CommitmentSource_Transaction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_Transaction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintSct(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommitmentSource_FundingStreamReward) Marshal() (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 *CommitmentSource_FundingStreamReward) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_FundingStreamReward) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochIndex != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CommitmentSource_CommunityPoolOutput) Marshal() (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 *CommitmentSource_CommunityPoolOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_CommunityPoolOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *CommitmentSource_Ics20Transfer) Marshal() (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 *CommitmentSource_Ics20Transfer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitmentSource_Ics20Transfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintSct(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintSct(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x12 - } - if m.PacketSeq != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.PacketSeq)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Nullifier) Marshal() (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 *Nullifier) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Nullifier) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintSct(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NullificationInfo) Marshal() (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 *NullificationInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NullificationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SpendHeight != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.SpendHeight)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintSct(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventCommitment) Marshal() (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 *EventCommitment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Source != nil { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Position != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Position)) - i-- - dAtA[i] = 0x10 - } - if m.Commitment != nil { - { - size, err := m.Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAnchor) Marshal() (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 *EventAnchor) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAnchor) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.Anchor != nil { - { - size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventEpochRoot) Marshal() (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 *EventEpochRoot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventEpochRoot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Index != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x10 - } - if m.Root != nil { - { - size, err := m.Root.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventBlockRoot) Marshal() (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 *EventBlockRoot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBlockRoot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.Root != nil { - { - size, err := m.Root.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EpochByHeightRequest) Marshal() (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 *EpochByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EpochByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EpochByHeightResponse) Marshal() (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 *EpochByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EpochByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Epoch != nil { - { - size, err := m.Epoch.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AnchorByHeightRequest) Marshal() (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 *AnchorByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnchorByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AnchorByHeightResponse) Marshal() (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 *AnchorByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnchorByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Anchor != nil { - { - size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TimestampByHeightRequest) Marshal() (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 *TimestampByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimestampByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSct(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TimestampByHeightResponse) Marshal() (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 *TimestampByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TimestampByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Timestamp != nil { - { - size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSct(dAtA []byte, offset int, v uint64) int { - offset -= sovSct(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SctParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EpochDuration != 0 { - n += 1 + sovSct(uint64(m.EpochDuration)) - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SctParams != nil { - l = m.SctParams.Size() - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func (m *Epoch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Index != 0 { - n += 1 + sovSct(uint64(m.Index)) - } - if m.StartHeight != 0 { - n += 1 + sovSct(uint64(m.StartHeight)) - } - return n -} - -func (m *CommitmentSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Source != nil { - n += m.Source.Size() - } - return n -} - -func (m *CommitmentSource_Transaction_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Transaction != nil { - l = m.Transaction.Size() - n += 1 + l + sovSct(uint64(l)) - } - return n -} -func (m *CommitmentSource_Ics_20Transfer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ics_20Transfer != nil { - l = m.Ics_20Transfer.Size() - n += 1 + l + sovSct(uint64(l)) - } - return n -} -func (m *CommitmentSource_FundingStreamReward_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FundingStreamReward != nil { - l = m.FundingStreamReward.Size() - n += 2 + l + sovSct(uint64(l)) - } - return n -} -func (m *CommitmentSource_CommunityPoolOutput_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolOutput != nil { - l = m.CommunityPoolOutput.Size() - n += 2 + l + sovSct(uint64(l)) - } - return n -} -func (m *CommitmentSource_Genesis_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Genesis != nil { - l = m.Genesis.Size() - n += 2 + l + sovSct(uint64(l)) - } - return n -} -func (m *CommitmentSource_Genesis) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *CommitmentSource_Transaction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func (m *CommitmentSource_FundingStreamReward) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EpochIndex != 0 { - n += 1 + sovSct(uint64(m.EpochIndex)) - } - return n -} - -func (m *CommitmentSource_CommunityPoolOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *CommitmentSource_Ics20Transfer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PacketSeq != 0 { - n += 1 + sovSct(uint64(m.PacketSeq)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovSct(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func (m *Nullifier) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func (m *NullificationInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovSct(uint64(l)) - } - if m.SpendHeight != 0 { - n += 1 + sovSct(uint64(m.SpendHeight)) - } - return n -} - -func (m *EventCommitment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Commitment != nil { - l = m.Commitment.Size() - n += 1 + l + sovSct(uint64(l)) - } - if m.Position != 0 { - n += 1 + sovSct(uint64(m.Position)) - } - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func (m *EventAnchor) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Anchor != nil { - l = m.Anchor.Size() - n += 1 + l + sovSct(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovSct(uint64(m.Height)) - } - return n -} - -func (m *EventEpochRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Root != nil { - l = m.Root.Size() - n += 1 + l + sovSct(uint64(l)) - } - if m.Index != 0 { - n += 1 + sovSct(uint64(m.Index)) - } - return n -} - -func (m *EventBlockRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Root != nil { - l = m.Root.Size() - n += 1 + l + sovSct(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovSct(uint64(m.Height)) - } - return n -} - -func (m *EpochByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSct(uint64(m.Height)) - } - return n -} - -func (m *EpochByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Epoch != nil { - l = m.Epoch.Size() - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func (m *AnchorByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSct(uint64(m.Height)) - } - return n -} - -func (m *AnchorByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Anchor != nil { - l = m.Anchor.Size() - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func (m *TimestampByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSct(uint64(m.Height)) - } - return n -} - -func (m *TimestampByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Timestamp != nil { - l = m.Timestamp.Size() - n += 1 + l + sovSct(uint64(l)) - } - return n -} - -func sovSct(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSct(x uint64) (n int) { - return sovSct(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SctParameters) 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 ErrIntOverflowSct - } - 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: SctParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SctParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochDuration", wireType) - } - m.EpochDuration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochDuration |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowSct - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SctParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SctParams == nil { - m.SctParams = &SctParameters{} - } - if err := m.SctParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Epoch) 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 ErrIntOverflowSct - } - 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: Epoch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Epoch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - m.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitmentSource) 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 ErrIntOverflowSct - } - 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: CommitmentSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitmentSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CommitmentSource_Transaction{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Source = &CommitmentSource_Transaction_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ics_20Transfer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CommitmentSource_Ics20Transfer{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Source = &CommitmentSource_Ics_20Transfer{v} - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FundingStreamReward", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CommitmentSource_FundingStreamReward{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Source = &CommitmentSource_FundingStreamReward_{v} - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolOutput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CommitmentSource_CommunityPoolOutput{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Source = &CommitmentSource_CommunityPoolOutput_{v} - iNdEx = postIndex - case 40: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Genesis", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &CommitmentSource_Genesis{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Source = &CommitmentSource_Genesis_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitmentSource_Genesis) 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 ErrIntOverflowSct - } - 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: Genesis: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Genesis: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitmentSource_Transaction) 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 ErrIntOverflowSct - } - 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: Transaction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Transaction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) - if m.Id == nil { - m.Id = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitmentSource_FundingStreamReward) 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 ErrIntOverflowSct - } - 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: FundingStreamReward: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FundingStreamReward: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitmentSource_CommunityPoolOutput) 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 ErrIntOverflowSct - } - 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: CommunityPoolOutput: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolOutput: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitmentSource_Ics20Transfer) 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 ErrIntOverflowSct - } - 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: Ics20Transfer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ics20Transfer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PacketSeq", wireType) - } - m.PacketSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PacketSeq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nullifier) 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 ErrIntOverflowSct - } - 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: Nullifier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nullifier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NullificationInfo) 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 ErrIntOverflowSct - } - 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: NullificationInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullificationInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = append(m.Id[:0], dAtA[iNdEx:postIndex]...) - if m.Id == nil { - m.Id = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpendHeight", wireType) - } - m.SpendHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpendHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventCommitment) 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 ErrIntOverflowSct - } - 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: EventCommitment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventCommitment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commitment == nil { - m.Commitment = &v1.StateCommitment{} - } - if err := m.Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - m.Position = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Position |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &CommitmentSource{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAnchor) 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 ErrIntOverflowSct - } - 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: EventAnchor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAnchor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Anchor == nil { - m.Anchor = &v1.MerkleRoot{} - } - if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventEpochRoot) 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 ErrIntOverflowSct - } - 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: EventEpochRoot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventEpochRoot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Root == nil { - m.Root = &v1.MerkleRoot{} - } - if err := m.Root.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBlockRoot) 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 ErrIntOverflowSct - } - 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: EventBlockRoot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBlockRoot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Root == nil { - m.Root = &v1.MerkleRoot{} - } - if err := m.Root.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EpochByHeightRequest) 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 ErrIntOverflowSct - } - 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: EpochByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EpochByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EpochByHeightResponse) 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 ErrIntOverflowSct - } - 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: EpochByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EpochByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Epoch == nil { - m.Epoch = &Epoch{} - } - if err := m.Epoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnchorByHeightRequest) 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 ErrIntOverflowSct - } - 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: AnchorByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnchorByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AnchorByHeightResponse) 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 ErrIntOverflowSct - } - 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: AnchorByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnchorByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Anchor == nil { - m.Anchor = &v1.MerkleRoot{} - } - if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimestampByHeightRequest) 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 ErrIntOverflowSct - } - 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: TimestampByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimestampByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimestampByHeightResponse) 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 ErrIntOverflowSct - } - 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: TimestampByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimestampByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timestamp == nil { - m.Timestamp = &types.Timestamp{} - } - if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSct(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSct - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSct - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSct - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSct = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSct = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSct = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/shielded_pool/v1/shielded_pool.pb.go b/chain/penumbra/core/component/shielded_pool/v1/shielded_pool.pb.go deleted file mode 100644 index 6d5ca17b..00000000 --- a/chain/penumbra/core/component/shielded_pool/v1/shielded_pool.pb.go +++ /dev/null @@ -1,9043 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/shielded_pool/v1/shielded_pool.proto - -package shielded_poolv1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v15 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - v17 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/txhash/v1" - v16 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/decaf377_fmd/v1" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/decaf377_rdsa/v1" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/tct/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Configuration data for the shielded pool component. -type ShieldedPoolParameters struct { - FixedFmdParams *FmdParameters `protobuf:"bytes,1,opt,name=fixed_fmd_params,json=fixedFmdParams,proto3" json:"fixed_fmd_params,omitempty"` // Deprecated: Do not use. - FmdMetaParams *FmdMetaParameters `protobuf:"bytes,2,opt,name=fmd_meta_params,json=fmdMetaParams,proto3" json:"fmd_meta_params,omitempty"` -} - -func (m *ShieldedPoolParameters) Reset() { *m = ShieldedPoolParameters{} } -func (m *ShieldedPoolParameters) String() string { return proto.CompactTextString(m) } -func (*ShieldedPoolParameters) ProtoMessage() {} -func (*ShieldedPoolParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{0} -} -func (m *ShieldedPoolParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ShieldedPoolParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ShieldedPoolParameters.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 *ShieldedPoolParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_ShieldedPoolParameters.Merge(m, src) -} -func (m *ShieldedPoolParameters) XXX_Size() int { - return m.Size() -} -func (m *ShieldedPoolParameters) XXX_DiscardUnknown() { - xxx_messageInfo_ShieldedPoolParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_ShieldedPoolParameters proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *ShieldedPoolParameters) GetFixedFmdParams() *FmdParameters { - if m != nil { - return m.FixedFmdParams - } - return nil -} - -func (m *ShieldedPoolParameters) GetFmdMetaParams() *FmdMetaParameters { - if m != nil { - return m.FmdMetaParams - } - return nil -} - -// Genesis data for the shielded pool component. -type GenesisContent struct { - ShieldedPoolParams *ShieldedPoolParameters `protobuf:"bytes,1,opt,name=shielded_pool_params,json=shieldedPoolParams,proto3" json:"shielded_pool_params,omitempty"` - // The allocations present at genesis - Allocations []*GenesisContent_Allocation `protobuf:"bytes,3,rep,name=allocations,proto3" json:"allocations,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{1} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetShieldedPoolParams() *ShieldedPoolParameters { - if m != nil { - return m.ShieldedPoolParams - } - return nil -} - -func (m *GenesisContent) GetAllocations() []*GenesisContent_Allocation { - if m != nil { - return m.Allocations - } - return nil -} - -type GenesisContent_Allocation struct { - Amount *v1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Address *v11.Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *GenesisContent_Allocation) Reset() { *m = GenesisContent_Allocation{} } -func (m *GenesisContent_Allocation) String() string { return proto.CompactTextString(m) } -func (*GenesisContent_Allocation) ProtoMessage() {} -func (*GenesisContent_Allocation) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{1, 0} -} -func (m *GenesisContent_Allocation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent_Allocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent_Allocation.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 *GenesisContent_Allocation) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent_Allocation.Merge(m, src) -} -func (m *GenesisContent_Allocation) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent_Allocation) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent_Allocation.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent_Allocation proto.InternalMessageInfo - -func (m *GenesisContent_Allocation) GetAmount() *v1.Amount { - if m != nil { - return m.Amount - } - return nil -} - -func (m *GenesisContent_Allocation) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *GenesisContent_Allocation) GetAddress() *v11.Address { - if m != nil { - return m.Address - } - return nil -} - -// The parameters which control how the FMD parameters evolve over time. -type FmdMetaParameters struct { - // How much time users have to transition to new parameters. - FmdGracePeriodBlocks uint64 `protobuf:"varint,1,opt,name=fmd_grace_period_blocks,json=fmdGracePeriodBlocks,proto3" json:"fmd_grace_period_blocks,omitempty"` - // The algorithm governing how the parameters change. - // - // Types that are valid to be assigned to Algorithm: - // - // *FmdMetaParameters_FixedPrecisionBits - // *FmdMetaParameters_SlidingWindow - Algorithm isFmdMetaParameters_Algorithm `protobuf_oneof:"algorithm"` -} - -func (m *FmdMetaParameters) Reset() { *m = FmdMetaParameters{} } -func (m *FmdMetaParameters) String() string { return proto.CompactTextString(m) } -func (*FmdMetaParameters) ProtoMessage() {} -func (*FmdMetaParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{2} -} -func (m *FmdMetaParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FmdMetaParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FmdMetaParameters.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 *FmdMetaParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_FmdMetaParameters.Merge(m, src) -} -func (m *FmdMetaParameters) XXX_Size() int { - return m.Size() -} -func (m *FmdMetaParameters) XXX_DiscardUnknown() { - xxx_messageInfo_FmdMetaParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_FmdMetaParameters proto.InternalMessageInfo - -type isFmdMetaParameters_Algorithm interface { - isFmdMetaParameters_Algorithm() - MarshalTo([]byte) (int, error) - Size() int -} - -type FmdMetaParameters_FixedPrecisionBits struct { - FixedPrecisionBits uint32 `protobuf:"varint,2,opt,name=fixed_precision_bits,json=fixedPrecisionBits,proto3,oneof" json:"fixed_precision_bits,omitempty"` -} -type FmdMetaParameters_SlidingWindow struct { - SlidingWindow *FmdMetaParameters_AlgorithmSlidingWindow `protobuf:"bytes,3,opt,name=sliding_window,json=slidingWindow,proto3,oneof" json:"sliding_window,omitempty"` -} - -func (*FmdMetaParameters_FixedPrecisionBits) isFmdMetaParameters_Algorithm() {} -func (*FmdMetaParameters_SlidingWindow) isFmdMetaParameters_Algorithm() {} - -func (m *FmdMetaParameters) GetAlgorithm() isFmdMetaParameters_Algorithm { - if m != nil { - return m.Algorithm - } - return nil -} - -func (m *FmdMetaParameters) GetFmdGracePeriodBlocks() uint64 { - if m != nil { - return m.FmdGracePeriodBlocks - } - return 0 -} - -func (m *FmdMetaParameters) GetFixedPrecisionBits() uint32 { - if x, ok := m.GetAlgorithm().(*FmdMetaParameters_FixedPrecisionBits); ok { - return x.FixedPrecisionBits - } - return 0 -} - -func (m *FmdMetaParameters) GetSlidingWindow() *FmdMetaParameters_AlgorithmSlidingWindow { - if x, ok := m.GetAlgorithm().(*FmdMetaParameters_SlidingWindow); ok { - return x.SlidingWindow - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*FmdMetaParameters) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*FmdMetaParameters_FixedPrecisionBits)(nil), - (*FmdMetaParameters_SlidingWindow)(nil), - } -} - -// A sliding window algorithm for updating the parameters. -type FmdMetaParameters_AlgorithmSlidingWindow struct { - // The window size, in terms of the number of update periods. - // - // The update period is 16 blocks, by default, but can change with governance. - WindowUpdatePeriods uint32 `protobuf:"varint,1,opt,name=window_update_periods,json=windowUpdatePeriods,proto3" json:"window_update_periods,omitempty"` - // The number of detections we aim to see per window. - TargetedDetectionsPerWindow uint32 `protobuf:"varint,2,opt,name=targeted_detections_per_window,json=targetedDetectionsPerWindow,proto3" json:"targeted_detections_per_window,omitempty"` -} - -func (m *FmdMetaParameters_AlgorithmSlidingWindow) Reset() { - *m = FmdMetaParameters_AlgorithmSlidingWindow{} -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) String() string { return proto.CompactTextString(m) } -func (*FmdMetaParameters_AlgorithmSlidingWindow) ProtoMessage() {} -func (*FmdMetaParameters_AlgorithmSlidingWindow) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{2, 0} -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FmdMetaParameters_AlgorithmSlidingWindow.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 *FmdMetaParameters_AlgorithmSlidingWindow) XXX_Merge(src proto.Message) { - xxx_messageInfo_FmdMetaParameters_AlgorithmSlidingWindow.Merge(m, src) -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) XXX_Size() int { - return m.Size() -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) XXX_DiscardUnknown() { - xxx_messageInfo_FmdMetaParameters_AlgorithmSlidingWindow.DiscardUnknown(m) -} - -var xxx_messageInfo_FmdMetaParameters_AlgorithmSlidingWindow proto.InternalMessageInfo - -func (m *FmdMetaParameters_AlgorithmSlidingWindow) GetWindowUpdatePeriods() uint32 { - if m != nil { - return m.WindowUpdatePeriods - } - return 0 -} - -func (m *FmdMetaParameters_AlgorithmSlidingWindow) GetTargetedDetectionsPerWindow() uint32 { - if m != nil { - return m.TargetedDetectionsPerWindow - } - return 0 -} - -// Used to potentially store state for the FMD Meta Parameters algorithm. -type FmdMetaParametersAlgorithmState struct { - // Types that are valid to be assigned to State: - // - // *FmdMetaParametersAlgorithmState_Fixed - // *FmdMetaParametersAlgorithmState_SlidingWindow - State isFmdMetaParametersAlgorithmState_State `protobuf_oneof:"state"` -} - -func (m *FmdMetaParametersAlgorithmState) Reset() { *m = FmdMetaParametersAlgorithmState{} } -func (m *FmdMetaParametersAlgorithmState) String() string { return proto.CompactTextString(m) } -func (*FmdMetaParametersAlgorithmState) ProtoMessage() {} -func (*FmdMetaParametersAlgorithmState) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{3} -} -func (m *FmdMetaParametersAlgorithmState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FmdMetaParametersAlgorithmState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FmdMetaParametersAlgorithmState.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 *FmdMetaParametersAlgorithmState) XXX_Merge(src proto.Message) { - xxx_messageInfo_FmdMetaParametersAlgorithmState.Merge(m, src) -} -func (m *FmdMetaParametersAlgorithmState) XXX_Size() int { - return m.Size() -} -func (m *FmdMetaParametersAlgorithmState) XXX_DiscardUnknown() { - xxx_messageInfo_FmdMetaParametersAlgorithmState.DiscardUnknown(m) -} - -var xxx_messageInfo_FmdMetaParametersAlgorithmState proto.InternalMessageInfo - -type isFmdMetaParametersAlgorithmState_State interface { - isFmdMetaParametersAlgorithmState_State() - MarshalTo([]byte) (int, error) - Size() int -} - -type FmdMetaParametersAlgorithmState_Fixed struct { - Fixed *FmdMetaParametersAlgorithmState_FixedState `protobuf:"bytes,1,opt,name=fixed,proto3,oneof" json:"fixed,omitempty"` -} -type FmdMetaParametersAlgorithmState_SlidingWindow struct { - SlidingWindow *FmdMetaParametersAlgorithmState_SlidingWindowState `protobuf:"bytes,2,opt,name=sliding_window,json=slidingWindow,proto3,oneof" json:"sliding_window,omitempty"` -} - -func (*FmdMetaParametersAlgorithmState_Fixed) isFmdMetaParametersAlgorithmState_State() {} -func (*FmdMetaParametersAlgorithmState_SlidingWindow) isFmdMetaParametersAlgorithmState_State() {} - -func (m *FmdMetaParametersAlgorithmState) GetState() isFmdMetaParametersAlgorithmState_State { - if m != nil { - return m.State - } - return nil -} - -func (m *FmdMetaParametersAlgorithmState) GetFixed() *FmdMetaParametersAlgorithmState_FixedState { - if x, ok := m.GetState().(*FmdMetaParametersAlgorithmState_Fixed); ok { - return x.Fixed - } - return nil -} - -func (m *FmdMetaParametersAlgorithmState) GetSlidingWindow() *FmdMetaParametersAlgorithmState_SlidingWindowState { - if x, ok := m.GetState().(*FmdMetaParametersAlgorithmState_SlidingWindow); ok { - return x.SlidingWindow - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*FmdMetaParametersAlgorithmState) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*FmdMetaParametersAlgorithmState_Fixed)(nil), - (*FmdMetaParametersAlgorithmState_SlidingWindow)(nil), - } -} - -// The state used for the fixed algorithm. -type FmdMetaParametersAlgorithmState_FixedState struct { -} - -func (m *FmdMetaParametersAlgorithmState_FixedState) Reset() { - *m = FmdMetaParametersAlgorithmState_FixedState{} -} -func (m *FmdMetaParametersAlgorithmState_FixedState) String() string { - return proto.CompactTextString(m) -} -func (*FmdMetaParametersAlgorithmState_FixedState) ProtoMessage() {} -func (*FmdMetaParametersAlgorithmState_FixedState) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{3, 0} -} -func (m *FmdMetaParametersAlgorithmState_FixedState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FmdMetaParametersAlgorithmState_FixedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FmdMetaParametersAlgorithmState_FixedState.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 *FmdMetaParametersAlgorithmState_FixedState) XXX_Merge(src proto.Message) { - xxx_messageInfo_FmdMetaParametersAlgorithmState_FixedState.Merge(m, src) -} -func (m *FmdMetaParametersAlgorithmState_FixedState) XXX_Size() int { - return m.Size() -} -func (m *FmdMetaParametersAlgorithmState_FixedState) XXX_DiscardUnknown() { - xxx_messageInfo_FmdMetaParametersAlgorithmState_FixedState.DiscardUnknown(m) -} - -var xxx_messageInfo_FmdMetaParametersAlgorithmState_FixedState proto.InternalMessageInfo - -// The state used for the sliding window algorithm. -type FmdMetaParametersAlgorithmState_SlidingWindowState struct { - // The number of clues previously observed, approximately. - ApproximateClueCount uint32 `protobuf:"varint,1,opt,name=approximate_clue_count,json=approximateClueCount,proto3" json:"approximate_clue_count,omitempty"` -} - -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) Reset() { - *m = FmdMetaParametersAlgorithmState_SlidingWindowState{} -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) String() string { - return proto.CompactTextString(m) -} -func (*FmdMetaParametersAlgorithmState_SlidingWindowState) ProtoMessage() {} -func (*FmdMetaParametersAlgorithmState_SlidingWindowState) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{3, 1} -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FmdMetaParametersAlgorithmState_SlidingWindowState.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 *FmdMetaParametersAlgorithmState_SlidingWindowState) XXX_Merge(src proto.Message) { - xxx_messageInfo_FmdMetaParametersAlgorithmState_SlidingWindowState.Merge(m, src) -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) XXX_Size() int { - return m.Size() -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) XXX_DiscardUnknown() { - xxx_messageInfo_FmdMetaParametersAlgorithmState_SlidingWindowState.DiscardUnknown(m) -} - -var xxx_messageInfo_FmdMetaParametersAlgorithmState_SlidingWindowState proto.InternalMessageInfo - -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) GetApproximateClueCount() uint32 { - if m != nil { - return m.ApproximateClueCount - } - return 0 -} - -// Parameters for Fuzzy Message Detection -type FmdParameters struct { - PrecisionBits uint32 `protobuf:"varint,1,opt,name=precision_bits,json=precisionBits,proto3" json:"precision_bits,omitempty"` - AsOfBlockHeight uint64 `protobuf:"varint,2,opt,name=as_of_block_height,json=asOfBlockHeight,proto3" json:"as_of_block_height,omitempty"` -} - -func (m *FmdParameters) Reset() { *m = FmdParameters{} } -func (m *FmdParameters) String() string { return proto.CompactTextString(m) } -func (*FmdParameters) ProtoMessage() {} -func (*FmdParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{4} -} -func (m *FmdParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FmdParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FmdParameters.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 *FmdParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_FmdParameters.Merge(m, src) -} -func (m *FmdParameters) XXX_Size() int { - return m.Size() -} -func (m *FmdParameters) XXX_DiscardUnknown() { - xxx_messageInfo_FmdParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_FmdParameters proto.InternalMessageInfo - -func (m *FmdParameters) GetPrecisionBits() uint32 { - if m != nil { - return m.PrecisionBits - } - return 0 -} - -func (m *FmdParameters) GetAsOfBlockHeight() uint64 { - if m != nil { - return m.AsOfBlockHeight - } - return 0 -} - -type Note struct { - Value *v12.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - Rseed []byte `protobuf:"bytes,2,opt,name=rseed,proto3" json:"rseed,omitempty"` - Address *v11.Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *Note) Reset() { *m = Note{} } -func (m *Note) String() string { return proto.CompactTextString(m) } -func (*Note) ProtoMessage() {} -func (*Note) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{5} -} -func (m *Note) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Note) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Note.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 *Note) XXX_Merge(src proto.Message) { - xxx_messageInfo_Note.Merge(m, src) -} -func (m *Note) XXX_Size() int { - return m.Size() -} -func (m *Note) XXX_DiscardUnknown() { - xxx_messageInfo_Note.DiscardUnknown(m) -} - -var xxx_messageInfo_Note proto.InternalMessageInfo - -func (m *Note) GetValue() *v12.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *Note) GetRseed() []byte { - if m != nil { - return m.Rseed - } - return nil -} - -func (m *Note) GetAddress() *v11.Address { - if m != nil { - return m.Address - } - return nil -} - -type NoteView struct { - Value *v12.ValueView `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - Rseed []byte `protobuf:"bytes,2,opt,name=rseed,proto3" json:"rseed,omitempty"` - Address *v11.AddressView `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *NoteView) Reset() { *m = NoteView{} } -func (m *NoteView) String() string { return proto.CompactTextString(m) } -func (*NoteView) ProtoMessage() {} -func (*NoteView) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{6} -} -func (m *NoteView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoteView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoteView.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 *NoteView) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoteView.Merge(m, src) -} -func (m *NoteView) XXX_Size() int { - return m.Size() -} -func (m *NoteView) XXX_DiscardUnknown() { - xxx_messageInfo_NoteView.DiscardUnknown(m) -} - -var xxx_messageInfo_NoteView proto.InternalMessageInfo - -func (m *NoteView) GetValue() *v12.ValueView { - if m != nil { - return m.Value - } - return nil -} - -func (m *NoteView) GetRseed() []byte { - if m != nil { - return m.Rseed - } - return nil -} - -func (m *NoteView) GetAddress() *v11.AddressView { - if m != nil { - return m.Address - } - return nil -} - -// An encrypted note. -// 176 = 80(address) + 16(amount) + 32(asset ID) + 32(rseed) + 16(MAC) bytes. -type NoteCiphertext struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *NoteCiphertext) Reset() { *m = NoteCiphertext{} } -func (m *NoteCiphertext) String() string { return proto.CompactTextString(m) } -func (*NoteCiphertext) ProtoMessage() {} -func (*NoteCiphertext) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{7} -} -func (m *NoteCiphertext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoteCiphertext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoteCiphertext.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 *NoteCiphertext) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoteCiphertext.Merge(m, src) -} -func (m *NoteCiphertext) XXX_Size() int { - return m.Size() -} -func (m *NoteCiphertext) XXX_DiscardUnknown() { - xxx_messageInfo_NoteCiphertext.DiscardUnknown(m) -} - -var xxx_messageInfo_NoteCiphertext proto.InternalMessageInfo - -func (m *NoteCiphertext) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// The body of an output description, including only the minimal -// data required to scan and process the output. -type NotePayload struct { - // The note commitment for the output note. 32 bytes. - NoteCommitment *v13.StateCommitment `protobuf:"bytes,1,opt,name=note_commitment,json=noteCommitment,proto3" json:"note_commitment,omitempty"` - // The encoding of an ephemeral public key. 32 bytes. - EphemeralKey []byte `protobuf:"bytes,2,opt,name=ephemeral_key,json=ephemeralKey,proto3" json:"ephemeral_key,omitempty"` - // An encryption of the newly created note. - // 176 = 80(address) + 16(amount) + 32(asset ID) + 32(rseed) + 16(MAC) bytes. - EncryptedNote *NoteCiphertext `protobuf:"bytes,3,opt,name=encrypted_note,json=encryptedNote,proto3" json:"encrypted_note,omitempty"` -} - -func (m *NotePayload) Reset() { *m = NotePayload{} } -func (m *NotePayload) String() string { return proto.CompactTextString(m) } -func (*NotePayload) ProtoMessage() {} -func (*NotePayload) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{8} -} -func (m *NotePayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NotePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NotePayload.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 *NotePayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotePayload.Merge(m, src) -} -func (m *NotePayload) XXX_Size() int { - return m.Size() -} -func (m *NotePayload) XXX_DiscardUnknown() { - xxx_messageInfo_NotePayload.DiscardUnknown(m) -} - -var xxx_messageInfo_NotePayload proto.InternalMessageInfo - -func (m *NotePayload) GetNoteCommitment() *v13.StateCommitment { - if m != nil { - return m.NoteCommitment - } - return nil -} - -func (m *NotePayload) GetEphemeralKey() []byte { - if m != nil { - return m.EphemeralKey - } - return nil -} - -func (m *NotePayload) GetEncryptedNote() *NoteCiphertext { - if m != nil { - return m.EncryptedNote - } - return nil -} - -// A Penumbra ZK output proof. -type ZKOutputProof struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ZKOutputProof) Reset() { *m = ZKOutputProof{} } -func (m *ZKOutputProof) String() string { return proto.CompactTextString(m) } -func (*ZKOutputProof) ProtoMessage() {} -func (*ZKOutputProof) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{9} -} -func (m *ZKOutputProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ZKOutputProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ZKOutputProof.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 *ZKOutputProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_ZKOutputProof.Merge(m, src) -} -func (m *ZKOutputProof) XXX_Size() int { - return m.Size() -} -func (m *ZKOutputProof) XXX_DiscardUnknown() { - xxx_messageInfo_ZKOutputProof.DiscardUnknown(m) -} - -var xxx_messageInfo_ZKOutputProof proto.InternalMessageInfo - -func (m *ZKOutputProof) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A Penumbra ZK spend proof. -type ZKSpendProof struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ZKSpendProof) Reset() { *m = ZKSpendProof{} } -func (m *ZKSpendProof) String() string { return proto.CompactTextString(m) } -func (*ZKSpendProof) ProtoMessage() {} -func (*ZKSpendProof) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{10} -} -func (m *ZKSpendProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ZKSpendProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ZKSpendProof.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 *ZKSpendProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_ZKSpendProof.Merge(m, src) -} -func (m *ZKSpendProof) XXX_Size() int { - return m.Size() -} -func (m *ZKSpendProof) XXX_DiscardUnknown() { - xxx_messageInfo_ZKSpendProof.DiscardUnknown(m) -} - -var xxx_messageInfo_ZKSpendProof proto.InternalMessageInfo - -func (m *ZKSpendProof) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A Penumbra ZK nullifier derivation proof. -type ZKNullifierDerivationProof struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ZKNullifierDerivationProof) Reset() { *m = ZKNullifierDerivationProof{} } -func (m *ZKNullifierDerivationProof) String() string { return proto.CompactTextString(m) } -func (*ZKNullifierDerivationProof) ProtoMessage() {} -func (*ZKNullifierDerivationProof) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{11} -} -func (m *ZKNullifierDerivationProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ZKNullifierDerivationProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ZKNullifierDerivationProof.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 *ZKNullifierDerivationProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_ZKNullifierDerivationProof.Merge(m, src) -} -func (m *ZKNullifierDerivationProof) XXX_Size() int { - return m.Size() -} -func (m *ZKNullifierDerivationProof) XXX_DiscardUnknown() { - xxx_messageInfo_ZKNullifierDerivationProof.DiscardUnknown(m) -} - -var xxx_messageInfo_ZKNullifierDerivationProof proto.InternalMessageInfo - -func (m *ZKNullifierDerivationProof) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// Spends a shielded note. -type Spend struct { - // The effecting data of the spend. - Body *SpendBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // The authorizing signature for the spend. - AuthSig *v14.SpendAuthSignature `protobuf:"bytes,2,opt,name=auth_sig,json=authSig,proto3" json:"auth_sig,omitempty"` - // The proof that the spend is well-formed is authorizing data. - Proof *ZKSpendProof `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (m *Spend) Reset() { *m = Spend{} } -func (m *Spend) String() string { return proto.CompactTextString(m) } -func (*Spend) ProtoMessage() {} -func (*Spend) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{12} -} -func (m *Spend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Spend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Spend.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 *Spend) XXX_Merge(src proto.Message) { - xxx_messageInfo_Spend.Merge(m, src) -} -func (m *Spend) XXX_Size() int { - return m.Size() -} -func (m *Spend) XXX_DiscardUnknown() { - xxx_messageInfo_Spend.DiscardUnknown(m) -} - -var xxx_messageInfo_Spend proto.InternalMessageInfo - -func (m *Spend) GetBody() *SpendBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *Spend) GetAuthSig() *v14.SpendAuthSignature { - if m != nil { - return m.AuthSig - } - return nil -} - -func (m *Spend) GetProof() *ZKSpendProof { - if m != nil { - return m.Proof - } - return nil -} - -// ABCI Event recording a spend. -type EventSpend struct { - Nullifier *v15.Nullifier `protobuf:"bytes,1,opt,name=nullifier,proto3" json:"nullifier,omitempty"` -} - -func (m *EventSpend) Reset() { *m = EventSpend{} } -func (m *EventSpend) String() string { return proto.CompactTextString(m) } -func (*EventSpend) ProtoMessage() {} -func (*EventSpend) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{13} -} -func (m *EventSpend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSpend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventSpend.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 *EventSpend) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSpend.Merge(m, src) -} -func (m *EventSpend) XXX_Size() int { - return m.Size() -} -func (m *EventSpend) XXX_DiscardUnknown() { - xxx_messageInfo_EventSpend.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSpend proto.InternalMessageInfo - -func (m *EventSpend) GetNullifier() *v15.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -// ABCI Event recording an output. -type EventOutput struct { - NoteCommitment *v13.StateCommitment `protobuf:"bytes,1,opt,name=note_commitment,json=noteCommitment,proto3" json:"note_commitment,omitempty"` -} - -func (m *EventOutput) Reset() { *m = EventOutput{} } -func (m *EventOutput) String() string { return proto.CompactTextString(m) } -func (*EventOutput) ProtoMessage() {} -func (*EventOutput) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{14} -} -func (m *EventOutput) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventOutput.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 *EventOutput) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventOutput.Merge(m, src) -} -func (m *EventOutput) XXX_Size() int { - return m.Size() -} -func (m *EventOutput) XXX_DiscardUnknown() { - xxx_messageInfo_EventOutput.DiscardUnknown(m) -} - -var xxx_messageInfo_EventOutput proto.InternalMessageInfo - -func (m *EventOutput) GetNoteCommitment() *v13.StateCommitment { - if m != nil { - return m.NoteCommitment - } - return nil -} - -// ABCI Event recording a clue. -type EventBroadcastClue struct { - Clue *v16.Clue `protobuf:"bytes,1,opt,name=clue,proto3" json:"clue,omitempty"` - Tx *v17.TransactionId `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (m *EventBroadcastClue) Reset() { *m = EventBroadcastClue{} } -func (m *EventBroadcastClue) String() string { return proto.CompactTextString(m) } -func (*EventBroadcastClue) ProtoMessage() {} -func (*EventBroadcastClue) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{15} -} -func (m *EventBroadcastClue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventBroadcastClue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventBroadcastClue.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 *EventBroadcastClue) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventBroadcastClue.Merge(m, src) -} -func (m *EventBroadcastClue) XXX_Size() int { - return m.Size() -} -func (m *EventBroadcastClue) XXX_DiscardUnknown() { - xxx_messageInfo_EventBroadcastClue.DiscardUnknown(m) -} - -var xxx_messageInfo_EventBroadcastClue proto.InternalMessageInfo - -func (m *EventBroadcastClue) GetClue() *v16.Clue { - if m != nil { - return m.Clue - } - return nil -} - -func (m *EventBroadcastClue) GetTx() *v17.TransactionId { - if m != nil { - return m.Tx - } - return nil -} - -// The body of a spend description, containing only the effecting data -// describing changes to the ledger, and not the authorizing data that allows -// those changes to be performed. -type SpendBody struct { - // A commitment to the value of the input note. - BalanceCommitment *v12.BalanceCommitment `protobuf:"bytes,1,opt,name=balance_commitment,json=balanceCommitment,proto3" json:"balance_commitment,omitempty"` - // The nullifier of the input note. - Nullifier *v15.Nullifier `protobuf:"bytes,6,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - // The randomized validating key for the spend authorization signature. - Rk *v14.SpendVerificationKey `protobuf:"bytes,4,opt,name=rk,proto3" json:"rk,omitempty"` -} - -func (m *SpendBody) Reset() { *m = SpendBody{} } -func (m *SpendBody) String() string { return proto.CompactTextString(m) } -func (*SpendBody) ProtoMessage() {} -func (*SpendBody) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{16} -} -func (m *SpendBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendBody.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 *SpendBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendBody.Merge(m, src) -} -func (m *SpendBody) XXX_Size() int { - return m.Size() -} -func (m *SpendBody) XXX_DiscardUnknown() { - xxx_messageInfo_SpendBody.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendBody proto.InternalMessageInfo - -func (m *SpendBody) GetBalanceCommitment() *v12.BalanceCommitment { - if m != nil { - return m.BalanceCommitment - } - return nil -} - -func (m *SpendBody) GetNullifier() *v15.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *SpendBody) GetRk() *v14.SpendVerificationKey { - if m != nil { - return m.Rk - } - return nil -} - -type SpendView struct { - // Types that are valid to be assigned to SpendView: - // - // *SpendView_Visible_ - // *SpendView_Opaque_ - SpendView isSpendView_SpendView `protobuf_oneof:"spend_view"` -} - -func (m *SpendView) Reset() { *m = SpendView{} } -func (m *SpendView) String() string { return proto.CompactTextString(m) } -func (*SpendView) ProtoMessage() {} -func (*SpendView) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{17} -} -func (m *SpendView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendView.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 *SpendView) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendView.Merge(m, src) -} -func (m *SpendView) XXX_Size() int { - return m.Size() -} -func (m *SpendView) XXX_DiscardUnknown() { - xxx_messageInfo_SpendView.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendView proto.InternalMessageInfo - -type isSpendView_SpendView interface { - isSpendView_SpendView() - MarshalTo([]byte) (int, error) - Size() int -} - -type SpendView_Visible_ struct { - Visible *SpendView_Visible `protobuf:"bytes,1,opt,name=visible,proto3,oneof" json:"visible,omitempty"` -} -type SpendView_Opaque_ struct { - Opaque *SpendView_Opaque `protobuf:"bytes,2,opt,name=opaque,proto3,oneof" json:"opaque,omitempty"` -} - -func (*SpendView_Visible_) isSpendView_SpendView() {} -func (*SpendView_Opaque_) isSpendView_SpendView() {} - -func (m *SpendView) GetSpendView() isSpendView_SpendView { - if m != nil { - return m.SpendView - } - return nil -} - -func (m *SpendView) GetVisible() *SpendView_Visible { - if x, ok := m.GetSpendView().(*SpendView_Visible_); ok { - return x.Visible - } - return nil -} - -func (m *SpendView) GetOpaque() *SpendView_Opaque { - if x, ok := m.GetSpendView().(*SpendView_Opaque_); ok { - return x.Opaque - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SpendView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SpendView_Visible_)(nil), - (*SpendView_Opaque_)(nil), - } -} - -type SpendView_Visible struct { - Spend *Spend `protobuf:"bytes,1,opt,name=spend,proto3" json:"spend,omitempty"` - Note *NoteView `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` -} - -func (m *SpendView_Visible) Reset() { *m = SpendView_Visible{} } -func (m *SpendView_Visible) String() string { return proto.CompactTextString(m) } -func (*SpendView_Visible) ProtoMessage() {} -func (*SpendView_Visible) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{17, 0} -} -func (m *SpendView_Visible) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendView_Visible) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendView_Visible.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 *SpendView_Visible) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendView_Visible.Merge(m, src) -} -func (m *SpendView_Visible) XXX_Size() int { - return m.Size() -} -func (m *SpendView_Visible) XXX_DiscardUnknown() { - xxx_messageInfo_SpendView_Visible.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendView_Visible proto.InternalMessageInfo - -func (m *SpendView_Visible) GetSpend() *Spend { - if m != nil { - return m.Spend - } - return nil -} - -func (m *SpendView_Visible) GetNote() *NoteView { - if m != nil { - return m.Note - } - return nil -} - -type SpendView_Opaque struct { - Spend *Spend `protobuf:"bytes,1,opt,name=spend,proto3" json:"spend,omitempty"` -} - -func (m *SpendView_Opaque) Reset() { *m = SpendView_Opaque{} } -func (m *SpendView_Opaque) String() string { return proto.CompactTextString(m) } -func (*SpendView_Opaque) ProtoMessage() {} -func (*SpendView_Opaque) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{17, 1} -} -func (m *SpendView_Opaque) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendView_Opaque) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendView_Opaque.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 *SpendView_Opaque) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendView_Opaque.Merge(m, src) -} -func (m *SpendView_Opaque) XXX_Size() int { - return m.Size() -} -func (m *SpendView_Opaque) XXX_DiscardUnknown() { - xxx_messageInfo_SpendView_Opaque.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendView_Opaque proto.InternalMessageInfo - -func (m *SpendView_Opaque) GetSpend() *Spend { - if m != nil { - return m.Spend - } - return nil -} - -type SpendPlan struct { - // The plaintext note we plan to spend. - Note *Note `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"` - // The position of the note we plan to spend. - Position uint64 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"` - // The randomizer to use for the spend. - Randomizer []byte `protobuf:"bytes,3,opt,name=randomizer,proto3" json:"randomizer,omitempty"` - // The blinding factor to use for the value commitment. - ValueBlinding []byte `protobuf:"bytes,4,opt,name=value_blinding,json=valueBlinding,proto3" json:"value_blinding,omitempty"` - // The first blinding factor to use for the ZK spend proof. - ProofBlindingR []byte `protobuf:"bytes,5,opt,name=proof_blinding_r,json=proofBlindingR,proto3" json:"proof_blinding_r,omitempty"` - // The second blinding factor to use for the ZK spend proof. - ProofBlindingS []byte `protobuf:"bytes,6,opt,name=proof_blinding_s,json=proofBlindingS,proto3" json:"proof_blinding_s,omitempty"` -} - -func (m *SpendPlan) Reset() { *m = SpendPlan{} } -func (m *SpendPlan) String() string { return proto.CompactTextString(m) } -func (*SpendPlan) ProtoMessage() {} -func (*SpendPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{18} -} -func (m *SpendPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendPlan.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 *SpendPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendPlan.Merge(m, src) -} -func (m *SpendPlan) XXX_Size() int { - return m.Size() -} -func (m *SpendPlan) XXX_DiscardUnknown() { - xxx_messageInfo_SpendPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendPlan proto.InternalMessageInfo - -func (m *SpendPlan) GetNote() *Note { - if m != nil { - return m.Note - } - return nil -} - -func (m *SpendPlan) GetPosition() uint64 { - if m != nil { - return m.Position - } - return 0 -} - -func (m *SpendPlan) GetRandomizer() []byte { - if m != nil { - return m.Randomizer - } - return nil -} - -func (m *SpendPlan) GetValueBlinding() []byte { - if m != nil { - return m.ValueBlinding - } - return nil -} - -func (m *SpendPlan) GetProofBlindingR() []byte { - if m != nil { - return m.ProofBlindingR - } - return nil -} - -func (m *SpendPlan) GetProofBlindingS() []byte { - if m != nil { - return m.ProofBlindingS - } - return nil -} - -// Creates a new shielded note. -type Output struct { - // The effecting data for the output. - Body *OutputBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // The output proof is authorizing data. - Proof *ZKOutputProof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (m *Output) Reset() { *m = Output{} } -func (m *Output) String() string { return proto.CompactTextString(m) } -func (*Output) ProtoMessage() {} -func (*Output) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{19} -} -func (m *Output) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Output.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 *Output) XXX_Merge(src proto.Message) { - xxx_messageInfo_Output.Merge(m, src) -} -func (m *Output) XXX_Size() int { - return m.Size() -} -func (m *Output) XXX_DiscardUnknown() { - xxx_messageInfo_Output.DiscardUnknown(m) -} - -var xxx_messageInfo_Output proto.InternalMessageInfo - -func (m *Output) GetBody() *OutputBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *Output) GetProof() *ZKOutputProof { - if m != nil { - return m.Proof - } - return nil -} - -// The body of an output description, containing only the effecting data -// describing changes to the ledger, and not the authorizing data that allows -// those changes to be performed. -type OutputBody struct { - // The minimal data required to scan and process the new output note. - NotePayload *NotePayload `protobuf:"bytes,1,opt,name=note_payload,json=notePayload,proto3" json:"note_payload,omitempty"` - // A commitment to the value of the output note. 32 bytes. - BalanceCommitment *v12.BalanceCommitment `protobuf:"bytes,2,opt,name=balance_commitment,json=balanceCommitment,proto3" json:"balance_commitment,omitempty"` - // An encrypted key for decrypting the memo. - WrappedMemoKey []byte `protobuf:"bytes,3,opt,name=wrapped_memo_key,json=wrappedMemoKey,proto3" json:"wrapped_memo_key,omitempty"` - // The key material used for note encryption, wrapped in encryption to the - // sender's outgoing viewing key. 48 bytes. - OvkWrappedKey []byte `protobuf:"bytes,4,opt,name=ovk_wrapped_key,json=ovkWrappedKey,proto3" json:"ovk_wrapped_key,omitempty"` -} - -func (m *OutputBody) Reset() { *m = OutputBody{} } -func (m *OutputBody) String() string { return proto.CompactTextString(m) } -func (*OutputBody) ProtoMessage() {} -func (*OutputBody) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{20} -} -func (m *OutputBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutputBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutputBody.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 *OutputBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutputBody.Merge(m, src) -} -func (m *OutputBody) XXX_Size() int { - return m.Size() -} -func (m *OutputBody) XXX_DiscardUnknown() { - xxx_messageInfo_OutputBody.DiscardUnknown(m) -} - -var xxx_messageInfo_OutputBody proto.InternalMessageInfo - -func (m *OutputBody) GetNotePayload() *NotePayload { - if m != nil { - return m.NotePayload - } - return nil -} - -func (m *OutputBody) GetBalanceCommitment() *v12.BalanceCommitment { - if m != nil { - return m.BalanceCommitment - } - return nil -} - -func (m *OutputBody) GetWrappedMemoKey() []byte { - if m != nil { - return m.WrappedMemoKey - } - return nil -} - -func (m *OutputBody) GetOvkWrappedKey() []byte { - if m != nil { - return m.OvkWrappedKey - } - return nil -} - -type OutputView struct { - // Types that are valid to be assigned to OutputView: - // - // *OutputView_Visible_ - // *OutputView_Opaque_ - OutputView isOutputView_OutputView `protobuf_oneof:"output_view"` -} - -func (m *OutputView) Reset() { *m = OutputView{} } -func (m *OutputView) String() string { return proto.CompactTextString(m) } -func (*OutputView) ProtoMessage() {} -func (*OutputView) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{21} -} -func (m *OutputView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutputView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutputView.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 *OutputView) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutputView.Merge(m, src) -} -func (m *OutputView) XXX_Size() int { - return m.Size() -} -func (m *OutputView) XXX_DiscardUnknown() { - xxx_messageInfo_OutputView.DiscardUnknown(m) -} - -var xxx_messageInfo_OutputView proto.InternalMessageInfo - -type isOutputView_OutputView interface { - isOutputView_OutputView() - MarshalTo([]byte) (int, error) - Size() int -} - -type OutputView_Visible_ struct { - Visible *OutputView_Visible `protobuf:"bytes,1,opt,name=visible,proto3,oneof" json:"visible,omitempty"` -} -type OutputView_Opaque_ struct { - Opaque *OutputView_Opaque `protobuf:"bytes,2,opt,name=opaque,proto3,oneof" json:"opaque,omitempty"` -} - -func (*OutputView_Visible_) isOutputView_OutputView() {} -func (*OutputView_Opaque_) isOutputView_OutputView() {} - -func (m *OutputView) GetOutputView() isOutputView_OutputView { - if m != nil { - return m.OutputView - } - return nil -} - -func (m *OutputView) GetVisible() *OutputView_Visible { - if x, ok := m.GetOutputView().(*OutputView_Visible_); ok { - return x.Visible - } - return nil -} - -func (m *OutputView) GetOpaque() *OutputView_Opaque { - if x, ok := m.GetOutputView().(*OutputView_Opaque_); ok { - return x.Opaque - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*OutputView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*OutputView_Visible_)(nil), - (*OutputView_Opaque_)(nil), - } -} - -type OutputView_Visible struct { - Output *Output `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` - Note *NoteView `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` - PayloadKey *v11.PayloadKey `protobuf:"bytes,3,opt,name=payload_key,json=payloadKey,proto3" json:"payload_key,omitempty"` -} - -func (m *OutputView_Visible) Reset() { *m = OutputView_Visible{} } -func (m *OutputView_Visible) String() string { return proto.CompactTextString(m) } -func (*OutputView_Visible) ProtoMessage() {} -func (*OutputView_Visible) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{21, 0} -} -func (m *OutputView_Visible) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutputView_Visible) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutputView_Visible.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 *OutputView_Visible) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutputView_Visible.Merge(m, src) -} -func (m *OutputView_Visible) XXX_Size() int { - return m.Size() -} -func (m *OutputView_Visible) XXX_DiscardUnknown() { - xxx_messageInfo_OutputView_Visible.DiscardUnknown(m) -} - -var xxx_messageInfo_OutputView_Visible proto.InternalMessageInfo - -func (m *OutputView_Visible) GetOutput() *Output { - if m != nil { - return m.Output - } - return nil -} - -func (m *OutputView_Visible) GetNote() *NoteView { - if m != nil { - return m.Note - } - return nil -} - -func (m *OutputView_Visible) GetPayloadKey() *v11.PayloadKey { - if m != nil { - return m.PayloadKey - } - return nil -} - -type OutputView_Opaque struct { - Output *Output `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` -} - -func (m *OutputView_Opaque) Reset() { *m = OutputView_Opaque{} } -func (m *OutputView_Opaque) String() string { return proto.CompactTextString(m) } -func (*OutputView_Opaque) ProtoMessage() {} -func (*OutputView_Opaque) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{21, 1} -} -func (m *OutputView_Opaque) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutputView_Opaque) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutputView_Opaque.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 *OutputView_Opaque) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutputView_Opaque.Merge(m, src) -} -func (m *OutputView_Opaque) XXX_Size() int { - return m.Size() -} -func (m *OutputView_Opaque) XXX_DiscardUnknown() { - xxx_messageInfo_OutputView_Opaque.DiscardUnknown(m) -} - -var xxx_messageInfo_OutputView_Opaque proto.InternalMessageInfo - -func (m *OutputView_Opaque) GetOutput() *Output { - if m != nil { - return m.Output - } - return nil -} - -type OutputPlan struct { - // The value to send to this output. - Value *v12.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // The destination address to send it to. - DestAddress *v11.Address `protobuf:"bytes,2,opt,name=dest_address,json=destAddress,proto3" json:"dest_address,omitempty"` - // The rseed to use for the new note. - Rseed []byte `protobuf:"bytes,3,opt,name=rseed,proto3" json:"rseed,omitempty"` - // The blinding factor to use for the value commitment. - ValueBlinding []byte `protobuf:"bytes,4,opt,name=value_blinding,json=valueBlinding,proto3" json:"value_blinding,omitempty"` - // The first blinding factor to use for the ZK output proof. - ProofBlindingR []byte `protobuf:"bytes,5,opt,name=proof_blinding_r,json=proofBlindingR,proto3" json:"proof_blinding_r,omitempty"` - // The second blinding factor to use for the ZK output proof. - ProofBlindingS []byte `protobuf:"bytes,6,opt,name=proof_blinding_s,json=proofBlindingS,proto3" json:"proof_blinding_s,omitempty"` -} - -func (m *OutputPlan) Reset() { *m = OutputPlan{} } -func (m *OutputPlan) String() string { return proto.CompactTextString(m) } -func (*OutputPlan) ProtoMessage() {} -func (*OutputPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{22} -} -func (m *OutputPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutputPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutputPlan.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 *OutputPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutputPlan.Merge(m, src) -} -func (m *OutputPlan) XXX_Size() int { - return m.Size() -} -func (m *OutputPlan) XXX_DiscardUnknown() { - xxx_messageInfo_OutputPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_OutputPlan proto.InternalMessageInfo - -func (m *OutputPlan) GetValue() *v12.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *OutputPlan) GetDestAddress() *v11.Address { - if m != nil { - return m.DestAddress - } - return nil -} - -func (m *OutputPlan) GetRseed() []byte { - if m != nil { - return m.Rseed - } - return nil -} - -func (m *OutputPlan) GetValueBlinding() []byte { - if m != nil { - return m.ValueBlinding - } - return nil -} - -func (m *OutputPlan) GetProofBlindingR() []byte { - if m != nil { - return m.ProofBlindingR - } - return nil -} - -func (m *OutputPlan) GetProofBlindingS() []byte { - if m != nil { - return m.ProofBlindingS - } - return nil -} - -// Requests information on an asset by asset id -type AssetMetadataByIdRequest struct { - // The asset id to request information on. - AssetId *v12.AssetId `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` -} - -func (m *AssetMetadataByIdRequest) Reset() { *m = AssetMetadataByIdRequest{} } -func (m *AssetMetadataByIdRequest) String() string { return proto.CompactTextString(m) } -func (*AssetMetadataByIdRequest) ProtoMessage() {} -func (*AssetMetadataByIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{23} -} -func (m *AssetMetadataByIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetMetadataByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetMetadataByIdRequest.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 *AssetMetadataByIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetMetadataByIdRequest.Merge(m, src) -} -func (m *AssetMetadataByIdRequest) XXX_Size() int { - return m.Size() -} -func (m *AssetMetadataByIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AssetMetadataByIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetMetadataByIdRequest proto.InternalMessageInfo - -func (m *AssetMetadataByIdRequest) GetAssetId() *v12.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -type AssetMetadataByIdResponse struct { - // If present, information on the requested asset. - // - // If the requested asset was unknown, this field will not be present. - DenomMetadata *v12.Metadata `protobuf:"bytes,1,opt,name=denom_metadata,json=denomMetadata,proto3" json:"denom_metadata,omitempty"` -} - -func (m *AssetMetadataByIdResponse) Reset() { *m = AssetMetadataByIdResponse{} } -func (m *AssetMetadataByIdResponse) String() string { return proto.CompactTextString(m) } -func (*AssetMetadataByIdResponse) ProtoMessage() {} -func (*AssetMetadataByIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{24} -} -func (m *AssetMetadataByIdResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetMetadataByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetMetadataByIdResponse.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 *AssetMetadataByIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetMetadataByIdResponse.Merge(m, src) -} -func (m *AssetMetadataByIdResponse) XXX_Size() int { - return m.Size() -} -func (m *AssetMetadataByIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AssetMetadataByIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetMetadataByIdResponse proto.InternalMessageInfo - -func (m *AssetMetadataByIdResponse) GetDenomMetadata() *v12.Metadata { - if m != nil { - return m.DenomMetadata - } - return nil -} - -// Requests information on an asset by multiple asset ids -type AssetMetadataByIdsRequest struct { - // The asset IDs to request information on. Note that node is neither required - // nor expected to stream responses in the same order as this array. - AssetId []*v12.AssetId `protobuf:"bytes,1,rep,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` -} - -func (m *AssetMetadataByIdsRequest) Reset() { *m = AssetMetadataByIdsRequest{} } -func (m *AssetMetadataByIdsRequest) String() string { return proto.CompactTextString(m) } -func (*AssetMetadataByIdsRequest) ProtoMessage() {} -func (*AssetMetadataByIdsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{25} -} -func (m *AssetMetadataByIdsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetMetadataByIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetMetadataByIdsRequest.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 *AssetMetadataByIdsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetMetadataByIdsRequest.Merge(m, src) -} -func (m *AssetMetadataByIdsRequest) XXX_Size() int { - return m.Size() -} -func (m *AssetMetadataByIdsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AssetMetadataByIdsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetMetadataByIdsRequest proto.InternalMessageInfo - -func (m *AssetMetadataByIdsRequest) GetAssetId() []*v12.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -type AssetMetadataByIdsResponse struct { - // A single asset metadata streamed from the node. - DenomMetadata *v12.Metadata `protobuf:"bytes,1,opt,name=denom_metadata,json=denomMetadata,proto3" json:"denom_metadata,omitempty"` -} - -func (m *AssetMetadataByIdsResponse) Reset() { *m = AssetMetadataByIdsResponse{} } -func (m *AssetMetadataByIdsResponse) String() string { return proto.CompactTextString(m) } -func (*AssetMetadataByIdsResponse) ProtoMessage() {} -func (*AssetMetadataByIdsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_26a9f446de1cd73c, []int{26} -} -func (m *AssetMetadataByIdsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetMetadataByIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetMetadataByIdsResponse.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 *AssetMetadataByIdsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetMetadataByIdsResponse.Merge(m, src) -} -func (m *AssetMetadataByIdsResponse) XXX_Size() int { - return m.Size() -} -func (m *AssetMetadataByIdsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AssetMetadataByIdsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetMetadataByIdsResponse proto.InternalMessageInfo - -func (m *AssetMetadataByIdsResponse) GetDenomMetadata() *v12.Metadata { - if m != nil { - return m.DenomMetadata - } - return nil -} - -func init() { - proto.RegisterType((*ShieldedPoolParameters)(nil), "penumbra.core.component.shielded_pool.v1.ShieldedPoolParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.shielded_pool.v1.GenesisContent") - proto.RegisterType((*GenesisContent_Allocation)(nil), "penumbra.core.component.shielded_pool.v1.GenesisContent.Allocation") - proto.RegisterType((*FmdMetaParameters)(nil), "penumbra.core.component.shielded_pool.v1.FmdMetaParameters") - proto.RegisterType((*FmdMetaParameters_AlgorithmSlidingWindow)(nil), "penumbra.core.component.shielded_pool.v1.FmdMetaParameters.AlgorithmSlidingWindow") - proto.RegisterType((*FmdMetaParametersAlgorithmState)(nil), "penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState") - proto.RegisterType((*FmdMetaParametersAlgorithmState_FixedState)(nil), "penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.FixedState") - proto.RegisterType((*FmdMetaParametersAlgorithmState_SlidingWindowState)(nil), "penumbra.core.component.shielded_pool.v1.FmdMetaParametersAlgorithmState.SlidingWindowState") - proto.RegisterType((*FmdParameters)(nil), "penumbra.core.component.shielded_pool.v1.FmdParameters") - proto.RegisterType((*Note)(nil), "penumbra.core.component.shielded_pool.v1.Note") - proto.RegisterType((*NoteView)(nil), "penumbra.core.component.shielded_pool.v1.NoteView") - proto.RegisterType((*NoteCiphertext)(nil), "penumbra.core.component.shielded_pool.v1.NoteCiphertext") - proto.RegisterType((*NotePayload)(nil), "penumbra.core.component.shielded_pool.v1.NotePayload") - proto.RegisterType((*ZKOutputProof)(nil), "penumbra.core.component.shielded_pool.v1.ZKOutputProof") - proto.RegisterType((*ZKSpendProof)(nil), "penumbra.core.component.shielded_pool.v1.ZKSpendProof") - proto.RegisterType((*ZKNullifierDerivationProof)(nil), "penumbra.core.component.shielded_pool.v1.ZKNullifierDerivationProof") - proto.RegisterType((*Spend)(nil), "penumbra.core.component.shielded_pool.v1.Spend") - proto.RegisterType((*EventSpend)(nil), "penumbra.core.component.shielded_pool.v1.EventSpend") - proto.RegisterType((*EventOutput)(nil), "penumbra.core.component.shielded_pool.v1.EventOutput") - proto.RegisterType((*EventBroadcastClue)(nil), "penumbra.core.component.shielded_pool.v1.EventBroadcastClue") - proto.RegisterType((*SpendBody)(nil), "penumbra.core.component.shielded_pool.v1.SpendBody") - proto.RegisterType((*SpendView)(nil), "penumbra.core.component.shielded_pool.v1.SpendView") - proto.RegisterType((*SpendView_Visible)(nil), "penumbra.core.component.shielded_pool.v1.SpendView.Visible") - proto.RegisterType((*SpendView_Opaque)(nil), "penumbra.core.component.shielded_pool.v1.SpendView.Opaque") - proto.RegisterType((*SpendPlan)(nil), "penumbra.core.component.shielded_pool.v1.SpendPlan") - proto.RegisterType((*Output)(nil), "penumbra.core.component.shielded_pool.v1.Output") - proto.RegisterType((*OutputBody)(nil), "penumbra.core.component.shielded_pool.v1.OutputBody") - proto.RegisterType((*OutputView)(nil), "penumbra.core.component.shielded_pool.v1.OutputView") - proto.RegisterType((*OutputView_Visible)(nil), "penumbra.core.component.shielded_pool.v1.OutputView.Visible") - proto.RegisterType((*OutputView_Opaque)(nil), "penumbra.core.component.shielded_pool.v1.OutputView.Opaque") - proto.RegisterType((*OutputPlan)(nil), "penumbra.core.component.shielded_pool.v1.OutputPlan") - proto.RegisterType((*AssetMetadataByIdRequest)(nil), "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdRequest") - proto.RegisterType((*AssetMetadataByIdResponse)(nil), "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdResponse") - proto.RegisterType((*AssetMetadataByIdsRequest)(nil), "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdsRequest") - proto.RegisterType((*AssetMetadataByIdsResponse)(nil), "penumbra.core.component.shielded_pool.v1.AssetMetadataByIdsResponse") -} - -func init() { - proto.RegisterFile("penumbra/core/component/shielded_pool/v1/shielded_pool.proto", fileDescriptor_26a9f446de1cd73c) -} - -var fileDescriptor_26a9f446de1cd73c = []byte{ - // 1991 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x73, 0x1b, 0x49, - 0xd9, 0xf7, 0xc8, 0x5f, 0xc9, 0x63, 0xc9, 0x49, 0xfa, 0xcd, 0x1b, 0x8c, 0x00, 0x6d, 0x18, 0x36, - 0x59, 0x6f, 0x2d, 0x48, 0x2b, 0x27, 0xbb, 0x09, 0x4e, 0x0e, 0x58, 0xca, 0x26, 0x0e, 0x26, 0x1b, - 0xd1, 0x4e, 0x9c, 0x54, 0xca, 0x55, 0x53, 0xad, 0x99, 0x96, 0x35, 0xe5, 0x99, 0xe9, 0xd9, 0xe9, - 0x96, 0x62, 0xc1, 0x85, 0xa2, 0x0a, 0x38, 0xc0, 0x01, 0xb6, 0x8a, 0x82, 0xc3, 0x5e, 0x96, 0x23, - 0x67, 0xfe, 0x08, 0x8a, 0xd3, 0x72, 0xe3, 0x06, 0x95, 0xc0, 0x85, 0x0b, 0x37, 0x0e, 0x9c, 0xa8, - 0xfe, 0x18, 0x49, 0x23, 0x59, 0x2e, 0x29, 0x76, 0x15, 0x17, 0x6b, 0xba, 0xfb, 0xf7, 0xfc, 0x9e, - 0xcf, 0x7e, 0xba, 0x67, 0x0c, 0x77, 0x63, 0x1a, 0x75, 0xc2, 0x66, 0x42, 0x2a, 0x2e, 0x4b, 0x68, - 0xc5, 0x65, 0x61, 0xcc, 0x22, 0x1a, 0x89, 0x0a, 0x6f, 0xfb, 0x34, 0xf0, 0xa8, 0xe7, 0xc4, 0x8c, - 0x05, 0x95, 0x6e, 0x35, 0x3b, 0x51, 0x8e, 0x13, 0x26, 0x18, 0x5a, 0x4f, 0xa5, 0xcb, 0x52, 0xba, - 0xdc, 0x97, 0x2e, 0x67, 0xc1, 0xdd, 0x6a, 0xd1, 0xce, 0xea, 0x21, 0x9c, 0x53, 0x21, 0x59, 0xd5, - 0x83, 0x66, 0x2b, 0xae, 0x4f, 0xb4, 0xc5, 0x55, 0x58, 0xee, 0xa6, 0xc8, 0xab, 0x59, 0xe4, 0x21, - 0xed, 0x71, 0x09, 0x90, 0xbf, 0x06, 0x51, 0xca, 0x22, 0xa2, 0x4e, 0x28, 0x01, 0x51, 0x27, 0x34, - 0xeb, 0x6f, 0x67, 0xd7, 0xc5, 0x51, 0x9b, 0xf0, 0xb6, 0x84, 0xe8, 0x27, 0x83, 0xda, 0x18, 0xa0, - 0x92, 0x5e, 0x2c, 0x58, 0xc5, 0xa3, 0x2e, 0x69, 0xdd, 0xb8, 0x75, 0xcb, 0x69, 0x85, 0x9e, 0x44, - 0x0f, 0x8f, 0x8d, 0xcc, 0xcd, 0x89, 0x32, 0x89, 0xc7, 0x49, 0x46, 0x48, 0x4e, 0x8c, 0x7b, 0xa4, - 0xa5, 0x84, 0xf6, 0x59, 0xa4, 0x3e, 0xdb, 0x7f, 0xb7, 0xe0, 0xca, 0xae, 0x09, 0x6b, 0x83, 0xb1, - 0xa0, 0x41, 0x12, 0x12, 0x52, 0x41, 0x13, 0x8e, 0x28, 0x5c, 0x6c, 0xf9, 0x47, 0xd4, 0x93, 0x56, - 0x38, 0xb1, 0x9c, 0xe7, 0x6b, 0xd6, 0x55, 0x6b, 0x7d, 0x65, 0xe3, 0x56, 0x79, 0xda, 0x0c, 0x95, - 0xef, 0x87, 0xde, 0x80, 0xb2, 0x96, 0x5b, 0xb3, 0xf0, 0xaa, 0x22, 0x4d, 0xe7, 0x39, 0x72, 0xe1, - 0x82, 0x54, 0x10, 0x52, 0x41, 0x52, 0x2d, 0x39, 0xa5, 0xe5, 0xce, 0x4c, 0x5a, 0x1e, 0x51, 0x41, - 0x06, 0x9a, 0x70, 0xa1, 0x35, 0x34, 0xc5, 0xed, 0x1f, 0xcd, 0xc3, 0xea, 0x03, 0x1a, 0x51, 0xee, - 0xf3, 0x3a, 0x8b, 0x04, 0x8d, 0x04, 0x4a, 0xe0, 0x72, 0x86, 0x27, 0xeb, 0xe2, 0x77, 0xa6, 0x57, - 0x7e, 0x7c, 0xf8, 0x30, 0xe2, 0xa3, 0xf3, 0x32, 0xa4, 0x2b, 0x24, 0x08, 0x98, 0x4b, 0x84, 0xcf, - 0x22, 0xbe, 0x36, 0x7f, 0x75, 0x7e, 0x7d, 0x65, 0xa3, 0x3e, 0xbd, 0xaa, 0xac, 0x0b, 0xe5, 0xad, - 0x3e, 0x17, 0x1e, 0xe6, 0x2d, 0x7e, 0x6a, 0x01, 0x0c, 0xd6, 0xd0, 0x4d, 0x58, 0x22, 0x21, 0xeb, - 0x44, 0xc2, 0xf8, 0xf6, 0xd5, 0x11, 0x85, 0xb2, 0x7e, 0xbb, 0xd5, 0xf2, 0x96, 0xc2, 0x60, 0x83, - 0x45, 0x97, 0x61, 0xd1, 0xa3, 0x11, 0x0b, 0x55, 0x36, 0xce, 0x63, 0x3d, 0x40, 0xb7, 0x61, 0x99, - 0x78, 0x5e, 0x42, 0xb9, 0xb4, 0x5e, 0x92, 0x95, 0x46, 0xc8, 0xd4, 0x6e, 0x91, 0x6c, 0x1a, 0x85, - 0x53, 0xb8, 0xfd, 0xd9, 0x3c, 0x5c, 0x1a, 0xcb, 0x13, 0xfa, 0x00, 0xbe, 0x24, 0xb3, 0x7f, 0x90, - 0x10, 0x97, 0x3a, 0x31, 0x4d, 0x7c, 0xe6, 0x39, 0xcd, 0x80, 0xb9, 0x87, 0x3a, 0x11, 0x0b, 0xf8, - 0x72, 0x2b, 0xf4, 0x1e, 0xc8, 0xd5, 0x86, 0x5a, 0xac, 0xa9, 0x35, 0xb4, 0x01, 0x97, 0x75, 0x6d, - 0xc6, 0x09, 0x75, 0x7d, 0xee, 0xb3, 0xc8, 0x69, 0xfa, 0x42, 0x57, 0x4e, 0x61, 0x7b, 0x0e, 0x23, - 0xb5, 0xda, 0x48, 0x17, 0x6b, 0xbe, 0xe0, 0xe8, 0x87, 0xb0, 0xca, 0x03, 0xdf, 0xf3, 0xa3, 0x03, - 0xe7, 0xa5, 0x1f, 0x79, 0xec, 0xa5, 0xf1, 0x00, 0x9f, 0xa2, 0xce, 0xca, 0x5b, 0xc1, 0x01, 0x4b, - 0x7c, 0xd1, 0x0e, 0x77, 0x35, 0xf5, 0x33, 0xc5, 0xbc, 0x3d, 0x87, 0x0b, 0x7c, 0x78, 0xa2, 0xf8, - 0x2b, 0x0b, 0xae, 0x1c, 0x8f, 0x45, 0x1b, 0xf0, 0xff, 0xda, 0x1e, 0xa7, 0x13, 0x7b, 0x44, 0xa4, - 0x61, 0xd0, 0x01, 0x28, 0xe0, 0xff, 0xd3, 0x8b, 0x4f, 0xd5, 0x9a, 0x0e, 0x02, 0x47, 0x75, 0x28, - 0x09, 0x92, 0x1c, 0x50, 0x41, 0x3d, 0xc7, 0xa3, 0x82, 0xba, 0x2a, 0xf1, 0x52, 0x32, 0xf5, 0x4d, - 0x45, 0x02, 0x7f, 0x25, 0x45, 0xdd, 0xeb, 0x83, 0x1a, 0x34, 0xd1, 0x8a, 0x6b, 0x2b, 0x70, 0x9e, - 0xa4, 0x26, 0xd9, 0xff, 0xc9, 0xc1, 0x5b, 0x63, 0xee, 0x0d, 0x2c, 0x16, 0x44, 0x50, 0x14, 0xc0, - 0xa2, 0x8a, 0xab, 0xa9, 0xa3, 0x27, 0xa7, 0x08, 0x5c, 0x96, 0xb9, 0x7c, 0x5f, 0xd2, 0xaa, 0xc7, - 0xed, 0x39, 0xac, 0x95, 0xa0, 0x9f, 0x58, 0x63, 0x09, 0xd3, 0x8d, 0x61, 0xff, 0xec, 0xf4, 0x66, - 0x32, 0x91, 0xea, 0x1f, 0x49, 0x5d, 0x1e, 0x60, 0x60, 0x5e, 0xf1, 0xbb, 0x80, 0xc6, 0x85, 0xd0, - 0x4d, 0xb8, 0x42, 0xe2, 0x38, 0x61, 0x47, 0x7e, 0x28, 0x33, 0xe8, 0x06, 0x1d, 0xea, 0xb8, 0xfd, - 0x2d, 0x57, 0xc0, 0x97, 0x87, 0x56, 0xeb, 0x41, 0x87, 0xd6, 0xe5, 0x5a, 0x6d, 0x19, 0x16, 0xb9, - 0x14, 0xb7, 0x5d, 0x28, 0x64, 0x1a, 0x25, 0xba, 0x06, 0xab, 0x23, 0x95, 0xad, 0x79, 0x0a, 0x71, - 0xa6, 0xa4, 0xdf, 0x03, 0x44, 0xb8, 0xc3, 0x5a, 0x7a, 0xcb, 0x38, 0x6d, 0xea, 0x1f, 0xb4, 0x85, - 0x8a, 0xd2, 0x02, 0xbe, 0x40, 0xf8, 0xe3, 0x96, 0xda, 0x2e, 0xdb, 0x6a, 0xda, 0xfe, 0xb9, 0x05, - 0x0b, 0x1f, 0x33, 0x41, 0xd1, 0x0d, 0x58, 0xec, 0x92, 0xa0, 0x43, 0x4d, 0x1a, 0xbf, 0x36, 0x12, - 0x4e, 0x7d, 0x78, 0x76, 0xab, 0xe5, 0x3d, 0x09, 0xc2, 0x1a, 0x2b, 0xdb, 0x41, 0xc2, 0x29, 0xf5, - 0x14, 0x7b, 0x1e, 0xeb, 0xc1, 0x29, 0xda, 0xc1, 0x6f, 0x2c, 0x38, 0x27, 0xad, 0xd9, 0xf3, 0xe9, - 0x4b, 0x74, 0x2b, 0x6b, 0xd1, 0xd7, 0x4f, 0xb4, 0x48, 0x4a, 0x9c, 0x6c, 0xd5, 0xdd, 0x51, 0xab, - 0xec, 0x93, 0xad, 0x52, 0x8c, 0x7d, 0xcb, 0xae, 0xc3, 0xaa, 0x34, 0xac, 0xee, 0xc7, 0x6d, 0x9a, - 0x08, 0x7a, 0xa4, 0x5a, 0xa1, 0x1f, 0x45, 0x34, 0x51, 0xe6, 0xe5, 0xb1, 0x1e, 0xd8, 0xff, 0xb0, - 0x60, 0x45, 0x02, 0x1b, 0xa4, 0x17, 0x30, 0xe2, 0xa1, 0x06, 0x5c, 0x88, 0x98, 0x4c, 0x3e, 0x0b, - 0x43, 0x5f, 0x84, 0xb4, 0xdf, 0x6f, 0xdf, 0x19, 0xd2, 0xae, 0x8e, 0xe1, 0xb2, 0x3c, 0x7f, 0xe5, - 0xc9, 0x21, 0x93, 0x5f, 0xef, 0xc3, 0xf1, 0xaa, 0x94, 0x1f, 0x8c, 0xd1, 0x37, 0xa0, 0x40, 0xe3, - 0x36, 0x0d, 0x69, 0x42, 0x02, 0xe7, 0x90, 0xf6, 0x8c, 0x97, 0xf9, 0xfe, 0xe4, 0x0e, 0xed, 0x21, - 0x07, 0x56, 0x69, 0xa4, 0x78, 0xa9, 0xe7, 0x48, 0x02, 0xe3, 0xf3, 0xed, 0xe9, 0x77, 0x49, 0xd6, - 0x5d, 0x5c, 0xe8, 0xf3, 0xc9, 0x05, 0xfb, 0x1a, 0x14, 0x5e, 0xec, 0x3c, 0xee, 0x88, 0xb8, 0x23, - 0x1a, 0x09, 0x63, 0xad, 0x09, 0xe1, 0x78, 0x1b, 0xf2, 0x2f, 0x76, 0x76, 0x63, 0x1a, 0x79, 0x27, - 0xa1, 0x36, 0xa0, 0xf8, 0x62, 0xe7, 0xe3, 0x4e, 0x10, 0xf8, 0x2d, 0x9f, 0x26, 0xf7, 0x68, 0xe2, - 0x77, 0xd5, 0x21, 0x75, 0x92, 0xcc, 0xbf, 0x2c, 0x58, 0x54, 0xc4, 0xe8, 0x01, 0x2c, 0x34, 0x99, - 0xd7, 0x33, 0x71, 0xbd, 0x31, 0xc3, 0x19, 0x2d, 0xc5, 0x6b, 0xcc, 0xeb, 0x61, 0x45, 0x80, 0x1e, - 0xc3, 0x39, 0xd2, 0x11, 0x6d, 0x87, 0xfb, 0x07, 0xa6, 0xa9, 0xdc, 0x1c, 0x4b, 0x52, 0xf6, 0x42, - 0x95, 0x92, 0x6c, 0x75, 0x44, 0x7b, 0xd7, 0x3f, 0x88, 0x88, 0xe8, 0x24, 0x14, 0x2f, 0x13, 0x3d, - 0x44, 0xdf, 0x83, 0xc5, 0x58, 0xba, 0x60, 0x82, 0xff, 0xe1, 0xf4, 0xa6, 0x0d, 0x07, 0x0d, 0x6b, - 0x12, 0xfb, 0x29, 0xc0, 0x47, 0x5d, 0x1a, 0x89, 0xd4, 0xeb, 0xf3, 0x51, 0x1a, 0x31, 0xe3, 0xfa, - 0xbb, 0x93, 0xf9, 0x75, 0x69, 0xf5, 0x43, 0x8c, 0x07, 0xb2, 0xb6, 0x03, 0x2b, 0x8a, 0x56, 0x27, - 0xf3, 0xec, 0x0b, 0xd6, 0xfe, 0x99, 0x05, 0x48, 0x69, 0xa8, 0x25, 0x8c, 0x78, 0x2e, 0xe1, 0x42, - 0x36, 0x3b, 0xf4, 0x6d, 0x58, 0x70, 0x07, 0xbb, 0xfb, 0xda, 0xe4, 0x48, 0xcb, 0xfb, 0x6e, 0xb7, - 0x5a, 0x96, 0x42, 0x58, 0x89, 0xa0, 0x0f, 0x21, 0x27, 0x8e, 0x4c, 0x8a, 0xae, 0x8f, 0x38, 0x6d, - 0x2e, 0xd5, 0xdd, 0x6a, 0xf9, 0x49, 0x42, 0x22, 0x4e, 0xd4, 0xf9, 0xf6, 0xd0, 0xc3, 0x39, 0x71, - 0x64, 0xff, 0xdb, 0x82, 0xf3, 0xfd, 0xa4, 0xa3, 0xe7, 0x80, 0x9a, 0x24, 0x20, 0x91, 0x7b, 0x8c, - 0xb3, 0xef, 0x4e, 0x6a, 0x36, 0x35, 0x2d, 0x31, 0xe4, 0xee, 0xa5, 0xe6, 0xe8, 0x54, 0x36, 0x37, - 0x4b, 0x6f, 0x9e, 0x1b, 0x74, 0x1f, 0x72, 0xc9, 0xe1, 0xda, 0xc2, 0x58, 0xf5, 0x9c, 0x54, 0x8b, - 0x7b, 0x34, 0xf1, 0x5b, 0xbe, 0xbe, 0xe5, 0xed, 0xd0, 0x1e, 0xce, 0x25, 0x87, 0xf6, 0x1f, 0xe6, - 0x8d, 0xe3, 0xaa, 0xb1, 0x3e, 0x83, 0xe5, 0xae, 0xcf, 0xfd, 0x66, 0x90, 0x06, 0xff, 0xce, 0x8c, - 0x7b, 0x46, 0xb2, 0x94, 0xf7, 0x34, 0xc5, 0xf6, 0x1c, 0x4e, 0xd9, 0xd0, 0x13, 0x58, 0x62, 0x31, - 0xf9, 0xa4, 0x43, 0x4d, 0x6e, 0x36, 0xdf, 0x84, 0xf7, 0xb1, 0x62, 0xd8, 0x9e, 0xc3, 0x86, 0xab, - 0xf8, 0x5b, 0x0b, 0x96, 0x8d, 0x32, 0xf4, 0x11, 0x2c, 0x72, 0x89, 0x34, 0x86, 0x57, 0x66, 0x54, - 0x80, 0xb5, 0x34, 0xba, 0x0f, 0x0b, 0xaa, 0x29, 0x6a, 0x33, 0x37, 0x66, 0x6b, 0x8a, 0xea, 0x60, - 0x50, 0xf2, 0xc5, 0xc7, 0xb0, 0xa4, 0xcd, 0x3d, 0x23, 0xc3, 0x6a, 0x79, 0x00, 0xf5, 0xe0, 0x74, - 0x7d, 0xfa, 0xd2, 0xfe, 0x69, 0xce, 0xa4, 0xad, 0x11, 0x90, 0x08, 0xd5, 0x8c, 0xd1, 0x5a, 0x43, - 0x79, 0x36, 0xa3, 0xb5, 0xc1, 0xa8, 0x08, 0xe7, 0x62, 0xc6, 0x7d, 0x59, 0x1b, 0xe6, 0x46, 0xd0, - 0x1f, 0xa3, 0x12, 0x40, 0x42, 0x22, 0x8f, 0x85, 0xfe, 0x0f, 0x68, 0xa2, 0x5a, 0x56, 0x1e, 0x0f, - 0xcd, 0xc8, 0xeb, 0x87, 0x3a, 0x5f, 0x9d, 0x66, 0xe0, 0x47, 0xf2, 0xae, 0xa3, 0x0a, 0x33, 0x8f, - 0x0b, 0x6a, 0xb6, 0x66, 0x26, 0xd1, 0x3a, 0x5c, 0x54, 0xfd, 0xaa, 0x0f, 0x73, 0x92, 0xb5, 0x45, - 0x05, 0x5c, 0x55, 0xf3, 0x29, 0x10, 0x1f, 0x83, 0xe4, 0x6a, 0xb7, 0x8c, 0x22, 0x77, 0xed, 0xcf, - 0x2d, 0x58, 0x32, 0xfd, 0x69, 0x3b, 0xd3, 0xed, 0x6f, 0x4e, 0x1f, 0x05, 0x2d, 0x3f, 0xd4, 0xee, - 0x1f, 0xa5, 0xdd, 0x39, 0x37, 0xeb, 0xfb, 0x6b, 0xe6, 0xe4, 0x4b, 0xdb, 0xf3, 0xa7, 0x39, 0x80, - 0x81, 0x0e, 0xf4, 0x1c, 0xf2, 0xaa, 0x8f, 0xc6, 0xfa, 0x22, 0x60, 0xec, 0xfd, 0x60, 0xb6, 0xac, - 0x99, 0x5b, 0x04, 0x5e, 0x89, 0x86, 0xae, 0x14, 0xc7, 0xf7, 0xad, 0xdc, 0x19, 0xf4, 0xad, 0x75, - 0xb8, 0xf8, 0x32, 0x21, 0x71, 0x4c, 0xe5, 0x9b, 0x77, 0xc8, 0xd4, 0xed, 0x42, 0xd7, 0xc1, 0xaa, - 0x99, 0x7f, 0x44, 0x43, 0x26, 0xef, 0x17, 0xd7, 0xe1, 0x02, 0xeb, 0x1e, 0x3a, 0x29, 0x5a, 0x02, - 0x4d, 0x31, 0xb0, 0xee, 0xe1, 0x33, 0x3d, 0xbb, 0x43, 0x7b, 0xf6, 0x8f, 0x17, 0xd2, 0xa0, 0xa8, - 0xce, 0xf3, 0x7c, 0xb4, 0xf3, 0xdc, 0x9d, 0x35, 0x7f, 0x93, 0x5a, 0xcf, 0xd3, 0x91, 0xd6, 0x73, - 0xe7, 0x8d, 0x88, 0xc7, 0x7a, 0xcf, 0x5f, 0x87, 0x7a, 0xcf, 0x36, 0x2c, 0x31, 0x05, 0x35, 0xb6, - 0xbf, 0x3f, 0xab, 0x0a, 0x6c, 0xe4, 0xcf, 0xaa, 0xfd, 0xa0, 0x1a, 0xac, 0x98, 0xf2, 0xea, 0xa7, - 0x6a, 0xfc, 0x9e, 0x9c, 0x5e, 0x6b, 0x4d, 0xf9, 0xc8, 0x23, 0x01, 0xe2, 0xfe, 0x73, 0x11, 0xf7, - 0x5b, 0xd8, 0x99, 0xf9, 0x57, 0x2b, 0xc0, 0x8a, 0x7e, 0xd2, 0x6d, 0xec, 0xd7, 0xfd, 0x9d, 0xa1, - 0xfa, 0xd8, 0x1b, 0xbd, 0x69, 0x6c, 0x41, 0xde, 0xa3, 0x5c, 0x38, 0xe9, 0x15, 0x3e, 0x37, 0xd5, - 0x8b, 0xc5, 0x8a, 0x94, 0x31, 0x83, 0xc1, 0x6b, 0xc1, 0xfc, 0xf0, 0x6b, 0xc1, 0xff, 0xb0, 0xab, - 0xed, 0xc1, 0xda, 0x96, 0x74, 0x56, 0xbe, 0x8c, 0x7a, 0x44, 0x90, 0x5a, 0xef, 0xa1, 0x87, 0xe9, - 0x27, 0x1d, 0xca, 0x05, 0xda, 0x84, 0x73, 0x2a, 0x10, 0x8e, 0xef, 0x19, 0x5f, 0xdf, 0x9a, 0x14, - 0x27, 0xc5, 0xf1, 0xd0, 0xc3, 0xcb, 0x44, 0x3f, 0xd8, 0x1e, 0x7c, 0xf9, 0x18, 0x5e, 0x1e, 0xb3, - 0x88, 0x53, 0xf4, 0x00, 0x56, 0xd5, 0x47, 0x1b, 0xf5, 0x6d, 0x4d, 0xae, 0x9a, 0x34, 0x5c, 0x9d, - 0x44, 0x9f, 0xb2, 0xe0, 0x82, 0x92, 0x4b, 0x87, 0xf6, 0xb3, 0x63, 0xb4, 0xf0, 0xe3, 0xcc, 0xb7, - 0xd4, 0x07, 0xad, 0xe9, 0xcd, 0xa7, 0x50, 0x3c, 0x8e, 0xf8, 0x8c, 0xed, 0xdf, 0xf8, 0x73, 0x0e, - 0xf2, 0xdf, 0xef, 0xd0, 0xa4, 0xb7, 0x4b, 0x93, 0xae, 0xef, 0x52, 0xf4, 0x99, 0x05, 0x97, 0xc6, - 0x14, 0xa3, 0xda, 0xf4, 0xbb, 0x60, 0x52, 0x32, 0x8b, 0xf5, 0x53, 0x71, 0x18, 0xc7, 0x3f, 0xb7, - 0x00, 0x8d, 0xc7, 0x05, 0x9d, 0x86, 0x3b, 0x4d, 0x57, 0xf1, 0xde, 0xe9, 0x48, 0xb4, 0x85, 0xef, - 0x5b, 0xb5, 0x5f, 0xcc, 0xff, 0xf1, 0x55, 0xc9, 0xfa, 0xe2, 0x55, 0xc9, 0xfa, 0xdb, 0xab, 0x92, - 0xf5, 0xcb, 0xd7, 0xa5, 0xb9, 0x2f, 0x5e, 0x97, 0xe6, 0xfe, 0xf2, 0xba, 0x34, 0x07, 0xdf, 0x74, - 0x59, 0x38, 0xb5, 0x96, 0xda, 0xa5, 0xcc, 0xf7, 0xd3, 0x84, 0x09, 0xd6, 0xb0, 0x5e, 0xc4, 0x07, - 0xbe, 0x68, 0x77, 0x9a, 0x52, 0xae, 0xc2, 0x45, 0x42, 0xa2, 0x03, 0x1a, 0xb0, 0x2e, 0xfd, 0x96, - 0x7c, 0xb7, 0xe8, 0x24, 0x94, 0x57, 0xfc, 0x48, 0xd0, 0xc4, 0x6d, 0x13, 0xf9, 0xcb, 0x45, 0xa5, - 0x7b, 0xbb, 0xa2, 0x06, 0x95, 0x69, 0xff, 0xf1, 0x70, 0x27, 0x33, 0xd1, 0xad, 0xfe, 0x2e, 0xb7, - 0xd0, 0xa8, 0xd7, 0x77, 0x7f, 0x9f, 0x7b, 0xa7, 0x91, 0x1a, 0x5e, 0x97, 0x86, 0xd7, 0xfb, 0x86, - 0x0f, 0x9b, 0x59, 0xde, 0xab, 0xfe, 0x69, 0x80, 0xdc, 0x97, 0xc8, 0xfd, 0x3e, 0x72, 0x7f, 0x18, - 0xb9, 0xbf, 0x57, 0x7d, 0x95, 0xbb, 0x31, 0x25, 0x72, 0xff, 0x41, 0xa3, 0x96, 0xc6, 0xfb, 0x9f, - 0xb9, 0xf7, 0x52, 0xa9, 0xcd, 0x4d, 0x29, 0x26, 0xff, 0x1a, 0xb9, 0xcd, 0xcd, 0x61, 0xc1, 0xcd, - 0xcd, 0xbd, 0x6a, 0x73, 0x49, 0x7d, 0xce, 0xbf, 0xf1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, - 0x31, 0x7e, 0xb6, 0x7a, 0x19, 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - AssetMetadataById(ctx context.Context, in *AssetMetadataByIdRequest, opts ...grpc.CallOption) (*AssetMetadataByIdResponse, error) - // Requests a stream of asset metadata, given an array of asset IDs. Responses - // may be streamed in a different order from that of the asset IDs in the - // request, and asset IDs unknown to the node will not receive any response - // objects -- that is, the number of responses may be smaller than the length - // of the asset IDs array. - AssetMetadataByIds(ctx context.Context, in *AssetMetadataByIdsRequest, opts ...grpc.CallOption) (QueryService_AssetMetadataByIdsClient, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) AssetMetadataById(ctx context.Context, in *AssetMetadataByIdRequest, opts ...grpc.CallOption) (*AssetMetadataByIdResponse, error) { - out := new(AssetMetadataByIdResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) AssetMetadataByIds(ctx context.Context, in *AssetMetadataByIdsRequest, opts ...grpc.CallOption) (QueryService_AssetMetadataByIdsClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataByIds", opts...) - if err != nil { - return nil, err - } - x := &queryServiceAssetMetadataByIdsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_AssetMetadataByIdsClient interface { - Recv() (*AssetMetadataByIdsResponse, error) - grpc.ClientStream -} - -type queryServiceAssetMetadataByIdsClient struct { - grpc.ClientStream -} - -func (x *queryServiceAssetMetadataByIdsClient) Recv() (*AssetMetadataByIdsResponse, error) { - m := new(AssetMetadataByIdsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - AssetMetadataById(context.Context, *AssetMetadataByIdRequest) (*AssetMetadataByIdResponse, error) - // Requests a stream of asset metadata, given an array of asset IDs. Responses - // may be streamed in a different order from that of the asset IDs in the - // request, and asset IDs unknown to the node will not receive any response - // objects -- that is, the number of responses may be smaller than the length - // of the asset IDs array. - AssetMetadataByIds(*AssetMetadataByIdsRequest, QueryService_AssetMetadataByIdsServer) error -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) AssetMetadataById(ctx context.Context, req *AssetMetadataByIdRequest) (*AssetMetadataByIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AssetMetadataById not implemented") -} -func (*UnimplementedQueryServiceServer) AssetMetadataByIds(req *AssetMetadataByIdsRequest, srv QueryService_AssetMetadataByIdsServer) error { - return status.Errorf(codes.Unimplemented, "method AssetMetadataByIds not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_AssetMetadataById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AssetMetadataByIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).AssetMetadataById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.shielded_pool.v1.QueryService/AssetMetadataById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).AssetMetadataById(ctx, req.(*AssetMetadataByIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_AssetMetadataByIds_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(AssetMetadataByIdsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).AssetMetadataByIds(m, &queryServiceAssetMetadataByIdsServer{stream}) -} - -type QueryService_AssetMetadataByIdsServer interface { - Send(*AssetMetadataByIdsResponse) error - grpc.ServerStream -} - -type queryServiceAssetMetadataByIdsServer struct { - grpc.ServerStream -} - -func (x *queryServiceAssetMetadataByIdsServer) Send(m *AssetMetadataByIdsResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.shielded_pool.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AssetMetadataById", - Handler: _QueryService_AssetMetadataById_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "AssetMetadataByIds", - Handler: _QueryService_AssetMetadataByIds_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/core/component/shielded_pool/v1/shielded_pool.proto", -} - -func (m *ShieldedPoolParameters) Marshal() (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 *ShieldedPoolParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ShieldedPoolParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FmdMetaParams != nil { - { - size, err := m.FmdMetaParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.FixedFmdParams != nil { - { - size, err := m.FixedFmdParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Allocations) > 0 { - for iNdEx := len(m.Allocations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Allocations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.ShieldedPoolParams != nil { - { - size, err := m.ShieldedPoolParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent_Allocation) Marshal() (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 *GenesisContent_Allocation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent_Allocation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FmdMetaParameters) Marshal() (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 *FmdMetaParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Algorithm != nil { - { - size := m.Algorithm.Size() - i -= size - if _, err := m.Algorithm.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.FmdGracePeriodBlocks != 0 { - i = encodeVarintShieldedPool(dAtA, i, uint64(m.FmdGracePeriodBlocks)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *FmdMetaParameters_FixedPrecisionBits) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParameters_FixedPrecisionBits) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintShieldedPool(dAtA, i, uint64(m.FixedPrecisionBits)) - i-- - dAtA[i] = 0x10 - return len(dAtA) - i, nil -} -func (m *FmdMetaParameters_SlidingWindow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParameters_SlidingWindow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SlidingWindow != nil { - { - size, err := m.SlidingWindow.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) Marshal() (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 *FmdMetaParameters_AlgorithmSlidingWindow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParameters_AlgorithmSlidingWindow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TargetedDetectionsPerWindow != 0 { - i = encodeVarintShieldedPool(dAtA, i, uint64(m.TargetedDetectionsPerWindow)) - i-- - dAtA[i] = 0x10 - } - if m.WindowUpdatePeriods != 0 { - i = encodeVarintShieldedPool(dAtA, i, uint64(m.WindowUpdatePeriods)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *FmdMetaParametersAlgorithmState) Marshal() (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 *FmdMetaParametersAlgorithmState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParametersAlgorithmState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size := m.State.Size() - i -= size - if _, err := m.State.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *FmdMetaParametersAlgorithmState_Fixed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParametersAlgorithmState_Fixed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Fixed != nil { - { - size, err := m.Fixed.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParametersAlgorithmState_SlidingWindow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SlidingWindow != nil { - { - size, err := m.SlidingWindow.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *FmdMetaParametersAlgorithmState_FixedState) Marshal() (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 *FmdMetaParametersAlgorithmState_FixedState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParametersAlgorithmState_FixedState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) Marshal() (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 *FmdMetaParametersAlgorithmState_SlidingWindowState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ApproximateClueCount != 0 { - i = encodeVarintShieldedPool(dAtA, i, uint64(m.ApproximateClueCount)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *FmdParameters) Marshal() (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 *FmdParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FmdParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AsOfBlockHeight != 0 { - i = encodeVarintShieldedPool(dAtA, i, uint64(m.AsOfBlockHeight)) - i-- - dAtA[i] = 0x10 - } - if m.PrecisionBits != 0 { - i = encodeVarintShieldedPool(dAtA, i, uint64(m.PrecisionBits)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Note) Marshal() (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 *Note) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Note) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Rseed) > 0 { - i -= len(m.Rseed) - copy(dAtA[i:], m.Rseed) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Rseed))) - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NoteView) Marshal() (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 *NoteView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoteView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Rseed) > 0 { - i -= len(m.Rseed) - copy(dAtA[i:], m.Rseed) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Rseed))) - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NoteCiphertext) Marshal() (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 *NoteCiphertext) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoteCiphertext) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NotePayload) Marshal() (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 *NotePayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NotePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EncryptedNote != nil { - { - size, err := m.EncryptedNote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.EphemeralKey) > 0 { - i -= len(m.EphemeralKey) - copy(dAtA[i:], m.EphemeralKey) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.EphemeralKey))) - i-- - dAtA[i] = 0x12 - } - if m.NoteCommitment != nil { - { - size, err := m.NoteCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ZKOutputProof) Marshal() (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 *ZKOutputProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ZKOutputProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ZKSpendProof) Marshal() (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 *ZKSpendProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ZKSpendProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ZKNullifierDerivationProof) Marshal() (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 *ZKNullifierDerivationProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ZKNullifierDerivationProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Spend) Marshal() (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 *Spend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Spend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.AuthSig != nil { - { - size, err := m.AuthSig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventSpend) Marshal() (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 *EventSpend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventSpend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventOutput) Marshal() (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 *EventOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NoteCommitment != nil { - { - size, err := m.NoteCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventBroadcastClue) Marshal() (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 *EventBroadcastClue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventBroadcastClue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Tx != nil { - { - size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Clue != nil { - { - size, err := m.Clue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpendBody) Marshal() (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 *SpendBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Rk != nil { - { - size, err := m.Rk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.BalanceCommitment != nil { - { - size, err := m.BalanceCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpendView) Marshal() (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 *SpendView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SpendView != nil { - { - size := m.SpendView.Size() - i -= size - if _, err := m.SpendView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SpendView_Visible_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendView_Visible_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Visible != nil { - { - size, err := m.Visible.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SpendView_Opaque_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendView_Opaque_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Opaque != nil { - { - size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SpendView_Visible) Marshal() (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 *SpendView_Visible) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendView_Visible) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Spend != nil { - { - size, err := m.Spend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpendView_Opaque) Marshal() (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 *SpendView_Opaque) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendView_Opaque) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Spend != nil { - { - size, err := m.Spend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpendPlan) Marshal() (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 *SpendPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProofBlindingS) > 0 { - i -= len(m.ProofBlindingS) - copy(dAtA[i:], m.ProofBlindingS) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.ProofBlindingS))) - i-- - dAtA[i] = 0x32 - } - if len(m.ProofBlindingR) > 0 { - i -= len(m.ProofBlindingR) - copy(dAtA[i:], m.ProofBlindingR) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.ProofBlindingR))) - i-- - dAtA[i] = 0x2a - } - if len(m.ValueBlinding) > 0 { - i -= len(m.ValueBlinding) - copy(dAtA[i:], m.ValueBlinding) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.ValueBlinding))) - i-- - dAtA[i] = 0x22 - } - if len(m.Randomizer) > 0 { - i -= len(m.Randomizer) - copy(dAtA[i:], m.Randomizer) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Randomizer))) - i-- - dAtA[i] = 0x1a - } - if m.Position != 0 { - i = encodeVarintShieldedPool(dAtA, i, uint64(m.Position)) - i-- - dAtA[i] = 0x10 - } - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Output) Marshal() (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 *Output) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proof != nil { - { - size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *OutputBody) Marshal() (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 *OutputBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.OvkWrappedKey) > 0 { - i -= len(m.OvkWrappedKey) - copy(dAtA[i:], m.OvkWrappedKey) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.OvkWrappedKey))) - i-- - dAtA[i] = 0x22 - } - if len(m.WrappedMemoKey) > 0 { - i -= len(m.WrappedMemoKey) - copy(dAtA[i:], m.WrappedMemoKey) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.WrappedMemoKey))) - i-- - dAtA[i] = 0x1a - } - if m.BalanceCommitment != nil { - { - size, err := m.BalanceCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.NotePayload != nil { - { - size, err := m.NotePayload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *OutputView) Marshal() (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 *OutputView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OutputView != nil { - { - size := m.OutputView.Size() - i -= size - if _, err := m.OutputView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *OutputView_Visible_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputView_Visible_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Visible != nil { - { - size, err := m.Visible.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *OutputView_Opaque_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputView_Opaque_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Opaque != nil { - { - size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *OutputView_Visible) Marshal() (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 *OutputView_Visible) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputView_Visible) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PayloadKey != nil { - { - size, err := m.PayloadKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *OutputView_Opaque) Marshal() (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 *OutputView_Opaque) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputView_Opaque) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *OutputPlan) Marshal() (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 *OutputPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutputPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProofBlindingS) > 0 { - i -= len(m.ProofBlindingS) - copy(dAtA[i:], m.ProofBlindingS) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.ProofBlindingS))) - i-- - dAtA[i] = 0x32 - } - if len(m.ProofBlindingR) > 0 { - i -= len(m.ProofBlindingR) - copy(dAtA[i:], m.ProofBlindingR) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.ProofBlindingR))) - i-- - dAtA[i] = 0x2a - } - if len(m.ValueBlinding) > 0 { - i -= len(m.ValueBlinding) - copy(dAtA[i:], m.ValueBlinding) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.ValueBlinding))) - i-- - dAtA[i] = 0x22 - } - if len(m.Rseed) > 0 { - i -= len(m.Rseed) - copy(dAtA[i:], m.Rseed) - i = encodeVarintShieldedPool(dAtA, i, uint64(len(m.Rseed))) - i-- - dAtA[i] = 0x1a - } - if m.DestAddress != nil { - { - size, err := m.DestAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetMetadataByIdRequest) Marshal() (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 *AssetMetadataByIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetMetadataByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *AssetMetadataByIdResponse) Marshal() (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 *AssetMetadataByIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetMetadataByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DenomMetadata != nil { - { - size, err := m.DenomMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetMetadataByIdsRequest) Marshal() (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 *AssetMetadataByIdsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetMetadataByIdsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AssetId) > 0 { - for iNdEx := len(m.AssetId) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AssetId[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AssetMetadataByIdsResponse) Marshal() (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 *AssetMetadataByIdsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetMetadataByIdsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DenomMetadata != nil { - { - size, err := m.DenomMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintShieldedPool(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintShieldedPool(dAtA []byte, offset int, v uint64) int { - offset -= sovShieldedPool(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ShieldedPoolParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FixedFmdParams != nil { - l = m.FixedFmdParams.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.FmdMetaParams != nil { - l = m.FmdMetaParams.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ShieldedPoolParams != nil { - l = m.ShieldedPoolParams.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if len(m.Allocations) > 0 { - for _, e := range m.Allocations { - l = e.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - } - return n -} - -func (m *GenesisContent_Allocation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *FmdMetaParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FmdGracePeriodBlocks != 0 { - n += 1 + sovShieldedPool(uint64(m.FmdGracePeriodBlocks)) - } - if m.Algorithm != nil { - n += m.Algorithm.Size() - } - return n -} - -func (m *FmdMetaParameters_FixedPrecisionBits) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovShieldedPool(uint64(m.FixedPrecisionBits)) - return n -} -func (m *FmdMetaParameters_SlidingWindow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SlidingWindow != nil { - l = m.SlidingWindow.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.WindowUpdatePeriods != 0 { - n += 1 + sovShieldedPool(uint64(m.WindowUpdatePeriods)) - } - if m.TargetedDetectionsPerWindow != 0 { - n += 1 + sovShieldedPool(uint64(m.TargetedDetectionsPerWindow)) - } - return n -} - -func (m *FmdMetaParametersAlgorithmState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != nil { - n += m.State.Size() - } - return n -} - -func (m *FmdMetaParametersAlgorithmState_Fixed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Fixed != nil { - l = m.Fixed.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SlidingWindow != nil { - l = m.SlidingWindow.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} -func (m *FmdMetaParametersAlgorithmState_FixedState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ApproximateClueCount != 0 { - n += 1 + sovShieldedPool(uint64(m.ApproximateClueCount)) - } - return n -} - -func (m *FmdParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PrecisionBits != 0 { - n += 1 + sovShieldedPool(uint64(m.PrecisionBits)) - } - if m.AsOfBlockHeight != 0 { - n += 1 + sovShieldedPool(uint64(m.AsOfBlockHeight)) - } - return n -} - -func (m *Note) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.Rseed) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *NoteView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.Rseed) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *NoteCiphertext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *NotePayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoteCommitment != nil { - l = m.NoteCommitment.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.EphemeralKey) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.EncryptedNote != nil { - l = m.EncryptedNote.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *ZKOutputProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *ZKSpendProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *ZKNullifierDerivationProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *Spend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.AuthSig != nil { - l = m.AuthSig.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *EventSpend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *EventOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoteCommitment != nil { - l = m.NoteCommitment.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *EventBroadcastClue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Clue != nil { - l = m.Clue.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Tx != nil { - l = m.Tx.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *SpendBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BalanceCommitment != nil { - l = m.BalanceCommitment.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Rk != nil { - l = m.Rk.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *SpendView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SpendView != nil { - n += m.SpendView.Size() - } - return n -} - -func (m *SpendView_Visible_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Visible != nil { - l = m.Visible.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} -func (m *SpendView_Opaque_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} -func (m *SpendView_Visible) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Spend != nil { - l = m.Spend.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *SpendView_Opaque) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Spend != nil { - l = m.Spend.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *SpendPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Position != 0 { - n += 1 + sovShieldedPool(uint64(m.Position)) - } - l = len(m.Randomizer) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.ValueBlinding) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.ProofBlindingR) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.ProofBlindingS) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *Output) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Proof != nil { - l = m.Proof.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *OutputBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NotePayload != nil { - l = m.NotePayload.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.BalanceCommitment != nil { - l = m.BalanceCommitment.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.WrappedMemoKey) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.OvkWrappedKey) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *OutputView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OutputView != nil { - n += m.OutputView.Size() - } - return n -} - -func (m *OutputView_Visible_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Visible != nil { - l = m.Visible.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} -func (m *OutputView_Opaque_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} -func (m *OutputView_Visible) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.PayloadKey != nil { - l = m.PayloadKey.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *OutputView_Opaque) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *OutputPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - if m.DestAddress != nil { - l = m.DestAddress.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.Rseed) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.ValueBlinding) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.ProofBlindingR) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - l = len(m.ProofBlindingS) - if l > 0 { - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *AssetMetadataByIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *AssetMetadataByIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DenomMetadata != nil { - l = m.DenomMetadata.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func (m *AssetMetadataByIdsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AssetId) > 0 { - for _, e := range m.AssetId { - l = e.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - } - return n -} - -func (m *AssetMetadataByIdsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DenomMetadata != nil { - l = m.DenomMetadata.Size() - n += 1 + l + sovShieldedPool(uint64(l)) - } - return n -} - -func sovShieldedPool(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozShieldedPool(x uint64) (n int) { - return sovShieldedPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ShieldedPoolParameters) 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 ErrIntOverflowShieldedPool - } - 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: ShieldedPoolParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ShieldedPoolParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedFmdParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FixedFmdParams == nil { - m.FixedFmdParams = &FmdParameters{} - } - if err := m.FixedFmdParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FmdMetaParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FmdMetaParams == nil { - m.FmdMetaParams = &FmdMetaParameters{} - } - if err := m.FmdMetaParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowShieldedPool - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShieldedPoolParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ShieldedPoolParams == nil { - m.ShieldedPoolParams = &ShieldedPoolParameters{} - } - if err := m.ShieldedPoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allocations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Allocations = append(m.Allocations, &GenesisContent_Allocation{}) - if err := m.Allocations[len(m.Allocations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent_Allocation) 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 ErrIntOverflowShieldedPool - } - 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: Allocation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Allocation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v1.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v11.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FmdMetaParameters) 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 ErrIntOverflowShieldedPool - } - 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: FmdMetaParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FmdMetaParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FmdGracePeriodBlocks", wireType) - } - m.FmdGracePeriodBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FmdGracePeriodBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FixedPrecisionBits", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Algorithm = &FmdMetaParameters_FixedPrecisionBits{v} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlidingWindow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &FmdMetaParameters_AlgorithmSlidingWindow{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Algorithm = &FmdMetaParameters_SlidingWindow{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FmdMetaParameters_AlgorithmSlidingWindow) 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 ErrIntOverflowShieldedPool - } - 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: AlgorithmSlidingWindow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AlgorithmSlidingWindow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WindowUpdatePeriods", wireType) - } - m.WindowUpdatePeriods = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WindowUpdatePeriods |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetedDetectionsPerWindow", wireType) - } - m.TargetedDetectionsPerWindow = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TargetedDetectionsPerWindow |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FmdMetaParametersAlgorithmState) 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 ErrIntOverflowShieldedPool - } - 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: FmdMetaParametersAlgorithmState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FmdMetaParametersAlgorithmState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fixed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &FmdMetaParametersAlgorithmState_FixedState{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.State = &FmdMetaParametersAlgorithmState_Fixed{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlidingWindow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &FmdMetaParametersAlgorithmState_SlidingWindowState{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.State = &FmdMetaParametersAlgorithmState_SlidingWindow{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FmdMetaParametersAlgorithmState_FixedState) 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 ErrIntOverflowShieldedPool - } - 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: FixedState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FixedState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FmdMetaParametersAlgorithmState_SlidingWindowState) 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 ErrIntOverflowShieldedPool - } - 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: SlidingWindowState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SlidingWindowState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ApproximateClueCount", wireType) - } - m.ApproximateClueCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ApproximateClueCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FmdParameters) 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 ErrIntOverflowShieldedPool - } - 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: FmdParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FmdParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrecisionBits", wireType) - } - m.PrecisionBits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PrecisionBits |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AsOfBlockHeight", wireType) - } - m.AsOfBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AsOfBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Note) 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 ErrIntOverflowShieldedPool - } - 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: Note: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Note: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v12.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rseed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rseed = append(m.Rseed[:0], dAtA[iNdEx:postIndex]...) - if m.Rseed == nil { - m.Rseed = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v11.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoteView) 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 ErrIntOverflowShieldedPool - } - 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: NoteView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoteView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v12.ValueView{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rseed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rseed = append(m.Rseed[:0], dAtA[iNdEx:postIndex]...) - if m.Rseed == nil { - m.Rseed = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v11.AddressView{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoteCiphertext) 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 ErrIntOverflowShieldedPool - } - 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: NoteCiphertext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoteCiphertext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NotePayload) 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 ErrIntOverflowShieldedPool - } - 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: NotePayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotePayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteCommitment == nil { - m.NoteCommitment = &v13.StateCommitment{} - } - if err := m.NoteCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EphemeralKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EphemeralKey = append(m.EphemeralKey[:0], dAtA[iNdEx:postIndex]...) - if m.EphemeralKey == nil { - m.EphemeralKey = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedNote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EncryptedNote == nil { - m.EncryptedNote = &NoteCiphertext{} - } - if err := m.EncryptedNote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ZKOutputProof) 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 ErrIntOverflowShieldedPool - } - 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: ZKOutputProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZKOutputProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ZKSpendProof) 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 ErrIntOverflowShieldedPool - } - 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: ZKSpendProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZKSpendProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ZKNullifierDerivationProof) 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 ErrIntOverflowShieldedPool - } - 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: ZKNullifierDerivationProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZKNullifierDerivationProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Spend) 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 ErrIntOverflowShieldedPool - } - 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: Spend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Spend: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &SpendBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthSig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthSig == nil { - m.AuthSig = &v14.SpendAuthSignature{} - } - if err := m.AuthSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &ZKSpendProof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventSpend) 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 ErrIntOverflowShieldedPool - } - 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: EventSpend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventSpend: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v15.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventOutput) 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 ErrIntOverflowShieldedPool - } - 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: EventOutput: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventOutput: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteCommitment == nil { - m.NoteCommitment = &v13.StateCommitment{} - } - if err := m.NoteCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventBroadcastClue) 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 ErrIntOverflowShieldedPool - } - 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: EventBroadcastClue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventBroadcastClue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Clue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Clue == nil { - m.Clue = &v16.Clue{} - } - if err := m.Clue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tx == nil { - m.Tx = &v17.TransactionId{} - } - if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendBody) 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 ErrIntOverflowShieldedPool - } - 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: SpendBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpendBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BalanceCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BalanceCommitment == nil { - m.BalanceCommitment = &v12.BalanceCommitment{} - } - if err := m.BalanceCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rk", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Rk == nil { - m.Rk = &v14.SpendVerificationKey{} - } - if err := m.Rk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v15.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendView) 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 ErrIntOverflowShieldedPool - } - 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: SpendView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpendView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Visible", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SpendView_Visible{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SpendView = &SpendView_Visible_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SpendView_Opaque{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.SpendView = &SpendView_Opaque_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendView_Visible) 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 ErrIntOverflowShieldedPool - } - 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: Visible: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Visible: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Spend == nil { - m.Spend = &Spend{} - } - if err := m.Spend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Note == nil { - m.Note = &NoteView{} - } - if err := m.Note.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendView_Opaque) 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 ErrIntOverflowShieldedPool - } - 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: Opaque: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Opaque: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Spend == nil { - m.Spend = &Spend{} - } - if err := m.Spend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendPlan) 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 ErrIntOverflowShieldedPool - } - 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: SpendPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpendPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Note == nil { - m.Note = &Note{} - } - if err := m.Note.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - m.Position = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Position |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Randomizer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Randomizer = append(m.Randomizer[:0], dAtA[iNdEx:postIndex]...) - if m.Randomizer == nil { - m.Randomizer = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueBlinding", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValueBlinding = append(m.ValueBlinding[:0], dAtA[iNdEx:postIndex]...) - if m.ValueBlinding == nil { - m.ValueBlinding = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingR", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingR = append(m.ProofBlindingR[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingR == nil { - m.ProofBlindingR = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingS", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingS = append(m.ProofBlindingS[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingS == nil { - m.ProofBlindingS = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Output) 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 ErrIntOverflowShieldedPool - } - 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: Output: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &OutputBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Proof == nil { - m.Proof = &ZKOutputProof{} - } - if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OutputBody) 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 ErrIntOverflowShieldedPool - } - 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: OutputBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutputBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotePayload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NotePayload == nil { - m.NotePayload = &NotePayload{} - } - if err := m.NotePayload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BalanceCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BalanceCommitment == nil { - m.BalanceCommitment = &v12.BalanceCommitment{} - } - if err := m.BalanceCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WrappedMemoKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WrappedMemoKey = append(m.WrappedMemoKey[:0], dAtA[iNdEx:postIndex]...) - if m.WrappedMemoKey == nil { - m.WrappedMemoKey = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OvkWrappedKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OvkWrappedKey = append(m.OvkWrappedKey[:0], dAtA[iNdEx:postIndex]...) - if m.OvkWrappedKey == nil { - m.OvkWrappedKey = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OutputView) 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 ErrIntOverflowShieldedPool - } - 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: OutputView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutputView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Visible", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &OutputView_Visible{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OutputView = &OutputView_Visible_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &OutputView_Opaque{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OutputView = &OutputView_Opaque_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OutputView_Visible) 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 ErrIntOverflowShieldedPool - } - 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: Visible: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Visible: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output == nil { - m.Output = &Output{} - } - if err := m.Output.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Note == nil { - m.Note = &NoteView{} - } - if err := m.Note.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PayloadKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PayloadKey == nil { - m.PayloadKey = &v11.PayloadKey{} - } - if err := m.PayloadKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OutputView_Opaque) 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 ErrIntOverflowShieldedPool - } - 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: Opaque: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Opaque: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Output == nil { - m.Output = &Output{} - } - if err := m.Output.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OutputPlan) 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 ErrIntOverflowShieldedPool - } - 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: OutputPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutputPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v12.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DestAddress == nil { - m.DestAddress = &v11.Address{} - } - if err := m.DestAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rseed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rseed = append(m.Rseed[:0], dAtA[iNdEx:postIndex]...) - if m.Rseed == nil { - m.Rseed = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueBlinding", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValueBlinding = append(m.ValueBlinding[:0], dAtA[iNdEx:postIndex]...) - if m.ValueBlinding == nil { - m.ValueBlinding = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingR", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingR = append(m.ProofBlindingR[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingR == nil { - m.ProofBlindingR = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingS", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingS = append(m.ProofBlindingS[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingS == nil { - m.ProofBlindingS = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetMetadataByIdRequest) 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 ErrIntOverflowShieldedPool - } - 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: AssetMetadataByIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMetadataByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v12.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetMetadataByIdResponse) 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 ErrIntOverflowShieldedPool - } - 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: AssetMetadataByIdResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMetadataByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DenomMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DenomMetadata == nil { - m.DenomMetadata = &v12.Metadata{} - } - if err := m.DenomMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetMetadataByIdsRequest) 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 ErrIntOverflowShieldedPool - } - 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: AssetMetadataByIdsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMetadataByIdsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssetId = append(m.AssetId, &v12.AssetId{}) - if err := m.AssetId[len(m.AssetId)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetMetadataByIdsResponse) 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 ErrIntOverflowShieldedPool - } - 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: AssetMetadataByIdsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMetadataByIdsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DenomMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthShieldedPool - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthShieldedPool - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DenomMetadata == nil { - m.DenomMetadata = &v12.Metadata{} - } - if err := m.DenomMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipShieldedPool(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthShieldedPool - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipShieldedPool(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowShieldedPool - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthShieldedPool - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupShieldedPool - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthShieldedPool - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthShieldedPool = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowShieldedPool = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupShieldedPool = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/component/stake/v1/stake.pb.go b/chain/penumbra/core/component/stake/v1/stake.pb.go deleted file mode 100644 index 220fbdab..00000000 --- a/chain/penumbra/core/component/stake/v1/stake.pb.go +++ /dev/null @@ -1,12285 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/component/stake/v1/stake.proto - -package stakev1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type BondingState_BondingStateEnum int32 - -const ( - BondingState_BONDING_STATE_ENUM_UNSPECIFIED BondingState_BondingStateEnum = 0 - BondingState_BONDING_STATE_ENUM_BONDED BondingState_BondingStateEnum = 1 - BondingState_BONDING_STATE_ENUM_UNBONDING BondingState_BondingStateEnum = 2 - BondingState_BONDING_STATE_ENUM_UNBONDED BondingState_BondingStateEnum = 3 -) - -var BondingState_BondingStateEnum_name = map[int32]string{ - 0: "BONDING_STATE_ENUM_UNSPECIFIED", - 1: "BONDING_STATE_ENUM_BONDED", - 2: "BONDING_STATE_ENUM_UNBONDING", - 3: "BONDING_STATE_ENUM_UNBONDED", -} - -var BondingState_BondingStateEnum_value = map[string]int32{ - "BONDING_STATE_ENUM_UNSPECIFIED": 0, - "BONDING_STATE_ENUM_BONDED": 1, - "BONDING_STATE_ENUM_UNBONDING": 2, - "BONDING_STATE_ENUM_UNBONDED": 3, -} - -func (x BondingState_BondingStateEnum) String() string { - return proto.EnumName(BondingState_BondingStateEnum_name, int32(x)) -} - -func (BondingState_BondingStateEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{7, 0} -} - -type ValidatorState_ValidatorStateEnum int32 - -const ( - ValidatorState_VALIDATOR_STATE_ENUM_UNSPECIFIED ValidatorState_ValidatorStateEnum = 0 - ValidatorState_VALIDATOR_STATE_ENUM_DEFINED ValidatorState_ValidatorStateEnum = 1 - ValidatorState_VALIDATOR_STATE_ENUM_INACTIVE ValidatorState_ValidatorStateEnum = 2 - ValidatorState_VALIDATOR_STATE_ENUM_ACTIVE ValidatorState_ValidatorStateEnum = 3 - ValidatorState_VALIDATOR_STATE_ENUM_JAILED ValidatorState_ValidatorStateEnum = 4 - ValidatorState_VALIDATOR_STATE_ENUM_TOMBSTONED ValidatorState_ValidatorStateEnum = 5 - ValidatorState_VALIDATOR_STATE_ENUM_DISABLED ValidatorState_ValidatorStateEnum = 6 -) - -var ValidatorState_ValidatorStateEnum_name = map[int32]string{ - 0: "VALIDATOR_STATE_ENUM_UNSPECIFIED", - 1: "VALIDATOR_STATE_ENUM_DEFINED", - 2: "VALIDATOR_STATE_ENUM_INACTIVE", - 3: "VALIDATOR_STATE_ENUM_ACTIVE", - 4: "VALIDATOR_STATE_ENUM_JAILED", - 5: "VALIDATOR_STATE_ENUM_TOMBSTONED", - 6: "VALIDATOR_STATE_ENUM_DISABLED", -} - -var ValidatorState_ValidatorStateEnum_value = map[string]int32{ - "VALIDATOR_STATE_ENUM_UNSPECIFIED": 0, - "VALIDATOR_STATE_ENUM_DEFINED": 1, - "VALIDATOR_STATE_ENUM_INACTIVE": 2, - "VALIDATOR_STATE_ENUM_ACTIVE": 3, - "VALIDATOR_STATE_ENUM_JAILED": 4, - "VALIDATOR_STATE_ENUM_TOMBSTONED": 5, - "VALIDATOR_STATE_ENUM_DISABLED": 6, -} - -func (x ValidatorState_ValidatorStateEnum) String() string { - return proto.EnumName(ValidatorState_ValidatorStateEnum_name, int32(x)) -} - -func (ValidatorState_ValidatorStateEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{8, 0} -} - -// A Penumbra ZK undelegate claim proof. -type ZKUndelegateClaimProof struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ZKUndelegateClaimProof) Reset() { *m = ZKUndelegateClaimProof{} } -func (m *ZKUndelegateClaimProof) String() string { return proto.CompactTextString(m) } -func (*ZKUndelegateClaimProof) ProtoMessage() {} -func (*ZKUndelegateClaimProof) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{0} -} -func (m *ZKUndelegateClaimProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ZKUndelegateClaimProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ZKUndelegateClaimProof.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 *ZKUndelegateClaimProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_ZKUndelegateClaimProof.Merge(m, src) -} -func (m *ZKUndelegateClaimProof) XXX_Size() int { - return m.Size() -} -func (m *ZKUndelegateClaimProof) XXX_DiscardUnknown() { - xxx_messageInfo_ZKUndelegateClaimProof.DiscardUnknown(m) -} - -var xxx_messageInfo_ZKUndelegateClaimProof proto.InternalMessageInfo - -func (m *ZKUndelegateClaimProof) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// Describes a validator's configuration data. -type Validator struct { - // The validator's identity verification key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The validator's consensus pubkey for use in Tendermint (Ed25519). - ConsensusKey []byte `protobuf:"bytes,2,opt,name=consensus_key,json=consensusKey,proto3" json:"consensus_key,omitempty"` - // The validator's (human-readable) name. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // The validator's website. - Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` - // The validator's description. - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // Whether the validator is enabled or not. - // - // Disabled validators cannot be delegated to, and immediately begin unbonding. - Enabled bool `protobuf:"varint,8,opt,name=enabled,proto3" json:"enabled,omitempty"` - // A list of funding streams describing the validator's commission. - FundingStreams []*FundingStream `protobuf:"bytes,6,rep,name=funding_streams,json=fundingStreams,proto3" json:"funding_streams,omitempty"` - // The sequence number determines which validator data takes priority, and - // prevents replay attacks. The chain only accepts new validator definitions - // with increasing sequence numbers. - SequenceNumber uint32 `protobuf:"varint,7,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` - // The validator's governance key. - GovernanceKey *v1.GovernanceKey `protobuf:"bytes,9,opt,name=governance_key,json=governanceKey,proto3" json:"governance_key,omitempty"` -} - -func (m *Validator) Reset() { *m = Validator{} } -func (m *Validator) String() string { return proto.CompactTextString(m) } -func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{1} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validator.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 *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(m, src) -} -func (m *Validator) XXX_Size() int { - return m.Size() -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -func (m *Validator) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *Validator) GetConsensusKey() []byte { - if m != nil { - return m.ConsensusKey - } - return nil -} - -func (m *Validator) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Validator) GetWebsite() string { - if m != nil { - return m.Website - } - return "" -} - -func (m *Validator) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Validator) GetEnabled() bool { - if m != nil { - return m.Enabled - } - return false -} - -func (m *Validator) GetFundingStreams() []*FundingStream { - if m != nil { - return m.FundingStreams - } - return nil -} - -func (m *Validator) GetSequenceNumber() uint32 { - if m != nil { - return m.SequenceNumber - } - return 0 -} - -func (m *Validator) GetGovernanceKey() *v1.GovernanceKey { - if m != nil { - return m.GovernanceKey - } - return nil -} - -// For storing the list of keys of known validators. -type ValidatorList struct { - ValidatorKeys []*v1.IdentityKey `protobuf:"bytes,1,rep,name=validator_keys,json=validatorKeys,proto3" json:"validator_keys,omitempty"` -} - -func (m *ValidatorList) Reset() { *m = ValidatorList{} } -func (m *ValidatorList) String() string { return proto.CompactTextString(m) } -func (*ValidatorList) ProtoMessage() {} -func (*ValidatorList) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{2} -} -func (m *ValidatorList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorList.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 *ValidatorList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorList.Merge(m, src) -} -func (m *ValidatorList) XXX_Size() int { - return m.Size() -} -func (m *ValidatorList) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorList.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorList proto.InternalMessageInfo - -func (m *ValidatorList) GetValidatorKeys() []*v1.IdentityKey { - if m != nil { - return m.ValidatorKeys - } - return nil -} - -// A portion of a validator's commission. -type FundingStream struct { - // The recipient of the funding stream. - // - // Types that are valid to be assigned to Recipient: - // - // *FundingStream_ToAddress_ - // *FundingStream_ToCommunityPool_ - Recipient isFundingStream_Recipient `protobuf_oneof:"recipient"` -} - -func (m *FundingStream) Reset() { *m = FundingStream{} } -func (m *FundingStream) String() string { return proto.CompactTextString(m) } -func (*FundingStream) ProtoMessage() {} -func (*FundingStream) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{3} -} -func (m *FundingStream) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FundingStream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FundingStream.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 *FundingStream) XXX_Merge(src proto.Message) { - xxx_messageInfo_FundingStream.Merge(m, src) -} -func (m *FundingStream) XXX_Size() int { - return m.Size() -} -func (m *FundingStream) XXX_DiscardUnknown() { - xxx_messageInfo_FundingStream.DiscardUnknown(m) -} - -var xxx_messageInfo_FundingStream proto.InternalMessageInfo - -type isFundingStream_Recipient interface { - isFundingStream_Recipient() - MarshalTo([]byte) (int, error) - Size() int -} - -type FundingStream_ToAddress_ struct { - ToAddress *FundingStream_ToAddress `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3,oneof" json:"to_address,omitempty"` -} -type FundingStream_ToCommunityPool_ struct { - ToCommunityPool *FundingStream_ToCommunityPool `protobuf:"bytes,2,opt,name=to_community_pool,json=toCommunityPool,proto3,oneof" json:"to_community_pool,omitempty"` -} - -func (*FundingStream_ToAddress_) isFundingStream_Recipient() {} -func (*FundingStream_ToCommunityPool_) isFundingStream_Recipient() {} - -func (m *FundingStream) GetRecipient() isFundingStream_Recipient { - if m != nil { - return m.Recipient - } - return nil -} - -func (m *FundingStream) GetToAddress() *FundingStream_ToAddress { - if x, ok := m.GetRecipient().(*FundingStream_ToAddress_); ok { - return x.ToAddress - } - return nil -} - -func (m *FundingStream) GetToCommunityPool() *FundingStream_ToCommunityPool { - if x, ok := m.GetRecipient().(*FundingStream_ToCommunityPool_); ok { - return x.ToCommunityPool - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*FundingStream) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*FundingStream_ToAddress_)(nil), - (*FundingStream_ToCommunityPool_)(nil), - } -} - -type FundingStream_ToAddress struct { - // The destination address for the funding stream. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The portion of the staking reward for the entire delegation pool - // allocated to this funding stream, specified in basis points. - RateBps uint32 `protobuf:"varint,2,opt,name=rate_bps,json=rateBps,proto3" json:"rate_bps,omitempty"` -} - -func (m *FundingStream_ToAddress) Reset() { *m = FundingStream_ToAddress{} } -func (m *FundingStream_ToAddress) String() string { return proto.CompactTextString(m) } -func (*FundingStream_ToAddress) ProtoMessage() {} -func (*FundingStream_ToAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{3, 0} -} -func (m *FundingStream_ToAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FundingStream_ToAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FundingStream_ToAddress.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 *FundingStream_ToAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_FundingStream_ToAddress.Merge(m, src) -} -func (m *FundingStream_ToAddress) XXX_Size() int { - return m.Size() -} -func (m *FundingStream_ToAddress) XXX_DiscardUnknown() { - xxx_messageInfo_FundingStream_ToAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_FundingStream_ToAddress proto.InternalMessageInfo - -func (m *FundingStream_ToAddress) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *FundingStream_ToAddress) GetRateBps() uint32 { - if m != nil { - return m.RateBps - } - return 0 -} - -type FundingStream_ToCommunityPool struct { - // The portion of the staking reward for the entire delegation pool - // allocated to this funding stream, specified in basis points. - RateBps uint32 `protobuf:"varint,2,opt,name=rate_bps,json=rateBps,proto3" json:"rate_bps,omitempty"` -} - -func (m *FundingStream_ToCommunityPool) Reset() { *m = FundingStream_ToCommunityPool{} } -func (m *FundingStream_ToCommunityPool) String() string { return proto.CompactTextString(m) } -func (*FundingStream_ToCommunityPool) ProtoMessage() {} -func (*FundingStream_ToCommunityPool) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{3, 1} -} -func (m *FundingStream_ToCommunityPool) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FundingStream_ToCommunityPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FundingStream_ToCommunityPool.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 *FundingStream_ToCommunityPool) XXX_Merge(src proto.Message) { - xxx_messageInfo_FundingStream_ToCommunityPool.Merge(m, src) -} -func (m *FundingStream_ToCommunityPool) XXX_Size() int { - return m.Size() -} -func (m *FundingStream_ToCommunityPool) XXX_DiscardUnknown() { - xxx_messageInfo_FundingStream_ToCommunityPool.DiscardUnknown(m) -} - -var xxx_messageInfo_FundingStream_ToCommunityPool proto.InternalMessageInfo - -func (m *FundingStream_ToCommunityPool) GetRateBps() uint32 { - if m != nil { - return m.RateBps - } - return 0 -} - -// Describes the reward and exchange rates and voting power for a validator in some epoch. -type RateData struct { - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - EpochIndex uint64 `protobuf:"varint,2,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` // Deprecated: Do not use. - ValidatorRewardRate *v11.Amount `protobuf:"bytes,4,opt,name=validator_reward_rate,json=validatorRewardRate,proto3" json:"validator_reward_rate,omitempty"` - // The validator exchange rate between delegation tokens and staking tokens. - // The rate is expressed in fixed-point representation with a scaling factor - // of 10^8. For example, a decimal rate of `1.234` will be represented as - // `123400000` - ValidatorExchangeRate *v11.Amount `protobuf:"bytes,5,opt,name=validator_exchange_rate,json=validatorExchangeRate,proto3" json:"validator_exchange_rate,omitempty"` -} - -func (m *RateData) Reset() { *m = RateData{} } -func (m *RateData) String() string { return proto.CompactTextString(m) } -func (*RateData) ProtoMessage() {} -func (*RateData) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{4} -} -func (m *RateData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RateData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RateData.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 *RateData) XXX_Merge(src proto.Message) { - xxx_messageInfo_RateData.Merge(m, src) -} -func (m *RateData) XXX_Size() int { - return m.Size() -} -func (m *RateData) XXX_DiscardUnknown() { - xxx_messageInfo_RateData.DiscardUnknown(m) -} - -var xxx_messageInfo_RateData proto.InternalMessageInfo - -func (m *RateData) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -// Deprecated: Do not use. -func (m *RateData) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -func (m *RateData) GetValidatorRewardRate() *v11.Amount { - if m != nil { - return m.ValidatorRewardRate - } - return nil -} - -func (m *RateData) GetValidatorExchangeRate() *v11.Amount { - if m != nil { - return m.ValidatorExchangeRate - } - return nil -} - -// Describes the base reward and exchange rates in some epoch. -type BaseRateData struct { - EpochIndex uint64 `protobuf:"varint,1,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` - BaseRewardRate *v11.Amount `protobuf:"bytes,2,opt,name=base_reward_rate,json=baseRewardRate,proto3" json:"base_reward_rate,omitempty"` - BaseExchangeRate *v11.Amount `protobuf:"bytes,3,opt,name=base_exchange_rate,json=baseExchangeRate,proto3" json:"base_exchange_rate,omitempty"` -} - -func (m *BaseRateData) Reset() { *m = BaseRateData{} } -func (m *BaseRateData) String() string { return proto.CompactTextString(m) } -func (*BaseRateData) ProtoMessage() {} -func (*BaseRateData) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{5} -} -func (m *BaseRateData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BaseRateData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BaseRateData.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 *BaseRateData) XXX_Merge(src proto.Message) { - xxx_messageInfo_BaseRateData.Merge(m, src) -} -func (m *BaseRateData) XXX_Size() int { - return m.Size() -} -func (m *BaseRateData) XXX_DiscardUnknown() { - xxx_messageInfo_BaseRateData.DiscardUnknown(m) -} - -var xxx_messageInfo_BaseRateData proto.InternalMessageInfo - -func (m *BaseRateData) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -func (m *BaseRateData) GetBaseRewardRate() *v11.Amount { - if m != nil { - return m.BaseRewardRate - } - return nil -} - -func (m *BaseRateData) GetBaseExchangeRate() *v11.Amount { - if m != nil { - return m.BaseExchangeRate - } - return nil -} - -// Describes the current state of a validator on-chain -type ValidatorStatus struct { - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - State *ValidatorState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` - VotingPower *v11.Amount `protobuf:"bytes,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` - BondingState *BondingState `protobuf:"bytes,4,opt,name=bonding_state,json=bondingState,proto3" json:"bonding_state,omitempty"` -} - -func (m *ValidatorStatus) Reset() { *m = ValidatorStatus{} } -func (m *ValidatorStatus) String() string { return proto.CompactTextString(m) } -func (*ValidatorStatus) ProtoMessage() {} -func (*ValidatorStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{6} -} -func (m *ValidatorStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorStatus.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 *ValidatorStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorStatus.Merge(m, src) -} -func (m *ValidatorStatus) XXX_Size() int { - return m.Size() -} -func (m *ValidatorStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorStatus proto.InternalMessageInfo - -func (m *ValidatorStatus) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *ValidatorStatus) GetState() *ValidatorState { - if m != nil { - return m.State - } - return nil -} - -func (m *ValidatorStatus) GetVotingPower() *v11.Amount { - if m != nil { - return m.VotingPower - } - return nil -} - -func (m *ValidatorStatus) GetBondingState() *BondingState { - if m != nil { - return m.BondingState - } - return nil -} - -// Describes the unbonding state of a validator's stake pool. -type BondingState struct { - State BondingState_BondingStateEnum `protobuf:"varint,1,opt,name=state,proto3,enum=penumbra.core.component.stake.v1.BondingState_BondingStateEnum" json:"state,omitempty"` - UnbondsAtEpoch uint64 `protobuf:"varint,2,opt,name=unbonds_at_epoch,json=unbondsAtEpoch,proto3" json:"unbonds_at_epoch,omitempty"` // Deprecated: Do not use. - UnbondsAtHeight uint64 `protobuf:"varint,3,opt,name=unbonds_at_height,json=unbondsAtHeight,proto3" json:"unbonds_at_height,omitempty"` -} - -func (m *BondingState) Reset() { *m = BondingState{} } -func (m *BondingState) String() string { return proto.CompactTextString(m) } -func (*BondingState) ProtoMessage() {} -func (*BondingState) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{7} -} -func (m *BondingState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BondingState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BondingState.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 *BondingState) XXX_Merge(src proto.Message) { - xxx_messageInfo_BondingState.Merge(m, src) -} -func (m *BondingState) XXX_Size() int { - return m.Size() -} -func (m *BondingState) XXX_DiscardUnknown() { - xxx_messageInfo_BondingState.DiscardUnknown(m) -} - -var xxx_messageInfo_BondingState proto.InternalMessageInfo - -func (m *BondingState) GetState() BondingState_BondingStateEnum { - if m != nil { - return m.State - } - return BondingState_BONDING_STATE_ENUM_UNSPECIFIED -} - -// Deprecated: Do not use. -func (m *BondingState) GetUnbondsAtEpoch() uint64 { - if m != nil { - return m.UnbondsAtEpoch - } - return 0 -} - -func (m *BondingState) GetUnbondsAtHeight() uint64 { - if m != nil { - return m.UnbondsAtHeight - } - return 0 -} - -// Describes the state of a validator -type ValidatorState struct { - State ValidatorState_ValidatorStateEnum `protobuf:"varint,1,opt,name=state,proto3,enum=penumbra.core.component.stake.v1.ValidatorState_ValidatorStateEnum" json:"state,omitempty"` -} - -func (m *ValidatorState) Reset() { *m = ValidatorState{} } -func (m *ValidatorState) String() string { return proto.CompactTextString(m) } -func (*ValidatorState) ProtoMessage() {} -func (*ValidatorState) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{8} -} -func (m *ValidatorState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorState.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 *ValidatorState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorState.Merge(m, src) -} -func (m *ValidatorState) XXX_Size() int { - return m.Size() -} -func (m *ValidatorState) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorState.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorState proto.InternalMessageInfo - -func (m *ValidatorState) GetState() ValidatorState_ValidatorStateEnum { - if m != nil { - return m.State - } - return ValidatorState_VALIDATOR_STATE_ENUM_UNSPECIFIED -} - -// Combines all validator info into a single packet. -type ValidatorInfo struct { - Validator *Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` - Status *ValidatorStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - RateData *RateData `protobuf:"bytes,3,opt,name=rate_data,json=rateData,proto3" json:"rate_data,omitempty"` -} - -func (m *ValidatorInfo) Reset() { *m = ValidatorInfo{} } -func (m *ValidatorInfo) String() string { return proto.CompactTextString(m) } -func (*ValidatorInfo) ProtoMessage() {} -func (*ValidatorInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{9} -} -func (m *ValidatorInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorInfo.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 *ValidatorInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorInfo.Merge(m, src) -} -func (m *ValidatorInfo) XXX_Size() int { - return m.Size() -} -func (m *ValidatorInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorInfo proto.InternalMessageInfo - -func (m *ValidatorInfo) GetValidator() *Validator { - if m != nil { - return m.Validator - } - return nil -} - -func (m *ValidatorInfo) GetStatus() *ValidatorStatus { - if m != nil { - return m.Status - } - return nil -} - -func (m *ValidatorInfo) GetRateData() *RateData { - if m != nil { - return m.RateData - } - return nil -} - -// A transaction action (re)defining a validator. -type ValidatorDefinition struct { - // The configuration data for the validator. - Validator *Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` - // A signature by the validator's identity key over the validator data. - AuthSig []byte `protobuf:"bytes,2,opt,name=auth_sig,json=authSig,proto3" json:"auth_sig,omitempty"` -} - -func (m *ValidatorDefinition) Reset() { *m = ValidatorDefinition{} } -func (m *ValidatorDefinition) String() string { return proto.CompactTextString(m) } -func (*ValidatorDefinition) ProtoMessage() {} -func (*ValidatorDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{10} -} -func (m *ValidatorDefinition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorDefinition.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 *ValidatorDefinition) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorDefinition.Merge(m, src) -} -func (m *ValidatorDefinition) XXX_Size() int { - return m.Size() -} -func (m *ValidatorDefinition) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorDefinition.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorDefinition proto.InternalMessageInfo - -func (m *ValidatorDefinition) GetValidator() *Validator { - if m != nil { - return m.Validator - } - return nil -} - -func (m *ValidatorDefinition) GetAuthSig() []byte { - if m != nil { - return m.AuthSig - } - return nil -} - -// A transaction action adding stake to a validator's delegation pool. -type Delegate struct { - // The identity key of the validator to delegate to. - ValidatorIdentity *v1.IdentityKey `protobuf:"bytes,1,opt,name=validator_identity,json=validatorIdentity,proto3" json:"validator_identity,omitempty"` - // The index of the epoch in which this delegation was performed. - // The delegation takes effect in the next epoch. - EpochIndex uint64 `protobuf:"varint,2,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` - // The delegation amount, in units of unbonded stake. - // TODO: use flow aggregation to hide this, replacing it with bytes amount_ciphertext; - UnbondedAmount *v11.Amount `protobuf:"bytes,3,opt,name=unbonded_amount,json=unbondedAmount,proto3" json:"unbonded_amount,omitempty"` - // The amount of delegation tokens produced by this action. - // - // This is implied by the validator's exchange rate in the specified epoch - // (and should be checked in transaction validation!), but including it allows - // stateless verification that the transaction is internally consistent. - DelegationAmount *v11.Amount `protobuf:"bytes,4,opt,name=delegation_amount,json=delegationAmount,proto3" json:"delegation_amount,omitempty"` -} - -func (m *Delegate) Reset() { *m = Delegate{} } -func (m *Delegate) String() string { return proto.CompactTextString(m) } -func (*Delegate) ProtoMessage() {} -func (*Delegate) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{11} -} -func (m *Delegate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Delegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Delegate.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 *Delegate) XXX_Merge(src proto.Message) { - xxx_messageInfo_Delegate.Merge(m, src) -} -func (m *Delegate) XXX_Size() int { - return m.Size() -} -func (m *Delegate) XXX_DiscardUnknown() { - xxx_messageInfo_Delegate.DiscardUnknown(m) -} - -var xxx_messageInfo_Delegate proto.InternalMessageInfo - -func (m *Delegate) GetValidatorIdentity() *v1.IdentityKey { - if m != nil { - return m.ValidatorIdentity - } - return nil -} - -func (m *Delegate) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -func (m *Delegate) GetUnbondedAmount() *v11.Amount { - if m != nil { - return m.UnbondedAmount - } - return nil -} - -func (m *Delegate) GetDelegationAmount() *v11.Amount { - if m != nil { - return m.DelegationAmount - } - return nil -} - -// A transaction action withdrawing stake from a validator's delegation pool. -type Undelegate struct { - // The identity key of the validator to undelegate from. - ValidatorIdentity *v1.IdentityKey `protobuf:"bytes,1,opt,name=validator_identity,json=validatorIdentity,proto3" json:"validator_identity,omitempty"` - // The index of the epoch in which this undelegation was performed. - StartEpochIndex uint64 `protobuf:"varint,2,opt,name=start_epoch_index,json=startEpochIndex,proto3" json:"start_epoch_index,omitempty"` // Deprecated: Do not use. - // The amount to undelegate, in units of unbonding tokens. - UnbondedAmount *v11.Amount `protobuf:"bytes,3,opt,name=unbonded_amount,json=unbondedAmount,proto3" json:"unbonded_amount,omitempty"` - // The amount of delegation tokens consumed by this action. - // - // This is implied by the validator's exchange rate in the specified epoch - // (and should be checked in transaction validation!), but including it allows - // stateless verification that the transaction is internally consistent. - DelegationAmount *v11.Amount `protobuf:"bytes,4,opt,name=delegation_amount,json=delegationAmount,proto3" json:"delegation_amount,omitempty"` - // The epoch in which this delegation was performed. - FromEpoch *v12.Epoch `protobuf:"bytes,5,opt,name=from_epoch,json=fromEpoch,proto3" json:"from_epoch,omitempty"` -} - -func (m *Undelegate) Reset() { *m = Undelegate{} } -func (m *Undelegate) String() string { return proto.CompactTextString(m) } -func (*Undelegate) ProtoMessage() {} -func (*Undelegate) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{12} -} -func (m *Undelegate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Undelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Undelegate.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 *Undelegate) XXX_Merge(src proto.Message) { - xxx_messageInfo_Undelegate.Merge(m, src) -} -func (m *Undelegate) XXX_Size() int { - return m.Size() -} -func (m *Undelegate) XXX_DiscardUnknown() { - xxx_messageInfo_Undelegate.DiscardUnknown(m) -} - -var xxx_messageInfo_Undelegate proto.InternalMessageInfo - -func (m *Undelegate) GetValidatorIdentity() *v1.IdentityKey { - if m != nil { - return m.ValidatorIdentity - } - return nil -} - -// Deprecated: Do not use. -func (m *Undelegate) GetStartEpochIndex() uint64 { - if m != nil { - return m.StartEpochIndex - } - return 0 -} - -func (m *Undelegate) GetUnbondedAmount() *v11.Amount { - if m != nil { - return m.UnbondedAmount - } - return nil -} - -func (m *Undelegate) GetDelegationAmount() *v11.Amount { - if m != nil { - return m.DelegationAmount - } - return nil -} - -func (m *Undelegate) GetFromEpoch() *v12.Epoch { - if m != nil { - return m.FromEpoch - } - return nil -} - -// A transaction action finishing an undelegation, converting (slashable) -// "unbonding tokens" to (unslashable) staking tokens. -type UndelegateClaim struct { - Body *UndelegateClaimBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (m *UndelegateClaim) Reset() { *m = UndelegateClaim{} } -func (m *UndelegateClaim) String() string { return proto.CompactTextString(m) } -func (*UndelegateClaim) ProtoMessage() {} -func (*UndelegateClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{13} -} -func (m *UndelegateClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UndelegateClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UndelegateClaim.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 *UndelegateClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_UndelegateClaim.Merge(m, src) -} -func (m *UndelegateClaim) XXX_Size() int { - return m.Size() -} -func (m *UndelegateClaim) XXX_DiscardUnknown() { - xxx_messageInfo_UndelegateClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_UndelegateClaim proto.InternalMessageInfo - -func (m *UndelegateClaim) GetBody() *UndelegateClaimBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *UndelegateClaim) GetProof() []byte { - if m != nil { - return m.Proof - } - return nil -} - -type UndelegateClaimBody struct { - // The identity key of the validator to finish undelegating from. - ValidatorIdentity *v1.IdentityKey `protobuf:"bytes,1,opt,name=validator_identity,json=validatorIdentity,proto3" json:"validator_identity,omitempty"` - // The epoch in which unbonding began, used to verify the penalty. - StartEpochIndex uint64 `protobuf:"varint,2,opt,name=start_epoch_index,json=startEpochIndex,proto3" json:"start_epoch_index,omitempty"` // Deprecated: Do not use. - // The penalty applied to undelegation, in bps^2 (10e-8). - // In the happy path (no slashing), this is 0. - Penalty *Penalty `protobuf:"bytes,3,opt,name=penalty,proto3" json:"penalty,omitempty"` - // The action's contribution to the transaction's value balance. - BalanceCommitment *v13.BalanceCommitment `protobuf:"bytes,4,opt,name=balance_commitment,json=balanceCommitment,proto3" json:"balance_commitment,omitempty"` - // / The starting height of the epoch during which unbonding began. - UnbondingStartHeight uint64 `protobuf:"varint,5,opt,name=unbonding_start_height,json=unbondingStartHeight,proto3" json:"unbonding_start_height,omitempty"` -} - -func (m *UndelegateClaimBody) Reset() { *m = UndelegateClaimBody{} } -func (m *UndelegateClaimBody) String() string { return proto.CompactTextString(m) } -func (*UndelegateClaimBody) ProtoMessage() {} -func (*UndelegateClaimBody) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{14} -} -func (m *UndelegateClaimBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UndelegateClaimBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UndelegateClaimBody.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 *UndelegateClaimBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_UndelegateClaimBody.Merge(m, src) -} -func (m *UndelegateClaimBody) XXX_Size() int { - return m.Size() -} -func (m *UndelegateClaimBody) XXX_DiscardUnknown() { - xxx_messageInfo_UndelegateClaimBody.DiscardUnknown(m) -} - -var xxx_messageInfo_UndelegateClaimBody proto.InternalMessageInfo - -func (m *UndelegateClaimBody) GetValidatorIdentity() *v1.IdentityKey { - if m != nil { - return m.ValidatorIdentity - } - return nil -} - -// Deprecated: Do not use. -func (m *UndelegateClaimBody) GetStartEpochIndex() uint64 { - if m != nil { - return m.StartEpochIndex - } - return 0 -} - -func (m *UndelegateClaimBody) GetPenalty() *Penalty { - if m != nil { - return m.Penalty - } - return nil -} - -func (m *UndelegateClaimBody) GetBalanceCommitment() *v13.BalanceCommitment { - if m != nil { - return m.BalanceCommitment - } - return nil -} - -func (m *UndelegateClaimBody) GetUnbondingStartHeight() uint64 { - if m != nil { - return m.UnbondingStartHeight - } - return 0 -} - -type UndelegateClaimPlan struct { - // The identity key of the validator to finish undelegating from. - ValidatorIdentity *v1.IdentityKey `protobuf:"bytes,1,opt,name=validator_identity,json=validatorIdentity,proto3" json:"validator_identity,omitempty"` - // The epoch in which unbonding began, used to verify the penalty. - StartEpochIndex uint64 `protobuf:"varint,2,opt,name=start_epoch_index,json=startEpochIndex,proto3" json:"start_epoch_index,omitempty"` // Deprecated: Do not use. - // The penalty applied to undelegation, in bps^2 (10e-8). - // In the happy path (no slashing), this is 0. - Penalty *Penalty `protobuf:"bytes,4,opt,name=penalty,proto3" json:"penalty,omitempty"` - // The amount of unbonding tokens to claim. - // This is a bare number because its denom is determined by the preceding data. - UnbondingAmount *v11.Amount `protobuf:"bytes,5,opt,name=unbonding_amount,json=unbondingAmount,proto3" json:"unbonding_amount,omitempty"` - // The blinding factor to use for the balance commitment. - BalanceBlinding []byte `protobuf:"bytes,6,opt,name=balance_blinding,json=balanceBlinding,proto3" json:"balance_blinding,omitempty"` - // The first blinding factor to use for the ZK undelegate claim proof. - ProofBlindingR []byte `protobuf:"bytes,7,opt,name=proof_blinding_r,json=proofBlindingR,proto3" json:"proof_blinding_r,omitempty"` - // The second blinding factor to use for the ZK undelegate claim proof. - ProofBlindingS []byte `protobuf:"bytes,8,opt,name=proof_blinding_s,json=proofBlindingS,proto3" json:"proof_blinding_s,omitempty"` - // The height during which unbonding began. - UnbondingStartHeight uint64 `protobuf:"varint,9,opt,name=unbonding_start_height,json=unbondingStartHeight,proto3" json:"unbonding_start_height,omitempty"` -} - -func (m *UndelegateClaimPlan) Reset() { *m = UndelegateClaimPlan{} } -func (m *UndelegateClaimPlan) String() string { return proto.CompactTextString(m) } -func (*UndelegateClaimPlan) ProtoMessage() {} -func (*UndelegateClaimPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{15} -} -func (m *UndelegateClaimPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UndelegateClaimPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UndelegateClaimPlan.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 *UndelegateClaimPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_UndelegateClaimPlan.Merge(m, src) -} -func (m *UndelegateClaimPlan) XXX_Size() int { - return m.Size() -} -func (m *UndelegateClaimPlan) XXX_DiscardUnknown() { - xxx_messageInfo_UndelegateClaimPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_UndelegateClaimPlan proto.InternalMessageInfo - -func (m *UndelegateClaimPlan) GetValidatorIdentity() *v1.IdentityKey { - if m != nil { - return m.ValidatorIdentity - } - return nil -} - -// Deprecated: Do not use. -func (m *UndelegateClaimPlan) GetStartEpochIndex() uint64 { - if m != nil { - return m.StartEpochIndex - } - return 0 -} - -func (m *UndelegateClaimPlan) GetPenalty() *Penalty { - if m != nil { - return m.Penalty - } - return nil -} - -func (m *UndelegateClaimPlan) GetUnbondingAmount() *v11.Amount { - if m != nil { - return m.UnbondingAmount - } - return nil -} - -func (m *UndelegateClaimPlan) GetBalanceBlinding() []byte { - if m != nil { - return m.BalanceBlinding - } - return nil -} - -func (m *UndelegateClaimPlan) GetProofBlindingR() []byte { - if m != nil { - return m.ProofBlindingR - } - return nil -} - -func (m *UndelegateClaimPlan) GetProofBlindingS() []byte { - if m != nil { - return m.ProofBlindingS - } - return nil -} - -func (m *UndelegateClaimPlan) GetUnbondingStartHeight() uint64 { - if m != nil { - return m.UnbondingStartHeight - } - return 0 -} - -// A list of pending delegations and undelegations. -type DelegationChanges struct { - Delegations []*Delegate `protobuf:"bytes,1,rep,name=delegations,proto3" json:"delegations,omitempty"` - Undelegations []*Undelegate `protobuf:"bytes,2,rep,name=undelegations,proto3" json:"undelegations,omitempty"` -} - -func (m *DelegationChanges) Reset() { *m = DelegationChanges{} } -func (m *DelegationChanges) String() string { return proto.CompactTextString(m) } -func (*DelegationChanges) ProtoMessage() {} -func (*DelegationChanges) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{16} -} -func (m *DelegationChanges) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegationChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegationChanges.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 *DelegationChanges) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegationChanges.Merge(m, src) -} -func (m *DelegationChanges) XXX_Size() int { - return m.Size() -} -func (m *DelegationChanges) XXX_DiscardUnknown() { - xxx_messageInfo_DelegationChanges.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegationChanges proto.InternalMessageInfo - -func (m *DelegationChanges) GetDelegations() []*Delegate { - if m != nil { - return m.Delegations - } - return nil -} - -func (m *DelegationChanges) GetUndelegations() []*Undelegate { - if m != nil { - return m.Undelegations - } - return nil -} - -// Track's a validator's uptime. -type Uptime struct { - AsOfBlockHeight uint64 `protobuf:"varint,1,opt,name=as_of_block_height,json=asOfBlockHeight,proto3" json:"as_of_block_height,omitempty"` - WindowLen uint32 `protobuf:"varint,2,opt,name=window_len,json=windowLen,proto3" json:"window_len,omitempty"` - Bitvec []byte `protobuf:"bytes,3,opt,name=bitvec,proto3" json:"bitvec,omitempty"` -} - -func (m *Uptime) Reset() { *m = Uptime{} } -func (m *Uptime) String() string { return proto.CompactTextString(m) } -func (*Uptime) ProtoMessage() {} -func (*Uptime) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{17} -} -func (m *Uptime) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Uptime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Uptime.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 *Uptime) XXX_Merge(src proto.Message) { - xxx_messageInfo_Uptime.Merge(m, src) -} -func (m *Uptime) XXX_Size() int { - return m.Size() -} -func (m *Uptime) XXX_DiscardUnknown() { - xxx_messageInfo_Uptime.DiscardUnknown(m) -} - -var xxx_messageInfo_Uptime proto.InternalMessageInfo - -func (m *Uptime) GetAsOfBlockHeight() uint64 { - if m != nil { - return m.AsOfBlockHeight - } - return 0 -} - -func (m *Uptime) GetWindowLen() uint32 { - if m != nil { - return m.WindowLen - } - return 0 -} - -func (m *Uptime) GetBitvec() []byte { - if m != nil { - return m.Bitvec - } - return nil -} - -// Tracks our view of Tendermint's view of the validator set, so we can keep it -// from getting confused. -type CurrentConsensusKeys struct { - ConsensusKeys []*v1.ConsensusKey `protobuf:"bytes,1,rep,name=consensus_keys,json=consensusKeys,proto3" json:"consensus_keys,omitempty"` -} - -func (m *CurrentConsensusKeys) Reset() { *m = CurrentConsensusKeys{} } -func (m *CurrentConsensusKeys) String() string { return proto.CompactTextString(m) } -func (*CurrentConsensusKeys) ProtoMessage() {} -func (*CurrentConsensusKeys) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{18} -} -func (m *CurrentConsensusKeys) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CurrentConsensusKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CurrentConsensusKeys.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 *CurrentConsensusKeys) XXX_Merge(src proto.Message) { - xxx_messageInfo_CurrentConsensusKeys.Merge(m, src) -} -func (m *CurrentConsensusKeys) XXX_Size() int { - return m.Size() -} -func (m *CurrentConsensusKeys) XXX_DiscardUnknown() { - xxx_messageInfo_CurrentConsensusKeys.DiscardUnknown(m) -} - -var xxx_messageInfo_CurrentConsensusKeys proto.InternalMessageInfo - -func (m *CurrentConsensusKeys) GetConsensusKeys() []*v1.ConsensusKey { - if m != nil { - return m.ConsensusKeys - } - return nil -} - -// Tracks slashing penalties applied to a validator in some epoch. -type Penalty struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *Penalty) Reset() { *m = Penalty{} } -func (m *Penalty) String() string { return proto.CompactTextString(m) } -func (*Penalty) ProtoMessage() {} -func (*Penalty) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{19} -} -func (m *Penalty) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Penalty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Penalty.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 *Penalty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Penalty.Merge(m, src) -} -func (m *Penalty) XXX_Size() int { - return m.Size() -} -func (m *Penalty) XXX_DiscardUnknown() { - xxx_messageInfo_Penalty.DiscardUnknown(m) -} - -var xxx_messageInfo_Penalty proto.InternalMessageInfo - -func (m *Penalty) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// Requests information about a specific validator. -type GetValidatorInfoRequest struct { - // The identity key of the validator. - IdentityKey *v1.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *GetValidatorInfoRequest) Reset() { *m = GetValidatorInfoRequest{} } -func (m *GetValidatorInfoRequest) String() string { return proto.CompactTextString(m) } -func (*GetValidatorInfoRequest) ProtoMessage() {} -func (*GetValidatorInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{20} -} -func (m *GetValidatorInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetValidatorInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetValidatorInfoRequest.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 *GetValidatorInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetValidatorInfoRequest.Merge(m, src) -} -func (m *GetValidatorInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *GetValidatorInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetValidatorInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetValidatorInfoRequest proto.InternalMessageInfo - -func (m *GetValidatorInfoRequest) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -type GetValidatorInfoResponse struct { - ValidatorInfo *ValidatorInfo `protobuf:"bytes,1,opt,name=validator_info,json=validatorInfo,proto3" json:"validator_info,omitempty"` -} - -func (m *GetValidatorInfoResponse) Reset() { *m = GetValidatorInfoResponse{} } -func (m *GetValidatorInfoResponse) String() string { return proto.CompactTextString(m) } -func (*GetValidatorInfoResponse) ProtoMessage() {} -func (*GetValidatorInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{21} -} -func (m *GetValidatorInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetValidatorInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetValidatorInfoResponse.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 *GetValidatorInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetValidatorInfoResponse.Merge(m, src) -} -func (m *GetValidatorInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *GetValidatorInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetValidatorInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetValidatorInfoResponse proto.InternalMessageInfo - -func (m *GetValidatorInfoResponse) GetValidatorInfo() *ValidatorInfo { - if m != nil { - return m.ValidatorInfo - } - return nil -} - -// Requests information on the chain's validators. -type ValidatorInfoRequest struct { - // Whether or not to return inactive validators - ShowInactive bool `protobuf:"varint,2,opt,name=show_inactive,json=showInactive,proto3" json:"show_inactive,omitempty"` -} - -func (m *ValidatorInfoRequest) Reset() { *m = ValidatorInfoRequest{} } -func (m *ValidatorInfoRequest) String() string { return proto.CompactTextString(m) } -func (*ValidatorInfoRequest) ProtoMessage() {} -func (*ValidatorInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{22} -} -func (m *ValidatorInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorInfoRequest.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 *ValidatorInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorInfoRequest.Merge(m, src) -} -func (m *ValidatorInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *ValidatorInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorInfoRequest proto.InternalMessageInfo - -func (m *ValidatorInfoRequest) GetShowInactive() bool { - if m != nil { - return m.ShowInactive - } - return false -} - -type ValidatorInfoResponse struct { - ValidatorInfo *ValidatorInfo `protobuf:"bytes,1,opt,name=validator_info,json=validatorInfo,proto3" json:"validator_info,omitempty"` -} - -func (m *ValidatorInfoResponse) Reset() { *m = ValidatorInfoResponse{} } -func (m *ValidatorInfoResponse) String() string { return proto.CompactTextString(m) } -func (*ValidatorInfoResponse) ProtoMessage() {} -func (*ValidatorInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{23} -} -func (m *ValidatorInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorInfoResponse.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 *ValidatorInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorInfoResponse.Merge(m, src) -} -func (m *ValidatorInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *ValidatorInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorInfoResponse proto.InternalMessageInfo - -func (m *ValidatorInfoResponse) GetValidatorInfo() *ValidatorInfo { - if m != nil { - return m.ValidatorInfo - } - return nil -} - -type ValidatorStatusRequest struct { - IdentityKey *v1.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *ValidatorStatusRequest) Reset() { *m = ValidatorStatusRequest{} } -func (m *ValidatorStatusRequest) String() string { return proto.CompactTextString(m) } -func (*ValidatorStatusRequest) ProtoMessage() {} -func (*ValidatorStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{24} -} -func (m *ValidatorStatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorStatusRequest.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 *ValidatorStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorStatusRequest.Merge(m, src) -} -func (m *ValidatorStatusRequest) XXX_Size() int { - return m.Size() -} -func (m *ValidatorStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorStatusRequest proto.InternalMessageInfo - -func (m *ValidatorStatusRequest) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -type ValidatorStatusResponse struct { - Status *ValidatorStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` -} - -func (m *ValidatorStatusResponse) Reset() { *m = ValidatorStatusResponse{} } -func (m *ValidatorStatusResponse) String() string { return proto.CompactTextString(m) } -func (*ValidatorStatusResponse) ProtoMessage() {} -func (*ValidatorStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{25} -} -func (m *ValidatorStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorStatusResponse.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 *ValidatorStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorStatusResponse.Merge(m, src) -} -func (m *ValidatorStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *ValidatorStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorStatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorStatusResponse proto.InternalMessageInfo - -func (m *ValidatorStatusResponse) GetStatus() *ValidatorStatus { - if m != nil { - return m.Status - } - return nil -} - -// Requests the compounded penalty for a validator over a range of epochs. -type ValidatorPenaltyRequest struct { - IdentityKey *v1.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - StartEpochIndex uint64 `protobuf:"varint,3,opt,name=start_epoch_index,json=startEpochIndex,proto3" json:"start_epoch_index,omitempty"` - EndEpochIndex uint64 `protobuf:"varint,4,opt,name=end_epoch_index,json=endEpochIndex,proto3" json:"end_epoch_index,omitempty"` -} - -func (m *ValidatorPenaltyRequest) Reset() { *m = ValidatorPenaltyRequest{} } -func (m *ValidatorPenaltyRequest) String() string { return proto.CompactTextString(m) } -func (*ValidatorPenaltyRequest) ProtoMessage() {} -func (*ValidatorPenaltyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{26} -} -func (m *ValidatorPenaltyRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorPenaltyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorPenaltyRequest.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 *ValidatorPenaltyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorPenaltyRequest.Merge(m, src) -} -func (m *ValidatorPenaltyRequest) XXX_Size() int { - return m.Size() -} -func (m *ValidatorPenaltyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorPenaltyRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorPenaltyRequest proto.InternalMessageInfo - -func (m *ValidatorPenaltyRequest) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *ValidatorPenaltyRequest) GetStartEpochIndex() uint64 { - if m != nil { - return m.StartEpochIndex - } - return 0 -} - -func (m *ValidatorPenaltyRequest) GetEndEpochIndex() uint64 { - if m != nil { - return m.EndEpochIndex - } - return 0 -} - -type ValidatorPenaltyResponse struct { - Penalty *Penalty `protobuf:"bytes,1,opt,name=penalty,proto3" json:"penalty,omitempty"` -} - -func (m *ValidatorPenaltyResponse) Reset() { *m = ValidatorPenaltyResponse{} } -func (m *ValidatorPenaltyResponse) String() string { return proto.CompactTextString(m) } -func (*ValidatorPenaltyResponse) ProtoMessage() {} -func (*ValidatorPenaltyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{27} -} -func (m *ValidatorPenaltyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorPenaltyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorPenaltyResponse.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 *ValidatorPenaltyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorPenaltyResponse.Merge(m, src) -} -func (m *ValidatorPenaltyResponse) XXX_Size() int { - return m.Size() -} -func (m *ValidatorPenaltyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorPenaltyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorPenaltyResponse proto.InternalMessageInfo - -func (m *ValidatorPenaltyResponse) GetPenalty() *Penalty { - if m != nil { - return m.Penalty - } - return nil -} - -type CurrentValidatorRateRequest struct { - IdentityKey *v1.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *CurrentValidatorRateRequest) Reset() { *m = CurrentValidatorRateRequest{} } -func (m *CurrentValidatorRateRequest) String() string { return proto.CompactTextString(m) } -func (*CurrentValidatorRateRequest) ProtoMessage() {} -func (*CurrentValidatorRateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{28} -} -func (m *CurrentValidatorRateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CurrentValidatorRateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CurrentValidatorRateRequest.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 *CurrentValidatorRateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CurrentValidatorRateRequest.Merge(m, src) -} -func (m *CurrentValidatorRateRequest) XXX_Size() int { - return m.Size() -} -func (m *CurrentValidatorRateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CurrentValidatorRateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CurrentValidatorRateRequest proto.InternalMessageInfo - -func (m *CurrentValidatorRateRequest) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -type CurrentValidatorRateResponse struct { - Data *RateData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *CurrentValidatorRateResponse) Reset() { *m = CurrentValidatorRateResponse{} } -func (m *CurrentValidatorRateResponse) String() string { return proto.CompactTextString(m) } -func (*CurrentValidatorRateResponse) ProtoMessage() {} -func (*CurrentValidatorRateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{29} -} -func (m *CurrentValidatorRateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CurrentValidatorRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CurrentValidatorRateResponse.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 *CurrentValidatorRateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CurrentValidatorRateResponse.Merge(m, src) -} -func (m *CurrentValidatorRateResponse) XXX_Size() int { - return m.Size() -} -func (m *CurrentValidatorRateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CurrentValidatorRateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CurrentValidatorRateResponse proto.InternalMessageInfo - -func (m *CurrentValidatorRateResponse) GetData() *RateData { - if m != nil { - return m.Data - } - return nil -} - -type ValidatorUptimeRequest struct { - IdentityKey *v1.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *ValidatorUptimeRequest) Reset() { *m = ValidatorUptimeRequest{} } -func (m *ValidatorUptimeRequest) String() string { return proto.CompactTextString(m) } -func (*ValidatorUptimeRequest) ProtoMessage() {} -func (*ValidatorUptimeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{30} -} -func (m *ValidatorUptimeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorUptimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorUptimeRequest.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 *ValidatorUptimeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorUptimeRequest.Merge(m, src) -} -func (m *ValidatorUptimeRequest) XXX_Size() int { - return m.Size() -} -func (m *ValidatorUptimeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorUptimeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorUptimeRequest proto.InternalMessageInfo - -func (m *ValidatorUptimeRequest) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -type ValidatorUptimeResponse struct { - Uptime *Uptime `protobuf:"bytes,1,opt,name=uptime,proto3" json:"uptime,omitempty"` -} - -func (m *ValidatorUptimeResponse) Reset() { *m = ValidatorUptimeResponse{} } -func (m *ValidatorUptimeResponse) String() string { return proto.CompactTextString(m) } -func (*ValidatorUptimeResponse) ProtoMessage() {} -func (*ValidatorUptimeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{31} -} -func (m *ValidatorUptimeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorUptimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorUptimeResponse.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 *ValidatorUptimeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorUptimeResponse.Merge(m, src) -} -func (m *ValidatorUptimeResponse) XXX_Size() int { - return m.Size() -} -func (m *ValidatorUptimeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorUptimeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorUptimeResponse proto.InternalMessageInfo - -func (m *ValidatorUptimeResponse) GetUptime() *Uptime { - if m != nil { - return m.Uptime - } - return nil -} - -// Staking configuration data. -type StakeParameters struct { - // The number of epochs an unbonding note for before being released. - UnbondingEpochs uint64 `protobuf:"varint,1,opt,name=unbonding_epochs,json=unbondingEpochs,proto3" json:"unbonding_epochs,omitempty"` // Deprecated: Do not use. - // The maximum number of validators in the consensus set. - ActiveValidatorLimit uint64 `protobuf:"varint,2,opt,name=active_validator_limit,json=activeValidatorLimit,proto3" json:"active_validator_limit,omitempty"` - // The base reward rate, expressed in basis points of basis points - BaseRewardRate uint64 `protobuf:"varint,3,opt,name=base_reward_rate,json=baseRewardRate,proto3" json:"base_reward_rate,omitempty"` - // The penalty for slashing due to misbehavior. - SlashingPenaltyMisbehavior uint64 `protobuf:"varint,4,opt,name=slashing_penalty_misbehavior,json=slashingPenaltyMisbehavior,proto3" json:"slashing_penalty_misbehavior,omitempty"` - // The penalty for slashing due to downtime. - SlashingPenaltyDowntime uint64 `protobuf:"varint,5,opt,name=slashing_penalty_downtime,json=slashingPenaltyDowntime,proto3" json:"slashing_penalty_downtime,omitempty"` - // The number of blocks in the window to check for downtime. - SignedBlocksWindowLen uint64 `protobuf:"varint,6,opt,name=signed_blocks_window_len,json=signedBlocksWindowLen,proto3" json:"signed_blocks_window_len,omitempty"` - // The maximum number of blocks in the window each validator can miss signing without slashing. - MissedBlocksMaximum uint64 `protobuf:"varint,7,opt,name=missed_blocks_maximum,json=missedBlocksMaximum,proto3" json:"missed_blocks_maximum,omitempty"` - // The minimum amount of stake required for a validator to be indexed by the protocol. - MinValidatorStake *v11.Amount `protobuf:"bytes,8,opt,name=min_validator_stake,json=minValidatorStake,proto3" json:"min_validator_stake,omitempty"` - // The number of blocks that must elapse before an unbonding note can be claimed. - UnbondingDelay uint64 `protobuf:"varint,9,opt,name=unbonding_delay,json=unbondingDelay,proto3" json:"unbonding_delay,omitempty"` -} - -func (m *StakeParameters) Reset() { *m = StakeParameters{} } -func (m *StakeParameters) String() string { return proto.CompactTextString(m) } -func (*StakeParameters) ProtoMessage() {} -func (*StakeParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{32} -} -func (m *StakeParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakeParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakeParameters.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 *StakeParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakeParameters.Merge(m, src) -} -func (m *StakeParameters) XXX_Size() int { - return m.Size() -} -func (m *StakeParameters) XXX_DiscardUnknown() { - xxx_messageInfo_StakeParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_StakeParameters proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *StakeParameters) GetUnbondingEpochs() uint64 { - if m != nil { - return m.UnbondingEpochs - } - return 0 -} - -func (m *StakeParameters) GetActiveValidatorLimit() uint64 { - if m != nil { - return m.ActiveValidatorLimit - } - return 0 -} - -func (m *StakeParameters) GetBaseRewardRate() uint64 { - if m != nil { - return m.BaseRewardRate - } - return 0 -} - -func (m *StakeParameters) GetSlashingPenaltyMisbehavior() uint64 { - if m != nil { - return m.SlashingPenaltyMisbehavior - } - return 0 -} - -func (m *StakeParameters) GetSlashingPenaltyDowntime() uint64 { - if m != nil { - return m.SlashingPenaltyDowntime - } - return 0 -} - -func (m *StakeParameters) GetSignedBlocksWindowLen() uint64 { - if m != nil { - return m.SignedBlocksWindowLen - } - return 0 -} - -func (m *StakeParameters) GetMissedBlocksMaximum() uint64 { - if m != nil { - return m.MissedBlocksMaximum - } - return 0 -} - -func (m *StakeParameters) GetMinValidatorStake() *v11.Amount { - if m != nil { - return m.MinValidatorStake - } - return nil -} - -func (m *StakeParameters) GetUnbondingDelay() uint64 { - if m != nil { - return m.UnbondingDelay - } - return 0 -} - -// Genesis data for the staking component. -type GenesisContent struct { - // The configuration parameters for the staking component present at genesis - StakeParams *StakeParameters `protobuf:"bytes,1,opt,name=stake_params,json=stakeParams,proto3" json:"stake_params,omitempty"` - // The list of validators present at genesis. - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` -} - -func (m *GenesisContent) Reset() { *m = GenesisContent{} } -func (m *GenesisContent) String() string { return proto.CompactTextString(m) } -func (*GenesisContent) ProtoMessage() {} -func (*GenesisContent) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{33} -} -func (m *GenesisContent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisContent.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 *GenesisContent) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisContent.Merge(m, src) -} -func (m *GenesisContent) XXX_Size() int { - return m.Size() -} -func (m *GenesisContent) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisContent.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisContent proto.InternalMessageInfo - -func (m *GenesisContent) GetStakeParams() *StakeParameters { - if m != nil { - return m.StakeParams - } - return nil -} - -func (m *GenesisContent) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -type EventTombstoneValidator struct { - // The height at which the offense occurred. - EvidenceHeight uint64 `protobuf:"varint,1,opt,name=evidence_height,json=evidenceHeight,proto3" json:"evidence_height,omitempty"` - // The height at which the evidence was processed. - CurrentHeight uint64 `protobuf:"varint,2,opt,name=current_height,json=currentHeight,proto3" json:"current_height,omitempty"` - // The validator identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,4,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The validator's Comet address. - Address []byte `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` - // The voting power for the validator. - VotingPower uint64 `protobuf:"varint,6,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` -} - -func (m *EventTombstoneValidator) Reset() { *m = EventTombstoneValidator{} } -func (m *EventTombstoneValidator) String() string { return proto.CompactTextString(m) } -func (*EventTombstoneValidator) ProtoMessage() {} -func (*EventTombstoneValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{34} -} -func (m *EventTombstoneValidator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventTombstoneValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventTombstoneValidator.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 *EventTombstoneValidator) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventTombstoneValidator.Merge(m, src) -} -func (m *EventTombstoneValidator) XXX_Size() int { - return m.Size() -} -func (m *EventTombstoneValidator) XXX_DiscardUnknown() { - xxx_messageInfo_EventTombstoneValidator.DiscardUnknown(m) -} - -var xxx_messageInfo_EventTombstoneValidator proto.InternalMessageInfo - -func (m *EventTombstoneValidator) GetEvidenceHeight() uint64 { - if m != nil { - return m.EvidenceHeight - } - return 0 -} - -func (m *EventTombstoneValidator) GetCurrentHeight() uint64 { - if m != nil { - return m.CurrentHeight - } - return 0 -} - -func (m *EventTombstoneValidator) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventTombstoneValidator) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *EventTombstoneValidator) GetVotingPower() uint64 { - if m != nil { - return m.VotingPower - } - return 0 -} - -type EventValidatorStateChange struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The new state of the validator. - State *ValidatorState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` -} - -func (m *EventValidatorStateChange) Reset() { *m = EventValidatorStateChange{} } -func (m *EventValidatorStateChange) String() string { return proto.CompactTextString(m) } -func (*EventValidatorStateChange) ProtoMessage() {} -func (*EventValidatorStateChange) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{35} -} -func (m *EventValidatorStateChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValidatorStateChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValidatorStateChange.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 *EventValidatorStateChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValidatorStateChange.Merge(m, src) -} -func (m *EventValidatorStateChange) XXX_Size() int { - return m.Size() -} -func (m *EventValidatorStateChange) XXX_DiscardUnknown() { - xxx_messageInfo_EventValidatorStateChange.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValidatorStateChange proto.InternalMessageInfo - -func (m *EventValidatorStateChange) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventValidatorStateChange) GetState() *ValidatorState { - if m != nil { - return m.State - } - return nil -} - -type EventValidatorVotingPowerChange struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The new voting power of the validator. - VotingPower *v11.Amount `protobuf:"bytes,2,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` -} - -func (m *EventValidatorVotingPowerChange) Reset() { *m = EventValidatorVotingPowerChange{} } -func (m *EventValidatorVotingPowerChange) String() string { return proto.CompactTextString(m) } -func (*EventValidatorVotingPowerChange) ProtoMessage() {} -func (*EventValidatorVotingPowerChange) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{36} -} -func (m *EventValidatorVotingPowerChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValidatorVotingPowerChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValidatorVotingPowerChange.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 *EventValidatorVotingPowerChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValidatorVotingPowerChange.Merge(m, src) -} -func (m *EventValidatorVotingPowerChange) XXX_Size() int { - return m.Size() -} -func (m *EventValidatorVotingPowerChange) XXX_DiscardUnknown() { - xxx_messageInfo_EventValidatorVotingPowerChange.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValidatorVotingPowerChange proto.InternalMessageInfo - -func (m *EventValidatorVotingPowerChange) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventValidatorVotingPowerChange) GetVotingPower() *v11.Amount { - if m != nil { - return m.VotingPower - } - return nil -} - -type EventValidatorBondingStateChange struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The new bonding state of the validator. - BondingState *BondingState `protobuf:"bytes,2,opt,name=bonding_state,json=bondingState,proto3" json:"bonding_state,omitempty"` -} - -func (m *EventValidatorBondingStateChange) Reset() { *m = EventValidatorBondingStateChange{} } -func (m *EventValidatorBondingStateChange) String() string { return proto.CompactTextString(m) } -func (*EventValidatorBondingStateChange) ProtoMessage() {} -func (*EventValidatorBondingStateChange) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{37} -} -func (m *EventValidatorBondingStateChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValidatorBondingStateChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValidatorBondingStateChange.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 *EventValidatorBondingStateChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValidatorBondingStateChange.Merge(m, src) -} -func (m *EventValidatorBondingStateChange) XXX_Size() int { - return m.Size() -} -func (m *EventValidatorBondingStateChange) XXX_DiscardUnknown() { - xxx_messageInfo_EventValidatorBondingStateChange.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValidatorBondingStateChange proto.InternalMessageInfo - -func (m *EventValidatorBondingStateChange) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventValidatorBondingStateChange) GetBondingState() *BondingState { - if m != nil { - return m.BondingState - } - return nil -} - -type EventRateDataChange struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The new rate data. - RateData *RateData `protobuf:"bytes,2,opt,name=rate_data,json=rateData,proto3" json:"rate_data,omitempty"` -} - -func (m *EventRateDataChange) Reset() { *m = EventRateDataChange{} } -func (m *EventRateDataChange) String() string { return proto.CompactTextString(m) } -func (*EventRateDataChange) ProtoMessage() {} -func (*EventRateDataChange) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{38} -} -func (m *EventRateDataChange) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventRateDataChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventRateDataChange.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 *EventRateDataChange) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventRateDataChange.Merge(m, src) -} -func (m *EventRateDataChange) XXX_Size() int { - return m.Size() -} -func (m *EventRateDataChange) XXX_DiscardUnknown() { - xxx_messageInfo_EventRateDataChange.DiscardUnknown(m) -} - -var xxx_messageInfo_EventRateDataChange proto.InternalMessageInfo - -func (m *EventRateDataChange) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventRateDataChange) GetRateData() *RateData { - if m != nil { - return m.RateData - } - return nil -} - -type EventValidatorDefinitionUpload struct { - // The validator definition. - Validator *Validator `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` -} - -func (m *EventValidatorDefinitionUpload) Reset() { *m = EventValidatorDefinitionUpload{} } -func (m *EventValidatorDefinitionUpload) String() string { return proto.CompactTextString(m) } -func (*EventValidatorDefinitionUpload) ProtoMessage() {} -func (*EventValidatorDefinitionUpload) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{39} -} -func (m *EventValidatorDefinitionUpload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValidatorDefinitionUpload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValidatorDefinitionUpload.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 *EventValidatorDefinitionUpload) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValidatorDefinitionUpload.Merge(m, src) -} -func (m *EventValidatorDefinitionUpload) XXX_Size() int { - return m.Size() -} -func (m *EventValidatorDefinitionUpload) XXX_DiscardUnknown() { - xxx_messageInfo_EventValidatorDefinitionUpload.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValidatorDefinitionUpload proto.InternalMessageInfo - -func (m *EventValidatorDefinitionUpload) GetValidator() *Validator { - if m != nil { - return m.Validator - } - return nil -} - -type EventValidatorMissedBlock struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *EventValidatorMissedBlock) Reset() { *m = EventValidatorMissedBlock{} } -func (m *EventValidatorMissedBlock) String() string { return proto.CompactTextString(m) } -func (*EventValidatorMissedBlock) ProtoMessage() {} -func (*EventValidatorMissedBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{40} -} -func (m *EventValidatorMissedBlock) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventValidatorMissedBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventValidatorMissedBlock.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 *EventValidatorMissedBlock) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventValidatorMissedBlock.Merge(m, src) -} -func (m *EventValidatorMissedBlock) XXX_Size() int { - return m.Size() -} -func (m *EventValidatorMissedBlock) XXX_DiscardUnknown() { - xxx_messageInfo_EventValidatorMissedBlock.DiscardUnknown(m) -} - -var xxx_messageInfo_EventValidatorMissedBlock proto.InternalMessageInfo - -func (m *EventValidatorMissedBlock) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -type EventDelegate struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The amount of stake delegated, in the staking token. - Amount *v11.Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *EventDelegate) Reset() { *m = EventDelegate{} } -func (m *EventDelegate) String() string { return proto.CompactTextString(m) } -func (*EventDelegate) ProtoMessage() {} -func (*EventDelegate) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{41} -} -func (m *EventDelegate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventDelegate.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 *EventDelegate) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDelegate.Merge(m, src) -} -func (m *EventDelegate) XXX_Size() int { - return m.Size() -} -func (m *EventDelegate) XXX_DiscardUnknown() { - xxx_messageInfo_EventDelegate.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDelegate proto.InternalMessageInfo - -func (m *EventDelegate) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventDelegate) GetAmount() *v11.Amount { - if m != nil { - return m.Amount - } - return nil -} - -type EventUndelegate struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The amount of stake undelegated, in the staking token. - Amount *v11.Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *EventUndelegate) Reset() { *m = EventUndelegate{} } -func (m *EventUndelegate) String() string { return proto.CompactTextString(m) } -func (*EventUndelegate) ProtoMessage() {} -func (*EventUndelegate) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{42} -} -func (m *EventUndelegate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventUndelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventUndelegate.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 *EventUndelegate) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventUndelegate.Merge(m, src) -} -func (m *EventUndelegate) XXX_Size() int { - return m.Size() -} -func (m *EventUndelegate) XXX_DiscardUnknown() { - xxx_messageInfo_EventUndelegate.DiscardUnknown(m) -} - -var xxx_messageInfo_EventUndelegate proto.InternalMessageInfo - -func (m *EventUndelegate) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventUndelegate) GetAmount() *v11.Amount { - if m != nil { - return m.Amount - } - return nil -} - -// Indicates a slashing penalty was applied to a validator's reward rates. -type EventSlashingPenaltyApplied struct { - // The validator's identity key. - IdentityKey *v1.IdentityKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // The epoch in which the penalty was applied. - EpochIndex uint64 `protobuf:"varint,2,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` - // The penalty amount after slashing. - NewPenalty *Penalty `protobuf:"bytes,3,opt,name=new_penalty,json=newPenalty,proto3" json:"new_penalty,omitempty"` -} - -func (m *EventSlashingPenaltyApplied) Reset() { *m = EventSlashingPenaltyApplied{} } -func (m *EventSlashingPenaltyApplied) String() string { return proto.CompactTextString(m) } -func (*EventSlashingPenaltyApplied) ProtoMessage() {} -func (*EventSlashingPenaltyApplied) Descriptor() ([]byte, []int) { - return fileDescriptor_061b0086577193ed, []int{43} -} -func (m *EventSlashingPenaltyApplied) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventSlashingPenaltyApplied) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventSlashingPenaltyApplied.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 *EventSlashingPenaltyApplied) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSlashingPenaltyApplied.Merge(m, src) -} -func (m *EventSlashingPenaltyApplied) XXX_Size() int { - return m.Size() -} -func (m *EventSlashingPenaltyApplied) XXX_DiscardUnknown() { - xxx_messageInfo_EventSlashingPenaltyApplied.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSlashingPenaltyApplied proto.InternalMessageInfo - -func (m *EventSlashingPenaltyApplied) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -func (m *EventSlashingPenaltyApplied) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -func (m *EventSlashingPenaltyApplied) GetNewPenalty() *Penalty { - if m != nil { - return m.NewPenalty - } - return nil -} - -func init() { - proto.RegisterEnum("penumbra.core.component.stake.v1.BondingState_BondingStateEnum", BondingState_BondingStateEnum_name, BondingState_BondingStateEnum_value) - proto.RegisterEnum("penumbra.core.component.stake.v1.ValidatorState_ValidatorStateEnum", ValidatorState_ValidatorStateEnum_name, ValidatorState_ValidatorStateEnum_value) - proto.RegisterType((*ZKUndelegateClaimProof)(nil), "penumbra.core.component.stake.v1.ZKUndelegateClaimProof") - proto.RegisterType((*Validator)(nil), "penumbra.core.component.stake.v1.Validator") - proto.RegisterType((*ValidatorList)(nil), "penumbra.core.component.stake.v1.ValidatorList") - proto.RegisterType((*FundingStream)(nil), "penumbra.core.component.stake.v1.FundingStream") - proto.RegisterType((*FundingStream_ToAddress)(nil), "penumbra.core.component.stake.v1.FundingStream.ToAddress") - proto.RegisterType((*FundingStream_ToCommunityPool)(nil), "penumbra.core.component.stake.v1.FundingStream.ToCommunityPool") - proto.RegisterType((*RateData)(nil), "penumbra.core.component.stake.v1.RateData") - proto.RegisterType((*BaseRateData)(nil), "penumbra.core.component.stake.v1.BaseRateData") - proto.RegisterType((*ValidatorStatus)(nil), "penumbra.core.component.stake.v1.ValidatorStatus") - proto.RegisterType((*BondingState)(nil), "penumbra.core.component.stake.v1.BondingState") - proto.RegisterType((*ValidatorState)(nil), "penumbra.core.component.stake.v1.ValidatorState") - proto.RegisterType((*ValidatorInfo)(nil), "penumbra.core.component.stake.v1.ValidatorInfo") - proto.RegisterType((*ValidatorDefinition)(nil), "penumbra.core.component.stake.v1.ValidatorDefinition") - proto.RegisterType((*Delegate)(nil), "penumbra.core.component.stake.v1.Delegate") - proto.RegisterType((*Undelegate)(nil), "penumbra.core.component.stake.v1.Undelegate") - proto.RegisterType((*UndelegateClaim)(nil), "penumbra.core.component.stake.v1.UndelegateClaim") - proto.RegisterType((*UndelegateClaimBody)(nil), "penumbra.core.component.stake.v1.UndelegateClaimBody") - proto.RegisterType((*UndelegateClaimPlan)(nil), "penumbra.core.component.stake.v1.UndelegateClaimPlan") - proto.RegisterType((*DelegationChanges)(nil), "penumbra.core.component.stake.v1.DelegationChanges") - proto.RegisterType((*Uptime)(nil), "penumbra.core.component.stake.v1.Uptime") - proto.RegisterType((*CurrentConsensusKeys)(nil), "penumbra.core.component.stake.v1.CurrentConsensusKeys") - proto.RegisterType((*Penalty)(nil), "penumbra.core.component.stake.v1.Penalty") - proto.RegisterType((*GetValidatorInfoRequest)(nil), "penumbra.core.component.stake.v1.GetValidatorInfoRequest") - proto.RegisterType((*GetValidatorInfoResponse)(nil), "penumbra.core.component.stake.v1.GetValidatorInfoResponse") - proto.RegisterType((*ValidatorInfoRequest)(nil), "penumbra.core.component.stake.v1.ValidatorInfoRequest") - proto.RegisterType((*ValidatorInfoResponse)(nil), "penumbra.core.component.stake.v1.ValidatorInfoResponse") - proto.RegisterType((*ValidatorStatusRequest)(nil), "penumbra.core.component.stake.v1.ValidatorStatusRequest") - proto.RegisterType((*ValidatorStatusResponse)(nil), "penumbra.core.component.stake.v1.ValidatorStatusResponse") - proto.RegisterType((*ValidatorPenaltyRequest)(nil), "penumbra.core.component.stake.v1.ValidatorPenaltyRequest") - proto.RegisterType((*ValidatorPenaltyResponse)(nil), "penumbra.core.component.stake.v1.ValidatorPenaltyResponse") - proto.RegisterType((*CurrentValidatorRateRequest)(nil), "penumbra.core.component.stake.v1.CurrentValidatorRateRequest") - proto.RegisterType((*CurrentValidatorRateResponse)(nil), "penumbra.core.component.stake.v1.CurrentValidatorRateResponse") - proto.RegisterType((*ValidatorUptimeRequest)(nil), "penumbra.core.component.stake.v1.ValidatorUptimeRequest") - proto.RegisterType((*ValidatorUptimeResponse)(nil), "penumbra.core.component.stake.v1.ValidatorUptimeResponse") - proto.RegisterType((*StakeParameters)(nil), "penumbra.core.component.stake.v1.StakeParameters") - proto.RegisterType((*GenesisContent)(nil), "penumbra.core.component.stake.v1.GenesisContent") - proto.RegisterType((*EventTombstoneValidator)(nil), "penumbra.core.component.stake.v1.EventTombstoneValidator") - proto.RegisterType((*EventValidatorStateChange)(nil), "penumbra.core.component.stake.v1.EventValidatorStateChange") - proto.RegisterType((*EventValidatorVotingPowerChange)(nil), "penumbra.core.component.stake.v1.EventValidatorVotingPowerChange") - proto.RegisterType((*EventValidatorBondingStateChange)(nil), "penumbra.core.component.stake.v1.EventValidatorBondingStateChange") - proto.RegisterType((*EventRateDataChange)(nil), "penumbra.core.component.stake.v1.EventRateDataChange") - proto.RegisterType((*EventValidatorDefinitionUpload)(nil), "penumbra.core.component.stake.v1.EventValidatorDefinitionUpload") - proto.RegisterType((*EventValidatorMissedBlock)(nil), "penumbra.core.component.stake.v1.EventValidatorMissedBlock") - proto.RegisterType((*EventDelegate)(nil), "penumbra.core.component.stake.v1.EventDelegate") - proto.RegisterType((*EventUndelegate)(nil), "penumbra.core.component.stake.v1.EventUndelegate") - proto.RegisterType((*EventSlashingPenaltyApplied)(nil), "penumbra.core.component.stake.v1.EventSlashingPenaltyApplied") -} - -func init() { - proto.RegisterFile("penumbra/core/component/stake/v1/stake.proto", fileDescriptor_061b0086577193ed) -} - -var fileDescriptor_061b0086577193ed = []byte{ - // 2592 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x4b, 0x6c, 0x1b, 0xc7, - 0xd5, 0xbb, 0xa2, 0x64, 0xe9, 0x89, 0x1f, 0x69, 0xfc, 0xa3, 0x15, 0x47, 0x66, 0xd6, 0x4e, 0xa3, - 0x24, 0x0e, 0x15, 0xb9, 0x69, 0x93, 0x28, 0x68, 0x12, 0xf1, 0x63, 0x85, 0xfe, 0xc8, 0xcc, 0x52, - 0x56, 0x53, 0xd7, 0xe8, 0x66, 0xc9, 0x1d, 0x49, 0x0b, 0x73, 0x67, 0x99, 0x9d, 0x21, 0x15, 0xa1, - 0xb7, 0x1c, 0x0a, 0x04, 0x28, 0x8a, 0x5c, 0x0a, 0xf4, 0xd4, 0x43, 0x81, 0x1e, 0x9a, 0x5b, 0xd1, - 0xcf, 0xb1, 0x97, 0x5e, 0x8a, 0x9e, 0x92, 0x43, 0xd1, 0xa2, 0xbd, 0x14, 0xce, 0xa1, 0x40, 0x81, - 0xf4, 0xda, 0x6b, 0x31, 0xb3, 0xb3, 0x3f, 0x52, 0x32, 0x49, 0x85, 0x6d, 0x7d, 0xb1, 0x77, 0xde, - 0xbc, 0xf7, 0xe6, 0xbd, 0x37, 0x6f, 0xde, 0x8f, 0x82, 0x6b, 0x1d, 0x4c, 0xba, 0x4e, 0xd3, 0x33, - 0x57, 0x5b, 0xae, 0x87, 0x57, 0x5b, 0xae, 0xd3, 0x71, 0x09, 0x26, 0x6c, 0x95, 0x32, 0xf3, 0x21, - 0x5e, 0xed, 0xad, 0xf9, 0x1f, 0xc5, 0x8e, 0xe7, 0x32, 0x17, 0x15, 0x02, 0xec, 0x22, 0xc7, 0x2e, - 0x86, 0xd8, 0x45, 0x1f, 0xa9, 0xb7, 0xb6, 0xa4, 0x25, 0xf9, 0x99, 0x94, 0x62, 0xc6, 0xb9, 0x88, - 0x0f, 0x9f, 0xcb, 0xd2, 0xca, 0xb1, 0x67, 0xb6, 0x04, 0x2e, 0x6d, 0x05, 0x98, 0x85, 0x24, 0xe6, - 0x43, 0x7c, 0x48, 0x39, 0x02, 0xff, 0x5f, 0x62, 0x2c, 0x27, 0x31, 0x48, 0xd7, 0xe1, 0x08, 0xa4, - 0xeb, 0xf8, 0xfb, 0x5a, 0x11, 0xce, 0xdf, 0xbf, 0x75, 0x8f, 0x58, 0xb8, 0x8d, 0xf7, 0x4c, 0x86, - 0xcb, 0x6d, 0xd3, 0x76, 0xea, 0x9e, 0xeb, 0xee, 0xa2, 0xb3, 0x30, 0x6d, 0x13, 0x82, 0xbd, 0xbc, - 0x52, 0x50, 0x56, 0xd2, 0xba, 0xbf, 0xd0, 0x7e, 0x39, 0x05, 0x73, 0x3b, 0x66, 0xdb, 0xb6, 0x4c, - 0xe6, 0x7a, 0xa8, 0x0a, 0x69, 0xdb, 0xc2, 0x84, 0xd9, 0xec, 0xd0, 0x78, 0x88, 0x0f, 0x05, 0xea, - 0xfc, 0x75, 0xad, 0x98, 0x34, 0x83, 0x10, 0xa7, 0xb7, 0x56, 0xac, 0x49, 0xd4, 0x5b, 0xf8, 0x50, - 0x9f, 0xb7, 0xa3, 0x05, 0xba, 0x02, 0x99, 0x96, 0x4b, 0x28, 0x26, 0xb4, 0x4b, 0x05, 0x1f, 0x55, - 0x1c, 0x99, 0x0e, 0x81, 0x1c, 0x09, 0x41, 0x8a, 0x98, 0x0e, 0xce, 0x4f, 0x15, 0x94, 0x95, 0x39, - 0x5d, 0x7c, 0xa3, 0x3c, 0x9c, 0x3e, 0xc0, 0x4d, 0x6a, 0x33, 0x9c, 0x4f, 0x09, 0x70, 0xb0, 0x44, - 0x05, 0x98, 0xb7, 0x30, 0x6d, 0x79, 0x76, 0x87, 0xd9, 0x2e, 0xc9, 0x4f, 0x8b, 0xdd, 0x38, 0x88, - 0xd3, 0x62, 0x62, 0x36, 0xdb, 0xd8, 0xca, 0xcf, 0x16, 0x94, 0x95, 0x59, 0x3d, 0x58, 0xa2, 0xf7, - 0x20, 0xb7, 0xdb, 0x25, 0x96, 0x4d, 0xf6, 0x0c, 0xca, 0x3c, 0x6c, 0x3a, 0x34, 0x3f, 0x53, 0x98, - 0x5a, 0x99, 0xbf, 0xbe, 0x5a, 0x1c, 0x76, 0xbf, 0xc5, 0x1b, 0x3e, 0x61, 0x43, 0xd0, 0xe9, 0xd9, - 0xdd, 0xf8, 0x92, 0xa2, 0xe7, 0x20, 0x47, 0xf1, 0x07, 0x5d, 0x4c, 0x5a, 0xd8, 0xe0, 0x8c, 0xb0, - 0x97, 0x3f, 0x5d, 0x50, 0x56, 0x32, 0x7a, 0x36, 0x00, 0x6f, 0x09, 0x28, 0xba, 0x05, 0xd9, 0x3d, - 0xb7, 0x87, 0x3d, 0x62, 0x72, 0x54, 0x6e, 0x92, 0x39, 0x61, 0xda, 0xab, 0xc7, 0x98, 0x76, 0x33, - 0x44, 0xe6, 0xc6, 0xcd, 0xec, 0xc5, 0x97, 0xda, 0x7d, 0xc8, 0x84, 0x57, 0x76, 0xdb, 0xa6, 0x0c, - 0xd5, 0x20, 0xdb, 0x0b, 0x00, 0x9c, 0x39, 0xcd, 0x2b, 0x42, 0xbf, 0x51, 0x2e, 0x2e, 0x13, 0x52, - 0xde, 0xc2, 0x87, 0x54, 0xfb, 0xb3, 0x0a, 0x99, 0x84, 0xce, 0xe8, 0x3e, 0x00, 0x73, 0x0d, 0xd3, - 0xb2, 0x3c, 0x4c, 0xa9, 0xf4, 0x88, 0xd7, 0xc7, 0x34, 0x5c, 0x71, 0xdb, 0xdd, 0xf0, 0x19, 0xbc, - 0x73, 0x4a, 0x9f, 0x63, 0xc1, 0x02, 0x39, 0xb0, 0xc8, 0x5c, 0xa3, 0xe5, 0x3a, 0x4e, 0x97, 0x70, - 0x9f, 0xeb, 0xb8, 0x6e, 0x5b, 0x38, 0xcb, 0xfc, 0xf5, 0xb7, 0xc6, 0x3f, 0xa2, 0x1c, 0xf0, 0xa9, - 0xbb, 0x6e, 0xfb, 0x9d, 0x53, 0x7a, 0x8e, 0x25, 0x41, 0x4b, 0x6f, 0xc3, 0x5c, 0x28, 0x08, 0xf7, - 0x97, 0xb8, 0x52, 0x73, 0x7a, 0xb0, 0x44, 0x17, 0x61, 0xd6, 0x33, 0x19, 0x36, 0x9a, 0x1d, 0x2a, - 0x84, 0xc9, 0xe8, 0xa7, 0xf9, 0xba, 0xd4, 0xa1, 0x4b, 0xd7, 0x20, 0xd7, 0x77, 0xce, 0x63, 0xb0, - 0x4b, 0xf3, 0x30, 0xe7, 0xe1, 0x96, 0xdd, 0xb1, 0x31, 0x61, 0xda, 0x4f, 0x55, 0x98, 0xd5, 0x4d, - 0x86, 0x2b, 0x26, 0x33, 0x27, 0xf7, 0xd0, 0xe6, 0x71, 0xc7, 0x6d, 0xed, 0x1b, 0x36, 0xb1, 0xf0, - 0x87, 0xe2, 0xf8, 0x54, 0x49, 0xcd, 0x2b, 0x3a, 0x08, 0x70, 0x8d, 0x43, 0x51, 0x1d, 0xce, 0x45, - 0xde, 0xe1, 0xe1, 0x03, 0xd3, 0xb3, 0x0c, 0x2e, 0xa1, 0x78, 0x62, 0xf3, 0xd7, 0x2f, 0xf5, 0x1d, - 0xca, 0x63, 0x49, 0x6f, 0xad, 0xb8, 0xe1, 0xb8, 0x5d, 0xc2, 0xf4, 0x33, 0x21, 0xa9, 0x2e, 0x28, - 0xb9, 0x06, 0x68, 0x1b, 0x2e, 0x44, 0x1c, 0xf1, 0x87, 0xad, 0x7d, 0x93, 0xec, 0x61, 0x9f, 0xe7, - 0xf4, 0x08, 0x3c, 0x23, 0x71, 0xaa, 0x92, 0x96, 0x73, 0xd5, 0x7e, 0xaf, 0x40, 0xba, 0x64, 0x52, - 0x1c, 0x1a, 0xe9, 0x72, 0x52, 0x3b, 0x6e, 0xa3, 0x54, 0x42, 0xb3, 0x1b, 0xb0, 0xd0, 0x34, 0x29, - 0x4e, 0x28, 0xa5, 0x8e, 0x20, 0x40, 0x96, 0x53, 0xc5, 0xf4, 0xb9, 0x09, 0x48, 0xf0, 0x49, 0xaa, - 0x32, 0x35, 0x02, 0x27, 0x71, 0x7e, 0x42, 0x8b, 0xdf, 0xaa, 0x90, 0x0b, 0x5f, 0x67, 0x83, 0x99, - 0xac, 0x4b, 0x27, 0x75, 0xdb, 0x37, 0x60, 0x9a, 0xb2, 0x48, 0xc7, 0x97, 0x87, 0xbf, 0x90, 0x84, - 0x20, 0x58, 0xf7, 0xc9, 0xd1, 0x5b, 0x90, 0xee, 0xb9, 0x8c, 0x87, 0xc3, 0x8e, 0x7b, 0x80, 0xbd, - 0x91, 0x14, 0x9d, 0xf7, 0x29, 0xea, 0x9c, 0x00, 0x35, 0x20, 0xd3, 0x74, 0x83, 0x80, 0x1a, 0x79, - 0x52, 0x71, 0xb8, 0x40, 0x25, 0x57, 0x3e, 0x59, 0x2e, 0x4e, 0xba, 0x19, 0x5b, 0x69, 0x7f, 0x55, - 0x21, 0x1d, 0xdf, 0x46, 0xf7, 0x02, 0x75, 0xb9, 0xb9, 0xb2, 0xa3, 0x04, 0x84, 0x38, 0x79, 0x62, - 0x51, 0x25, 0x5d, 0x27, 0xd0, 0xfe, 0x1a, 0x2c, 0x74, 0x09, 0x3f, 0x99, 0x1a, 0x26, 0x33, 0x84, - 0x37, 0xc5, 0x1e, 0x4e, 0x56, 0xee, 0x6d, 0xb0, 0x2a, 0xdf, 0x41, 0x2f, 0xc0, 0x62, 0x0c, 0x7b, - 0x1f, 0xdb, 0x7b, 0xfb, 0x4c, 0x18, 0x2c, 0xa5, 0xe7, 0x42, 0xd4, 0x77, 0x04, 0x58, 0xfb, 0x89, - 0x02, 0x0b, 0xfd, 0xa7, 0x22, 0x0d, 0x96, 0x4b, 0x77, 0xb7, 0x2a, 0xb5, 0xad, 0x4d, 0xa3, 0xb1, - 0xbd, 0xb1, 0x5d, 0x35, 0xaa, 0x5b, 0xf7, 0xee, 0x18, 0xf7, 0xb6, 0x1a, 0xf5, 0x6a, 0xb9, 0x76, - 0xa3, 0x56, 0xad, 0x2c, 0x9c, 0x42, 0x4f, 0xc3, 0xc5, 0x23, 0x70, 0x38, 0xa8, 0x5a, 0x59, 0x50, - 0x50, 0x01, 0x2e, 0x1d, 0xc9, 0x42, 0x02, 0x17, 0x54, 0x74, 0x19, 0x9e, 0x3a, 0x16, 0xa3, 0x5a, - 0x59, 0x98, 0xd2, 0xfe, 0xad, 0x42, 0x36, 0xe9, 0x0c, 0xe8, 0x3b, 0x49, 0xf3, 0x96, 0xc7, 0xf5, - 0xa6, 0xbe, 0x65, 0xcc, 0xc4, 0xda, 0xc7, 0x2a, 0xa0, 0xc1, 0x5d, 0x74, 0x15, 0x0a, 0x3b, 0x1b, - 0xb7, 0x6b, 0x95, 0x8d, 0xed, 0xbb, 0xfa, 0xf1, 0xc6, 0x28, 0xc0, 0xa5, 0x23, 0xb1, 0x2a, 0xd5, - 0x1b, 0xb5, 0x2d, 0x61, 0x8f, 0x67, 0xe0, 0xe9, 0x23, 0x31, 0x6a, 0x5b, 0x1b, 0xe5, 0xed, 0xda, - 0x4e, 0xd5, 0x37, 0xc8, 0x91, 0x28, 0x12, 0x61, 0xea, 0x58, 0x84, 0x9b, 0x1b, 0xb5, 0xdb, 0xd5, - 0xca, 0x42, 0x0a, 0x5d, 0x81, 0xcb, 0x47, 0x22, 0x6c, 0xdf, 0xbd, 0x53, 0x6a, 0x6c, 0xdf, 0xe5, - 0x92, 0x4c, 0x1f, 0x2b, 0x49, 0xa5, 0xd6, 0xd8, 0x28, 0x71, 0x3e, 0x33, 0xda, 0xbf, 0x94, 0x58, - 0xb6, 0xae, 0x91, 0x5d, 0x17, 0xd5, 0x60, 0x2e, 0x0c, 0x80, 0x32, 0x14, 0xbc, 0x38, 0x86, 0xf1, - 0xf5, 0x88, 0x1a, 0xd5, 0x60, 0x86, 0x8a, 0x10, 0x23, 0x43, 0xc2, 0xda, 0x98, 0x97, 0xd8, 0xa5, - 0xba, 0x64, 0x80, 0x36, 0x61, 0x4e, 0xa4, 0x31, 0xcb, 0x64, 0xa6, 0x8c, 0x08, 0x2f, 0x0c, 0xe7, - 0x16, 0xc4, 0x6a, 0x5d, 0xe4, 0x40, 0xfe, 0xa5, 0x7d, 0x1f, 0xce, 0x84, 0x67, 0x54, 0xf0, 0xae, - 0x4d, 0x6c, 0x51, 0x9e, 0x4d, 0x50, 0xeb, 0x8b, 0x30, 0x6b, 0x76, 0xd9, 0xbe, 0x41, 0xed, 0x3d, - 0x59, 0x59, 0x9e, 0xe6, 0xeb, 0x86, 0xbd, 0xa7, 0x7d, 0xa2, 0xc2, 0x6c, 0x45, 0xd6, 0xbe, 0xe8, - 0x5d, 0x40, 0x51, 0x9a, 0x0a, 0x02, 0xe9, 0x18, 0xc1, 0x77, 0x31, 0xa4, 0x0e, 0xa0, 0xfd, 0x29, - 0x49, 0x1d, 0x48, 0x49, 0x55, 0x90, 0x61, 0x01, 0x5b, 0x86, 0x29, 0x42, 0xe7, 0x48, 0xe1, 0x35, - 0x1b, 0x10, 0xf9, 0x6b, 0x54, 0x83, 0x45, 0x59, 0xc2, 0xdb, 0x2e, 0x09, 0x18, 0x8d, 0x92, 0xaf, - 0x17, 0x22, 0x32, 0x1f, 0xa2, 0xfd, 0x43, 0x05, 0x88, 0x1a, 0x82, 0xff, 0x86, 0x51, 0x8a, 0xb0, - 0x48, 0x99, 0xe9, 0xc9, 0x60, 0x3a, 0x50, 0x8b, 0xe4, 0xc4, 0x66, 0xf5, 0x09, 0xb6, 0x11, 0xaa, - 0x00, 0xec, 0x7a, 0xae, 0x23, 0xb3, 0x81, 0x5f, 0xc3, 0x3c, 0x7b, 0xbc, 0x77, 0xb6, 0x18, 0xe7, - 0x26, 0x34, 0xd2, 0xe7, 0x38, 0xa1, 0xf8, 0xd4, 0x3c, 0xc8, 0xf5, 0x75, 0x5e, 0xa8, 0x06, 0xa9, - 0xa6, 0x6b, 0x05, 0xf6, 0xfd, 0xc6, 0x70, 0x87, 0xef, 0x63, 0x50, 0x72, 0xad, 0x43, 0x5d, 0xb0, - 0xe0, 0xfd, 0x5b, 0x87, 0x37, 0x72, 0xd2, 0xe5, 0xfd, 0x85, 0xf6, 0xa5, 0x0a, 0x67, 0x8e, 0xa0, - 0x79, 0x12, 0xae, 0xb9, 0x0c, 0xa7, 0x3b, 0x98, 0x98, 0x6d, 0x76, 0x28, 0xaf, 0xf7, 0xf9, 0xe1, - 0xea, 0xd7, 0x7d, 0x02, 0x3d, 0xa0, 0x44, 0xef, 0xf1, 0xd2, 0xac, 0x2d, 0xba, 0x26, 0xde, 0x26, - 0xd8, 0xcc, 0xc1, 0xe1, 0x2d, 0xf7, 0xf3, 0xf3, 0x7b, 0x6e, 0x5e, 0x07, 0xf8, 0x14, 0xe5, 0x90, - 0x40, 0x5f, 0x6c, 0xf6, 0x83, 0xd0, 0x2b, 0x70, 0xde, 0x77, 0x28, 0x59, 0xc6, 0x78, 0x61, 0x7a, - 0x9f, 0x16, 0xaf, 0xfa, 0x6c, 0xb8, 0xdb, 0xe0, 0x9b, 0x32, 0xc7, 0xff, 0x6d, 0x6a, 0xc0, 0xde, - 0xf5, 0xb6, 0x49, 0x9e, 0x30, 0x7b, 0xa7, 0x4e, 0x6c, 0xef, 0xcd, 0xa0, 0x3a, 0xe2, 0x56, 0x91, - 0x6f, 0x6a, 0x94, 0x9a, 0x3e, 0x17, 0x52, 0xc9, 0x27, 0xf5, 0x3c, 0xaf, 0xcd, 0xfd, 0x8b, 0x6b, - 0xb6, 0x6d, 0xb1, 0x93, 0x9f, 0x11, 0x9e, 0x9b, 0x93, 0xf0, 0x92, 0x04, 0xa3, 0x15, 0x58, 0x10, - 0xce, 0x1c, 0x22, 0x1a, 0x7e, 0x1b, 0x9d, 0xd6, 0xb3, 0x02, 0x1e, 0x20, 0xea, 0x47, 0x60, 0x52, - 0xd1, 0xec, 0xf7, 0x63, 0x36, 0x1e, 0x73, 0xbb, 0x73, 0x8f, 0xb9, 0xdd, 0xdf, 0x28, 0xb0, 0x58, - 0x09, 0x83, 0x43, 0x59, 0x54, 0xf5, 0x14, 0xdd, 0x86, 0xf9, 0x28, 0x62, 0x04, 0xbd, 0xf5, 0x08, - 0xc9, 0x31, 0x48, 0x44, 0x7a, 0x9c, 0x1c, 0xe9, 0x90, 0xe9, 0x92, 0x38, 0x3f, 0x55, 0xf0, 0xbb, - 0x36, 0x4e, 0x6c, 0xd0, 0x93, 0x2c, 0xb4, 0x36, 0xcc, 0xdc, 0xeb, 0x30, 0xdb, 0xc1, 0xe8, 0x45, - 0x40, 0x26, 0x35, 0x84, 0x85, 0xdc, 0xd6, 0xc3, 0x40, 0x67, 0xbf, 0x75, 0xca, 0x99, 0xf4, 0xee, - 0x6e, 0x89, 0xc3, 0x7d, 0x75, 0xd1, 0xd3, 0x00, 0x07, 0x36, 0xb1, 0xdc, 0x03, 0xa3, 0x8d, 0x89, - 0x6c, 0x5e, 0xe7, 0x7c, 0xc8, 0x6d, 0x4c, 0xd0, 0x79, 0x98, 0x69, 0xda, 0xac, 0x87, 0x5b, 0xe2, - 0xfd, 0xa6, 0x75, 0xb9, 0xd2, 0x9a, 0x70, 0xb6, 0xdc, 0xf5, 0x3c, 0x4c, 0x58, 0x39, 0x36, 0xd0, - 0xa1, 0xe8, 0x26, 0x64, 0x13, 0x63, 0x9f, 0xc0, 0x54, 0x57, 0x8e, 0xf1, 0xff, 0x38, 0xb5, 0x9e, - 0x89, 0x0f, 0x87, 0xa8, 0x76, 0x19, 0x4e, 0x4b, 0xdf, 0x3c, 0x66, 0x70, 0xf5, 0x3e, 0x5c, 0xd8, - 0xc4, 0x2c, 0x51, 0x59, 0xe9, 0xf8, 0x83, 0x2e, 0xa6, 0x6c, 0xa0, 0xdd, 0x52, 0x4f, 0xd4, 0x6e, - 0x69, 0x1e, 0xe4, 0x07, 0x4f, 0xa0, 0x1d, 0x2e, 0x26, 0xda, 0x89, 0x4f, 0x5c, 0x6c, 0xb2, 0xeb, - 0xca, 0xa7, 0xbe, 0x3a, 0x46, 0x49, 0x23, 0x18, 0x46, 0xe3, 0x17, 0xbe, 0xd4, 0xde, 0x80, 0xb3, - 0x47, 0xaa, 0x74, 0x05, 0x32, 0x74, 0xdf, 0x3d, 0x30, 0x6c, 0x62, 0xb6, 0x98, 0xdd, 0xf3, 0x5b, - 0xc0, 0x59, 0x3d, 0xcd, 0x81, 0x35, 0x09, 0xd3, 0x5c, 0x38, 0xf7, 0xbf, 0x95, 0xd6, 0x80, 0xf3, - 0xfd, 0xe5, 0xe4, 0x64, 0xaf, 0xc0, 0x82, 0x0b, 0x03, 0x07, 0x48, 0x9d, 0xa2, 0xd2, 0x57, 0xf9, - 0x8a, 0xa5, 0xaf, 0xf6, 0x6b, 0x25, 0x76, 0x4c, 0x10, 0x11, 0x27, 0xaa, 0x08, 0x6f, 0x23, 0x07, - 0x63, 0xb9, 0x6c, 0x23, 0xfb, 0xe3, 0xf8, 0xd7, 0x20, 0x87, 0x89, 0x95, 0xc0, 0x4c, 0x09, 0xcc, - 0x0c, 0x26, 0x56, 0x84, 0xa7, 0x19, 0x90, 0x1f, 0x94, 0x5a, 0x5a, 0x27, 0x96, 0x0b, 0x94, 0x93, - 0xe6, 0x02, 0xcd, 0x82, 0xa7, 0xe4, 0x3b, 0x8f, 0xca, 0x70, 0x1e, 0x7c, 0x26, 0x7b, 0xc7, 0xdf, - 0x83, 0x4b, 0x47, 0x9f, 0x22, 0x55, 0x79, 0x13, 0x52, 0xa2, 0x27, 0x51, 0xc6, 0xee, 0x49, 0x04, - 0x5d, 0xc2, 0x49, 0xfd, 0x20, 0x39, 0x61, 0x05, 0xbe, 0x1b, 0xf3, 0x9e, 0xe0, 0x00, 0x29, 0xfb, - 0xdb, 0x30, 0xd3, 0x15, 0x10, 0x29, 0xfd, 0xca, 0x08, 0x41, 0xde, 0xe7, 0x20, 0xe9, 0xb4, 0x8f, - 0x52, 0x90, 0x6b, 0xf0, 0xbd, 0xba, 0xe9, 0x99, 0x0e, 0x66, 0xd8, 0xa3, 0xe8, 0xa5, 0x78, 0x8e, - 0x16, 0x6e, 0xe2, 0x3f, 0x02, 0x59, 0x17, 0x84, 0x7b, 0xc2, 0x57, 0x28, 0x4f, 0x85, 0x7e, 0x80, - 0x30, 0xa2, 0x20, 0xd0, 0xb6, 0x1d, 0x9b, 0xc9, 0xf6, 0xe5, 0xac, 0xbf, 0x1b, 0x1b, 0x29, 0x3b, - 0x36, 0xe3, 0xa9, 0x76, 0x60, 0xb6, 0xe6, 0x3b, 0x6c, 0xff, 0xf4, 0xec, 0x6d, 0xb8, 0x44, 0xdb, - 0x26, 0xdd, 0x17, 0x03, 0x25, 0xdf, 0x75, 0x0c, 0xc7, 0xa6, 0x4d, 0xbc, 0x6f, 0xf6, 0x6c, 0xd7, - 0x93, 0xce, 0xbb, 0x14, 0xe0, 0x48, 0x37, 0xbb, 0x13, 0x61, 0xa0, 0x75, 0xb8, 0x38, 0xc0, 0xc1, - 0x72, 0x0f, 0x88, 0xb0, 0x9c, 0x5f, 0x8d, 0x5d, 0xe8, 0x23, 0xaf, 0xc8, 0x6d, 0xf4, 0x2a, 0xe4, - 0xa9, 0xbd, 0x47, 0xb0, 0xe5, 0x67, 0x3c, 0x6a, 0xc4, 0x32, 0xda, 0x8c, 0x20, 0x3d, 0xe7, 0xef, - 0x8b, 0xc4, 0x47, 0xbf, 0x1d, 0x66, 0xb7, 0xeb, 0x70, 0xce, 0xb1, 0x29, 0x8d, 0x08, 0x1d, 0xf3, - 0x43, 0xdb, 0xe9, 0x3a, 0xa2, 0xf4, 0x48, 0xe9, 0x67, 0xfc, 0x4d, 0x9f, 0xea, 0x8e, 0xbf, 0x85, - 0x6e, 0xc3, 0x19, 0xc7, 0x26, 0x31, 0x3b, 0x8a, 0x6b, 0x13, 0x25, 0xc8, 0xb0, 0x02, 0x69, 0xd1, - 0xb1, 0x49, 0x3c, 0x00, 0x3d, 0xc4, 0xe8, 0x39, 0x88, 0xee, 0xca, 0xb0, 0x70, 0xdb, 0x3c, 0x94, - 0xc5, 0x49, 0x36, 0x04, 0x57, 0x38, 0x54, 0xfb, 0x95, 0x02, 0xd9, 0x4d, 0x4c, 0x30, 0xb5, 0x69, - 0xd9, 0x25, 0x8c, 0x57, 0xaf, 0xdb, 0x90, 0x16, 0x67, 0x1b, 0x1d, 0xee, 0x17, 0x63, 0x04, 0xc1, - 0x3e, 0x67, 0xd2, 0xe7, 0x69, 0x08, 0xa0, 0xe8, 0x16, 0x40, 0xa8, 0x5b, 0x50, 0x98, 0x8c, 0xd5, - 0xa5, 0xc7, 0xc8, 0xb5, 0x2f, 0x15, 0xb8, 0x50, 0xed, 0x61, 0xc2, 0xb6, 0x5d, 0xa7, 0x49, 0x99, - 0x4b, 0x22, 0x17, 0xe3, 0xaa, 0xe3, 0x1e, 0x7f, 0x44, 0x2d, 0x9c, 0xac, 0x51, 0xb2, 0x01, 0x58, - 0x96, 0x28, 0xcf, 0x42, 0xb6, 0xe5, 0x47, 0x87, 0x00, 0xcf, 0x77, 0xda, 0x8c, 0x84, 0x4a, 0xb4, - 0xfe, 0xa7, 0x9c, 0x3a, 0x59, 0x98, 0x8e, 0xfd, 0x26, 0x30, 0x2d, 0x07, 0x0b, 0xf2, 0x37, 0x81, - 0x67, 0xfa, 0x66, 0xa6, 0xbe, 0x6b, 0xc5, 0xa7, 0xa2, 0xda, 0xa7, 0x0a, 0x5c, 0x14, 0xfa, 0x26, - 0x47, 0x5f, 0x7e, 0x15, 0xf9, 0x84, 0xcd, 0x80, 0xb5, 0x5f, 0x28, 0x70, 0x39, 0x29, 0xec, 0x4e, - 0xa4, 0xca, 0x64, 0x45, 0xee, 0x1f, 0x37, 0xab, 0x63, 0x8e, 0x9b, 0xb5, 0xdf, 0x29, 0x50, 0x48, - 0xca, 0x1a, 0x9f, 0xb2, 0x4e, 0x56, 0xd8, 0x81, 0xd1, 0xb6, 0x3a, 0x81, 0xd1, 0xf6, 0xcf, 0x15, - 0x38, 0x23, 0x14, 0x08, 0x52, 0xd3, 0x64, 0x65, 0x4e, 0x8c, 0xee, 0xd4, 0xaf, 0x30, 0xba, 0x7b, - 0x08, 0xcb, 0x49, 0x3b, 0x47, 0xf3, 0xbb, 0x7b, 0x9d, 0xb6, 0x6b, 0x5a, 0x13, 0x9c, 0xe2, 0x69, - 0xcd, 0xfe, 0xd7, 0x72, 0x27, 0x0a, 0xb8, 0x13, 0xb2, 0x8c, 0xf6, 0x43, 0x05, 0x32, 0xe2, 0x90, - 0x70, 0x26, 0x38, 0x21, 0x93, 0xbf, 0x02, 0x33, 0x63, 0x4c, 0xae, 0x24, 0xae, 0xf6, 0x23, 0x05, - 0x72, 0x42, 0x9c, 0xd8, 0x3c, 0xee, 0xff, 0x2a, 0xd0, 0xe7, 0x0a, 0x3c, 0x25, 0x04, 0x6a, 0x24, - 0xb3, 0xeb, 0x46, 0xa7, 0xd3, 0xb6, 0xb1, 0x35, 0x29, 0xe1, 0x86, 0x4e, 0x4d, 0x6f, 0xc2, 0x3c, - 0xc1, 0x07, 0xc6, 0x89, 0xc7, 0x45, 0x40, 0xf0, 0x81, 0xfc, 0xbe, 0xfe, 0xa7, 0x19, 0x48, 0xbf, - 0xdb, 0xc5, 0xde, 0x61, 0x03, 0x7b, 0x3d, 0xbb, 0x85, 0xd1, 0xc7, 0x0a, 0x2c, 0xf4, 0x37, 0x72, - 0x68, 0x84, 0x5f, 0xb0, 0x8f, 0x69, 0x2f, 0x97, 0xd6, 0x4f, 0x42, 0x2a, 0x0b, 0xc2, 0x8f, 0x06, - 0x7e, 0x0d, 0xf8, 0xe6, 0xb8, 0x3d, 0x98, 0x94, 0xe2, 0xd5, 0xb1, 0xe9, 0x7c, 0x11, 0x5e, 0x56, - 0xd0, 0x0f, 0x94, 0xc1, 0x9f, 0x28, 0x5f, 0x1b, 0xbf, 0x7d, 0x92, 0x82, 0xbc, 0x7e, 0x02, 0x4a, - 0x69, 0x0d, 0x7e, 0x33, 0xfd, 0x2d, 0x0c, 0x1a, 0x87, 0x5f, 0xb2, 0x59, 0x1b, 0xe5, 0x66, 0x8e, - 0xed, 0x98, 0x7e, 0xac, 0x84, 0x53, 0x8d, 0x44, 0x1f, 0x82, 0xbe, 0x35, 0x9c, 0xe9, 0x63, 0xba, - 0xa4, 0xa5, 0x37, 0x4f, 0x4a, 0x2e, 0xe5, 0x4a, 0x5c, 0x96, 0x1c, 0xf2, 0x8c, 0x73, 0x59, 0x89, - 0x96, 0x67, 0xac, 0xcb, 0x4a, 0xf6, 0x32, 0xa5, 0xcf, 0xd5, 0x3f, 0x3c, 0x5a, 0x56, 0x3e, 0x7b, - 0xb4, 0xac, 0xfc, 0xfd, 0xd1, 0xb2, 0xf2, 0xc9, 0x17, 0xcb, 0xa7, 0x3e, 0xfb, 0x62, 0xf9, 0xd4, - 0x5f, 0xbe, 0x58, 0x3e, 0x05, 0x57, 0x5b, 0xae, 0x33, 0x94, 0x71, 0x09, 0xfc, 0xd2, 0xd3, 0x73, - 0x99, 0x5b, 0x57, 0xee, 0xbf, 0xbf, 0x67, 0xb3, 0xfd, 0x6e, 0x93, 0x23, 0xae, 0x52, 0xe6, 0xf1, - 0x7c, 0xd8, 0x76, 0x7b, 0xf8, 0x25, 0x1e, 0x8d, 0xba, 0x1e, 0xa6, 0xab, 0x36, 0x61, 0xd8, 0x6b, - 0xed, 0x9b, 0xfc, 0x7f, 0xca, 0x56, 0x7b, 0xaf, 0xad, 0x8a, 0xc5, 0xea, 0xb0, 0x3f, 0xe0, 0x7a, - 0x43, 0x7c, 0xf4, 0xd6, 0x7e, 0xa6, 0xa6, 0xea, 0xe5, 0x72, 0xe3, 0x53, 0xb5, 0x50, 0x0f, 0x24, - 0x2b, 0x73, 0xc9, 0xca, 0xa1, 0x64, 0x42, 0x9e, 0xe2, 0xce, 0xda, 0x1f, 0x23, 0x94, 0x07, 0x1c, - 0xe5, 0x41, 0x88, 0xf2, 0x40, 0xa0, 0x3c, 0xd8, 0x59, 0x7b, 0xa4, 0x5e, 0x1b, 0x86, 0xf2, 0x60, - 0xb3, 0x5e, 0xba, 0x83, 0x99, 0xc9, 0xb3, 0xf0, 0x3f, 0xd5, 0xab, 0x01, 0xfa, 0xfa, 0x3a, 0xc7, - 0xe7, 0xff, 0x4a, 0x82, 0xf5, 0x75, 0x41, 0xb1, 0xbe, 0xbe, 0xb3, 0xd6, 0x9c, 0x11, 0x7f, 0xb4, - 0xf5, 0xf5, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x31, 0x0c, 0x48, 0x70, 0x96, 0x26, 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 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - // Queries for information about a specific validator. - GetValidatorInfo(ctx context.Context, in *GetValidatorInfoRequest, opts ...grpc.CallOption) (*GetValidatorInfoResponse, error) - // Queries the current validator set, with filtering. - ValidatorInfo(ctx context.Context, in *ValidatorInfoRequest, opts ...grpc.CallOption) (QueryService_ValidatorInfoClient, error) - ValidatorStatus(ctx context.Context, in *ValidatorStatusRequest, opts ...grpc.CallOption) (*ValidatorStatusResponse, error) - ValidatorPenalty(ctx context.Context, in *ValidatorPenaltyRequest, opts ...grpc.CallOption) (*ValidatorPenaltyResponse, error) - CurrentValidatorRate(ctx context.Context, in *CurrentValidatorRateRequest, opts ...grpc.CallOption) (*CurrentValidatorRateResponse, error) - ValidatorUptime(ctx context.Context, in *ValidatorUptimeRequest, opts ...grpc.CallOption) (*ValidatorUptimeResponse, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) GetValidatorInfo(ctx context.Context, in *GetValidatorInfoRequest, opts ...grpc.CallOption) (*GetValidatorInfoResponse, error) { - out := new(GetValidatorInfoResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.stake.v1.QueryService/GetValidatorInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) ValidatorInfo(ctx context.Context, in *ValidatorInfoRequest, opts ...grpc.CallOption) (QueryService_ValidatorInfoClient, error) { - stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/penumbra.core.component.stake.v1.QueryService/ValidatorInfo", opts...) - if err != nil { - return nil, err - } - x := &queryServiceValidatorInfoClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type QueryService_ValidatorInfoClient interface { - Recv() (*ValidatorInfoResponse, error) - grpc.ClientStream -} - -type queryServiceValidatorInfoClient struct { - grpc.ClientStream -} - -func (x *queryServiceValidatorInfoClient) Recv() (*ValidatorInfoResponse, error) { - m := new(ValidatorInfoResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *queryServiceClient) ValidatorStatus(ctx context.Context, in *ValidatorStatusRequest, opts ...grpc.CallOption) (*ValidatorStatusResponse, error) { - out := new(ValidatorStatusResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.stake.v1.QueryService/ValidatorStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) ValidatorPenalty(ctx context.Context, in *ValidatorPenaltyRequest, opts ...grpc.CallOption) (*ValidatorPenaltyResponse, error) { - out := new(ValidatorPenaltyResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.stake.v1.QueryService/ValidatorPenalty", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) CurrentValidatorRate(ctx context.Context, in *CurrentValidatorRateRequest, opts ...grpc.CallOption) (*CurrentValidatorRateResponse, error) { - out := new(CurrentValidatorRateResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.stake.v1.QueryService/CurrentValidatorRate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryServiceClient) ValidatorUptime(ctx context.Context, in *ValidatorUptimeRequest, opts ...grpc.CallOption) (*ValidatorUptimeResponse, error) { - out := new(ValidatorUptimeResponse) - err := c.cc.Invoke(ctx, "/penumbra.core.component.stake.v1.QueryService/ValidatorUptime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - // Queries for information about a specific validator. - GetValidatorInfo(context.Context, *GetValidatorInfoRequest) (*GetValidatorInfoResponse, error) - // Queries the current validator set, with filtering. - ValidatorInfo(*ValidatorInfoRequest, QueryService_ValidatorInfoServer) error - ValidatorStatus(context.Context, *ValidatorStatusRequest) (*ValidatorStatusResponse, error) - ValidatorPenalty(context.Context, *ValidatorPenaltyRequest) (*ValidatorPenaltyResponse, error) - CurrentValidatorRate(context.Context, *CurrentValidatorRateRequest) (*CurrentValidatorRateResponse, error) - ValidatorUptime(context.Context, *ValidatorUptimeRequest) (*ValidatorUptimeResponse, error) -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) GetValidatorInfo(ctx context.Context, req *GetValidatorInfoRequest) (*GetValidatorInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorInfo not implemented") -} -func (*UnimplementedQueryServiceServer) ValidatorInfo(req *ValidatorInfoRequest, srv QueryService_ValidatorInfoServer) error { - return status.Errorf(codes.Unimplemented, "method ValidatorInfo not implemented") -} -func (*UnimplementedQueryServiceServer) ValidatorStatus(ctx context.Context, req *ValidatorStatusRequest) (*ValidatorStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorStatus not implemented") -} -func (*UnimplementedQueryServiceServer) ValidatorPenalty(ctx context.Context, req *ValidatorPenaltyRequest) (*ValidatorPenaltyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorPenalty not implemented") -} -func (*UnimplementedQueryServiceServer) CurrentValidatorRate(ctx context.Context, req *CurrentValidatorRateRequest) (*CurrentValidatorRateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrentValidatorRate not implemented") -} -func (*UnimplementedQueryServiceServer) ValidatorUptime(ctx context.Context, req *ValidatorUptimeRequest) (*ValidatorUptimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatorUptime not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_GetValidatorInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).GetValidatorInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.stake.v1.QueryService/GetValidatorInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).GetValidatorInfo(ctx, req.(*GetValidatorInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_ValidatorInfo_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ValidatorInfoRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(QueryServiceServer).ValidatorInfo(m, &queryServiceValidatorInfoServer{stream}) -} - -type QueryService_ValidatorInfoServer interface { - Send(*ValidatorInfoResponse) error - grpc.ServerStream -} - -type queryServiceValidatorInfoServer struct { - grpc.ServerStream -} - -func (x *queryServiceValidatorInfoServer) Send(m *ValidatorInfoResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _QueryService_ValidatorStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidatorStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).ValidatorStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.stake.v1.QueryService/ValidatorStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).ValidatorStatus(ctx, req.(*ValidatorStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_ValidatorPenalty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidatorPenaltyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).ValidatorPenalty(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.stake.v1.QueryService/ValidatorPenalty", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).ValidatorPenalty(ctx, req.(*ValidatorPenaltyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_CurrentValidatorRate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CurrentValidatorRateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).CurrentValidatorRate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.stake.v1.QueryService/CurrentValidatorRate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).CurrentValidatorRate(ctx, req.(*CurrentValidatorRateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _QueryService_ValidatorUptime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidatorUptimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).ValidatorUptime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.core.component.stake.v1.QueryService/ValidatorUptime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).ValidatorUptime(ctx, req.(*ValidatorUptimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.core.component.stake.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetValidatorInfo", - Handler: _QueryService_GetValidatorInfo_Handler, - }, - { - MethodName: "ValidatorStatus", - Handler: _QueryService_ValidatorStatus_Handler, - }, - { - MethodName: "ValidatorPenalty", - Handler: _QueryService_ValidatorPenalty_Handler, - }, - { - MethodName: "CurrentValidatorRate", - Handler: _QueryService_CurrentValidatorRate_Handler, - }, - { - MethodName: "ValidatorUptime", - Handler: _QueryService_ValidatorUptime_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "ValidatorInfo", - Handler: _QueryService_ValidatorInfo_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/core/component/stake/v1/stake.proto", -} - -func (m *ZKUndelegateClaimProof) Marshal() (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 *ZKUndelegateClaimProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ZKUndelegateClaimProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintStake(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Validator) Marshal() (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 *Validator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.GovernanceKey != nil { - { - size, err := m.GovernanceKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.Enabled { - i-- - if m.Enabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.SequenceNumber != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.SequenceNumber)) - i-- - dAtA[i] = 0x38 - } - if len(m.FundingStreams) > 0 { - for iNdEx := len(m.FundingStreams) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FundingStreams[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintStake(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x2a - } - if len(m.Website) > 0 { - i -= len(m.Website) - copy(dAtA[i:], m.Website) - i = encodeVarintStake(dAtA, i, uint64(len(m.Website))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintStake(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.ConsensusKey) > 0 { - i -= len(m.ConsensusKey) - copy(dAtA[i:], m.ConsensusKey) - i = encodeVarintStake(dAtA, i, uint64(len(m.ConsensusKey))) - i-- - dAtA[i] = 0x12 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorList) Marshal() (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 *ValidatorList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorKeys) > 0 { - for iNdEx := len(m.ValidatorKeys) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ValidatorKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *FundingStream) Marshal() (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 *FundingStream) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingStream) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Recipient != nil { - { - size := m.Recipient.Size() - i -= size - if _, err := m.Recipient.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *FundingStream_ToAddress_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingStream_ToAddress_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ToAddress != nil { - { - size, err := m.ToAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *FundingStream_ToCommunityPool_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingStream_ToCommunityPool_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ToCommunityPool != nil { - { - size, err := m.ToCommunityPool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *FundingStream_ToAddress) Marshal() (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 *FundingStream_ToAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingStream_ToAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RateBps != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.RateBps)) - i-- - dAtA[i] = 0x10 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintStake(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FundingStream_ToCommunityPool) Marshal() (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 *FundingStream_ToCommunityPool) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FundingStream_ToCommunityPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RateBps != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.RateBps)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *RateData) Marshal() (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 *RateData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RateData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorExchangeRate != nil { - { - size, err := m.ValidatorExchangeRate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.ValidatorRewardRate != nil { - { - size, err := m.ValidatorRewardRate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.EpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0x10 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BaseRateData) Marshal() (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 *BaseRateData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BaseRateData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BaseExchangeRate != nil { - { - size, err := m.BaseExchangeRate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.BaseRewardRate != nil { - { - size, err := m.BaseRewardRate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.EpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorStatus) Marshal() (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 *ValidatorStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BondingState != nil { - { - size, err := m.BondingState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.VotingPower != nil { - { - size, err := m.VotingPower.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BondingState) Marshal() (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 *BondingState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BondingState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnbondsAtHeight != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.UnbondsAtHeight)) - i-- - dAtA[i] = 0x18 - } - if m.UnbondsAtEpoch != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.UnbondsAtEpoch)) - i-- - dAtA[i] = 0x10 - } - if m.State != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorState) Marshal() (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 *ValidatorState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorInfo) Marshal() (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 *ValidatorInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RateData != nil { - { - size, err := m.RateData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorDefinition) Marshal() (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 *ValidatorDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AuthSig) > 0 { - i -= len(m.AuthSig) - copy(dAtA[i:], m.AuthSig) - i = encodeVarintStake(dAtA, i, uint64(len(m.AuthSig))) - i-- - dAtA[i] = 0x12 - } - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Delegate) Marshal() (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 *Delegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Delegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DelegationAmount != nil { - { - size, err := m.DelegationAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.UnbondedAmount != nil { - { - size, err := m.UnbondedAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.EpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0x10 - } - if m.ValidatorIdentity != nil { - { - size, err := m.ValidatorIdentity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Undelegate) Marshal() (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 *Undelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Undelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FromEpoch != nil { - { - size, err := m.FromEpoch.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.DelegationAmount != nil { - { - size, err := m.DelegationAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.UnbondedAmount != nil { - { - size, err := m.UnbondedAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.StartEpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.StartEpochIndex)) - i-- - dAtA[i] = 0x10 - } - if m.ValidatorIdentity != nil { - { - size, err := m.ValidatorIdentity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UndelegateClaim) Marshal() (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 *UndelegateClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UndelegateClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Proof) > 0 { - i -= len(m.Proof) - copy(dAtA[i:], m.Proof) - i = encodeVarintStake(dAtA, i, uint64(len(m.Proof))) - i-- - dAtA[i] = 0x12 - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UndelegateClaimBody) Marshal() (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 *UndelegateClaimBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UndelegateClaimBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnbondingStartHeight != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.UnbondingStartHeight)) - i-- - dAtA[i] = 0x28 - } - if m.BalanceCommitment != nil { - { - size, err := m.BalanceCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Penalty != nil { - { - size, err := m.Penalty.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.StartEpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.StartEpochIndex)) - i-- - dAtA[i] = 0x10 - } - if m.ValidatorIdentity != nil { - { - size, err := m.ValidatorIdentity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UndelegateClaimPlan) Marshal() (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 *UndelegateClaimPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UndelegateClaimPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnbondingStartHeight != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.UnbondingStartHeight)) - i-- - dAtA[i] = 0x48 - } - if len(m.ProofBlindingS) > 0 { - i -= len(m.ProofBlindingS) - copy(dAtA[i:], m.ProofBlindingS) - i = encodeVarintStake(dAtA, i, uint64(len(m.ProofBlindingS))) - i-- - dAtA[i] = 0x42 - } - if len(m.ProofBlindingR) > 0 { - i -= len(m.ProofBlindingR) - copy(dAtA[i:], m.ProofBlindingR) - i = encodeVarintStake(dAtA, i, uint64(len(m.ProofBlindingR))) - i-- - dAtA[i] = 0x3a - } - if len(m.BalanceBlinding) > 0 { - i -= len(m.BalanceBlinding) - copy(dAtA[i:], m.BalanceBlinding) - i = encodeVarintStake(dAtA, i, uint64(len(m.BalanceBlinding))) - i-- - dAtA[i] = 0x32 - } - if m.UnbondingAmount != nil { - { - size, err := m.UnbondingAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Penalty != nil { - { - size, err := m.Penalty.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.StartEpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.StartEpochIndex)) - i-- - dAtA[i] = 0x10 - } - if m.ValidatorIdentity != nil { - { - size, err := m.ValidatorIdentity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegationChanges) Marshal() (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 *DelegationChanges) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegationChanges) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Undelegations) > 0 { - for iNdEx := len(m.Undelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Undelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Delegations) > 0 { - for iNdEx := len(m.Delegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Delegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Uptime) Marshal() (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 *Uptime) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Uptime) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Bitvec) > 0 { - i -= len(m.Bitvec) - copy(dAtA[i:], m.Bitvec) - i = encodeVarintStake(dAtA, i, uint64(len(m.Bitvec))) - i-- - dAtA[i] = 0x1a - } - if m.WindowLen != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.WindowLen)) - i-- - dAtA[i] = 0x10 - } - if m.AsOfBlockHeight != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.AsOfBlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *CurrentConsensusKeys) Marshal() (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 *CurrentConsensusKeys) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CurrentConsensusKeys) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ConsensusKeys) > 0 { - for iNdEx := len(m.ConsensusKeys) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConsensusKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Penalty) Marshal() (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 *Penalty) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Penalty) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintStake(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetValidatorInfoRequest) Marshal() (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 *GetValidatorInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetValidatorInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *GetValidatorInfoResponse) Marshal() (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 *GetValidatorInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetValidatorInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorInfo != nil { - { - size, err := m.ValidatorInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorInfoRequest) Marshal() (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 *ValidatorInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ShowInactive { - i-- - if m.ShowInactive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorInfoResponse) Marshal() (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 *ValidatorInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorInfo != nil { - { - size, err := m.ValidatorInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorStatusRequest) Marshal() (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 *ValidatorStatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorStatusResponse) Marshal() (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 *ValidatorStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorPenaltyRequest) Marshal() (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 *ValidatorPenaltyRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorPenaltyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EndEpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.EndEpochIndex)) - i-- - dAtA[i] = 0x20 - } - if m.StartEpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.StartEpochIndex)) - i-- - dAtA[i] = 0x18 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorPenaltyResponse) Marshal() (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 *ValidatorPenaltyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorPenaltyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Penalty != nil { - { - size, err := m.Penalty.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CurrentValidatorRateRequest) Marshal() (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 *CurrentValidatorRateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CurrentValidatorRateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *CurrentValidatorRateResponse) Marshal() (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 *CurrentValidatorRateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CurrentValidatorRateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorUptimeRequest) Marshal() (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 *ValidatorUptimeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorUptimeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *ValidatorUptimeResponse) Marshal() (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 *ValidatorUptimeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorUptimeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Uptime != nil { - { - size, err := m.Uptime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StakeParameters) Marshal() (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 *StakeParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakeParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnbondingDelay != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.UnbondingDelay)) - i-- - dAtA[i] = 0x48 - } - if m.MinValidatorStake != nil { - { - size, err := m.MinValidatorStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.MissedBlocksMaximum != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.MissedBlocksMaximum)) - i-- - dAtA[i] = 0x38 - } - if m.SignedBlocksWindowLen != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.SignedBlocksWindowLen)) - i-- - dAtA[i] = 0x30 - } - if m.SlashingPenaltyDowntime != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.SlashingPenaltyDowntime)) - i-- - dAtA[i] = 0x28 - } - if m.SlashingPenaltyMisbehavior != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.SlashingPenaltyMisbehavior)) - i-- - dAtA[i] = 0x20 - } - if m.BaseRewardRate != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.BaseRewardRate)) - i-- - dAtA[i] = 0x18 - } - if m.ActiveValidatorLimit != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.ActiveValidatorLimit)) - i-- - dAtA[i] = 0x10 - } - if m.UnbondingEpochs != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.UnbondingEpochs)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisContent) Marshal() (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 *GenesisContent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.StakeParams != nil { - { - size, err := m.StakeParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventTombstoneValidator) Marshal() (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 *EventTombstoneValidator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventTombstoneValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.VotingPower != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.VotingPower)) - i-- - dAtA[i] = 0x30 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintStake(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x2a - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.CurrentHeight != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.CurrentHeight)) - i-- - dAtA[i] = 0x10 - } - if m.EvidenceHeight != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.EvidenceHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EventValidatorStateChange) Marshal() (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 *EventValidatorStateChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValidatorStateChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != nil { - { - size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValidatorVotingPowerChange) Marshal() (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 *EventValidatorVotingPowerChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValidatorVotingPowerChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.VotingPower != nil { - { - size, err := m.VotingPower.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValidatorBondingStateChange) Marshal() (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 *EventValidatorBondingStateChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValidatorBondingStateChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BondingState != nil { - { - size, err := m.BondingState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventRateDataChange) Marshal() (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 *EventRateDataChange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventRateDataChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RateData != nil { - { - size, err := m.RateData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValidatorDefinitionUpload) Marshal() (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 *EventValidatorDefinitionUpload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValidatorDefinitionUpload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventValidatorMissedBlock) Marshal() (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 *EventValidatorMissedBlock) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventValidatorMissedBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventDelegate) Marshal() (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 *EventDelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventDelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventUndelegate) Marshal() (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 *EventUndelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventUndelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventSlashingPenaltyApplied) Marshal() (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 *EventSlashingPenaltyApplied) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventSlashingPenaltyApplied) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NewPenalty != nil { - { - size, err := m.NewPenalty.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.EpochIndex != 0 { - i = encodeVarintStake(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0x10 - } - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStake(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintStake(dAtA []byte, offset int, v uint64) int { - offset -= sovStake(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ZKUndelegateClaimProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.ConsensusKey) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.Website) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - if len(m.FundingStreams) > 0 { - for _, e := range m.FundingStreams { - l = e.Size() - n += 1 + l + sovStake(uint64(l)) - } - } - if m.SequenceNumber != 0 { - n += 1 + sovStake(uint64(m.SequenceNumber)) - } - if m.Enabled { - n += 2 - } - if m.GovernanceKey != nil { - l = m.GovernanceKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ValidatorKeys) > 0 { - for _, e := range m.ValidatorKeys { - l = e.Size() - n += 1 + l + sovStake(uint64(l)) - } - } - return n -} - -func (m *FundingStream) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Recipient != nil { - n += m.Recipient.Size() - } - return n -} - -func (m *FundingStream_ToAddress_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ToAddress != nil { - l = m.ToAddress.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} -func (m *FundingStream_ToCommunityPool_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ToCommunityPool != nil { - l = m.ToCommunityPool.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} -func (m *FundingStream_ToAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - if m.RateBps != 0 { - n += 1 + sovStake(uint64(m.RateBps)) - } - return n -} - -func (m *FundingStream_ToCommunityPool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RateBps != 0 { - n += 1 + sovStake(uint64(m.RateBps)) - } - return n -} - -func (m *RateData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.EpochIndex != 0 { - n += 1 + sovStake(uint64(m.EpochIndex)) - } - if m.ValidatorRewardRate != nil { - l = m.ValidatorRewardRate.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.ValidatorExchangeRate != nil { - l = m.ValidatorExchangeRate.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *BaseRateData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EpochIndex != 0 { - n += 1 + sovStake(uint64(m.EpochIndex)) - } - if m.BaseRewardRate != nil { - l = m.BaseRewardRate.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.BaseExchangeRate != nil { - l = m.BaseExchangeRate.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.VotingPower != nil { - l = m.VotingPower.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.BondingState != nil { - l = m.BondingState.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *BondingState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != 0 { - n += 1 + sovStake(uint64(m.State)) - } - if m.UnbondsAtEpoch != 0 { - n += 1 + sovStake(uint64(m.UnbondsAtEpoch)) - } - if m.UnbondsAtHeight != 0 { - n += 1 + sovStake(uint64(m.UnbondsAtHeight)) - } - return n -} - -func (m *ValidatorState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != 0 { - n += 1 + sovStake(uint64(m.State)) - } - return n -} - -func (m *ValidatorInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.RateData != nil { - l = m.RateData.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.AuthSig) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *Delegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorIdentity != nil { - l = m.ValidatorIdentity.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.EpochIndex != 0 { - n += 1 + sovStake(uint64(m.EpochIndex)) - } - if m.UnbondedAmount != nil { - l = m.UnbondedAmount.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.DelegationAmount != nil { - l = m.DelegationAmount.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *Undelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorIdentity != nil { - l = m.ValidatorIdentity.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.StartEpochIndex != 0 { - n += 1 + sovStake(uint64(m.StartEpochIndex)) - } - if m.UnbondedAmount != nil { - l = m.UnbondedAmount.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.DelegationAmount != nil { - l = m.DelegationAmount.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.FromEpoch != nil { - l = m.FromEpoch.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *UndelegateClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.Proof) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *UndelegateClaimBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorIdentity != nil { - l = m.ValidatorIdentity.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.StartEpochIndex != 0 { - n += 1 + sovStake(uint64(m.StartEpochIndex)) - } - if m.Penalty != nil { - l = m.Penalty.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.BalanceCommitment != nil { - l = m.BalanceCommitment.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.UnbondingStartHeight != 0 { - n += 1 + sovStake(uint64(m.UnbondingStartHeight)) - } - return n -} - -func (m *UndelegateClaimPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorIdentity != nil { - l = m.ValidatorIdentity.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.StartEpochIndex != 0 { - n += 1 + sovStake(uint64(m.StartEpochIndex)) - } - if m.Penalty != nil { - l = m.Penalty.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.UnbondingAmount != nil { - l = m.UnbondingAmount.Size() - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.BalanceBlinding) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.ProofBlindingR) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.ProofBlindingS) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - if m.UnbondingStartHeight != 0 { - n += 1 + sovStake(uint64(m.UnbondingStartHeight)) - } - return n -} - -func (m *DelegationChanges) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Delegations) > 0 { - for _, e := range m.Delegations { - l = e.Size() - n += 1 + l + sovStake(uint64(l)) - } - } - if len(m.Undelegations) > 0 { - for _, e := range m.Undelegations { - l = e.Size() - n += 1 + l + sovStake(uint64(l)) - } - } - return n -} - -func (m *Uptime) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AsOfBlockHeight != 0 { - n += 1 + sovStake(uint64(m.AsOfBlockHeight)) - } - if m.WindowLen != 0 { - n += 1 + sovStake(uint64(m.WindowLen)) - } - l = len(m.Bitvec) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *CurrentConsensusKeys) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ConsensusKeys) > 0 { - for _, e := range m.ConsensusKeys { - l = e.Size() - n += 1 + l + sovStake(uint64(l)) - } - } - return n -} - -func (m *Penalty) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *GetValidatorInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *GetValidatorInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorInfo != nil { - l = m.ValidatorInfo.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ShowInactive { - n += 2 - } - return n -} - -func (m *ValidatorInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorInfo != nil { - l = m.ValidatorInfo.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorStatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorStatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorPenaltyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.StartEpochIndex != 0 { - n += 1 + sovStake(uint64(m.StartEpochIndex)) - } - if m.EndEpochIndex != 0 { - n += 1 + sovStake(uint64(m.EndEpochIndex)) - } - return n -} - -func (m *ValidatorPenaltyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Penalty != nil { - l = m.Penalty.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *CurrentValidatorRateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *CurrentValidatorRateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorUptimeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *ValidatorUptimeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Uptime != nil { - l = m.Uptime.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *StakeParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UnbondingEpochs != 0 { - n += 1 + sovStake(uint64(m.UnbondingEpochs)) - } - if m.ActiveValidatorLimit != 0 { - n += 1 + sovStake(uint64(m.ActiveValidatorLimit)) - } - if m.BaseRewardRate != 0 { - n += 1 + sovStake(uint64(m.BaseRewardRate)) - } - if m.SlashingPenaltyMisbehavior != 0 { - n += 1 + sovStake(uint64(m.SlashingPenaltyMisbehavior)) - } - if m.SlashingPenaltyDowntime != 0 { - n += 1 + sovStake(uint64(m.SlashingPenaltyDowntime)) - } - if m.SignedBlocksWindowLen != 0 { - n += 1 + sovStake(uint64(m.SignedBlocksWindowLen)) - } - if m.MissedBlocksMaximum != 0 { - n += 1 + sovStake(uint64(m.MissedBlocksMaximum)) - } - if m.MinValidatorStake != nil { - l = m.MinValidatorStake.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.UnbondingDelay != 0 { - n += 1 + sovStake(uint64(m.UnbondingDelay)) - } - return n -} - -func (m *GenesisContent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StakeParams != nil { - l = m.StakeParams.Size() - n += 1 + l + sovStake(uint64(l)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovStake(uint64(l)) - } - } - return n -} - -func (m *EventTombstoneValidator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EvidenceHeight != 0 { - n += 1 + sovStake(uint64(m.EvidenceHeight)) - } - if m.CurrentHeight != 0 { - n += 1 + sovStake(uint64(m.CurrentHeight)) - } - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovStake(uint64(l)) - } - if m.VotingPower != 0 { - n += 1 + sovStake(uint64(m.VotingPower)) - } - return n -} - -func (m *EventValidatorStateChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.State != nil { - l = m.State.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventValidatorVotingPowerChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.VotingPower != nil { - l = m.VotingPower.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventValidatorBondingStateChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.BondingState != nil { - l = m.BondingState.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventRateDataChange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.RateData != nil { - l = m.RateData.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventValidatorDefinitionUpload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventValidatorMissedBlock) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventDelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventUndelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func (m *EventSlashingPenaltyApplied) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovStake(uint64(l)) - } - if m.EpochIndex != 0 { - n += 1 + sovStake(uint64(m.EpochIndex)) - } - if m.NewPenalty != nil { - l = m.NewPenalty.Size() - n += 1 + l + sovStake(uint64(l)) - } - return n -} - -func sovStake(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStake(x uint64) (n int) { - return sovStake(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ZKUndelegateClaimProof) 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 ErrIntOverflowStake - } - 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: ZKUndelegateClaimProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ZKUndelegateClaimProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Validator) 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 ErrIntOverflowStake - } - 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: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusKey", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsensusKey = append(m.ConsensusKey[:0], dAtA[iNdEx:postIndex]...) - if m.ConsensusKey == nil { - m.ConsensusKey = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Website = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FundingStreams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FundingStreams = append(m.FundingStreams, &FundingStream{}) - if err := m.FundingStreams[len(m.FundingStreams)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SequenceNumber", wireType) - } - m.SequenceNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SequenceNumber |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enabled = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GovernanceKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GovernanceKey == nil { - m.GovernanceKey = &v1.GovernanceKey{} - } - if err := m.GovernanceKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorList) 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 ErrIntOverflowStake - } - 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: ValidatorList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorKeys = append(m.ValidatorKeys, &v1.IdentityKey{}) - if err := m.ValidatorKeys[len(m.ValidatorKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FundingStream) 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 ErrIntOverflowStake - } - 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: FundingStream: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FundingStream: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &FundingStream_ToAddress{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Recipient = &FundingStream_ToAddress_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ToCommunityPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &FundingStream_ToCommunityPool{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Recipient = &FundingStream_ToCommunityPool_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FundingStream_ToAddress) 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 ErrIntOverflowStake - } - 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: ToAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ToAddress: 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 ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RateBps", wireType) - } - m.RateBps = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RateBps |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FundingStream_ToCommunityPool) 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 ErrIntOverflowStake - } - 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: ToCommunityPool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ToCommunityPool: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RateBps", wireType) - } - m.RateBps = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RateBps |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RateData) 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 ErrIntOverflowStake - } - 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: RateData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RateData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorRewardRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorRewardRate == nil { - m.ValidatorRewardRate = &v11.Amount{} - } - if err := m.ValidatorRewardRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorExchangeRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorExchangeRate == nil { - m.ValidatorExchangeRate = &v11.Amount{} - } - if err := m.ValidatorExchangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BaseRateData) 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 ErrIntOverflowStake - } - 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: BaseRateData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BaseRateData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseRewardRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseRewardRate == nil { - m.BaseRewardRate = &v11.Amount{} - } - if err := m.BaseRewardRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseExchangeRate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseExchangeRate == nil { - m.BaseExchangeRate = &v11.Amount{} - } - if err := m.BaseExchangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorStatus) 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 ErrIntOverflowStake - } - 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: ValidatorStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &ValidatorState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VotingPower == nil { - m.VotingPower = &v11.Amount{} - } - if err := m.VotingPower.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondingState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BondingState == nil { - m.BondingState = &BondingState{} - } - if err := m.BondingState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BondingState) 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 ErrIntOverflowStake - } - 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: BondingState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BondingState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= BondingState_BondingStateEnum(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondsAtEpoch", wireType) - } - m.UnbondsAtEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondsAtEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondsAtHeight", wireType) - } - m.UnbondsAtHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondsAtHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorState) 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 ErrIntOverflowStake - } - 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: ValidatorState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= ValidatorState_ValidatorStateEnum(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorInfo) 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 ErrIntOverflowStake - } - 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: ValidatorInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &Validator{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &ValidatorStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RateData == nil { - m.RateData = &RateData{} - } - if err := m.RateData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorDefinition) 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 ErrIntOverflowStake - } - 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: ValidatorDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &Validator{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthSig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthSig = append(m.AuthSig[:0], dAtA[iNdEx:postIndex]...) - if m.AuthSig == nil { - m.AuthSig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Delegate) 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 ErrIntOverflowStake - } - 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: Delegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Delegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIdentity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorIdentity == nil { - m.ValidatorIdentity = &v1.IdentityKey{} - } - if err := m.ValidatorIdentity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondedAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnbondedAmount == nil { - m.UnbondedAmount = &v11.Amount{} - } - if err := m.UnbondedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DelegationAmount == nil { - m.DelegationAmount = &v11.Amount{} - } - if err := m.DelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Undelegate) 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 ErrIntOverflowStake - } - 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: Undelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Undelegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIdentity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorIdentity == nil { - m.ValidatorIdentity = &v1.IdentityKey{} - } - if err := m.ValidatorIdentity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartEpochIndex", wireType) - } - m.StartEpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartEpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondedAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnbondedAmount == nil { - m.UnbondedAmount = &v11.Amount{} - } - if err := m.UnbondedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DelegationAmount == nil { - m.DelegationAmount = &v11.Amount{} - } - if err := m.DelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromEpoch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FromEpoch == nil { - m.FromEpoch = &v12.Epoch{} - } - if err := m.FromEpoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UndelegateClaim) 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 ErrIntOverflowStake - } - 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: UndelegateClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UndelegateClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &UndelegateClaimBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) - if m.Proof == nil { - m.Proof = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UndelegateClaimBody) 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 ErrIntOverflowStake - } - 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: UndelegateClaimBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UndelegateClaimBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIdentity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorIdentity == nil { - m.ValidatorIdentity = &v1.IdentityKey{} - } - if err := m.ValidatorIdentity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartEpochIndex", wireType) - } - m.StartEpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartEpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Penalty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Penalty == nil { - m.Penalty = &Penalty{} - } - if err := m.Penalty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BalanceCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BalanceCommitment == nil { - m.BalanceCommitment = &v13.BalanceCommitment{} - } - if err := m.BalanceCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingStartHeight", wireType) - } - m.UnbondingStartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingStartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UndelegateClaimPlan) 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 ErrIntOverflowStake - } - 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: UndelegateClaimPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UndelegateClaimPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIdentity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorIdentity == nil { - m.ValidatorIdentity = &v1.IdentityKey{} - } - if err := m.ValidatorIdentity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartEpochIndex", wireType) - } - m.StartEpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartEpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Penalty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Penalty == nil { - m.Penalty = &Penalty{} - } - if err := m.Penalty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnbondingAmount == nil { - m.UnbondingAmount = &v11.Amount{} - } - if err := m.UnbondingAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BalanceBlinding", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BalanceBlinding = append(m.BalanceBlinding[:0], dAtA[iNdEx:postIndex]...) - if m.BalanceBlinding == nil { - m.BalanceBlinding = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingR", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingR = append(m.ProofBlindingR[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingR == nil { - m.ProofBlindingR = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofBlindingS", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofBlindingS = append(m.ProofBlindingS[:0], dAtA[iNdEx:postIndex]...) - if m.ProofBlindingS == nil { - m.ProofBlindingS = []byte{} - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingStartHeight", wireType) - } - m.UnbondingStartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingStartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegationChanges) 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 ErrIntOverflowStake - } - 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: DelegationChanges: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegationChanges: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Delegations = append(m.Delegations, &Delegate{}) - if err := m.Delegations[len(m.Delegations)-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 Undelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Undelegations = append(m.Undelegations, &Undelegate{}) - if err := m.Undelegations[len(m.Undelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Uptime) 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 ErrIntOverflowStake - } - 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: Uptime: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Uptime: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AsOfBlockHeight", wireType) - } - m.AsOfBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AsOfBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WindowLen", wireType) - } - m.WindowLen = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WindowLen |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bitvec", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bitvec = append(m.Bitvec[:0], dAtA[iNdEx:postIndex]...) - if m.Bitvec == nil { - m.Bitvec = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CurrentConsensusKeys) 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 ErrIntOverflowStake - } - 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: CurrentConsensusKeys: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CurrentConsensusKeys: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsensusKeys = append(m.ConsensusKeys, &v1.ConsensusKey{}) - if err := m.ConsensusKeys[len(m.ConsensusKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Penalty) 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 ErrIntOverflowStake - } - 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: Penalty: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Penalty: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetValidatorInfoRequest) 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 ErrIntOverflowStake - } - 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: GetValidatorInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetValidatorInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetValidatorInfoResponse) 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 ErrIntOverflowStake - } - 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: GetValidatorInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetValidatorInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorInfo == nil { - m.ValidatorInfo = &ValidatorInfo{} - } - if err := m.ValidatorInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorInfoRequest) 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 ErrIntOverflowStake - } - 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: ValidatorInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShowInactive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ShowInactive = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorInfoResponse) 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 ErrIntOverflowStake - } - 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: ValidatorInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorInfo == nil { - m.ValidatorInfo = &ValidatorInfo{} - } - if err := m.ValidatorInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorStatusRequest) 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 ErrIntOverflowStake - } - 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: ValidatorStatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorStatusResponse) 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 ErrIntOverflowStake - } - 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: ValidatorStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &ValidatorStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorPenaltyRequest) 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 ErrIntOverflowStake - } - 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: ValidatorPenaltyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorPenaltyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartEpochIndex", wireType) - } - m.StartEpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartEpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndEpochIndex", wireType) - } - m.EndEpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndEpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorPenaltyResponse) 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 ErrIntOverflowStake - } - 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: ValidatorPenaltyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorPenaltyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Penalty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Penalty == nil { - m.Penalty = &Penalty{} - } - if err := m.Penalty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CurrentValidatorRateRequest) 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 ErrIntOverflowStake - } - 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: CurrentValidatorRateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CurrentValidatorRateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CurrentValidatorRateResponse) 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 ErrIntOverflowStake - } - 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: CurrentValidatorRateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CurrentValidatorRateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &RateData{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorUptimeRequest) 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 ErrIntOverflowStake - } - 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: ValidatorUptimeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorUptimeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorUptimeResponse) 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 ErrIntOverflowStake - } - 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: ValidatorUptimeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorUptimeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Uptime == nil { - m.Uptime = &Uptime{} - } - if err := m.Uptime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StakeParameters) 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 ErrIntOverflowStake - } - 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: StakeParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StakeParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEpochs", wireType) - } - m.UnbondingEpochs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingEpochs |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveValidatorLimit", wireType) - } - m.ActiveValidatorLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActiveValidatorLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseRewardRate", wireType) - } - m.BaseRewardRate = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BaseRewardRate |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashingPenaltyMisbehavior", wireType) - } - m.SlashingPenaltyMisbehavior = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SlashingPenaltyMisbehavior |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashingPenaltyDowntime", wireType) - } - m.SlashingPenaltyDowntime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SlashingPenaltyDowntime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedBlocksWindowLen", wireType) - } - m.SignedBlocksWindowLen = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SignedBlocksWindowLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MissedBlocksMaximum", wireType) - } - m.MissedBlocksMaximum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MissedBlocksMaximum |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinValidatorStake", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MinValidatorStake == nil { - m.MinValidatorStake = &v11.Amount{} - } - if err := m.MinValidatorStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDelay", wireType) - } - m.UnbondingDelay = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingDelay |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisContent) 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 ErrIntOverflowStake - } - 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: GenesisContent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisContent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StakeParams == nil { - m.StakeParams = &StakeParameters{} - } - if err := m.StakeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventTombstoneValidator) 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 ErrIntOverflowStake - } - 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: EventTombstoneValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventTombstoneValidator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHeight", wireType) - } - m.EvidenceHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EvidenceHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentHeight", wireType) - } - m.CurrentHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CurrentHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - m.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotingPower |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValidatorStateChange) 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 ErrIntOverflowStake - } - 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: EventValidatorStateChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValidatorStateChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.State == nil { - m.State = &ValidatorState{} - } - if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValidatorVotingPowerChange) 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 ErrIntOverflowStake - } - 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: EventValidatorVotingPowerChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValidatorVotingPowerChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VotingPower == nil { - m.VotingPower = &v11.Amount{} - } - if err := m.VotingPower.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValidatorBondingStateChange) 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 ErrIntOverflowStake - } - 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: EventValidatorBondingStateChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValidatorBondingStateChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondingState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BondingState == nil { - m.BondingState = &BondingState{} - } - if err := m.BondingState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventRateDataChange) 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 ErrIntOverflowStake - } - 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: EventRateDataChange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventRateDataChange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RateData == nil { - m.RateData = &RateData{} - } - if err := m.RateData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValidatorDefinitionUpload) 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 ErrIntOverflowStake - } - 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: EventValidatorDefinitionUpload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValidatorDefinitionUpload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &Validator{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventValidatorMissedBlock) 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 ErrIntOverflowStake - } - 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: EventValidatorMissedBlock: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventValidatorMissedBlock: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDelegate) 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 ErrIntOverflowStake - } - 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: EventDelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDelegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v11.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventUndelegate) 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 ErrIntOverflowStake - } - 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: EventUndelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventUndelegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v11.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventSlashingPenaltyApplied) 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 ErrIntOverflowStake - } - 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: EventSlashingPenaltyApplied: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventSlashingPenaltyApplied: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewPenalty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStake - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStake - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStake - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NewPenalty == nil { - m.NewPenalty = &Penalty{} - } - if err := m.NewPenalty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStake(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStake - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStake(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStake - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStake - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStake - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStake - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupStake - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthStake - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthStake = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStake = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupStake = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/keys/v1/keys.pb.go b/chain/penumbra/core/keys/v1/keys.pb.go deleted file mode 100644 index ce6686c5..00000000 --- a/chain/penumbra/core/keys/v1/keys.pb.go +++ /dev/null @@ -1,2788 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/keys/v1/keys.proto - -package keysv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A Penumbra address. An address in Penumbra is a Bech32m-encoded -// string, with the human-readable prefix (HRP) `penumbrav2t`. -type Address struct { - // The bytes of the address. Must be represented as a series of - // `uint8` (i.e. values 0 through 255), with a length of 80 elements. - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` - // Alternatively, a Bech32m-encoded string representation of the `inner` - // bytes. - // - // NOTE: implementations are not required to support parsing this field. - // Implementations should prefer to encode the bytes in all messages they - // produce. Implementations must not accept messages with both `inner` and - // `alt_bech32m` set. - AltBech32M string `protobuf:"bytes,2,opt,name=alt_bech32m,json=altBech32m,proto3" json:"alt_bech32m,omitempty"` -} - -func (m *Address) Reset() { *m = Address{} } -func (m *Address) String() string { return proto.CompactTextString(m) } -func (*Address) ProtoMessage() {} -func (*Address) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{0} -} -func (m *Address) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Address.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 *Address) XXX_Merge(src proto.Message) { - xxx_messageInfo_Address.Merge(m, src) -} -func (m *Address) XXX_Size() int { - return m.Size() -} -func (m *Address) XXX_DiscardUnknown() { - xxx_messageInfo_Address.DiscardUnknown(m) -} - -var xxx_messageInfo_Address proto.InternalMessageInfo - -func (m *Address) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -func (m *Address) GetAltBech32M() string { - if m != nil { - return m.AltBech32M - } - return "" -} - -type AddressView struct { - // Types that are valid to be assigned to AddressView: - // - // *AddressView_Decoded_ - // *AddressView_Opaque_ - AddressView isAddressView_AddressView `protobuf_oneof:"address_view"` -} - -func (m *AddressView) Reset() { *m = AddressView{} } -func (m *AddressView) String() string { return proto.CompactTextString(m) } -func (*AddressView) ProtoMessage() {} -func (*AddressView) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{1} -} -func (m *AddressView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressView.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 *AddressView) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressView.Merge(m, src) -} -func (m *AddressView) XXX_Size() int { - return m.Size() -} -func (m *AddressView) XXX_DiscardUnknown() { - xxx_messageInfo_AddressView.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressView proto.InternalMessageInfo - -type isAddressView_AddressView interface { - isAddressView_AddressView() - MarshalTo([]byte) (int, error) - Size() int -} - -type AddressView_Decoded_ struct { - Decoded *AddressView_Decoded `protobuf:"bytes,1,opt,name=decoded,proto3,oneof" json:"decoded,omitempty"` -} -type AddressView_Opaque_ struct { - Opaque *AddressView_Opaque `protobuf:"bytes,2,opt,name=opaque,proto3,oneof" json:"opaque,omitempty"` -} - -func (*AddressView_Decoded_) isAddressView_AddressView() {} -func (*AddressView_Opaque_) isAddressView_AddressView() {} - -func (m *AddressView) GetAddressView() isAddressView_AddressView { - if m != nil { - return m.AddressView - } - return nil -} - -func (m *AddressView) GetDecoded() *AddressView_Decoded { - if x, ok := m.GetAddressView().(*AddressView_Decoded_); ok { - return x.Decoded - } - return nil -} - -func (m *AddressView) GetOpaque() *AddressView_Opaque { - if x, ok := m.GetAddressView().(*AddressView_Opaque_); ok { - return x.Opaque - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AddressView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AddressView_Decoded_)(nil), - (*AddressView_Opaque_)(nil), - } -} - -// A decoded address, with information about the address index and wallet ID visible. -type AddressView_Decoded struct { - Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Index *AddressIndex `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` - WalletId *WalletId `protobuf:"bytes,3,opt,name=wallet_id,json=walletId,proto3" json:"wallet_id,omitempty"` -} - -func (m *AddressView_Decoded) Reset() { *m = AddressView_Decoded{} } -func (m *AddressView_Decoded) String() string { return proto.CompactTextString(m) } -func (*AddressView_Decoded) ProtoMessage() {} -func (*AddressView_Decoded) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{1, 0} -} -func (m *AddressView_Decoded) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressView_Decoded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressView_Decoded.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 *AddressView_Decoded) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressView_Decoded.Merge(m, src) -} -func (m *AddressView_Decoded) XXX_Size() int { - return m.Size() -} -func (m *AddressView_Decoded) XXX_DiscardUnknown() { - xxx_messageInfo_AddressView_Decoded.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressView_Decoded proto.InternalMessageInfo - -func (m *AddressView_Decoded) GetAddress() *Address { - if m != nil { - return m.Address - } - return nil -} - -func (m *AddressView_Decoded) GetIndex() *AddressIndex { - if m != nil { - return m.Index - } - return nil -} - -func (m *AddressView_Decoded) GetWalletId() *WalletId { - if m != nil { - return m.WalletId - } - return nil -} - -// An opaque address, with no information about the address index or wallet ID visible. -type AddressView_Opaque struct { - Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *AddressView_Opaque) Reset() { *m = AddressView_Opaque{} } -func (m *AddressView_Opaque) String() string { return proto.CompactTextString(m) } -func (*AddressView_Opaque) ProtoMessage() {} -func (*AddressView_Opaque) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{1, 1} -} -func (m *AddressView_Opaque) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressView_Opaque) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressView_Opaque.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 *AddressView_Opaque) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressView_Opaque.Merge(m, src) -} -func (m *AddressView_Opaque) XXX_Size() int { - return m.Size() -} -func (m *AddressView_Opaque) XXX_DiscardUnknown() { - xxx_messageInfo_AddressView_Opaque.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressView_Opaque proto.InternalMessageInfo - -func (m *AddressView_Opaque) GetAddress() *Address { - if m != nil { - return m.Address - } - return nil -} - -type PayloadKey struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *PayloadKey) Reset() { *m = PayloadKey{} } -func (m *PayloadKey) String() string { return proto.CompactTextString(m) } -func (*PayloadKey) ProtoMessage() {} -func (*PayloadKey) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{2} -} -func (m *PayloadKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayloadKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayloadKey.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 *PayloadKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayloadKey.Merge(m, src) -} -func (m *PayloadKey) XXX_Size() int { - return m.Size() -} -func (m *PayloadKey) XXX_DiscardUnknown() { - xxx_messageInfo_PayloadKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PayloadKey proto.InternalMessageInfo - -func (m *PayloadKey) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type SpendKey struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *SpendKey) Reset() { *m = SpendKey{} } -func (m *SpendKey) String() string { return proto.CompactTextString(m) } -func (*SpendKey) ProtoMessage() {} -func (*SpendKey) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{3} -} -func (m *SpendKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendKey.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 *SpendKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendKey.Merge(m, src) -} -func (m *SpendKey) XXX_Size() int { - return m.Size() -} -func (m *SpendKey) XXX_DiscardUnknown() { - xxx_messageInfo_SpendKey.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendKey proto.InternalMessageInfo - -func (m *SpendKey) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type FullViewingKey struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *FullViewingKey) Reset() { *m = FullViewingKey{} } -func (m *FullViewingKey) String() string { return proto.CompactTextString(m) } -func (*FullViewingKey) ProtoMessage() {} -func (*FullViewingKey) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{4} -} -func (m *FullViewingKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FullViewingKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FullViewingKey.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 *FullViewingKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_FullViewingKey.Merge(m, src) -} -func (m *FullViewingKey) XXX_Size() int { - return m.Size() -} -func (m *FullViewingKey) XXX_DiscardUnknown() { - xxx_messageInfo_FullViewingKey.DiscardUnknown(m) -} - -var xxx_messageInfo_FullViewingKey proto.InternalMessageInfo - -func (m *FullViewingKey) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type WalletId struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *WalletId) Reset() { *m = WalletId{} } -func (m *WalletId) String() string { return proto.CompactTextString(m) } -func (*WalletId) ProtoMessage() {} -func (*WalletId) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{5} -} -func (m *WalletId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletId.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 *WalletId) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletId.Merge(m, src) -} -func (m *WalletId) XXX_Size() int { - return m.Size() -} -func (m *WalletId) XXX_DiscardUnknown() { - xxx_messageInfo_WalletId.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletId proto.InternalMessageInfo - -func (m *WalletId) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type Diversifier struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *Diversifier) Reset() { *m = Diversifier{} } -func (m *Diversifier) String() string { return proto.CompactTextString(m) } -func (*Diversifier) ProtoMessage() {} -func (*Diversifier) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{6} -} -func (m *Diversifier) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Diversifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Diversifier.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 *Diversifier) XXX_Merge(src proto.Message) { - xxx_messageInfo_Diversifier.Merge(m, src) -} -func (m *Diversifier) XXX_Size() int { - return m.Size() -} -func (m *Diversifier) XXX_DiscardUnknown() { - xxx_messageInfo_Diversifier.DiscardUnknown(m) -} - -var xxx_messageInfo_Diversifier proto.InternalMessageInfo - -func (m *Diversifier) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type AddressIndex struct { - Account uint32 `protobuf:"varint,2,opt,name=account,proto3" json:"account,omitempty"` - Randomizer []byte `protobuf:"bytes,3,opt,name=randomizer,proto3" json:"randomizer,omitempty"` -} - -func (m *AddressIndex) Reset() { *m = AddressIndex{} } -func (m *AddressIndex) String() string { return proto.CompactTextString(m) } -func (*AddressIndex) ProtoMessage() {} -func (*AddressIndex) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{7} -} -func (m *AddressIndex) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressIndex.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 *AddressIndex) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressIndex.Merge(m, src) -} -func (m *AddressIndex) XXX_Size() int { - return m.Size() -} -func (m *AddressIndex) XXX_DiscardUnknown() { - xxx_messageInfo_AddressIndex.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressIndex proto.InternalMessageInfo - -func (m *AddressIndex) GetAccount() uint32 { - if m != nil { - return m.Account - } - return 0 -} - -func (m *AddressIndex) GetRandomizer() []byte { - if m != nil { - return m.Randomizer - } - return nil -} - -// A validator's identity key (decaf377-rdsa spendauth verification key). -type IdentityKey struct { - Ik []byte `protobuf:"bytes,1,opt,name=ik,proto3" json:"ik,omitempty"` -} - -func (m *IdentityKey) Reset() { *m = IdentityKey{} } -func (m *IdentityKey) String() string { return proto.CompactTextString(m) } -func (*IdentityKey) ProtoMessage() {} -func (*IdentityKey) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{8} -} -func (m *IdentityKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IdentityKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IdentityKey.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 *IdentityKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_IdentityKey.Merge(m, src) -} -func (m *IdentityKey) XXX_Size() int { - return m.Size() -} -func (m *IdentityKey) XXX_DiscardUnknown() { - xxx_messageInfo_IdentityKey.DiscardUnknown(m) -} - -var xxx_messageInfo_IdentityKey proto.InternalMessageInfo - -func (m *IdentityKey) GetIk() []byte { - if m != nil { - return m.Ik - } - return nil -} - -// A validator's governance key (decaf377-rdsa spendauth verification key). -type GovernanceKey struct { - Gk []byte `protobuf:"bytes,1,opt,name=gk,proto3" json:"gk,omitempty"` -} - -func (m *GovernanceKey) Reset() { *m = GovernanceKey{} } -func (m *GovernanceKey) String() string { return proto.CompactTextString(m) } -func (*GovernanceKey) ProtoMessage() {} -func (*GovernanceKey) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{9} -} -func (m *GovernanceKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GovernanceKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GovernanceKey.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 *GovernanceKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_GovernanceKey.Merge(m, src) -} -func (m *GovernanceKey) XXX_Size() int { - return m.Size() -} -func (m *GovernanceKey) XXX_DiscardUnknown() { - xxx_messageInfo_GovernanceKey.DiscardUnknown(m) -} - -var xxx_messageInfo_GovernanceKey proto.InternalMessageInfo - -func (m *GovernanceKey) GetGk() []byte { - if m != nil { - return m.Gk - } - return nil -} - -type ConsensusKey struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *ConsensusKey) Reset() { *m = ConsensusKey{} } -func (m *ConsensusKey) String() string { return proto.CompactTextString(m) } -func (*ConsensusKey) ProtoMessage() {} -func (*ConsensusKey) Descriptor() ([]byte, []int) { - return fileDescriptor_171d3f5d66e6613e, []int{10} -} -func (m *ConsensusKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusKey.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 *ConsensusKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusKey.Merge(m, src) -} -func (m *ConsensusKey) XXX_Size() int { - return m.Size() -} -func (m *ConsensusKey) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusKey.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusKey proto.InternalMessageInfo - -func (m *ConsensusKey) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -func init() { - proto.RegisterType((*Address)(nil), "penumbra.core.keys.v1.Address") - proto.RegisterType((*AddressView)(nil), "penumbra.core.keys.v1.AddressView") - proto.RegisterType((*AddressView_Decoded)(nil), "penumbra.core.keys.v1.AddressView.Decoded") - proto.RegisterType((*AddressView_Opaque)(nil), "penumbra.core.keys.v1.AddressView.Opaque") - proto.RegisterType((*PayloadKey)(nil), "penumbra.core.keys.v1.PayloadKey") - proto.RegisterType((*SpendKey)(nil), "penumbra.core.keys.v1.SpendKey") - proto.RegisterType((*FullViewingKey)(nil), "penumbra.core.keys.v1.FullViewingKey") - proto.RegisterType((*WalletId)(nil), "penumbra.core.keys.v1.WalletId") - proto.RegisterType((*Diversifier)(nil), "penumbra.core.keys.v1.Diversifier") - proto.RegisterType((*AddressIndex)(nil), "penumbra.core.keys.v1.AddressIndex") - proto.RegisterType((*IdentityKey)(nil), "penumbra.core.keys.v1.IdentityKey") - proto.RegisterType((*GovernanceKey)(nil), "penumbra.core.keys.v1.GovernanceKey") - proto.RegisterType((*ConsensusKey)(nil), "penumbra.core.keys.v1.ConsensusKey") -} - -func init() { proto.RegisterFile("penumbra/core/keys/v1/keys.proto", fileDescriptor_171d3f5d66e6613e) } - -var fileDescriptor_171d3f5d66e6613e = []byte{ - // 597 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xc7, 0x63, 0x57, 0xbf, 0xa6, 0x9d, 0xa4, 0x3d, 0x58, 0xbf, 0x4a, 0xa1, 0x12, 0x6e, 0x70, - 0x11, 0x2a, 0x48, 0xd8, 0x4a, 0x7b, 0x29, 0x81, 0x03, 0x24, 0x55, 0xff, 0xa8, 0x42, 0x44, 0x06, - 0x05, 0x09, 0x45, 0xaa, 0x36, 0xde, 0x21, 0x5d, 0xc5, 0xd9, 0x0d, 0xeb, 0xb5, 0x43, 0x78, 0x05, - 0x2e, 0x3c, 0x03, 0x47, 0x24, 0xde, 0x80, 0x07, 0x40, 0x9c, 0x7a, 0xe4, 0x88, 0xd2, 0x1b, 0x4f, - 0x81, 0xd6, 0xb1, 0x21, 0x87, 0x24, 0x42, 0x9c, 0x76, 0x77, 0xfc, 0xf9, 0xce, 0x7c, 0x77, 0x46, - 0x5e, 0xa8, 0x0e, 0x91, 0xc7, 0x83, 0xae, 0x24, 0x5e, 0x20, 0x24, 0x7a, 0x7d, 0x1c, 0x47, 0x5e, - 0x52, 0x4b, 0x57, 0x77, 0x28, 0x85, 0x12, 0xd6, 0x56, 0x4e, 0xb8, 0x9a, 0x70, 0xd3, 0x2f, 0x49, - 0xcd, 0x79, 0x0c, 0xc5, 0x27, 0x94, 0x4a, 0x8c, 0x22, 0xeb, 0x7f, 0xf8, 0x8f, 0x71, 0x8e, 0xb2, - 0x62, 0x54, 0x8d, 0xbd, 0xb2, 0x3f, 0x3d, 0x58, 0x3b, 0x50, 0x22, 0xa1, 0xba, 0xe8, 0x62, 0x70, - 0x79, 0xb0, 0x3f, 0xa8, 0x98, 0x55, 0x63, 0x6f, 0xdd, 0x07, 0x12, 0xaa, 0xc6, 0x34, 0xe2, 0x7c, - 0x5e, 0x81, 0x52, 0x96, 0xa2, 0xcd, 0x70, 0x64, 0x1d, 0x43, 0x91, 0x62, 0x20, 0x28, 0xd2, 0x34, - 0x51, 0x69, 0xff, 0x9e, 0x3b, 0xb7, 0xb4, 0x3b, 0x23, 0x72, 0x8f, 0xa6, 0x8a, 0xd3, 0x82, 0x9f, - 0x8b, 0xad, 0x26, 0xac, 0x8a, 0x21, 0x79, 0x13, 0x63, 0x5a, 0xb3, 0xb4, 0x7f, 0xf7, 0x2f, 0xd2, - 0x3c, 0x4b, 0x05, 0xa7, 0x05, 0x3f, 0x93, 0x6e, 0x7f, 0x31, 0xa0, 0x98, 0xe5, 0xb6, 0x0e, 0xa1, - 0x48, 0xa6, 0x6c, 0x66, 0xcc, 0x5e, 0x9e, 0xd1, 0xcf, 0x71, 0xeb, 0x81, 0xee, 0x0c, 0xc5, 0xb7, - 0x99, 0x93, 0xdd, 0xe5, 0xba, 0x33, 0x8d, 0xfa, 0x53, 0x85, 0xf5, 0x08, 0xd6, 0x47, 0x24, 0x0c, - 0x51, 0x5d, 0x30, 0x5a, 0x59, 0x49, 0xe5, 0x3b, 0x0b, 0xe4, 0x2f, 0x53, 0xee, 0x8c, 0xfa, 0x6b, - 0xa3, 0x6c, 0xb7, 0xdd, 0x80, 0xd5, 0xe9, 0x95, 0xfe, 0xdd, 0x7c, 0x63, 0x13, 0xca, 0xd9, 0xf6, - 0x22, 0x61, 0x38, 0x72, 0x1c, 0x80, 0x16, 0x19, 0x87, 0x82, 0xd0, 0x73, 0x1c, 0xcf, 0x1f, 0xba, - 0x53, 0x85, 0xb5, 0xe7, 0x43, 0xe4, 0x4b, 0x88, 0x3b, 0xb0, 0x79, 0x1c, 0x87, 0xa1, 0xee, 0x3a, - 0xe3, 0xbd, 0xa5, 0x99, 0xf2, 0x7b, 0x2d, 0x20, 0x76, 0xa1, 0x74, 0xc4, 0x12, 0x94, 0x11, 0x7b, - 0xcd, 0x50, 0x2e, 0x80, 0x4e, 0xa1, 0x3c, 0xdb, 0x5d, 0xab, 0x02, 0x45, 0x12, 0x04, 0x22, 0xe6, - 0x2a, 0x9d, 0xc9, 0x86, 0x9f, 0x1f, 0x2d, 0x1b, 0x40, 0x12, 0x4e, 0xc5, 0x80, 0xbd, 0x43, 0x99, - 0x76, 0xbc, 0xec, 0xcf, 0x44, 0x9c, 0x9b, 0x50, 0x3a, 0xa3, 0xc8, 0x15, 0x53, 0x63, 0xed, 0x7a, - 0x13, 0x4c, 0xd6, 0xcf, 0x6a, 0x99, 0xac, 0xef, 0xec, 0xc0, 0xc6, 0x89, 0x48, 0x50, 0x72, 0xc2, - 0x03, 0xcc, 0x80, 0xde, 0x6f, 0xa0, 0xd7, 0x77, 0x6e, 0x43, 0xb9, 0x29, 0x78, 0x84, 0x3c, 0x8a, - 0xa3, 0x85, 0xd7, 0x6e, 0xbc, 0x37, 0xbf, 0x4e, 0x6c, 0xe3, 0x6a, 0x62, 0x1b, 0x3f, 0x26, 0xb6, - 0xf1, 0xe1, 0xda, 0x2e, 0x5c, 0x5d, 0xdb, 0x85, 0xef, 0xd7, 0x76, 0x01, 0x6e, 0x04, 0x62, 0x30, - 0x7f, 0x76, 0x8d, 0xf5, 0x73, 0x1c, 0x47, 0x2d, 0xfd, 0xbb, 0xb6, 0x8c, 0x57, 0x2f, 0x7a, 0x4c, - 0x5d, 0xc6, 0x5d, 0x37, 0x10, 0x03, 0x2f, 0x52, 0x92, 0xf0, 0x1e, 0x86, 0x22, 0xc1, 0xfb, 0x09, - 0x72, 0x15, 0x4b, 0x8c, 0x3c, 0xc6, 0x15, 0xca, 0xe0, 0x92, 0xe8, 0x35, 0x52, 0x5e, 0x72, 0xe8, - 0xa5, 0x07, 0x6f, 0xee, 0x53, 0xf0, 0x50, 0xaf, 0x49, 0xed, 0xa3, 0xb9, 0xd2, 0x6a, 0x9e, 0x7f, - 0x32, 0xb7, 0x5a, 0xb9, 0x81, 0xa6, 0x36, 0xa0, 0xeb, 0xba, 0xed, 0xda, 0xb7, 0x3f, 0xf1, 0x8e, - 0x8e, 0x77, 0x74, 0xbc, 0xd3, 0xae, 0x4d, 0xcc, 0x5b, 0x73, 0xe3, 0x9d, 0x93, 0x56, 0xe3, 0x29, - 0x2a, 0x42, 0x89, 0x22, 0x3f, 0xcd, 0x4a, 0xce, 0xd4, 0xeb, 0x1a, 0xaa, 0xd7, 0x35, 0x55, 0xaf, - 0xb7, 0x6b, 0xdd, 0xd5, 0xf4, 0x09, 0x3a, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x6e, 0x40, - 0xa5, 0xa6, 0x04, 0x00, 0x00, -} - -func (m *Address) Marshal() (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 *Address) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Address) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AltBech32M) > 0 { - i -= len(m.AltBech32M) - copy(dAtA[i:], m.AltBech32M) - i = encodeVarintKeys(dAtA, i, uint64(len(m.AltBech32M))) - i-- - dAtA[i] = 0x12 - } - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressView) Marshal() (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 *AddressView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AddressView != nil { - { - size := m.AddressView.Size() - i -= size - if _, err := m.AddressView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *AddressView_Decoded_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressView_Decoded_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Decoded != nil { - { - size, err := m.Decoded.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKeys(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *AddressView_Opaque_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressView_Opaque_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Opaque != nil { - { - size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKeys(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *AddressView_Decoded) Marshal() (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 *AddressView_Decoded) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressView_Decoded) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.WalletId != nil { - { - size, err := m.WalletId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKeys(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Index != nil { - { - size, err := m.Index.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKeys(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKeys(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressView_Opaque) Marshal() (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 *AddressView_Opaque) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressView_Opaque) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintKeys(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayloadKey) Marshal() (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 *PayloadKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayloadKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpendKey) Marshal() (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 *SpendKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FullViewingKey) Marshal() (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 *FullViewingKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FullViewingKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WalletId) Marshal() (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 *WalletId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Diversifier) Marshal() (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 *Diversifier) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Diversifier) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressIndex) Marshal() (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 *AddressIndex) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Randomizer) > 0 { - i -= len(m.Randomizer) - copy(dAtA[i:], m.Randomizer) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Randomizer))) - i-- - dAtA[i] = 0x1a - } - if m.Account != 0 { - i = encodeVarintKeys(dAtA, i, uint64(m.Account)) - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *IdentityKey) Marshal() (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 *IdentityKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IdentityKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ik) > 0 { - i -= len(m.Ik) - copy(dAtA[i:], m.Ik) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Ik))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GovernanceKey) Marshal() (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 *GovernanceKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GovernanceKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Gk) > 0 { - i -= len(m.Gk) - copy(dAtA[i:], m.Gk) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Gk))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConsensusKey) Marshal() (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 *ConsensusKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintKeys(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { - offset -= sovKeys(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Address) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - l = len(m.AltBech32M) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *AddressView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AddressView != nil { - n += m.AddressView.Size() - } - return n -} - -func (m *AddressView_Decoded_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Decoded != nil { - l = m.Decoded.Size() - n += 1 + l + sovKeys(uint64(l)) - } - return n -} -func (m *AddressView_Opaque_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovKeys(uint64(l)) - } - return n -} -func (m *AddressView_Decoded) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovKeys(uint64(l)) - } - if m.Index != nil { - l = m.Index.Size() - n += 1 + l + sovKeys(uint64(l)) - } - if m.WalletId != nil { - l = m.WalletId.Size() - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *AddressView_Opaque) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *PayloadKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *SpendKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *FullViewingKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *WalletId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *Diversifier) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *AddressIndex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != 0 { - n += 1 + sovKeys(uint64(m.Account)) - } - l = len(m.Randomizer) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *IdentityKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Ik) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *GovernanceKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Gk) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func (m *ConsensusKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovKeys(uint64(l)) - } - return n -} - -func sovKeys(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozKeys(x uint64) (n int) { - return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Address) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Address: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Address: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltBech32M", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltBech32M = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddressView) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddressView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddressView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Decoded", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AddressView_Decoded{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.AddressView = &AddressView_Decoded_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AddressView_Opaque{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.AddressView = &AddressView_Opaque_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddressView_Decoded) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Decoded: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Decoded: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Index == nil { - m.Index = &AddressIndex{} - } - if err := m.Index.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WalletId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.WalletId == nil { - m.WalletId = &WalletId{} - } - if err := m.WalletId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddressView_Opaque) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Opaque: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Opaque: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayloadKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PayloadKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayloadKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpendKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpendKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FullViewingKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FullViewingKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FullViewingKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletId) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WalletId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WalletId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Diversifier) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Diversifier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Diversifier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddressIndex) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddressIndex: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddressIndex: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - m.Account = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Account |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Randomizer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Randomizer = append(m.Randomizer[:0], dAtA[iNdEx:postIndex]...) - if m.Randomizer == nil { - m.Randomizer = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IdentityKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IdentityKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IdentityKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ik", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ik = append(m.Ik[:0], dAtA[iNdEx:postIndex]...) - if m.Ik == nil { - m.Ik = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GovernanceKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GovernanceKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GovernanceKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gk = append(m.Gk[:0], dAtA[iNdEx:postIndex]...) - if m.Gk == nil { - m.Gk = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsensusKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConsensusKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeys - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthKeys - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthKeys - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipKeys(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthKeys - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipKeys(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowKeys - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthKeys - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupKeys - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthKeys - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/num/v1/num.pb.go b/chain/penumbra/core/num/v1/num.pb.go deleted file mode 100644 index 372745d2..00000000 --- a/chain/penumbra/core/num/v1/num.pb.go +++ /dev/null @@ -1,346 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/num/v1/num.proto - -package numv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// The quantity of a particular Asset. Represented as a 128-bit unsigned integer, -// split over two fields, `lo` and `hi`, representing the low- and high-order bytes -// of the 128-bit value, respectively. Clients must assemble these bits in their -// implementation into a `uint128` or comparable data structure, in order to model -// the Amount accurately. -type Amount struct { - Lo uint64 `protobuf:"varint,1,opt,name=lo,proto3" json:"lo,omitempty"` - Hi uint64 `protobuf:"varint,2,opt,name=hi,proto3" json:"hi,omitempty"` -} - -func (m *Amount) Reset() { *m = Amount{} } -func (m *Amount) String() string { return proto.CompactTextString(m) } -func (*Amount) ProtoMessage() {} -func (*Amount) Descriptor() ([]byte, []int) { - return fileDescriptor_660cebd44e5047eb, []int{0} -} -func (m *Amount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Amount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Amount.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 *Amount) XXX_Merge(src proto.Message) { - xxx_messageInfo_Amount.Merge(m, src) -} -func (m *Amount) XXX_Size() int { - return m.Size() -} -func (m *Amount) XXX_DiscardUnknown() { - xxx_messageInfo_Amount.DiscardUnknown(m) -} - -var xxx_messageInfo_Amount proto.InternalMessageInfo - -func (m *Amount) GetLo() uint64 { - if m != nil { - return m.Lo - } - return 0 -} - -func (m *Amount) GetHi() uint64 { - if m != nil { - return m.Hi - } - return 0 -} - -func init() { - proto.RegisterType((*Amount)(nil), "penumbra.core.num.v1.Amount") -} - -func init() { proto.RegisterFile("penumbra/core/num/v1/num.proto", fileDescriptor_660cebd44e5047eb) } - -var fileDescriptor_660cebd44e5047eb = []byte{ - // 282 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x4b, 0xf4, 0x30, - 0x1c, 0xc7, 0x9b, 0x3c, 0x0f, 0x87, 0x74, 0x70, 0x38, 0x0e, 0xec, 0x14, 0x0e, 0xa7, 0x5b, 0x4c, - 0x08, 0x2e, 0x12, 0x27, 0x7b, 0x83, 0x93, 0xa5, 0xdc, 0xd0, 0x41, 0xba, 0xa4, 0x35, 0x5c, 0x0b, - 0x4d, 0x72, 0xa4, 0x49, 0xde, 0x80, 0x6f, 0xc0, 0xd7, 0xe0, 0xe8, 0x2b, 0x11, 0xa7, 0x1b, 0x1d, - 0xa5, 0xdd, 0x7c, 0x15, 0x92, 0x93, 0xe2, 0xd2, 0xe9, 0xcb, 0xf7, 0x0f, 0xf9, 0x90, 0x5f, 0x8c, - 0x0e, 0x42, 0x39, 0x59, 0x19, 0x4e, 0x6a, 0x6d, 0x04, 0x51, 0x4e, 0x12, 0x4f, 0x83, 0xe0, 0x83, - 0xd1, 0x56, 0x2f, 0x57, 0x53, 0x8f, 0x43, 0x8f, 0x43, 0xe1, 0xe9, 0xe5, 0x26, 0x5e, 0xdc, 0x49, - 0xed, 0x94, 0x5d, 0x9e, 0xc7, 0xb0, 0xd3, 0x09, 0x58, 0x83, 0xcd, 0xff, 0x1d, 0xec, 0x74, 0xf0, - 0x4d, 0x9b, 0xc0, 0x5f, 0xdf, 0xb4, 0xe9, 0x33, 0x7c, 0x1f, 0x10, 0x38, 0x0e, 0x08, 0x7c, 0x0d, - 0x08, 0xbc, 0x8c, 0x28, 0x3a, 0x8e, 0x28, 0xfa, 0x1c, 0x51, 0x14, 0x27, 0xb5, 0x96, 0x78, 0xee, - 0xf9, 0xf4, 0x2c, 0x73, 0x32, 0x0f, 0xf8, 0x1c, 0x3c, 0xee, 0xf6, 0xad, 0x6d, 0x5c, 0x85, 0x6b, - 0x2d, 0x49, 0x6f, 0x0d, 0x57, 0x7b, 0xd1, 0x69, 0x2f, 0xae, 0xbc, 0x50, 0xd6, 0x19, 0xd1, 0x93, - 0x56, 0x59, 0x61, 0xea, 0x86, 0x07, 0xed, 0x2d, 0xf1, 0x37, 0xe4, 0x64, 0xc8, 0xdc, 0xc7, 0x6e, - 0x95, 0x93, 0x9e, 0xbe, 0xc2, 0x7f, 0xf9, 0x36, 0x7b, 0x83, 0xab, 0x7c, 0x82, 0x6f, 0x03, 0x3c, - 0x73, 0x12, 0x17, 0xf4, 0xe3, 0x2f, 0x2e, 0x43, 0x5c, 0x66, 0x4e, 0x96, 0x05, 0x1d, 0xe0, 0x7a, - 0x2e, 0x2e, 0xef, 0xf3, 0xf4, 0x41, 0x58, 0xfe, 0xc4, 0x2d, 0xff, 0x86, 0x17, 0xd3, 0x84, 0xb1, - 0xb0, 0x61, 0x2c, 0x73, 0x92, 0xb1, 0x82, 0x56, 0x8b, 0xd3, 0x31, 0xaf, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0xd0, 0xc4, 0x90, 0x18, 0x6e, 0x01, 0x00, 0x00, -} - -func (m *Amount) Marshal() (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 *Amount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Amount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Hi != 0 { - i = encodeVarintNum(dAtA, i, uint64(m.Hi)) - i-- - dAtA[i] = 0x10 - } - if m.Lo != 0 { - i = encodeVarintNum(dAtA, i, uint64(m.Lo)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintNum(dAtA []byte, offset int, v uint64) int { - offset -= sovNum(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Amount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Lo != 0 { - n += 1 + sovNum(uint64(m.Lo)) - } - if m.Hi != 0 { - n += 1 + sovNum(uint64(m.Hi)) - } - return n -} - -func sovNum(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozNum(x uint64) (n int) { - return sovNum(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Amount) 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 ErrIntOverflowNum - } - 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: Amount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Amount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lo", wireType) - } - m.Lo = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNum - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Lo |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hi", wireType) - } - m.Hi = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNum - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Hi |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipNum(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNum - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipNum(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNum - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNum - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNum - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthNum - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupNum - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthNum - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthNum = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNum = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupNum = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/transaction/v1/transaction.pb.go b/chain/penumbra/core/transaction/v1/transaction.pb.go deleted file mode 100644 index d8dcfba5..00000000 --- a/chain/penumbra/core/transaction/v1/transaction.pb.go +++ /dev/null @@ -1,13819 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/transaction/v1/transaction.proto - -package transactionv1 - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - proto "github.com/cosmos/gogoproto/proto" - v111 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v19 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/auction/v1" - v15 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/dex/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/fee/v1" - v18 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/governance/v1" - v17 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/ibc/v1" - v113 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/shielded_pool/v1" - v16 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/stake/v1" - v110 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v112 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/txhash/v1" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/decaf377_fmd/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/decaf377_rdsa/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/tct/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A Penumbra transaction. -type Transaction struct { - Body *TransactionBody `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` - // The binding signature is stored separately from the transaction body that it signs. - BindingSig *v1.BindingSignature `protobuf:"bytes,2,opt,name=binding_sig,json=bindingSig,proto3" json:"binding_sig,omitempty"` - // The root of some previous state of the state commitment tree, used as an anchor for all - // ZK state transition proofs. - Anchor *v11.MerkleRoot `protobuf:"bytes,3,opt,name=anchor,proto3" json:"anchor,omitempty"` -} - -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{0} -} -func (m *Transaction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Transaction.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 *Transaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction.Merge(m, src) -} -func (m *Transaction) XXX_Size() int { - return m.Size() -} -func (m *Transaction) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction.DiscardUnknown(m) -} - -var xxx_messageInfo_Transaction proto.InternalMessageInfo - -func (m *Transaction) GetBody() *TransactionBody { - if m != nil { - return m.Body - } - return nil -} - -func (m *Transaction) GetBindingSig() *v1.BindingSignature { - if m != nil { - return m.BindingSig - } - return nil -} - -func (m *Transaction) GetAnchor() *v11.MerkleRoot { - if m != nil { - return m.Anchor - } - return nil -} - -// The body of a transaction. -type TransactionBody struct { - // A list of actions (state changes) performed by this transaction. - Actions []*Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` - // Parameters determining if a transaction should be accepted by this chain. - TransactionParameters *TransactionParameters `protobuf:"bytes,2,opt,name=transaction_parameters,json=transactionParameters,proto3" json:"transaction_parameters,omitempty"` - // Detection data for use with Fuzzy Message Detection - DetectionData *DetectionData `protobuf:"bytes,4,opt,name=detection_data,json=detectionData,proto3" json:"detection_data,omitempty"` - // The encrypted memo for this transaction. - // - // This field will be present if and only if the transaction has outputs. - Memo *MemoCiphertext `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` -} - -func (m *TransactionBody) Reset() { *m = TransactionBody{} } -func (m *TransactionBody) String() string { return proto.CompactTextString(m) } -func (*TransactionBody) ProtoMessage() {} -func (*TransactionBody) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{1} -} -func (m *TransactionBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionBody.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 *TransactionBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionBody.Merge(m, src) -} -func (m *TransactionBody) XXX_Size() int { - return m.Size() -} -func (m *TransactionBody) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionBody.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionBody proto.InternalMessageInfo - -func (m *TransactionBody) GetActions() []*Action { - if m != nil { - return m.Actions - } - return nil -} - -func (m *TransactionBody) GetTransactionParameters() *TransactionParameters { - if m != nil { - return m.TransactionParameters - } - return nil -} - -func (m *TransactionBody) GetDetectionData() *DetectionData { - if m != nil { - return m.DetectionData - } - return nil -} - -func (m *TransactionBody) GetMemo() *MemoCiphertext { - if m != nil { - return m.Memo - } - return nil -} - -// The parameters determining if a transaction should be accepted by the chain. -type TransactionParameters struct { - // The maximum height that this transaction can be included in the chain. - // - // If zero, there is no maximum. - ExpiryHeight uint64 `protobuf:"varint,1,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` - // The chain this transaction is intended for. Including this prevents - // replaying a transaction on one chain onto a different chain. - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // The transaction fee. - Fee *v12.Fee `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (m *TransactionParameters) Reset() { *m = TransactionParameters{} } -func (m *TransactionParameters) String() string { return proto.CompactTextString(m) } -func (*TransactionParameters) ProtoMessage() {} -func (*TransactionParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{2} -} -func (m *TransactionParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionParameters.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 *TransactionParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionParameters.Merge(m, src) -} -func (m *TransactionParameters) XXX_Size() int { - return m.Size() -} -func (m *TransactionParameters) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionParameters proto.InternalMessageInfo - -func (m *TransactionParameters) GetExpiryHeight() uint64 { - if m != nil { - return m.ExpiryHeight - } - return 0 -} - -func (m *TransactionParameters) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *TransactionParameters) GetFee() *v12.Fee { - if m != nil { - return m.Fee - } - return nil -} - -// Detection data used by a detection server performing Fuzzy Message Detection. -type DetectionData struct { - // A list of clues for use with Fuzzy Message Detection. - FmdClues []*v13.Clue `protobuf:"bytes,4,rep,name=fmd_clues,json=fmdClues,proto3" json:"fmd_clues,omitempty"` -} - -func (m *DetectionData) Reset() { *m = DetectionData{} } -func (m *DetectionData) String() string { return proto.CompactTextString(m) } -func (*DetectionData) ProtoMessage() {} -func (*DetectionData) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{3} -} -func (m *DetectionData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DetectionData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DetectionData.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 *DetectionData) XXX_Merge(src proto.Message) { - xxx_messageInfo_DetectionData.Merge(m, src) -} -func (m *DetectionData) XXX_Size() int { - return m.Size() -} -func (m *DetectionData) XXX_DiscardUnknown() { - xxx_messageInfo_DetectionData.DiscardUnknown(m) -} - -var xxx_messageInfo_DetectionData proto.InternalMessageInfo - -func (m *DetectionData) GetFmdClues() []*v13.Clue { - if m != nil { - return m.FmdClues - } - return nil -} - -// A state change performed by a transaction. -type Action struct { - // Types that are valid to be assigned to Action: - // *Action_Spend - // *Action_Output - // *Action_Swap - // *Action_SwapClaim - // *Action_ValidatorDefinition - // *Action_IbcRelayAction - // *Action_ProposalSubmit - // *Action_ProposalWithdraw - // *Action_ValidatorVote - // *Action_DelegatorVote - // *Action_ProposalDepositClaim - // *Action_PositionOpen - // *Action_PositionClose - // *Action_PositionWithdraw - // *Action_PositionRewardClaim - // *Action_Delegate - // *Action_Undelegate - // *Action_UndelegateClaim - // *Action_CommunityPoolSpend - // *Action_CommunityPoolOutput - // *Action_CommunityPoolDeposit - // *Action_ActionDutchAuctionSchedule - // *Action_ActionDutchAuctionEnd - // *Action_ActionDutchAuctionWithdraw - // *Action_Ics20Withdrawal - Action isAction_Action `protobuf_oneof:"action"` -} - -func (m *Action) Reset() { *m = Action{} } -func (m *Action) String() string { return proto.CompactTextString(m) } -func (*Action) ProtoMessage() {} -func (*Action) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{4} -} -func (m *Action) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Action.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 *Action) XXX_Merge(src proto.Message) { - xxx_messageInfo_Action.Merge(m, src) -} -func (m *Action) XXX_Size() int { - return m.Size() -} -func (m *Action) XXX_DiscardUnknown() { - xxx_messageInfo_Action.DiscardUnknown(m) -} - -var xxx_messageInfo_Action proto.InternalMessageInfo - -type isAction_Action interface { - isAction_Action() - MarshalTo([]byte) (int, error) - Size() int -} - -type Action_Spend struct { - Spend *v14.Spend `protobuf:"bytes,1,opt,name=spend,proto3,oneof" json:"spend,omitempty"` -} -type Action_Output struct { - Output *v14.Output `protobuf:"bytes,2,opt,name=output,proto3,oneof" json:"output,omitempty"` -} -type Action_Swap struct { - Swap *v15.Swap `protobuf:"bytes,3,opt,name=swap,proto3,oneof" json:"swap,omitempty"` -} -type Action_SwapClaim struct { - SwapClaim *v15.SwapClaim `protobuf:"bytes,4,opt,name=swap_claim,json=swapClaim,proto3,oneof" json:"swap_claim,omitempty"` -} -type Action_ValidatorDefinition struct { - ValidatorDefinition *v16.ValidatorDefinition `protobuf:"bytes,16,opt,name=validator_definition,json=validatorDefinition,proto3,oneof" json:"validator_definition,omitempty"` -} -type Action_IbcRelayAction struct { - IbcRelayAction *v17.IbcRelay `protobuf:"bytes,17,opt,name=ibc_relay_action,json=ibcRelayAction,proto3,oneof" json:"ibc_relay_action,omitempty"` -} -type Action_ProposalSubmit struct { - ProposalSubmit *v18.ProposalSubmit `protobuf:"bytes,18,opt,name=proposal_submit,json=proposalSubmit,proto3,oneof" json:"proposal_submit,omitempty"` -} -type Action_ProposalWithdraw struct { - ProposalWithdraw *v18.ProposalWithdraw `protobuf:"bytes,19,opt,name=proposal_withdraw,json=proposalWithdraw,proto3,oneof" json:"proposal_withdraw,omitempty"` -} -type Action_ValidatorVote struct { - ValidatorVote *v18.ValidatorVote `protobuf:"bytes,20,opt,name=validator_vote,json=validatorVote,proto3,oneof" json:"validator_vote,omitempty"` -} -type Action_DelegatorVote struct { - DelegatorVote *v18.DelegatorVote `protobuf:"bytes,21,opt,name=delegator_vote,json=delegatorVote,proto3,oneof" json:"delegator_vote,omitempty"` -} -type Action_ProposalDepositClaim struct { - ProposalDepositClaim *v18.ProposalDepositClaim `protobuf:"bytes,22,opt,name=proposal_deposit_claim,json=proposalDepositClaim,proto3,oneof" json:"proposal_deposit_claim,omitempty"` -} -type Action_PositionOpen struct { - PositionOpen *v15.PositionOpen `protobuf:"bytes,30,opt,name=position_open,json=positionOpen,proto3,oneof" json:"position_open,omitempty"` -} -type Action_PositionClose struct { - PositionClose *v15.PositionClose `protobuf:"bytes,31,opt,name=position_close,json=positionClose,proto3,oneof" json:"position_close,omitempty"` -} -type Action_PositionWithdraw struct { - PositionWithdraw *v15.PositionWithdraw `protobuf:"bytes,32,opt,name=position_withdraw,json=positionWithdraw,proto3,oneof" json:"position_withdraw,omitempty"` -} -type Action_PositionRewardClaim struct { - PositionRewardClaim *v15.PositionRewardClaim `protobuf:"bytes,34,opt,name=position_reward_claim,json=positionRewardClaim,proto3,oneof" json:"position_reward_claim,omitempty"` -} -type Action_Delegate struct { - Delegate *v16.Delegate `protobuf:"bytes,40,opt,name=delegate,proto3,oneof" json:"delegate,omitempty"` -} -type Action_Undelegate struct { - Undelegate *v16.Undelegate `protobuf:"bytes,41,opt,name=undelegate,proto3,oneof" json:"undelegate,omitempty"` -} -type Action_UndelegateClaim struct { - UndelegateClaim *v16.UndelegateClaim `protobuf:"bytes,42,opt,name=undelegate_claim,json=undelegateClaim,proto3,oneof" json:"undelegate_claim,omitempty"` -} -type Action_CommunityPoolSpend struct { - CommunityPoolSpend *v18.CommunityPoolSpend `protobuf:"bytes,50,opt,name=community_pool_spend,json=communityPoolSpend,proto3,oneof" json:"community_pool_spend,omitempty"` -} -type Action_CommunityPoolOutput struct { - CommunityPoolOutput *v18.CommunityPoolOutput `protobuf:"bytes,51,opt,name=community_pool_output,json=communityPoolOutput,proto3,oneof" json:"community_pool_output,omitempty"` -} -type Action_CommunityPoolDeposit struct { - CommunityPoolDeposit *v18.CommunityPoolDeposit `protobuf:"bytes,52,opt,name=community_pool_deposit,json=communityPoolDeposit,proto3,oneof" json:"community_pool_deposit,omitempty"` -} -type Action_ActionDutchAuctionSchedule struct { - ActionDutchAuctionSchedule *v19.ActionDutchAuctionSchedule `protobuf:"bytes,53,opt,name=action_dutch_auction_schedule,json=actionDutchAuctionSchedule,proto3,oneof" json:"action_dutch_auction_schedule,omitempty"` -} -type Action_ActionDutchAuctionEnd struct { - ActionDutchAuctionEnd *v19.ActionDutchAuctionEnd `protobuf:"bytes,54,opt,name=action_dutch_auction_end,json=actionDutchAuctionEnd,proto3,oneof" json:"action_dutch_auction_end,omitempty"` -} -type Action_ActionDutchAuctionWithdraw struct { - ActionDutchAuctionWithdraw *v19.ActionDutchAuctionWithdraw `protobuf:"bytes,55,opt,name=action_dutch_auction_withdraw,json=actionDutchAuctionWithdraw,proto3,oneof" json:"action_dutch_auction_withdraw,omitempty"` -} -type Action_Ics20Withdrawal struct { - Ics20Withdrawal *v17.Ics20Withdrawal `protobuf:"bytes,200,opt,name=ics20_withdrawal,json=ics20Withdrawal,proto3,oneof" json:"ics20_withdrawal,omitempty"` -} - -func (*Action_Spend) isAction_Action() {} -func (*Action_Output) isAction_Action() {} -func (*Action_Swap) isAction_Action() {} -func (*Action_SwapClaim) isAction_Action() {} -func (*Action_ValidatorDefinition) isAction_Action() {} -func (*Action_IbcRelayAction) isAction_Action() {} -func (*Action_ProposalSubmit) isAction_Action() {} -func (*Action_ProposalWithdraw) isAction_Action() {} -func (*Action_ValidatorVote) isAction_Action() {} -func (*Action_DelegatorVote) isAction_Action() {} -func (*Action_ProposalDepositClaim) isAction_Action() {} -func (*Action_PositionOpen) isAction_Action() {} -func (*Action_PositionClose) isAction_Action() {} -func (*Action_PositionWithdraw) isAction_Action() {} -func (*Action_PositionRewardClaim) isAction_Action() {} -func (*Action_Delegate) isAction_Action() {} -func (*Action_Undelegate) isAction_Action() {} -func (*Action_UndelegateClaim) isAction_Action() {} -func (*Action_CommunityPoolSpend) isAction_Action() {} -func (*Action_CommunityPoolOutput) isAction_Action() {} -func (*Action_CommunityPoolDeposit) isAction_Action() {} -func (*Action_ActionDutchAuctionSchedule) isAction_Action() {} -func (*Action_ActionDutchAuctionEnd) isAction_Action() {} -func (*Action_ActionDutchAuctionWithdraw) isAction_Action() {} -func (*Action_Ics20Withdrawal) isAction_Action() {} - -func (m *Action) GetAction() isAction_Action { - if m != nil { - return m.Action - } - return nil -} - -func (m *Action) GetSpend() *v14.Spend { - if x, ok := m.GetAction().(*Action_Spend); ok { - return x.Spend - } - return nil -} - -func (m *Action) GetOutput() *v14.Output { - if x, ok := m.GetAction().(*Action_Output); ok { - return x.Output - } - return nil -} - -func (m *Action) GetSwap() *v15.Swap { - if x, ok := m.GetAction().(*Action_Swap); ok { - return x.Swap - } - return nil -} - -func (m *Action) GetSwapClaim() *v15.SwapClaim { - if x, ok := m.GetAction().(*Action_SwapClaim); ok { - return x.SwapClaim - } - return nil -} - -func (m *Action) GetValidatorDefinition() *v16.ValidatorDefinition { - if x, ok := m.GetAction().(*Action_ValidatorDefinition); ok { - return x.ValidatorDefinition - } - return nil -} - -func (m *Action) GetIbcRelayAction() *v17.IbcRelay { - if x, ok := m.GetAction().(*Action_IbcRelayAction); ok { - return x.IbcRelayAction - } - return nil -} - -func (m *Action) GetProposalSubmit() *v18.ProposalSubmit { - if x, ok := m.GetAction().(*Action_ProposalSubmit); ok { - return x.ProposalSubmit - } - return nil -} - -func (m *Action) GetProposalWithdraw() *v18.ProposalWithdraw { - if x, ok := m.GetAction().(*Action_ProposalWithdraw); ok { - return x.ProposalWithdraw - } - return nil -} - -func (m *Action) GetValidatorVote() *v18.ValidatorVote { - if x, ok := m.GetAction().(*Action_ValidatorVote); ok { - return x.ValidatorVote - } - return nil -} - -func (m *Action) GetDelegatorVote() *v18.DelegatorVote { - if x, ok := m.GetAction().(*Action_DelegatorVote); ok { - return x.DelegatorVote - } - return nil -} - -func (m *Action) GetProposalDepositClaim() *v18.ProposalDepositClaim { - if x, ok := m.GetAction().(*Action_ProposalDepositClaim); ok { - return x.ProposalDepositClaim - } - return nil -} - -func (m *Action) GetPositionOpen() *v15.PositionOpen { - if x, ok := m.GetAction().(*Action_PositionOpen); ok { - return x.PositionOpen - } - return nil -} - -func (m *Action) GetPositionClose() *v15.PositionClose { - if x, ok := m.GetAction().(*Action_PositionClose); ok { - return x.PositionClose - } - return nil -} - -func (m *Action) GetPositionWithdraw() *v15.PositionWithdraw { - if x, ok := m.GetAction().(*Action_PositionWithdraw); ok { - return x.PositionWithdraw - } - return nil -} - -// Deprecated: Do not use. -func (m *Action) GetPositionRewardClaim() *v15.PositionRewardClaim { - if x, ok := m.GetAction().(*Action_PositionRewardClaim); ok { - return x.PositionRewardClaim - } - return nil -} - -func (m *Action) GetDelegate() *v16.Delegate { - if x, ok := m.GetAction().(*Action_Delegate); ok { - return x.Delegate - } - return nil -} - -func (m *Action) GetUndelegate() *v16.Undelegate { - if x, ok := m.GetAction().(*Action_Undelegate); ok { - return x.Undelegate - } - return nil -} - -func (m *Action) GetUndelegateClaim() *v16.UndelegateClaim { - if x, ok := m.GetAction().(*Action_UndelegateClaim); ok { - return x.UndelegateClaim - } - return nil -} - -func (m *Action) GetCommunityPoolSpend() *v18.CommunityPoolSpend { - if x, ok := m.GetAction().(*Action_CommunityPoolSpend); ok { - return x.CommunityPoolSpend - } - return nil -} - -func (m *Action) GetCommunityPoolOutput() *v18.CommunityPoolOutput { - if x, ok := m.GetAction().(*Action_CommunityPoolOutput); ok { - return x.CommunityPoolOutput - } - return nil -} - -func (m *Action) GetCommunityPoolDeposit() *v18.CommunityPoolDeposit { - if x, ok := m.GetAction().(*Action_CommunityPoolDeposit); ok { - return x.CommunityPoolDeposit - } - return nil -} - -func (m *Action) GetActionDutchAuctionSchedule() *v19.ActionDutchAuctionSchedule { - if x, ok := m.GetAction().(*Action_ActionDutchAuctionSchedule); ok { - return x.ActionDutchAuctionSchedule - } - return nil -} - -func (m *Action) GetActionDutchAuctionEnd() *v19.ActionDutchAuctionEnd { - if x, ok := m.GetAction().(*Action_ActionDutchAuctionEnd); ok { - return x.ActionDutchAuctionEnd - } - return nil -} - -func (m *Action) GetActionDutchAuctionWithdraw() *v19.ActionDutchAuctionWithdraw { - if x, ok := m.GetAction().(*Action_ActionDutchAuctionWithdraw); ok { - return x.ActionDutchAuctionWithdraw - } - return nil -} - -func (m *Action) GetIcs20Withdrawal() *v17.Ics20Withdrawal { - if x, ok := m.GetAction().(*Action_Ics20Withdrawal); ok { - return x.Ics20Withdrawal - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Action) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Action_Spend)(nil), - (*Action_Output)(nil), - (*Action_Swap)(nil), - (*Action_SwapClaim)(nil), - (*Action_ValidatorDefinition)(nil), - (*Action_IbcRelayAction)(nil), - (*Action_ProposalSubmit)(nil), - (*Action_ProposalWithdraw)(nil), - (*Action_ValidatorVote)(nil), - (*Action_DelegatorVote)(nil), - (*Action_ProposalDepositClaim)(nil), - (*Action_PositionOpen)(nil), - (*Action_PositionClose)(nil), - (*Action_PositionWithdraw)(nil), - (*Action_PositionRewardClaim)(nil), - (*Action_Delegate)(nil), - (*Action_Undelegate)(nil), - (*Action_UndelegateClaim)(nil), - (*Action_CommunityPoolSpend)(nil), - (*Action_CommunityPoolOutput)(nil), - (*Action_CommunityPoolDeposit)(nil), - (*Action_ActionDutchAuctionSchedule)(nil), - (*Action_ActionDutchAuctionEnd)(nil), - (*Action_ActionDutchAuctionWithdraw)(nil), - (*Action_Ics20Withdrawal)(nil), - } -} - -// A transaction perspective is a bundle of key material and commitment openings -// that allow generating a view of a transaction from that perspective. -type TransactionPerspective struct { - PayloadKeys []*PayloadKeyWithCommitment `protobuf:"bytes,1,rep,name=payload_keys,json=payloadKeys,proto3" json:"payload_keys,omitempty"` - SpendNullifiers []*NullifierWithNote `protobuf:"bytes,2,rep,name=spend_nullifiers,json=spendNullifiers,proto3" json:"spend_nullifiers,omitempty"` - // The openings of note commitments referred to in the transaction - // but not included in the transaction. - AdviceNotes []*v14.Note `protobuf:"bytes,3,rep,name=advice_notes,json=adviceNotes,proto3" json:"advice_notes,omitempty"` - // Any relevant address views. - AddressViews []*v110.AddressView `protobuf:"bytes,4,rep,name=address_views,json=addressViews,proto3" json:"address_views,omitempty"` - // Any relevant denoms for viewed assets. - Denoms []*v111.Metadata `protobuf:"bytes,5,rep,name=denoms,proto3" json:"denoms,omitempty"` - // The transaction ID associated with this TransactionPerspective - TransactionId *v112.TransactionId `protobuf:"bytes,6,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` - // Any relevant estimated prices - Prices []*v111.EstimatedPrice `protobuf:"bytes,20,rep,name=prices,proto3" json:"prices,omitempty"` - // Any relevant extended metadata, indexed by asset id. - ExtendedMetadata []*TransactionPerspective_ExtendedMetadataById `protobuf:"bytes,30,rep,name=extended_metadata,json=extendedMetadata,proto3" json:"extended_metadata,omitempty"` - CreationTransactionIdsByNullifier []*TransactionPerspective_CreationTransactionIdByNullifier `protobuf:"bytes,40,rep,name=creation_transaction_ids_by_nullifier,json=creationTransactionIdsByNullifier,proto3" json:"creation_transaction_ids_by_nullifier,omitempty"` - NullificationTransactionIdsByCommitment []*TransactionPerspective_NullificationTransactionIdByCommitment `protobuf:"bytes,50,rep,name=nullification_transaction_ids_by_commitment,json=nullificationTransactionIdsByCommitment,proto3" json:"nullification_transaction_ids_by_commitment,omitempty"` - // Any relevant BatchSwapOutputData to the transaction. - // - // This can be used to fill in information about swap outputs. - BatchSwapOutputData []*v15.BatchSwapOutputData `protobuf:"bytes,60,rep,name=batch_swap_output_data,json=batchSwapOutputData,proto3" json:"batch_swap_output_data,omitempty"` -} - -func (m *TransactionPerspective) Reset() { *m = TransactionPerspective{} } -func (m *TransactionPerspective) String() string { return proto.CompactTextString(m) } -func (*TransactionPerspective) ProtoMessage() {} -func (*TransactionPerspective) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{5} -} -func (m *TransactionPerspective) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPerspective) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPerspective.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 *TransactionPerspective) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPerspective.Merge(m, src) -} -func (m *TransactionPerspective) XXX_Size() int { - return m.Size() -} -func (m *TransactionPerspective) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPerspective.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPerspective proto.InternalMessageInfo - -func (m *TransactionPerspective) GetPayloadKeys() []*PayloadKeyWithCommitment { - if m != nil { - return m.PayloadKeys - } - return nil -} - -func (m *TransactionPerspective) GetSpendNullifiers() []*NullifierWithNote { - if m != nil { - return m.SpendNullifiers - } - return nil -} - -func (m *TransactionPerspective) GetAdviceNotes() []*v14.Note { - if m != nil { - return m.AdviceNotes - } - return nil -} - -func (m *TransactionPerspective) GetAddressViews() []*v110.AddressView { - if m != nil { - return m.AddressViews - } - return nil -} - -func (m *TransactionPerspective) GetDenoms() []*v111.Metadata { - if m != nil { - return m.Denoms - } - return nil -} - -func (m *TransactionPerspective) GetTransactionId() *v112.TransactionId { - if m != nil { - return m.TransactionId - } - return nil -} - -func (m *TransactionPerspective) GetPrices() []*v111.EstimatedPrice { - if m != nil { - return m.Prices - } - return nil -} - -func (m *TransactionPerspective) GetExtendedMetadata() []*TransactionPerspective_ExtendedMetadataById { - if m != nil { - return m.ExtendedMetadata - } - return nil -} - -func (m *TransactionPerspective) GetCreationTransactionIdsByNullifier() []*TransactionPerspective_CreationTransactionIdByNullifier { - if m != nil { - return m.CreationTransactionIdsByNullifier - } - return nil -} - -func (m *TransactionPerspective) GetNullificationTransactionIdsByCommitment() []*TransactionPerspective_NullificationTransactionIdByCommitment { - if m != nil { - return m.NullificationTransactionIdsByCommitment - } - return nil -} - -func (m *TransactionPerspective) GetBatchSwapOutputData() []*v15.BatchSwapOutputData { - if m != nil { - return m.BatchSwapOutputData - } - return nil -} - -type TransactionPerspective_ExtendedMetadataById struct { - AssetId *v111.AssetId `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - ExtendedMetadata *types.Any `protobuf:"bytes,2,opt,name=extended_metadata,json=extendedMetadata,proto3" json:"extended_metadata,omitempty"` -} - -func (m *TransactionPerspective_ExtendedMetadataById) Reset() { - *m = TransactionPerspective_ExtendedMetadataById{} -} -func (m *TransactionPerspective_ExtendedMetadataById) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPerspective_ExtendedMetadataById) ProtoMessage() {} -func (*TransactionPerspective_ExtendedMetadataById) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{5, 0} -} -func (m *TransactionPerspective_ExtendedMetadataById) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPerspective_ExtendedMetadataById) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPerspective_ExtendedMetadataById.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 *TransactionPerspective_ExtendedMetadataById) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPerspective_ExtendedMetadataById.Merge(m, src) -} -func (m *TransactionPerspective_ExtendedMetadataById) XXX_Size() int { - return m.Size() -} -func (m *TransactionPerspective_ExtendedMetadataById) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPerspective_ExtendedMetadataById.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPerspective_ExtendedMetadataById proto.InternalMessageInfo - -func (m *TransactionPerspective_ExtendedMetadataById) GetAssetId() *v111.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -func (m *TransactionPerspective_ExtendedMetadataById) GetExtendedMetadata() *types.Any { - if m != nil { - return m.ExtendedMetadata - } - return nil -} - -// Associates a nullifier with the transaction ID that created the nullified state commitment. -// -// Note: this is _not_ the transaction ID that revealed the nullifier. -// -// Allows walking backwards from a spend to the transaction that created the note. -type TransactionPerspective_CreationTransactionIdByNullifier struct { - Nullifier *v113.Nullifier `protobuf:"bytes,1,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - TransactionId *v112.TransactionId `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` -} - -func (m *TransactionPerspective_CreationTransactionIdByNullifier) Reset() { - *m = TransactionPerspective_CreationTransactionIdByNullifier{} -} -func (m *TransactionPerspective_CreationTransactionIdByNullifier) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPerspective_CreationTransactionIdByNullifier) ProtoMessage() {} -func (*TransactionPerspective_CreationTransactionIdByNullifier) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{5, 1} -} -func (m *TransactionPerspective_CreationTransactionIdByNullifier) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPerspective_CreationTransactionIdByNullifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPerspective_CreationTransactionIdByNullifier.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 *TransactionPerspective_CreationTransactionIdByNullifier) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPerspective_CreationTransactionIdByNullifier.Merge(m, src) -} -func (m *TransactionPerspective_CreationTransactionIdByNullifier) XXX_Size() int { - return m.Size() -} -func (m *TransactionPerspective_CreationTransactionIdByNullifier) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPerspective_CreationTransactionIdByNullifier.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPerspective_CreationTransactionIdByNullifier proto.InternalMessageInfo - -func (m *TransactionPerspective_CreationTransactionIdByNullifier) GetNullifier() *v113.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *TransactionPerspective_CreationTransactionIdByNullifier) GetTransactionId() *v112.TransactionId { - if m != nil { - return m.TransactionId - } - return nil -} - -// Associates a commitment with the transaction ID that eventually nullified it. -// -// Allows walking forwards from an output to the transaction that spent the note. -type TransactionPerspective_NullificationTransactionIdByCommitment struct { - Commitment *v11.StateCommitment `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` - TransactionId *v112.TransactionId `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` -} - -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) Reset() { - *m = TransactionPerspective_NullificationTransactionIdByCommitment{} -} -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPerspective_NullificationTransactionIdByCommitment) ProtoMessage() {} -func (*TransactionPerspective_NullificationTransactionIdByCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{5, 2} -} -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPerspective_NullificationTransactionIdByCommitment.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 *TransactionPerspective_NullificationTransactionIdByCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPerspective_NullificationTransactionIdByCommitment.Merge(m, src) -} -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) XXX_Size() int { - return m.Size() -} -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPerspective_NullificationTransactionIdByCommitment.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPerspective_NullificationTransactionIdByCommitment proto.InternalMessageInfo - -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) GetCommitment() *v11.StateCommitment { - if m != nil { - return m.Commitment - } - return nil -} - -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) GetTransactionId() *v112.TransactionId { - if m != nil { - return m.TransactionId - } - return nil -} - -type PayloadKeyWithCommitment struct { - PayloadKey *v110.PayloadKey `protobuf:"bytes,1,opt,name=payload_key,json=payloadKey,proto3" json:"payload_key,omitempty"` - Commitment *v11.StateCommitment `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"` -} - -func (m *PayloadKeyWithCommitment) Reset() { *m = PayloadKeyWithCommitment{} } -func (m *PayloadKeyWithCommitment) String() string { return proto.CompactTextString(m) } -func (*PayloadKeyWithCommitment) ProtoMessage() {} -func (*PayloadKeyWithCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{6} -} -func (m *PayloadKeyWithCommitment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PayloadKeyWithCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PayloadKeyWithCommitment.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 *PayloadKeyWithCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_PayloadKeyWithCommitment.Merge(m, src) -} -func (m *PayloadKeyWithCommitment) XXX_Size() int { - return m.Size() -} -func (m *PayloadKeyWithCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_PayloadKeyWithCommitment.DiscardUnknown(m) -} - -var xxx_messageInfo_PayloadKeyWithCommitment proto.InternalMessageInfo - -func (m *PayloadKeyWithCommitment) GetPayloadKey() *v110.PayloadKey { - if m != nil { - return m.PayloadKey - } - return nil -} - -func (m *PayloadKeyWithCommitment) GetCommitment() *v11.StateCommitment { - if m != nil { - return m.Commitment - } - return nil -} - -type NullifierWithNote struct { - Nullifier *v113.Nullifier `protobuf:"bytes,1,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - Note *v14.Note `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` -} - -func (m *NullifierWithNote) Reset() { *m = NullifierWithNote{} } -func (m *NullifierWithNote) String() string { return proto.CompactTextString(m) } -func (*NullifierWithNote) ProtoMessage() {} -func (*NullifierWithNote) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{7} -} -func (m *NullifierWithNote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NullifierWithNote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NullifierWithNote.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 *NullifierWithNote) XXX_Merge(src proto.Message) { - xxx_messageInfo_NullifierWithNote.Merge(m, src) -} -func (m *NullifierWithNote) XXX_Size() int { - return m.Size() -} -func (m *NullifierWithNote) XXX_DiscardUnknown() { - xxx_messageInfo_NullifierWithNote.DiscardUnknown(m) -} - -var xxx_messageInfo_NullifierWithNote proto.InternalMessageInfo - -func (m *NullifierWithNote) GetNullifier() *v113.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *NullifierWithNote) GetNote() *v14.Note { - if m != nil { - return m.Note - } - return nil -} - -// View of a Penumbra transaction. -type TransactionView struct { - // View of the transaction body - BodyView *TransactionBodyView `protobuf:"bytes,1,opt,name=body_view,json=bodyView,proto3" json:"body_view,omitempty"` - // The binding signature is stored separately from the transaction body that it signs. - BindingSig *v1.BindingSignature `protobuf:"bytes,2,opt,name=binding_sig,json=bindingSig,proto3" json:"binding_sig,omitempty"` - // The root of some previous state of the state commitment tree, used as an anchor for all - // ZK state transition proofs. - Anchor *v11.MerkleRoot `protobuf:"bytes,3,opt,name=anchor,proto3" json:"anchor,omitempty"` -} - -func (m *TransactionView) Reset() { *m = TransactionView{} } -func (m *TransactionView) String() string { return proto.CompactTextString(m) } -func (*TransactionView) ProtoMessage() {} -func (*TransactionView) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{8} -} -func (m *TransactionView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionView.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 *TransactionView) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionView.Merge(m, src) -} -func (m *TransactionView) XXX_Size() int { - return m.Size() -} -func (m *TransactionView) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionView.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionView proto.InternalMessageInfo - -func (m *TransactionView) GetBodyView() *TransactionBodyView { - if m != nil { - return m.BodyView - } - return nil -} - -func (m *TransactionView) GetBindingSig() *v1.BindingSignature { - if m != nil { - return m.BindingSig - } - return nil -} - -func (m *TransactionView) GetAnchor() *v11.MerkleRoot { - if m != nil { - return m.Anchor - } - return nil -} - -type TransactionBodyView struct { - // A list views into of actions (state changes) performed by this transaction. - ActionViews []*ActionView `protobuf:"bytes,1,rep,name=action_views,json=actionViews,proto3" json:"action_views,omitempty"` - // Transaction parameters. - TransactionParameters *TransactionParameters `protobuf:"bytes,2,opt,name=transaction_parameters,json=transactionParameters,proto3" json:"transaction_parameters,omitempty"` - // The detection data in this transaction, only populated if - // there are outputs in the actions of this transaction. - DetectionData *DetectionData `protobuf:"bytes,4,opt,name=detection_data,json=detectionData,proto3" json:"detection_data,omitempty"` - // An optional view of a transaction memo. It will only be populated if there are - // outputs in the actions of this transaction. - MemoView *MemoView `protobuf:"bytes,5,opt,name=memo_view,json=memoView,proto3" json:"memo_view,omitempty"` -} - -func (m *TransactionBodyView) Reset() { *m = TransactionBodyView{} } -func (m *TransactionBodyView) String() string { return proto.CompactTextString(m) } -func (*TransactionBodyView) ProtoMessage() {} -func (*TransactionBodyView) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{9} -} -func (m *TransactionBodyView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionBodyView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionBodyView.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 *TransactionBodyView) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionBodyView.Merge(m, src) -} -func (m *TransactionBodyView) XXX_Size() int { - return m.Size() -} -func (m *TransactionBodyView) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionBodyView.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionBodyView proto.InternalMessageInfo - -func (m *TransactionBodyView) GetActionViews() []*ActionView { - if m != nil { - return m.ActionViews - } - return nil -} - -func (m *TransactionBodyView) GetTransactionParameters() *TransactionParameters { - if m != nil { - return m.TransactionParameters - } - return nil -} - -func (m *TransactionBodyView) GetDetectionData() *DetectionData { - if m != nil { - return m.DetectionData - } - return nil -} - -func (m *TransactionBodyView) GetMemoView() *MemoView { - if m != nil { - return m.MemoView - } - return nil -} - -// A view of a specific state change action performed by a transaction. -type ActionView struct { - // Types that are valid to be assigned to ActionView: - // *ActionView_Spend - // *ActionView_Output - // *ActionView_Swap - // *ActionView_SwapClaim - // *ActionView_DelegatorVote - // *ActionView_ValidatorDefinition - // *ActionView_IbcRelayAction - // *ActionView_ProposalSubmit - // *ActionView_ProposalWithdraw - // *ActionView_ValidatorVote - // *ActionView_ProposalDepositClaim - // *ActionView_PositionOpen - // *ActionView_PositionClose - // *ActionView_PositionWithdraw - // *ActionView_PositionRewardClaim - // *ActionView_Delegate - // *ActionView_Undelegate - // *ActionView_CommunityPoolSpend - // *ActionView_CommunityPoolOutput - // *ActionView_CommunityPoolDeposit - // *ActionView_ActionDutchAuctionSchedule - // *ActionView_ActionDutchAuctionEnd - // *ActionView_ActionDutchAuctionWithdraw - // *ActionView_UndelegateClaim - // *ActionView_Ics20Withdrawal - ActionView isActionView_ActionView `protobuf_oneof:"action_view"` -} - -func (m *ActionView) Reset() { *m = ActionView{} } -func (m *ActionView) String() string { return proto.CompactTextString(m) } -func (*ActionView) ProtoMessage() {} -func (*ActionView) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{10} -} -func (m *ActionView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionView.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 *ActionView) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionView.Merge(m, src) -} -func (m *ActionView) XXX_Size() int { - return m.Size() -} -func (m *ActionView) XXX_DiscardUnknown() { - xxx_messageInfo_ActionView.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionView proto.InternalMessageInfo - -type isActionView_ActionView interface { - isActionView_ActionView() - MarshalTo([]byte) (int, error) - Size() int -} - -type ActionView_Spend struct { - Spend *v14.SpendView `protobuf:"bytes,1,opt,name=spend,proto3,oneof" json:"spend,omitempty"` -} -type ActionView_Output struct { - Output *v14.OutputView `protobuf:"bytes,2,opt,name=output,proto3,oneof" json:"output,omitempty"` -} -type ActionView_Swap struct { - Swap *v15.SwapView `protobuf:"bytes,3,opt,name=swap,proto3,oneof" json:"swap,omitempty"` -} -type ActionView_SwapClaim struct { - SwapClaim *v15.SwapClaimView `protobuf:"bytes,4,opt,name=swap_claim,json=swapClaim,proto3,oneof" json:"swap_claim,omitempty"` -} -type ActionView_DelegatorVote struct { - DelegatorVote *v18.DelegatorVoteView `protobuf:"bytes,21,opt,name=delegator_vote,json=delegatorVote,proto3,oneof" json:"delegator_vote,omitempty"` -} -type ActionView_ValidatorDefinition struct { - ValidatorDefinition *v16.ValidatorDefinition `protobuf:"bytes,16,opt,name=validator_definition,json=validatorDefinition,proto3,oneof" json:"validator_definition,omitempty"` -} -type ActionView_IbcRelayAction struct { - IbcRelayAction *v17.IbcRelay `protobuf:"bytes,17,opt,name=ibc_relay_action,json=ibcRelayAction,proto3,oneof" json:"ibc_relay_action,omitempty"` -} -type ActionView_ProposalSubmit struct { - ProposalSubmit *v18.ProposalSubmit `protobuf:"bytes,18,opt,name=proposal_submit,json=proposalSubmit,proto3,oneof" json:"proposal_submit,omitempty"` -} -type ActionView_ProposalWithdraw struct { - ProposalWithdraw *v18.ProposalWithdraw `protobuf:"bytes,19,opt,name=proposal_withdraw,json=proposalWithdraw,proto3,oneof" json:"proposal_withdraw,omitempty"` -} -type ActionView_ValidatorVote struct { - ValidatorVote *v18.ValidatorVote `protobuf:"bytes,20,opt,name=validator_vote,json=validatorVote,proto3,oneof" json:"validator_vote,omitempty"` -} -type ActionView_ProposalDepositClaim struct { - ProposalDepositClaim *v18.ProposalDepositClaim `protobuf:"bytes,22,opt,name=proposal_deposit_claim,json=proposalDepositClaim,proto3,oneof" json:"proposal_deposit_claim,omitempty"` -} -type ActionView_PositionOpen struct { - PositionOpen *v15.PositionOpen `protobuf:"bytes,30,opt,name=position_open,json=positionOpen,proto3,oneof" json:"position_open,omitempty"` -} -type ActionView_PositionClose struct { - PositionClose *v15.PositionClose `protobuf:"bytes,31,opt,name=position_close,json=positionClose,proto3,oneof" json:"position_close,omitempty"` -} -type ActionView_PositionWithdraw struct { - PositionWithdraw *v15.PositionWithdraw `protobuf:"bytes,32,opt,name=position_withdraw,json=positionWithdraw,proto3,oneof" json:"position_withdraw,omitempty"` -} -type ActionView_PositionRewardClaim struct { - PositionRewardClaim *v15.PositionRewardClaim `protobuf:"bytes,34,opt,name=position_reward_claim,json=positionRewardClaim,proto3,oneof" json:"position_reward_claim,omitempty"` -} -type ActionView_Delegate struct { - Delegate *v16.Delegate `protobuf:"bytes,41,opt,name=delegate,proto3,oneof" json:"delegate,omitempty"` -} -type ActionView_Undelegate struct { - Undelegate *v16.Undelegate `protobuf:"bytes,42,opt,name=undelegate,proto3,oneof" json:"undelegate,omitempty"` -} -type ActionView_CommunityPoolSpend struct { - CommunityPoolSpend *v18.CommunityPoolSpend `protobuf:"bytes,50,opt,name=community_pool_spend,json=communityPoolSpend,proto3,oneof" json:"community_pool_spend,omitempty"` -} -type ActionView_CommunityPoolOutput struct { - CommunityPoolOutput *v18.CommunityPoolOutput `protobuf:"bytes,51,opt,name=community_pool_output,json=communityPoolOutput,proto3,oneof" json:"community_pool_output,omitempty"` -} -type ActionView_CommunityPoolDeposit struct { - CommunityPoolDeposit *v18.CommunityPoolDeposit `protobuf:"bytes,52,opt,name=community_pool_deposit,json=communityPoolDeposit,proto3,oneof" json:"community_pool_deposit,omitempty"` -} -type ActionView_ActionDutchAuctionSchedule struct { - ActionDutchAuctionSchedule *v19.ActionDutchAuctionScheduleView `protobuf:"bytes,53,opt,name=action_dutch_auction_schedule,json=actionDutchAuctionSchedule,proto3,oneof" json:"action_dutch_auction_schedule,omitempty"` -} -type ActionView_ActionDutchAuctionEnd struct { - ActionDutchAuctionEnd *v19.ActionDutchAuctionEnd `protobuf:"bytes,54,opt,name=action_dutch_auction_end,json=actionDutchAuctionEnd,proto3,oneof" json:"action_dutch_auction_end,omitempty"` -} -type ActionView_ActionDutchAuctionWithdraw struct { - ActionDutchAuctionWithdraw *v19.ActionDutchAuctionWithdrawView `protobuf:"bytes,55,opt,name=action_dutch_auction_withdraw,json=actionDutchAuctionWithdraw,proto3,oneof" json:"action_dutch_auction_withdraw,omitempty"` -} -type ActionView_UndelegateClaim struct { - UndelegateClaim *v16.UndelegateClaim `protobuf:"bytes,43,opt,name=undelegate_claim,json=undelegateClaim,proto3,oneof" json:"undelegate_claim,omitempty"` -} -type ActionView_Ics20Withdrawal struct { - Ics20Withdrawal *v17.Ics20Withdrawal `protobuf:"bytes,200,opt,name=ics20_withdrawal,json=ics20Withdrawal,proto3,oneof" json:"ics20_withdrawal,omitempty"` -} - -func (*ActionView_Spend) isActionView_ActionView() {} -func (*ActionView_Output) isActionView_ActionView() {} -func (*ActionView_Swap) isActionView_ActionView() {} -func (*ActionView_SwapClaim) isActionView_ActionView() {} -func (*ActionView_DelegatorVote) isActionView_ActionView() {} -func (*ActionView_ValidatorDefinition) isActionView_ActionView() {} -func (*ActionView_IbcRelayAction) isActionView_ActionView() {} -func (*ActionView_ProposalSubmit) isActionView_ActionView() {} -func (*ActionView_ProposalWithdraw) isActionView_ActionView() {} -func (*ActionView_ValidatorVote) isActionView_ActionView() {} -func (*ActionView_ProposalDepositClaim) isActionView_ActionView() {} -func (*ActionView_PositionOpen) isActionView_ActionView() {} -func (*ActionView_PositionClose) isActionView_ActionView() {} -func (*ActionView_PositionWithdraw) isActionView_ActionView() {} -func (*ActionView_PositionRewardClaim) isActionView_ActionView() {} -func (*ActionView_Delegate) isActionView_ActionView() {} -func (*ActionView_Undelegate) isActionView_ActionView() {} -func (*ActionView_CommunityPoolSpend) isActionView_ActionView() {} -func (*ActionView_CommunityPoolOutput) isActionView_ActionView() {} -func (*ActionView_CommunityPoolDeposit) isActionView_ActionView() {} -func (*ActionView_ActionDutchAuctionSchedule) isActionView_ActionView() {} -func (*ActionView_ActionDutchAuctionEnd) isActionView_ActionView() {} -func (*ActionView_ActionDutchAuctionWithdraw) isActionView_ActionView() {} -func (*ActionView_UndelegateClaim) isActionView_ActionView() {} -func (*ActionView_Ics20Withdrawal) isActionView_ActionView() {} - -func (m *ActionView) GetActionView() isActionView_ActionView { - if m != nil { - return m.ActionView - } - return nil -} - -func (m *ActionView) GetSpend() *v14.SpendView { - if x, ok := m.GetActionView().(*ActionView_Spend); ok { - return x.Spend - } - return nil -} - -func (m *ActionView) GetOutput() *v14.OutputView { - if x, ok := m.GetActionView().(*ActionView_Output); ok { - return x.Output - } - return nil -} - -func (m *ActionView) GetSwap() *v15.SwapView { - if x, ok := m.GetActionView().(*ActionView_Swap); ok { - return x.Swap - } - return nil -} - -func (m *ActionView) GetSwapClaim() *v15.SwapClaimView { - if x, ok := m.GetActionView().(*ActionView_SwapClaim); ok { - return x.SwapClaim - } - return nil -} - -func (m *ActionView) GetDelegatorVote() *v18.DelegatorVoteView { - if x, ok := m.GetActionView().(*ActionView_DelegatorVote); ok { - return x.DelegatorVote - } - return nil -} - -func (m *ActionView) GetValidatorDefinition() *v16.ValidatorDefinition { - if x, ok := m.GetActionView().(*ActionView_ValidatorDefinition); ok { - return x.ValidatorDefinition - } - return nil -} - -func (m *ActionView) GetIbcRelayAction() *v17.IbcRelay { - if x, ok := m.GetActionView().(*ActionView_IbcRelayAction); ok { - return x.IbcRelayAction - } - return nil -} - -func (m *ActionView) GetProposalSubmit() *v18.ProposalSubmit { - if x, ok := m.GetActionView().(*ActionView_ProposalSubmit); ok { - return x.ProposalSubmit - } - return nil -} - -func (m *ActionView) GetProposalWithdraw() *v18.ProposalWithdraw { - if x, ok := m.GetActionView().(*ActionView_ProposalWithdraw); ok { - return x.ProposalWithdraw - } - return nil -} - -func (m *ActionView) GetValidatorVote() *v18.ValidatorVote { - if x, ok := m.GetActionView().(*ActionView_ValidatorVote); ok { - return x.ValidatorVote - } - return nil -} - -func (m *ActionView) GetProposalDepositClaim() *v18.ProposalDepositClaim { - if x, ok := m.GetActionView().(*ActionView_ProposalDepositClaim); ok { - return x.ProposalDepositClaim - } - return nil -} - -func (m *ActionView) GetPositionOpen() *v15.PositionOpen { - if x, ok := m.GetActionView().(*ActionView_PositionOpen); ok { - return x.PositionOpen - } - return nil -} - -func (m *ActionView) GetPositionClose() *v15.PositionClose { - if x, ok := m.GetActionView().(*ActionView_PositionClose); ok { - return x.PositionClose - } - return nil -} - -func (m *ActionView) GetPositionWithdraw() *v15.PositionWithdraw { - if x, ok := m.GetActionView().(*ActionView_PositionWithdraw); ok { - return x.PositionWithdraw - } - return nil -} - -// Deprecated: Do not use. -func (m *ActionView) GetPositionRewardClaim() *v15.PositionRewardClaim { - if x, ok := m.GetActionView().(*ActionView_PositionRewardClaim); ok { - return x.PositionRewardClaim - } - return nil -} - -func (m *ActionView) GetDelegate() *v16.Delegate { - if x, ok := m.GetActionView().(*ActionView_Delegate); ok { - return x.Delegate - } - return nil -} - -func (m *ActionView) GetUndelegate() *v16.Undelegate { - if x, ok := m.GetActionView().(*ActionView_Undelegate); ok { - return x.Undelegate - } - return nil -} - -func (m *ActionView) GetCommunityPoolSpend() *v18.CommunityPoolSpend { - if x, ok := m.GetActionView().(*ActionView_CommunityPoolSpend); ok { - return x.CommunityPoolSpend - } - return nil -} - -func (m *ActionView) GetCommunityPoolOutput() *v18.CommunityPoolOutput { - if x, ok := m.GetActionView().(*ActionView_CommunityPoolOutput); ok { - return x.CommunityPoolOutput - } - return nil -} - -func (m *ActionView) GetCommunityPoolDeposit() *v18.CommunityPoolDeposit { - if x, ok := m.GetActionView().(*ActionView_CommunityPoolDeposit); ok { - return x.CommunityPoolDeposit - } - return nil -} - -func (m *ActionView) GetActionDutchAuctionSchedule() *v19.ActionDutchAuctionScheduleView { - if x, ok := m.GetActionView().(*ActionView_ActionDutchAuctionSchedule); ok { - return x.ActionDutchAuctionSchedule - } - return nil -} - -func (m *ActionView) GetActionDutchAuctionEnd() *v19.ActionDutchAuctionEnd { - if x, ok := m.GetActionView().(*ActionView_ActionDutchAuctionEnd); ok { - return x.ActionDutchAuctionEnd - } - return nil -} - -func (m *ActionView) GetActionDutchAuctionWithdraw() *v19.ActionDutchAuctionWithdrawView { - if x, ok := m.GetActionView().(*ActionView_ActionDutchAuctionWithdraw); ok { - return x.ActionDutchAuctionWithdraw - } - return nil -} - -func (m *ActionView) GetUndelegateClaim() *v16.UndelegateClaim { - if x, ok := m.GetActionView().(*ActionView_UndelegateClaim); ok { - return x.UndelegateClaim - } - return nil -} - -func (m *ActionView) GetIcs20Withdrawal() *v17.Ics20Withdrawal { - if x, ok := m.GetActionView().(*ActionView_Ics20Withdrawal); ok { - return x.Ics20Withdrawal - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ActionView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ActionView_Spend)(nil), - (*ActionView_Output)(nil), - (*ActionView_Swap)(nil), - (*ActionView_SwapClaim)(nil), - (*ActionView_DelegatorVote)(nil), - (*ActionView_ValidatorDefinition)(nil), - (*ActionView_IbcRelayAction)(nil), - (*ActionView_ProposalSubmit)(nil), - (*ActionView_ProposalWithdraw)(nil), - (*ActionView_ValidatorVote)(nil), - (*ActionView_ProposalDepositClaim)(nil), - (*ActionView_PositionOpen)(nil), - (*ActionView_PositionClose)(nil), - (*ActionView_PositionWithdraw)(nil), - (*ActionView_PositionRewardClaim)(nil), - (*ActionView_Delegate)(nil), - (*ActionView_Undelegate)(nil), - (*ActionView_CommunityPoolSpend)(nil), - (*ActionView_CommunityPoolOutput)(nil), - (*ActionView_CommunityPoolDeposit)(nil), - (*ActionView_ActionDutchAuctionSchedule)(nil), - (*ActionView_ActionDutchAuctionEnd)(nil), - (*ActionView_ActionDutchAuctionWithdraw)(nil), - (*ActionView_UndelegateClaim)(nil), - (*ActionView_Ics20Withdrawal)(nil), - } -} - -// The data required to authorize a transaction plan. -type AuthorizationData struct { - // The computed auth hash for the approved transaction plan. - EffectHash *v112.EffectHash `protobuf:"bytes,1,opt,name=effect_hash,json=effectHash,proto3" json:"effect_hash,omitempty"` - // The required spend authorizations, returned in the same order as the - // Spend actions in the original request. - SpendAuths []*v1.SpendAuthSignature `protobuf:"bytes,2,rep,name=spend_auths,json=spendAuths,proto3" json:"spend_auths,omitempty"` - // The required delegator vote authorizations, returned in the same order as the - // DelegatorVote actions in the original request. - DelegatorVoteAuths []*v1.SpendAuthSignature `protobuf:"bytes,3,rep,name=delegator_vote_auths,json=delegatorVoteAuths,proto3" json:"delegator_vote_auths,omitempty"` -} - -func (m *AuthorizationData) Reset() { *m = AuthorizationData{} } -func (m *AuthorizationData) String() string { return proto.CompactTextString(m) } -func (*AuthorizationData) ProtoMessage() {} -func (*AuthorizationData) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{11} -} -func (m *AuthorizationData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizationData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizationData.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 *AuthorizationData) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizationData.Merge(m, src) -} -func (m *AuthorizationData) XXX_Size() int { - return m.Size() -} -func (m *AuthorizationData) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizationData.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizationData proto.InternalMessageInfo - -func (m *AuthorizationData) GetEffectHash() *v112.EffectHash { - if m != nil { - return m.EffectHash - } - return nil -} - -func (m *AuthorizationData) GetSpendAuths() []*v1.SpendAuthSignature { - if m != nil { - return m.SpendAuths - } - return nil -} - -func (m *AuthorizationData) GetDelegatorVoteAuths() []*v1.SpendAuthSignature { - if m != nil { - return m.DelegatorVoteAuths - } - return nil -} - -// The data required for proving when building a transaction from a plan. -type WitnessData struct { - // The anchor for the state transition proofs. - Anchor *v11.MerkleRoot `protobuf:"bytes,1,opt,name=anchor,proto3" json:"anchor,omitempty"` - // The auth paths for the notes the transaction spends, in the - // same order as the spends in the transaction plan. - StateCommitmentProofs []*v11.StateCommitmentProof `protobuf:"bytes,2,rep,name=state_commitment_proofs,json=stateCommitmentProofs,proto3" json:"state_commitment_proofs,omitempty"` -} - -func (m *WitnessData) Reset() { *m = WitnessData{} } -func (m *WitnessData) String() string { return proto.CompactTextString(m) } -func (*WitnessData) ProtoMessage() {} -func (*WitnessData) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{12} -} -func (m *WitnessData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WitnessData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WitnessData.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 *WitnessData) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessData.Merge(m, src) -} -func (m *WitnessData) XXX_Size() int { - return m.Size() -} -func (m *WitnessData) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessData.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessData proto.InternalMessageInfo - -func (m *WitnessData) GetAnchor() *v11.MerkleRoot { - if m != nil { - return m.Anchor - } - return nil -} - -func (m *WitnessData) GetStateCommitmentProofs() []*v11.StateCommitmentProof { - if m != nil { - return m.StateCommitmentProofs - } - return nil -} - -// Describes a planned transaction. Permits clients to prepare a transaction -// prior submission, so that a user can review it prior to authorizing its execution. -// -// The `TransactionPlan` is a fully determined bundle binding all of a transaction's effects. -// The only thing it does not include is the witness data used for proving. -type TransactionPlan struct { - // The sequence of actions planned for this transaction. - Actions []*ActionPlan `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` - // Parameters determining if a transaction should be accepted by this chain. - TransactionParameters *TransactionParameters `protobuf:"bytes,2,opt,name=transaction_parameters,json=transactionParameters,proto3" json:"transaction_parameters,omitempty"` - // Detection data for use with Fuzzy Message Detection - DetectionData *DetectionDataPlan `protobuf:"bytes,4,opt,name=detection_data,json=detectionData,proto3" json:"detection_data,omitempty"` - // The memo plan for this transaction. - Memo *MemoPlan `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` -} - -func (m *TransactionPlan) Reset() { *m = TransactionPlan{} } -func (m *TransactionPlan) String() string { return proto.CompactTextString(m) } -func (*TransactionPlan) ProtoMessage() {} -func (*TransactionPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{13} -} -func (m *TransactionPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlan.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 *TransactionPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlan.Merge(m, src) -} -func (m *TransactionPlan) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlan) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlan proto.InternalMessageInfo - -func (m *TransactionPlan) GetActions() []*ActionPlan { - if m != nil { - return m.Actions - } - return nil -} - -func (m *TransactionPlan) GetTransactionParameters() *TransactionParameters { - if m != nil { - return m.TransactionParameters - } - return nil -} - -func (m *TransactionPlan) GetDetectionData() *DetectionDataPlan { - if m != nil { - return m.DetectionData - } - return nil -} - -func (m *TransactionPlan) GetMemo() *MemoPlan { - if m != nil { - return m.Memo - } - return nil -} - -type DetectionDataPlan struct { - CluePlans []*CluePlan `protobuf:"bytes,5,rep,name=clue_plans,json=cluePlans,proto3" json:"clue_plans,omitempty"` -} - -func (m *DetectionDataPlan) Reset() { *m = DetectionDataPlan{} } -func (m *DetectionDataPlan) String() string { return proto.CompactTextString(m) } -func (*DetectionDataPlan) ProtoMessage() {} -func (*DetectionDataPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{14} -} -func (m *DetectionDataPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DetectionDataPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DetectionDataPlan.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 *DetectionDataPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_DetectionDataPlan.Merge(m, src) -} -func (m *DetectionDataPlan) XXX_Size() int { - return m.Size() -} -func (m *DetectionDataPlan) XXX_DiscardUnknown() { - xxx_messageInfo_DetectionDataPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_DetectionDataPlan proto.InternalMessageInfo - -func (m *DetectionDataPlan) GetCluePlans() []*CluePlan { - if m != nil { - return m.CluePlans - } - return nil -} - -// Describes a planned transaction action. -// -// Some transaction Actions don't have any private data and are treated as being plans -// themselves. -type ActionPlan struct { - // Types that are valid to be assigned to Action: - // - // *ActionPlan_Spend - // *ActionPlan_Output - // *ActionPlan_Swap - // *ActionPlan_SwapClaim - // *ActionPlan_ValidatorDefinition - // *ActionPlan_IbcRelayAction - // *ActionPlan_ProposalSubmit - // *ActionPlan_ProposalWithdraw - // *ActionPlan_ValidatorVote - // *ActionPlan_DelegatorVote - // *ActionPlan_ProposalDepositClaim - // *ActionPlan_Ics20Withdrawal - // *ActionPlan_PositionOpen - // *ActionPlan_PositionClose - // *ActionPlan_PositionWithdraw - // *ActionPlan_PositionRewardClaim - // *ActionPlan_Delegate - // *ActionPlan_Undelegate - // *ActionPlan_UndelegateClaim - // *ActionPlan_CommunityPoolSpend - // *ActionPlan_CommunityPoolOutput - // *ActionPlan_CommunityPoolDeposit - // *ActionPlan_ActionDutchAuctionSchedule - // *ActionPlan_ActionDutchAuctionEnd - // *ActionPlan_ActionDutchAuctionWithdraw - Action isActionPlan_Action `protobuf_oneof:"action"` -} - -func (m *ActionPlan) Reset() { *m = ActionPlan{} } -func (m *ActionPlan) String() string { return proto.CompactTextString(m) } -func (*ActionPlan) ProtoMessage() {} -func (*ActionPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{15} -} -func (m *ActionPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionPlan.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 *ActionPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionPlan.Merge(m, src) -} -func (m *ActionPlan) XXX_Size() int { - return m.Size() -} -func (m *ActionPlan) XXX_DiscardUnknown() { - xxx_messageInfo_ActionPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionPlan proto.InternalMessageInfo - -type isActionPlan_Action interface { - isActionPlan_Action() - MarshalTo([]byte) (int, error) - Size() int -} - -type ActionPlan_Spend struct { - Spend *v14.SpendPlan `protobuf:"bytes,1,opt,name=spend,proto3,oneof" json:"spend,omitempty"` -} -type ActionPlan_Output struct { - Output *v14.OutputPlan `protobuf:"bytes,2,opt,name=output,proto3,oneof" json:"output,omitempty"` -} -type ActionPlan_Swap struct { - Swap *v15.SwapPlan `protobuf:"bytes,3,opt,name=swap,proto3,oneof" json:"swap,omitempty"` -} -type ActionPlan_SwapClaim struct { - SwapClaim *v15.SwapClaimPlan `protobuf:"bytes,4,opt,name=swap_claim,json=swapClaim,proto3,oneof" json:"swap_claim,omitempty"` -} -type ActionPlan_ValidatorDefinition struct { - ValidatorDefinition *v16.ValidatorDefinition `protobuf:"bytes,16,opt,name=validator_definition,json=validatorDefinition,proto3,oneof" json:"validator_definition,omitempty"` -} -type ActionPlan_IbcRelayAction struct { - IbcRelayAction *v17.IbcRelay `protobuf:"bytes,17,opt,name=ibc_relay_action,json=ibcRelayAction,proto3,oneof" json:"ibc_relay_action,omitempty"` -} -type ActionPlan_ProposalSubmit struct { - ProposalSubmit *v18.ProposalSubmit `protobuf:"bytes,18,opt,name=proposal_submit,json=proposalSubmit,proto3,oneof" json:"proposal_submit,omitempty"` -} -type ActionPlan_ProposalWithdraw struct { - ProposalWithdraw *v18.ProposalWithdraw `protobuf:"bytes,19,opt,name=proposal_withdraw,json=proposalWithdraw,proto3,oneof" json:"proposal_withdraw,omitempty"` -} -type ActionPlan_ValidatorVote struct { - ValidatorVote *v18.ValidatorVote `protobuf:"bytes,20,opt,name=validator_vote,json=validatorVote,proto3,oneof" json:"validator_vote,omitempty"` -} -type ActionPlan_DelegatorVote struct { - DelegatorVote *v18.DelegatorVotePlan `protobuf:"bytes,21,opt,name=delegator_vote,json=delegatorVote,proto3,oneof" json:"delegator_vote,omitempty"` -} -type ActionPlan_ProposalDepositClaim struct { - ProposalDepositClaim *v18.ProposalDepositClaim `protobuf:"bytes,22,opt,name=proposal_deposit_claim,json=proposalDepositClaim,proto3,oneof" json:"proposal_deposit_claim,omitempty"` -} -type ActionPlan_Ics20Withdrawal struct { - Ics20Withdrawal *v17.Ics20Withdrawal `protobuf:"bytes,200,opt,name=ics20_withdrawal,json=ics20Withdrawal,proto3,oneof" json:"ics20_withdrawal,omitempty"` -} -type ActionPlan_PositionOpen struct { - PositionOpen *v15.PositionOpen `protobuf:"bytes,30,opt,name=position_open,json=positionOpen,proto3,oneof" json:"position_open,omitempty"` -} -type ActionPlan_PositionClose struct { - PositionClose *v15.PositionClose `protobuf:"bytes,31,opt,name=position_close,json=positionClose,proto3,oneof" json:"position_close,omitempty"` -} -type ActionPlan_PositionWithdraw struct { - PositionWithdraw *v15.PositionWithdrawPlan `protobuf:"bytes,32,opt,name=position_withdraw,json=positionWithdraw,proto3,oneof" json:"position_withdraw,omitempty"` -} -type ActionPlan_PositionRewardClaim struct { - PositionRewardClaim *v15.PositionRewardClaimPlan `protobuf:"bytes,34,opt,name=position_reward_claim,json=positionRewardClaim,proto3,oneof" json:"position_reward_claim,omitempty"` -} -type ActionPlan_Delegate struct { - Delegate *v16.Delegate `protobuf:"bytes,40,opt,name=delegate,proto3,oneof" json:"delegate,omitempty"` -} -type ActionPlan_Undelegate struct { - Undelegate *v16.Undelegate `protobuf:"bytes,41,opt,name=undelegate,proto3,oneof" json:"undelegate,omitempty"` -} -type ActionPlan_UndelegateClaim struct { - UndelegateClaim *v16.UndelegateClaimPlan `protobuf:"bytes,42,opt,name=undelegate_claim,json=undelegateClaim,proto3,oneof" json:"undelegate_claim,omitempty"` -} -type ActionPlan_CommunityPoolSpend struct { - CommunityPoolSpend *v18.CommunityPoolSpend `protobuf:"bytes,50,opt,name=community_pool_spend,json=communityPoolSpend,proto3,oneof" json:"community_pool_spend,omitempty"` -} -type ActionPlan_CommunityPoolOutput struct { - CommunityPoolOutput *v18.CommunityPoolOutput `protobuf:"bytes,51,opt,name=community_pool_output,json=communityPoolOutput,proto3,oneof" json:"community_pool_output,omitempty"` -} -type ActionPlan_CommunityPoolDeposit struct { - CommunityPoolDeposit *v18.CommunityPoolDeposit `protobuf:"bytes,52,opt,name=community_pool_deposit,json=communityPoolDeposit,proto3,oneof" json:"community_pool_deposit,omitempty"` -} -type ActionPlan_ActionDutchAuctionSchedule struct { - ActionDutchAuctionSchedule *v19.ActionDutchAuctionSchedule `protobuf:"bytes,53,opt,name=action_dutch_auction_schedule,json=actionDutchAuctionSchedule,proto3,oneof" json:"action_dutch_auction_schedule,omitempty"` -} -type ActionPlan_ActionDutchAuctionEnd struct { - ActionDutchAuctionEnd *v19.ActionDutchAuctionEnd `protobuf:"bytes,54,opt,name=action_dutch_auction_end,json=actionDutchAuctionEnd,proto3,oneof" json:"action_dutch_auction_end,omitempty"` -} -type ActionPlan_ActionDutchAuctionWithdraw struct { - ActionDutchAuctionWithdraw *v19.ActionDutchAuctionWithdrawPlan `protobuf:"bytes,55,opt,name=action_dutch_auction_withdraw,json=actionDutchAuctionWithdraw,proto3,oneof" json:"action_dutch_auction_withdraw,omitempty"` -} - -func (*ActionPlan_Spend) isActionPlan_Action() {} -func (*ActionPlan_Output) isActionPlan_Action() {} -func (*ActionPlan_Swap) isActionPlan_Action() {} -func (*ActionPlan_SwapClaim) isActionPlan_Action() {} -func (*ActionPlan_ValidatorDefinition) isActionPlan_Action() {} -func (*ActionPlan_IbcRelayAction) isActionPlan_Action() {} -func (*ActionPlan_ProposalSubmit) isActionPlan_Action() {} -func (*ActionPlan_ProposalWithdraw) isActionPlan_Action() {} -func (*ActionPlan_ValidatorVote) isActionPlan_Action() {} -func (*ActionPlan_DelegatorVote) isActionPlan_Action() {} -func (*ActionPlan_ProposalDepositClaim) isActionPlan_Action() {} -func (*ActionPlan_Ics20Withdrawal) isActionPlan_Action() {} -func (*ActionPlan_PositionOpen) isActionPlan_Action() {} -func (*ActionPlan_PositionClose) isActionPlan_Action() {} -func (*ActionPlan_PositionWithdraw) isActionPlan_Action() {} -func (*ActionPlan_PositionRewardClaim) isActionPlan_Action() {} -func (*ActionPlan_Delegate) isActionPlan_Action() {} -func (*ActionPlan_Undelegate) isActionPlan_Action() {} -func (*ActionPlan_UndelegateClaim) isActionPlan_Action() {} -func (*ActionPlan_CommunityPoolSpend) isActionPlan_Action() {} -func (*ActionPlan_CommunityPoolOutput) isActionPlan_Action() {} -func (*ActionPlan_CommunityPoolDeposit) isActionPlan_Action() {} -func (*ActionPlan_ActionDutchAuctionSchedule) isActionPlan_Action() {} -func (*ActionPlan_ActionDutchAuctionEnd) isActionPlan_Action() {} -func (*ActionPlan_ActionDutchAuctionWithdraw) isActionPlan_Action() {} - -func (m *ActionPlan) GetAction() isActionPlan_Action { - if m != nil { - return m.Action - } - return nil -} - -func (m *ActionPlan) GetSpend() *v14.SpendPlan { - if x, ok := m.GetAction().(*ActionPlan_Spend); ok { - return x.Spend - } - return nil -} - -func (m *ActionPlan) GetOutput() *v14.OutputPlan { - if x, ok := m.GetAction().(*ActionPlan_Output); ok { - return x.Output - } - return nil -} - -func (m *ActionPlan) GetSwap() *v15.SwapPlan { - if x, ok := m.GetAction().(*ActionPlan_Swap); ok { - return x.Swap - } - return nil -} - -func (m *ActionPlan) GetSwapClaim() *v15.SwapClaimPlan { - if x, ok := m.GetAction().(*ActionPlan_SwapClaim); ok { - return x.SwapClaim - } - return nil -} - -func (m *ActionPlan) GetValidatorDefinition() *v16.ValidatorDefinition { - if x, ok := m.GetAction().(*ActionPlan_ValidatorDefinition); ok { - return x.ValidatorDefinition - } - return nil -} - -func (m *ActionPlan) GetIbcRelayAction() *v17.IbcRelay { - if x, ok := m.GetAction().(*ActionPlan_IbcRelayAction); ok { - return x.IbcRelayAction - } - return nil -} - -func (m *ActionPlan) GetProposalSubmit() *v18.ProposalSubmit { - if x, ok := m.GetAction().(*ActionPlan_ProposalSubmit); ok { - return x.ProposalSubmit - } - return nil -} - -func (m *ActionPlan) GetProposalWithdraw() *v18.ProposalWithdraw { - if x, ok := m.GetAction().(*ActionPlan_ProposalWithdraw); ok { - return x.ProposalWithdraw - } - return nil -} - -func (m *ActionPlan) GetValidatorVote() *v18.ValidatorVote { - if x, ok := m.GetAction().(*ActionPlan_ValidatorVote); ok { - return x.ValidatorVote - } - return nil -} - -func (m *ActionPlan) GetDelegatorVote() *v18.DelegatorVotePlan { - if x, ok := m.GetAction().(*ActionPlan_DelegatorVote); ok { - return x.DelegatorVote - } - return nil -} - -func (m *ActionPlan) GetProposalDepositClaim() *v18.ProposalDepositClaim { - if x, ok := m.GetAction().(*ActionPlan_ProposalDepositClaim); ok { - return x.ProposalDepositClaim - } - return nil -} - -func (m *ActionPlan) GetIcs20Withdrawal() *v17.Ics20Withdrawal { - if x, ok := m.GetAction().(*ActionPlan_Ics20Withdrawal); ok { - return x.Ics20Withdrawal - } - return nil -} - -func (m *ActionPlan) GetPositionOpen() *v15.PositionOpen { - if x, ok := m.GetAction().(*ActionPlan_PositionOpen); ok { - return x.PositionOpen - } - return nil -} - -func (m *ActionPlan) GetPositionClose() *v15.PositionClose { - if x, ok := m.GetAction().(*ActionPlan_PositionClose); ok { - return x.PositionClose - } - return nil -} - -func (m *ActionPlan) GetPositionWithdraw() *v15.PositionWithdrawPlan { - if x, ok := m.GetAction().(*ActionPlan_PositionWithdraw); ok { - return x.PositionWithdraw - } - return nil -} - -// Deprecated: Do not use. -func (m *ActionPlan) GetPositionRewardClaim() *v15.PositionRewardClaimPlan { - if x, ok := m.GetAction().(*ActionPlan_PositionRewardClaim); ok { - return x.PositionRewardClaim - } - return nil -} - -func (m *ActionPlan) GetDelegate() *v16.Delegate { - if x, ok := m.GetAction().(*ActionPlan_Delegate); ok { - return x.Delegate - } - return nil -} - -func (m *ActionPlan) GetUndelegate() *v16.Undelegate { - if x, ok := m.GetAction().(*ActionPlan_Undelegate); ok { - return x.Undelegate - } - return nil -} - -func (m *ActionPlan) GetUndelegateClaim() *v16.UndelegateClaimPlan { - if x, ok := m.GetAction().(*ActionPlan_UndelegateClaim); ok { - return x.UndelegateClaim - } - return nil -} - -func (m *ActionPlan) GetCommunityPoolSpend() *v18.CommunityPoolSpend { - if x, ok := m.GetAction().(*ActionPlan_CommunityPoolSpend); ok { - return x.CommunityPoolSpend - } - return nil -} - -func (m *ActionPlan) GetCommunityPoolOutput() *v18.CommunityPoolOutput { - if x, ok := m.GetAction().(*ActionPlan_CommunityPoolOutput); ok { - return x.CommunityPoolOutput - } - return nil -} - -func (m *ActionPlan) GetCommunityPoolDeposit() *v18.CommunityPoolDeposit { - if x, ok := m.GetAction().(*ActionPlan_CommunityPoolDeposit); ok { - return x.CommunityPoolDeposit - } - return nil -} - -func (m *ActionPlan) GetActionDutchAuctionSchedule() *v19.ActionDutchAuctionSchedule { - if x, ok := m.GetAction().(*ActionPlan_ActionDutchAuctionSchedule); ok { - return x.ActionDutchAuctionSchedule - } - return nil -} - -func (m *ActionPlan) GetActionDutchAuctionEnd() *v19.ActionDutchAuctionEnd { - if x, ok := m.GetAction().(*ActionPlan_ActionDutchAuctionEnd); ok { - return x.ActionDutchAuctionEnd - } - return nil -} - -func (m *ActionPlan) GetActionDutchAuctionWithdraw() *v19.ActionDutchAuctionWithdrawPlan { - if x, ok := m.GetAction().(*ActionPlan_ActionDutchAuctionWithdraw); ok { - return x.ActionDutchAuctionWithdraw - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ActionPlan) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ActionPlan_Spend)(nil), - (*ActionPlan_Output)(nil), - (*ActionPlan_Swap)(nil), - (*ActionPlan_SwapClaim)(nil), - (*ActionPlan_ValidatorDefinition)(nil), - (*ActionPlan_IbcRelayAction)(nil), - (*ActionPlan_ProposalSubmit)(nil), - (*ActionPlan_ProposalWithdraw)(nil), - (*ActionPlan_ValidatorVote)(nil), - (*ActionPlan_DelegatorVote)(nil), - (*ActionPlan_ProposalDepositClaim)(nil), - (*ActionPlan_Ics20Withdrawal)(nil), - (*ActionPlan_PositionOpen)(nil), - (*ActionPlan_PositionClose)(nil), - (*ActionPlan_PositionWithdraw)(nil), - (*ActionPlan_PositionRewardClaim)(nil), - (*ActionPlan_Delegate)(nil), - (*ActionPlan_Undelegate)(nil), - (*ActionPlan_UndelegateClaim)(nil), - (*ActionPlan_CommunityPoolSpend)(nil), - (*ActionPlan_CommunityPoolOutput)(nil), - (*ActionPlan_CommunityPoolDeposit)(nil), - (*ActionPlan_ActionDutchAuctionSchedule)(nil), - (*ActionPlan_ActionDutchAuctionEnd)(nil), - (*ActionPlan_ActionDutchAuctionWithdraw)(nil), - } -} - -// Describes a plan for forming a `Clue`. -type CluePlan struct { - // The address. - Address *v110.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The random seed to use for the clue plan. - Rseed []byte `protobuf:"bytes,2,opt,name=rseed,proto3" json:"rseed,omitempty"` - // The bits of precision. - PrecisionBits uint64 `protobuf:"varint,3,opt,name=precision_bits,json=precisionBits,proto3" json:"precision_bits,omitempty"` -} - -func (m *CluePlan) Reset() { *m = CluePlan{} } -func (m *CluePlan) String() string { return proto.CompactTextString(m) } -func (*CluePlan) ProtoMessage() {} -func (*CluePlan) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{16} -} -func (m *CluePlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CluePlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CluePlan.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 *CluePlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_CluePlan.Merge(m, src) -} -func (m *CluePlan) XXX_Size() int { - return m.Size() -} -func (m *CluePlan) XXX_DiscardUnknown() { - xxx_messageInfo_CluePlan.DiscardUnknown(m) -} - -var xxx_messageInfo_CluePlan proto.InternalMessageInfo - -func (m *CluePlan) GetAddress() *v110.Address { - if m != nil { - return m.Address - } - return nil -} - -func (m *CluePlan) GetRseed() []byte { - if m != nil { - return m.Rseed - } - return nil -} - -func (m *CluePlan) GetPrecisionBits() uint64 { - if m != nil { - return m.PrecisionBits - } - return 0 -} - -// Describes a plan for forming the transaction memo. -type MemoPlan struct { - // The plaintext. - Plaintext *MemoPlaintext `protobuf:"bytes,1,opt,name=plaintext,proto3" json:"plaintext,omitempty"` - // The key to use to encrypt the memo. - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` -} - -func (m *MemoPlan) Reset() { *m = MemoPlan{} } -func (m *MemoPlan) String() string { return proto.CompactTextString(m) } -func (*MemoPlan) ProtoMessage() {} -func (*MemoPlan) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{17} -} -func (m *MemoPlan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemoPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemoPlan.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 *MemoPlan) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemoPlan.Merge(m, src) -} -func (m *MemoPlan) XXX_Size() int { - return m.Size() -} -func (m *MemoPlan) XXX_DiscardUnknown() { - xxx_messageInfo_MemoPlan.DiscardUnknown(m) -} - -var xxx_messageInfo_MemoPlan proto.InternalMessageInfo - -func (m *MemoPlan) GetPlaintext() *MemoPlaintext { - if m != nil { - return m.Plaintext - } - return nil -} - -func (m *MemoPlan) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -// The encrypted memo data describing information about the purpose of a transaction. -type MemoCiphertext struct { - // The encrypted data. 528 bytes. - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *MemoCiphertext) Reset() { *m = MemoCiphertext{} } -func (m *MemoCiphertext) String() string { return proto.CompactTextString(m) } -func (*MemoCiphertext) ProtoMessage() {} -func (*MemoCiphertext) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{18} -} -func (m *MemoCiphertext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemoCiphertext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemoCiphertext.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 *MemoCiphertext) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemoCiphertext.Merge(m, src) -} -func (m *MemoCiphertext) XXX_Size() int { - return m.Size() -} -func (m *MemoCiphertext) XXX_DiscardUnknown() { - xxx_messageInfo_MemoCiphertext.DiscardUnknown(m) -} - -var xxx_messageInfo_MemoCiphertext proto.InternalMessageInfo - -func (m *MemoCiphertext) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// The plaintext describing information about the purpose of a transaction. -type MemoPlaintext struct { - // The sender's return address. - // - // This should always be a valid address; the sender is responsible for ensuring - // that if the receiver returns funds to this address, they will not be lost. - ReturnAddress *v110.Address `protobuf:"bytes,1,opt,name=return_address,json=returnAddress,proto3" json:"return_address,omitempty"` - // Free-form text, up to 432 bytes long. - Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` -} - -func (m *MemoPlaintext) Reset() { *m = MemoPlaintext{} } -func (m *MemoPlaintext) String() string { return proto.CompactTextString(m) } -func (*MemoPlaintext) ProtoMessage() {} -func (*MemoPlaintext) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{19} -} -func (m *MemoPlaintext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemoPlaintext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemoPlaintext.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 *MemoPlaintext) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemoPlaintext.Merge(m, src) -} -func (m *MemoPlaintext) XXX_Size() int { - return m.Size() -} -func (m *MemoPlaintext) XXX_DiscardUnknown() { - xxx_messageInfo_MemoPlaintext.DiscardUnknown(m) -} - -var xxx_messageInfo_MemoPlaintext proto.InternalMessageInfo - -func (m *MemoPlaintext) GetReturnAddress() *v110.Address { - if m != nil { - return m.ReturnAddress - } - return nil -} - -func (m *MemoPlaintext) GetText() string { - if m != nil { - return m.Text - } - return "" -} - -type MemoPlaintextView struct { - ReturnAddress *v110.AddressView `protobuf:"bytes,1,opt,name=return_address,json=returnAddress,proto3" json:"return_address,omitempty"` - Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` -} - -func (m *MemoPlaintextView) Reset() { *m = MemoPlaintextView{} } -func (m *MemoPlaintextView) String() string { return proto.CompactTextString(m) } -func (*MemoPlaintextView) ProtoMessage() {} -func (*MemoPlaintextView) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{20} -} -func (m *MemoPlaintextView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemoPlaintextView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemoPlaintextView.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 *MemoPlaintextView) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemoPlaintextView.Merge(m, src) -} -func (m *MemoPlaintextView) XXX_Size() int { - return m.Size() -} -func (m *MemoPlaintextView) XXX_DiscardUnknown() { - xxx_messageInfo_MemoPlaintextView.DiscardUnknown(m) -} - -var xxx_messageInfo_MemoPlaintextView proto.InternalMessageInfo - -func (m *MemoPlaintextView) GetReturnAddress() *v110.AddressView { - if m != nil { - return m.ReturnAddress - } - return nil -} - -func (m *MemoPlaintextView) GetText() string { - if m != nil { - return m.Text - } - return "" -} - -type MemoView struct { - // Types that are valid to be assigned to MemoView: - // - // *MemoView_Visible_ - // *MemoView_Opaque_ - MemoView isMemoView_MemoView `protobuf_oneof:"memo_view"` -} - -func (m *MemoView) Reset() { *m = MemoView{} } -func (m *MemoView) String() string { return proto.CompactTextString(m) } -func (*MemoView) ProtoMessage() {} -func (*MemoView) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{21} -} -func (m *MemoView) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemoView) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemoView.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 *MemoView) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemoView.Merge(m, src) -} -func (m *MemoView) XXX_Size() int { - return m.Size() -} -func (m *MemoView) XXX_DiscardUnknown() { - xxx_messageInfo_MemoView.DiscardUnknown(m) -} - -var xxx_messageInfo_MemoView proto.InternalMessageInfo - -type isMemoView_MemoView interface { - isMemoView_MemoView() - MarshalTo([]byte) (int, error) - Size() int -} - -type MemoView_Visible_ struct { - Visible *MemoView_Visible `protobuf:"bytes,1,opt,name=visible,proto3,oneof" json:"visible,omitempty"` -} -type MemoView_Opaque_ struct { - Opaque *MemoView_Opaque `protobuf:"bytes,2,opt,name=opaque,proto3,oneof" json:"opaque,omitempty"` -} - -func (*MemoView_Visible_) isMemoView_MemoView() {} -func (*MemoView_Opaque_) isMemoView_MemoView() {} - -func (m *MemoView) GetMemoView() isMemoView_MemoView { - if m != nil { - return m.MemoView - } - return nil -} - -func (m *MemoView) GetVisible() *MemoView_Visible { - if x, ok := m.GetMemoView().(*MemoView_Visible_); ok { - return x.Visible - } - return nil -} - -func (m *MemoView) GetOpaque() *MemoView_Opaque { - if x, ok := m.GetMemoView().(*MemoView_Opaque_); ok { - return x.Opaque - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*MemoView) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*MemoView_Visible_)(nil), - (*MemoView_Opaque_)(nil), - } -} - -type MemoView_Visible struct { - Ciphertext *MemoCiphertext `protobuf:"bytes,1,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` - Plaintext *MemoPlaintextView `protobuf:"bytes,2,opt,name=plaintext,proto3" json:"plaintext,omitempty"` -} - -func (m *MemoView_Visible) Reset() { *m = MemoView_Visible{} } -func (m *MemoView_Visible) String() string { return proto.CompactTextString(m) } -func (*MemoView_Visible) ProtoMessage() {} -func (*MemoView_Visible) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{21, 0} -} -func (m *MemoView_Visible) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemoView_Visible) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemoView_Visible.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 *MemoView_Visible) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemoView_Visible.Merge(m, src) -} -func (m *MemoView_Visible) XXX_Size() int { - return m.Size() -} -func (m *MemoView_Visible) XXX_DiscardUnknown() { - xxx_messageInfo_MemoView_Visible.DiscardUnknown(m) -} - -var xxx_messageInfo_MemoView_Visible proto.InternalMessageInfo - -func (m *MemoView_Visible) GetCiphertext() *MemoCiphertext { - if m != nil { - return m.Ciphertext - } - return nil -} - -func (m *MemoView_Visible) GetPlaintext() *MemoPlaintextView { - if m != nil { - return m.Plaintext - } - return nil -} - -type MemoView_Opaque struct { - Ciphertext *MemoCiphertext `protobuf:"bytes,1,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` -} - -func (m *MemoView_Opaque) Reset() { *m = MemoView_Opaque{} } -func (m *MemoView_Opaque) String() string { return proto.CompactTextString(m) } -func (*MemoView_Opaque) ProtoMessage() {} -func (*MemoView_Opaque) Descriptor() ([]byte, []int) { - return fileDescriptor_8b6c2b29a42813c9, []int{21, 1} -} -func (m *MemoView_Opaque) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MemoView_Opaque) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MemoView_Opaque.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 *MemoView_Opaque) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemoView_Opaque.Merge(m, src) -} -func (m *MemoView_Opaque) XXX_Size() int { - return m.Size() -} -func (m *MemoView_Opaque) XXX_DiscardUnknown() { - xxx_messageInfo_MemoView_Opaque.DiscardUnknown(m) -} - -var xxx_messageInfo_MemoView_Opaque proto.InternalMessageInfo - -func (m *MemoView_Opaque) GetCiphertext() *MemoCiphertext { - if m != nil { - return m.Ciphertext - } - return nil -} - -func init() { - proto.RegisterType((*Transaction)(nil), "penumbra.core.transaction.v1.Transaction") - proto.RegisterType((*TransactionBody)(nil), "penumbra.core.transaction.v1.TransactionBody") - proto.RegisterType((*TransactionParameters)(nil), "penumbra.core.transaction.v1.TransactionParameters") - proto.RegisterType((*DetectionData)(nil), "penumbra.core.transaction.v1.DetectionData") - proto.RegisterType((*Action)(nil), "penumbra.core.transaction.v1.Action") - proto.RegisterType((*TransactionPerspective)(nil), "penumbra.core.transaction.v1.TransactionPerspective") - proto.RegisterType((*TransactionPerspective_ExtendedMetadataById)(nil), "penumbra.core.transaction.v1.TransactionPerspective.ExtendedMetadataById") - proto.RegisterType((*TransactionPerspective_CreationTransactionIdByNullifier)(nil), "penumbra.core.transaction.v1.TransactionPerspective.CreationTransactionIdByNullifier") - proto.RegisterType((*TransactionPerspective_NullificationTransactionIdByCommitment)(nil), "penumbra.core.transaction.v1.TransactionPerspective.NullificationTransactionIdByCommitment") - proto.RegisterType((*PayloadKeyWithCommitment)(nil), "penumbra.core.transaction.v1.PayloadKeyWithCommitment") - proto.RegisterType((*NullifierWithNote)(nil), "penumbra.core.transaction.v1.NullifierWithNote") - proto.RegisterType((*TransactionView)(nil), "penumbra.core.transaction.v1.TransactionView") - proto.RegisterType((*TransactionBodyView)(nil), "penumbra.core.transaction.v1.TransactionBodyView") - proto.RegisterType((*ActionView)(nil), "penumbra.core.transaction.v1.ActionView") - proto.RegisterType((*AuthorizationData)(nil), "penumbra.core.transaction.v1.AuthorizationData") - proto.RegisterType((*WitnessData)(nil), "penumbra.core.transaction.v1.WitnessData") - proto.RegisterType((*TransactionPlan)(nil), "penumbra.core.transaction.v1.TransactionPlan") - proto.RegisterType((*DetectionDataPlan)(nil), "penumbra.core.transaction.v1.DetectionDataPlan") - proto.RegisterType((*ActionPlan)(nil), "penumbra.core.transaction.v1.ActionPlan") - proto.RegisterType((*CluePlan)(nil), "penumbra.core.transaction.v1.CluePlan") - proto.RegisterType((*MemoPlan)(nil), "penumbra.core.transaction.v1.MemoPlan") - proto.RegisterType((*MemoCiphertext)(nil), "penumbra.core.transaction.v1.MemoCiphertext") - proto.RegisterType((*MemoPlaintext)(nil), "penumbra.core.transaction.v1.MemoPlaintext") - proto.RegisterType((*MemoPlaintextView)(nil), "penumbra.core.transaction.v1.MemoPlaintextView") - proto.RegisterType((*MemoView)(nil), "penumbra.core.transaction.v1.MemoView") - proto.RegisterType((*MemoView_Visible)(nil), "penumbra.core.transaction.v1.MemoView.Visible") - proto.RegisterType((*MemoView_Opaque)(nil), "penumbra.core.transaction.v1.MemoView.Opaque") -} - -func init() { - proto.RegisterFile("penumbra/core/transaction/v1/transaction.proto", fileDescriptor_8b6c2b29a42813c9) -} - -var fileDescriptor_8b6c2b29a42813c9 = []byte{ - // 2804 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0x27, 0x29, 0x59, 0x96, 0x1e, 0x25, 0x59, 0x1a, 0x49, 0xfe, 0x6e, 0x84, 0x7c, 0x15, 0x85, - 0x49, 0x1c, 0x25, 0x8e, 0xc9, 0x50, 0xb6, 0x63, 0x57, 0x09, 0x8c, 0x8a, 0x92, 0x6b, 0x2a, 0xa9, - 0x15, 0x75, 0x95, 0x28, 0x68, 0xea, 0x76, 0x3b, 0xdc, 0x1d, 0x8a, 0x1b, 0x2f, 0x77, 0x37, 0x3b, - 0xc3, 0x95, 0xd8, 0x5b, 0xd1, 0x43, 0x6e, 0x45, 0x0f, 0x2d, 0xd0, 0x43, 0x0f, 0x45, 0x0f, 0x0d, - 0x50, 0xa0, 0xe8, 0xb9, 0x3d, 0xb5, 0x68, 0x0f, 0x41, 0x4f, 0x01, 0x8a, 0x02, 0x3d, 0xb6, 0xce, - 0xa1, 0x40, 0x8f, 0xfd, 0x0b, 0x8a, 0x99, 0x9d, 0x5d, 0xee, 0x92, 0x5c, 0x91, 0xb4, 0x14, 0x34, - 0xa9, 0x75, 0xd2, 0xcc, 0xf0, 0x7d, 0x3e, 0xef, 0xcd, 0xcc, 0x9b, 0x1f, 0xef, 0xed, 0x08, 0x8a, - 0x2e, 0xb1, 0x5b, 0xcd, 0x9a, 0x87, 0x4b, 0xba, 0xe3, 0x91, 0x12, 0xf3, 0xb0, 0x4d, 0xb1, 0xce, - 0x4c, 0xc7, 0x2e, 0xf9, 0xe5, 0x78, 0xb5, 0xe8, 0x7a, 0x0e, 0x73, 0xd0, 0xd3, 0xa1, 0x7c, 0x91, - 0xcb, 0x17, 0xe3, 0x02, 0x7e, 0x79, 0xf9, 0xa9, 0x43, 0xc7, 0x39, 0xb4, 0x48, 0x49, 0xc8, 0xd6, - 0x5a, 0xf5, 0x12, 0xb6, 0xdb, 0x01, 0x70, 0xb9, 0x90, 0x54, 0x84, 0x29, 0x25, 0x8c, 0xab, 0x10, - 0x05, 0x29, 0xf3, 0x6a, 0x52, 0x46, 0x77, 0x9a, 0xae, 0x63, 0x13, 0x9b, 0x95, 0x70, 0x2b, 0x32, - 0x49, 0x16, 0x25, 0x62, 0x2d, 0x0d, 0x61, 0x90, 0x63, 0x2e, 0x6d, 0x90, 0xe3, 0x41, 0x92, 0x75, - 0x42, 0xb8, 0x64, 0x9d, 0x10, 0x29, 0xf9, 0x5a, 0x9a, 0xe4, 0xa1, 0xe3, 0x13, 0xcf, 0xc6, 0xb6, - 0x2e, 0x00, 0x9d, 0xda, 0x20, 0x0d, 0x66, 0x4d, 0xe7, 0x00, 0xb3, 0xa6, 0x0f, 0x92, 0xa4, 0xba, - 0x18, 0x13, 0xaa, 0x87, 0x23, 0xf2, 0x46, 0xaa, 0x64, 0xc3, 0x24, 0x96, 0x41, 0x0c, 0xcd, 0x75, - 0x1c, 0x4b, 0x60, 0xe2, 0x0d, 0x12, 0xfd, 0x4a, 0x2a, 0x9a, 0xe1, 0x87, 0xa2, 0x13, 0xa2, 0x20, - 0xa5, 0x57, 0x93, 0xd2, 0x0f, 0x49, 0x9b, 0x72, 0x11, 0xfe, 0x57, 0x4a, 0x3c, 0xdf, 0xe5, 0x2c, - 0xc7, 0x0d, 0x4c, 0x1b, 0xc2, 0x4f, 0x44, 0x49, 0x4a, 0xad, 0x77, 0xa4, 0xbc, 0xb6, 0xcb, 0x9c, - 0x92, 0x41, 0x74, 0x5c, 0xbf, 0x7e, 0xeb, 0x96, 0x56, 0x6f, 0x1a, 0xc1, 0xa4, 0x74, 0xea, 0x12, - 0x73, 0x23, 0x15, 0xe3, 0x19, 0x14, 0x27, 0x40, 0xbc, 0xa1, 0xd7, 0xe2, 0x00, 0xc5, 0x82, 0xf1, - 0x63, 0xe1, 0xf8, 0x15, 0xfe, 0x91, 0x85, 0xfc, 0x3b, 0x1d, 0x1f, 0x45, 0x9b, 0x30, 0x5e, 0x73, - 0x8c, 0xb6, 0x92, 0x5d, 0xcd, 0xae, 0xe5, 0xd7, 0xaf, 0x15, 0x4f, 0xf2, 0xe6, 0x62, 0x0c, 0x58, - 0x71, 0x8c, 0xb6, 0x2a, 0xa0, 0x68, 0x1f, 0xf2, 0x35, 0xd3, 0x36, 0x4c, 0xfb, 0x50, 0xa3, 0xe6, - 0xa1, 0x92, 0x13, 0x4c, 0xeb, 0x31, 0x26, 0x61, 0x4a, 0x31, 0x69, 0xaf, 0x5f, 0x2e, 0x56, 0x02, - 0xd0, 0xbe, 0x79, 0x68, 0x63, 0xd6, 0xf2, 0x88, 0x0a, 0xb5, 0xa8, 0x05, 0x6d, 0xc0, 0x04, 0xb6, - 0xf5, 0x86, 0xe3, 0x29, 0x63, 0x82, 0xaf, 0xd0, 0xc3, 0xc7, 0xfb, 0xe4, 0x97, 0x8b, 0xf7, 0x89, - 0xf7, 0xd0, 0x22, 0xaa, 0xe3, 0x30, 0x55, 0x22, 0x0a, 0x7f, 0xc9, 0xc1, 0xa5, 0x2e, 0x53, 0xd1, - 0x1d, 0xb8, 0x18, 0xd4, 0xa8, 0x92, 0x5d, 0x1d, 0x5b, 0xcb, 0xaf, 0x3f, 0x7f, 0x72, 0x57, 0x37, - 0x45, 0x49, 0x0d, 0x41, 0xe8, 0x03, 0xb8, 0x1c, 0x93, 0xd0, 0x5c, 0xec, 0xe1, 0x26, 0x61, 0xc4, - 0xa3, 0xb2, 0xbf, 0xd7, 0x87, 0x1e, 0xb9, 0xbd, 0x08, 0xaa, 0x2e, 0xb1, 0x7e, 0xcd, 0x48, 0x85, - 0x59, 0x83, 0x30, 0x12, 0x68, 0x32, 0x30, 0xc3, 0xca, 0xb8, 0xd0, 0x71, 0xf5, 0x64, 0x1d, 0xdb, - 0x21, 0x66, 0x1b, 0x33, 0xac, 0xce, 0x18, 0xf1, 0x2a, 0xfa, 0x2a, 0x8c, 0x37, 0x49, 0xd3, 0x51, - 0x2e, 0x08, 0xa6, 0x57, 0x4e, 0x66, 0xba, 0x4f, 0x9a, 0xce, 0x96, 0xe9, 0x36, 0x88, 0xc7, 0xc8, - 0x31, 0x53, 0x05, 0xb2, 0xf0, 0xc3, 0x2c, 0x2c, 0xf5, 0xed, 0x06, 0x7a, 0x0e, 0x66, 0xc8, 0xb1, - 0x6b, 0x7a, 0x6d, 0xad, 0x41, 0xcc, 0xc3, 0x06, 0x13, 0xce, 0x34, 0xae, 0x4e, 0x07, 0x8d, 0x55, - 0xd1, 0x86, 0x9e, 0x82, 0x49, 0xbd, 0x81, 0x4d, 0x5b, 0x33, 0x0d, 0x31, 0x64, 0x53, 0xea, 0x45, - 0x51, 0xdf, 0x31, 0xd0, 0x4d, 0x18, 0xab, 0x13, 0x22, 0x27, 0xfa, 0xb9, 0x2e, 0xd3, 0xa2, 0x35, - 0x5a, 0xe4, 0x1b, 0x92, 0x5f, 0x2e, 0x7e, 0x8d, 0x10, 0x95, 0xcb, 0x17, 0xf6, 0x61, 0x26, 0xd1, - 0x65, 0x54, 0x81, 0xa9, 0x7a, 0xd3, 0xd0, 0x74, 0xab, 0x45, 0xa8, 0x32, 0x2e, 0x66, 0xf9, 0x85, - 0x74, 0x37, 0xe4, 0x6b, 0xcd, 0x2f, 0x17, 0xb7, 0xac, 0x16, 0x51, 0x27, 0xeb, 0x4d, 0x83, 0x17, - 0x68, 0xe1, 0x67, 0x0b, 0x30, 0x11, 0xcc, 0x3d, 0xba, 0x07, 0x17, 0xa8, 0x4b, 0x6c, 0x43, 0xae, - 0x8d, 0x52, 0xaa, 0x61, 0xc9, 0x9d, 0xc6, 0x2f, 0x17, 0xf7, 0x39, 0xac, 0x9a, 0x51, 0x03, 0x3c, - 0x7a, 0x13, 0x26, 0x9c, 0x16, 0x73, 0x5b, 0x4c, 0xfa, 0xca, 0xab, 0xc3, 0x33, 0xbd, 0x2d, 0x70, - 0xd5, 0x8c, 0x2a, 0x19, 0xd0, 0x06, 0x8c, 0xd3, 0x23, 0xec, 0xca, 0xc1, 0x7a, 0x3e, 0x95, 0x89, - 0xef, 0xf3, 0xdc, 0x92, 0x23, 0xec, 0x56, 0x33, 0xaa, 0xc0, 0xa0, 0x37, 0x01, 0xf8, 0x5f, 0x4d, - 0xb7, 0xb0, 0xd9, 0x94, 0x3e, 0xf5, 0xd2, 0x30, 0x0c, 0x5b, 0x1c, 0x50, 0xcd, 0xa8, 0x53, 0x34, - 0xac, 0xa0, 0x0f, 0x60, 0xd1, 0xc7, 0x96, 0x69, 0x60, 0xe6, 0x78, 0x9a, 0x41, 0xea, 0xa6, 0x6d, - 0xf2, 0x41, 0x53, 0xe6, 0x04, 0xeb, 0xcd, 0xf4, 0x1e, 0x8a, 0xfd, 0xd5, 0x2f, 0x17, 0x0f, 0x42, - 0xf4, 0x76, 0x04, 0xae, 0x66, 0xd4, 0x05, 0xbf, 0xb7, 0x19, 0xbd, 0x03, 0x73, 0x66, 0x4d, 0xd7, - 0x3c, 0x62, 0xe1, 0xb6, 0x16, 0x78, 0x9f, 0x32, 0x2f, 0xf4, 0xac, 0xa5, 0xea, 0xe1, 0x67, 0x8b, - 0x5f, 0x2e, 0xee, 0xd4, 0x74, 0x95, 0xc3, 0xaa, 0x19, 0x75, 0xd6, 0x94, 0x65, 0x39, 0xbd, 0xdf, - 0x85, 0x4b, 0xae, 0xe7, 0xb8, 0x0e, 0xc5, 0x96, 0x46, 0x5b, 0xb5, 0xa6, 0xc9, 0x14, 0x34, 0xc0, - 0xf8, 0xd8, 0x09, 0xe7, 0x97, 0x8b, 0x7b, 0x12, 0xbd, 0x2f, 0xc0, 0x5c, 0x83, 0x9b, 0x68, 0x41, - 0x75, 0x98, 0x8f, 0x34, 0x1c, 0x99, 0xac, 0x61, 0x78, 0xf8, 0x48, 0x59, 0x10, 0x3a, 0x6e, 0x8d, - 0xa8, 0xe3, 0x3d, 0x09, 0xaf, 0x66, 0xd4, 0x39, 0xb7, 0xab, 0x0d, 0x7d, 0x1b, 0x66, 0x3b, 0x73, - 0xe1, 0x3b, 0x8c, 0x28, 0x8b, 0x42, 0xc9, 0x8d, 0x21, 0x95, 0x44, 0x53, 0x71, 0xe0, 0x30, 0x52, - 0xcd, 0xa8, 0x33, 0x7e, 0xbc, 0x81, 0xd3, 0x1b, 0xc4, 0x22, 0x87, 0x1d, 0xfa, 0xa5, 0x91, 0xe8, - 0xb7, 0x43, 0x70, 0x48, 0x6f, 0xc4, 0x1b, 0x10, 0x85, 0xcb, 0xd1, 0x28, 0x19, 0xc4, 0x75, 0xa8, - 0xc9, 0xa4, 0x87, 0x5e, 0x16, 0x6a, 0x5e, 0x1f, 0x71, 0xa8, 0xb6, 0x03, 0x8e, 0xd0, 0x67, 0x17, - 0xdd, 0x3e, 0xed, 0x68, 0x1f, 0x66, 0x44, 0x8d, 0xef, 0xb0, 0x8e, 0x4b, 0x6c, 0x65, 0xa5, 0xef, - 0xbe, 0xd8, 0xb3, 0x1a, 0xf6, 0x24, 0xe8, 0x6d, 0x97, 0x70, 0x77, 0x9d, 0x76, 0x63, 0x75, 0x74, - 0x00, 0xb3, 0x11, 0xa9, 0x6e, 0x39, 0x94, 0x28, 0xcf, 0xf4, 0x3d, 0x55, 0x53, 0x59, 0xb7, 0x38, - 0x88, 0x8f, 0x90, 0x1b, 0x6f, 0x40, 0x1a, 0xcc, 0x47, 0xbc, 0x91, 0x1f, 0xad, 0x0e, 0xd8, 0x4a, - 0xba, 0xa8, 0x13, 0x0e, 0xd4, 0xd5, 0x86, 0x9a, 0xb0, 0x14, 0x29, 0xf0, 0xc8, 0x11, 0xf6, 0x0c, - 0x39, 0x03, 0x85, 0xbe, 0x67, 0x5b, 0xaa, 0x12, 0x55, 0x60, 0xc5, 0x08, 0x57, 0x72, 0x4a, 0x96, - 0xaf, 0x67, 0xb7, 0xf7, 0x27, 0x54, 0x85, 0x49, 0xe9, 0x02, 0x44, 0x59, 0x13, 0x1a, 0x5e, 0x1e, - 0xbc, 0x5f, 0x48, 0x2f, 0xe2, 0xc3, 0x13, 0xa1, 0xd1, 0x2e, 0x40, 0xcb, 0x8e, 0xb8, 0x5e, 0x1a, - 0x30, 0x87, 0x11, 0xd7, 0xbb, 0x11, 0xa6, 0x9a, 0x51, 0x63, 0x0c, 0xe8, 0x3b, 0x30, 0xd7, 0xa9, - 0xc9, 0x31, 0x78, 0x59, 0xb0, 0x96, 0x47, 0x61, 0x0d, 0x7d, 0xef, 0x52, 0x2b, 0xd9, 0x84, 0x9a, - 0xb0, 0xa8, 0x3b, 0xcd, 0x66, 0xcb, 0x36, 0x59, 0x5b, 0xec, 0xf1, 0x5a, 0x70, 0xc2, 0xac, 0x0b, - 0x1d, 0x5f, 0x19, 0xd2, 0xd3, 0xb7, 0x42, 0x8a, 0x3d, 0xc7, 0xb1, 0xc2, 0xb3, 0x06, 0xe9, 0x3d, - 0xad, 0xc8, 0x85, 0xa5, 0x2e, 0x75, 0xf2, 0x1c, 0xba, 0x2e, 0xf4, 0x6d, 0x3c, 0x8e, 0xbe, 0xe8, - 0x44, 0x5a, 0xd0, 0x7b, 0x9b, 0xf9, 0x62, 0xee, 0xd2, 0x28, 0x97, 0xb4, 0x72, 0x63, 0xa4, 0xc5, - 0x9c, 0x50, 0x29, 0x57, 0x2e, 0x5f, 0xcc, 0x7a, 0x9f, 0x76, 0xf4, 0x83, 0x2c, 0xfc, 0xbf, 0xbc, - 0x97, 0x19, 0x2d, 0xa6, 0x37, 0x34, 0x19, 0x12, 0x69, 0x54, 0x6f, 0x10, 0xa3, 0x65, 0x11, 0xe5, - 0xa6, 0x50, 0x7e, 0x27, 0x55, 0x79, 0x18, 0x43, 0x45, 0x17, 0xbf, 0x6d, 0xce, 0xb3, 0x19, 0xb4, - 0xee, 0x4b, 0x96, 0x6a, 0x46, 0x5d, 0xc6, 0xa9, 0xbf, 0x22, 0x06, 0x4a, 0x5f, 0x23, 0xf8, 0xfc, - 0xbe, 0x36, 0x60, 0x7e, 0x4f, 0xd4, 0x7f, 0x57, 0xcc, 0xef, 0x12, 0xee, 0xf7, 0x43, 0x7a, 0xdf, - 0xa3, 0x8d, 0xe2, 0xd6, 0x69, 0xfa, 0x1e, 0xdb, 0x36, 0xfa, 0xf4, 0x3d, 0x76, 0x02, 0xcd, 0x99, - 0x3a, 0x5d, 0x7f, 0x35, 0xd2, 0x8a, 0x2d, 0xe5, 0x93, 0x41, 0xd7, 0xa6, 0xf0, 0x88, 0xe6, 0xc0, - 0xf7, 0x22, 0x1c, 0x5f, 0x36, 0x66, 0xb2, 0xa9, 0x32, 0x09, 0x13, 0x81, 0xf2, 0xc2, 0x8f, 0x67, - 0xe0, 0x72, 0xfc, 0x12, 0x4a, 0x3c, 0xea, 0xf2, 0x1b, 0xa0, 0x4f, 0xd0, 0x37, 0x61, 0xda, 0xc5, - 0x6d, 0xcb, 0xc1, 0x86, 0xc6, 0x23, 0x34, 0x79, 0xcd, 0x7f, 0xed, 0xe4, 0x9b, 0xee, 0x5e, 0x80, - 0x78, 0x8b, 0xb4, 0xb9, 0x3a, 0xee, 0x75, 0x26, 0x6b, 0x12, 0x9b, 0xa9, 0x79, 0x37, 0xfa, 0x85, - 0xa2, 0xf7, 0x61, 0x4e, 0xac, 0x53, 0xcd, 0x6e, 0x59, 0x96, 0x59, 0x37, 0x83, 0x6b, 0xff, 0x58, - 0x9f, 0xde, 0x75, 0xd1, 0xef, 0x86, 0xf2, 0x9c, 0x7d, 0xd7, 0x61, 0x44, 0xbd, 0x24, 0x88, 0xa2, - 0x76, 0x8a, 0xbe, 0x01, 0xd3, 0xd8, 0xf0, 0x4d, 0x9d, 0x68, 0xb6, 0xc3, 0x08, 0x55, 0xc6, 0x04, - 0x6f, 0x71, 0xf8, 0x2b, 0xa2, 0xa0, 0xcd, 0x07, 0x1c, 0xbc, 0x4c, 0xd1, 0x3d, 0x98, 0xc1, 0x86, - 0xe1, 0x11, 0x4a, 0x35, 0xdf, 0x24, 0x47, 0xe1, 0x5d, 0xb8, 0xd0, 0xc5, 0x29, 0xe2, 0x58, 0x3e, - 0xeb, 0x81, 0xec, 0x81, 0x49, 0x8e, 0xd4, 0x69, 0xdc, 0xa9, 0x50, 0x74, 0x1b, 0x26, 0x0c, 0x62, - 0x3b, 0x4d, 0xaa, 0x5c, 0x10, 0x0c, 0xab, 0x5d, 0x0c, 0x41, 0xaa, 0x42, 0x04, 0x0c, 0x0c, 0xf3, - 0x40, 0x45, 0x95, 0xf2, 0xe8, 0x3e, 0xcc, 0xc6, 0xc3, 0x25, 0xd3, 0x50, 0x26, 0x84, 0x37, 0x5c, - 0xe9, 0x1e, 0xaf, 0x20, 0x4e, 0x4e, 0x46, 0x48, 0x3b, 0x86, 0x3a, 0xc3, 0xe2, 0x55, 0x74, 0x07, - 0x26, 0x5c, 0xcf, 0xd4, 0x09, 0x55, 0x16, 0x85, 0x21, 0x57, 0xd2, 0x0c, 0xb9, 0x4b, 0x99, 0xd9, - 0xc4, 0x8c, 0x18, 0x7b, 0x5c, 0x5c, 0x95, 0x28, 0xe4, 0xc3, 0x3c, 0x39, 0x66, 0xc4, 0xe6, 0xe3, - 0xd6, 0x94, 0xb6, 0x2a, 0x2b, 0x82, 0x6a, 0x67, 0xf8, 0xc0, 0xad, 0xe3, 0x6c, 0xc5, 0xbb, 0x92, - 0x2d, 0xec, 0x78, 0xa5, 0xbd, 0x63, 0xa8, 0x73, 0xa4, 0xab, 0x15, 0x7d, 0x9c, 0x85, 0x17, 0x74, - 0x8f, 0x60, 0x31, 0x08, 0xc9, 0x01, 0xa1, 0x5a, 0xad, 0xdd, 0xf1, 0x27, 0x65, 0x4d, 0x18, 0xf3, - 0xee, 0x63, 0x19, 0xb3, 0x25, 0x35, 0x24, 0x86, 0xb0, 0xd2, 0x8e, 0x9c, 0x4c, 0x7d, 0x56, 0xef, - 0x27, 0x41, 0x63, 0x22, 0xe8, 0xb7, 0x59, 0xb8, 0x2a, 0xad, 0xd1, 0x53, 0xcd, 0xd5, 0xa3, 0xf5, - 0xa1, 0xac, 0x0b, 0x7b, 0xbf, 0xf5, 0x58, 0xf6, 0xee, 0xc6, 0xf5, 0x74, 0x19, 0x1d, 0x5b, 0x82, - 0x2f, 0xda, 0xa9, 0x72, 0x34, 0x2e, 0x88, 0x1a, 0x70, 0xb9, 0x86, 0xf9, 0xde, 0x27, 0xa2, 0x9b, - 0xe0, 0x88, 0x0b, 0xe2, 0xe6, 0x37, 0x84, 0x95, 0x03, 0xef, 0x2f, 0x15, 0x8e, 0xe6, 0x81, 0x4e, - 0x70, 0x8a, 0x89, 0xf8, 0x79, 0xa1, 0xd6, 0xdb, 0xb8, 0xfc, 0x93, 0x2c, 0x2c, 0xf6, 0x9b, 0x7a, - 0xb4, 0x01, 0x93, 0xc2, 0x07, 0xb9, 0xa7, 0x07, 0xfb, 0xde, 0x33, 0x69, 0x2e, 0xba, 0xc9, 0x0b, - 0x3b, 0x86, 0x7a, 0x11, 0x07, 0x05, 0xb4, 0xd9, 0xcf, 0x39, 0x83, 0x48, 0x71, 0xb1, 0x18, 0xe4, - 0x0f, 0x8b, 0x61, 0xfe, 0xb0, 0xb8, 0x69, 0xb7, 0x7b, 0xfd, 0x6c, 0xf9, 0x77, 0x59, 0x58, 0x1d, - 0xe4, 0x05, 0xe8, 0x1e, 0x4c, 0x75, 0xfc, 0x2d, 0x3b, 0x20, 0xfa, 0xa3, 0x41, 0x76, 0xa5, 0xe3, - 0x43, 0x1d, 0x6c, 0x9f, 0xc5, 0x9d, 0x3b, 0xc5, 0xe2, 0x5e, 0xfe, 0x7d, 0x16, 0xae, 0x0c, 0xe7, - 0x12, 0xe8, 0x1e, 0x40, 0xcc, 0x07, 0x83, 0x3e, 0xbc, 0x98, 0x96, 0x19, 0xda, 0x67, 0xfc, 0xde, - 0xd5, 0xf1, 0xa7, 0x18, 0xf4, 0x8c, 0xbb, 0x50, 0xf8, 0x38, 0x0b, 0x4a, 0xda, 0x51, 0x82, 0x2a, - 0x90, 0x8f, 0x1d, 0x4c, 0xd2, 0xea, 0x67, 0x53, 0x36, 0xe3, 0x0e, 0x8b, 0x0a, 0x9d, 0x23, 0xa8, - 0xab, 0xe3, 0xb9, 0xc7, 0xee, 0x78, 0xe1, 0xe7, 0x59, 0x98, 0xef, 0x39, 0x95, 0xce, 0xce, 0x35, - 0x2a, 0x30, 0xce, 0x8f, 0x31, 0x69, 0xe1, 0xa8, 0xa7, 0x98, 0xc0, 0x16, 0xfe, 0x9d, 0x4d, 0xa4, - 0xef, 0xf8, 0x51, 0x84, 0x76, 0x61, 0xaa, 0xe6, 0x18, 0x6d, 0x71, 0x9e, 0x49, 0x03, 0xcb, 0x23, - 0xe5, 0x2a, 0xc5, 0xe9, 0x36, 0x59, 0x93, 0xa5, 0x2f, 0x5e, 0xce, 0xf2, 0x9f, 0x39, 0x58, 0xe8, - 0x63, 0x32, 0x7a, 0x0b, 0xa6, 0xa5, 0x8f, 0x06, 0x47, 0x79, 0x70, 0xab, 0x59, 0x1b, 0x26, 0x79, - 0x29, 0xba, 0x9c, 0xef, 0x0c, 0xe2, 0x97, 0x3f, 0x89, 0xb9, 0x05, 0x53, 0x4d, 0xd2, 0x74, 0x02, - 0x2f, 0xb8, 0xd0, 0x7f, 0xc1, 0xf6, 0x66, 0x32, 0x83, 0xa9, 0x6f, 0xca, 0x52, 0xe1, 0x0f, 0x0b, - 0x00, 0x9d, 0x01, 0x42, 0x6f, 0x25, 0xb3, 0x7c, 0xd7, 0x47, 0xcc, 0xf2, 0x71, 0x8e, 0x4e, 0xa6, - 0x6f, 0xb7, 0x2b, 0xd3, 0x77, 0x63, 0xd4, 0x4c, 0x9f, 0xa4, 0x0b, 0xb3, 0x7d, 0x77, 0x12, 0xd9, - 0xbe, 0xb5, 0x61, 0x72, 0x75, 0x92, 0x21, 0xc8, 0xf8, 0xed, 0xf6, 0xc9, 0xf8, 0x5d, 0x1b, 0x3a, - 0xe3, 0x27, 0xa9, 0x62, 0x59, 0x3f, 0x9c, 0x92, 0x0a, 0xba, 0xfd, 0x38, 0xa9, 0x20, 0x49, 0xdf, - 0x95, 0x0e, 0x3a, 0x4f, 0x2c, 0x3e, 0x31, 0x89, 0xc5, 0xf3, 0xcc, 0xdf, 0x93, 0x9c, 0xf9, 0x7b, - 0xe9, 0x0c, 0x33, 0x7f, 0x2f, 0x9f, 0x3a, 0xf3, 0x77, 0x9e, 0x99, 0xfb, 0x3c, 0x32, 0x73, 0x1f, - 0x0d, 0x99, 0x99, 0xab, 0x9c, 0x2e, 0x33, 0x27, 0x4f, 0x92, 0x2f, 0x5e, 0x76, 0xee, 0xa3, 0x21, - 0xb3, 0x73, 0x95, 0xd3, 0x65, 0xe7, 0xd2, 0xfb, 0x1f, 0x2d, 0xf4, 0x7e, 0x99, 0xed, 0xab, 0x67, - 0x98, 0xd9, 0xfe, 0x9c, 0x33, 0x80, 0x33, 0x90, 0x8f, 0x5d, 0x83, 0x0b, 0x3f, 0xcd, 0xc1, 0xfc, - 0x66, 0x8b, 0x35, 0x1c, 0xcf, 0xfc, 0x1e, 0x8e, 0xae, 0x87, 0xdb, 0x90, 0x27, 0xf5, 0x3a, 0xd1, - 0x99, 0xc6, 0x83, 0x36, 0x79, 0xa1, 0x7b, 0x2e, 0x35, 0xa2, 0xbb, 0x2b, 0x64, 0xab, 0x98, 0x36, - 0x54, 0x20, 0x51, 0x19, 0xbd, 0x0b, 0xf9, 0x20, 0xd9, 0x87, 0x5b, 0xac, 0x11, 0xe6, 0xf9, 0x6e, - 0x0c, 0x0e, 0x0d, 0xc4, 0xc2, 0xe6, 0x46, 0xc5, 0x82, 0x03, 0x1a, 0xb6, 0x51, 0x54, 0x87, 0xc5, - 0xe4, 0xd5, 0x49, 0xf2, 0x8f, 0x9d, 0x82, 0x1f, 0x25, 0xae, 0x4e, 0x42, 0x4f, 0xe1, 0x37, 0x59, - 0xc8, 0xbf, 0x67, 0x32, 0x9b, 0x50, 0x2a, 0x06, 0xa5, 0x13, 0x94, 0x64, 0x47, 0x0d, 0x4a, 0x90, - 0x01, 0xff, 0x47, 0x99, 0xf0, 0x97, 0x28, 0x80, 0xd4, 0x5c, 0xcf, 0x71, 0xea, 0xe1, 0xb0, 0xbc, - 0x32, 0x64, 0x08, 0xba, 0xc7, 0x41, 0xea, 0x12, 0xed, 0xd3, 0x4a, 0x0b, 0x7f, 0x4d, 0x3e, 0xd7, - 0xd8, 0xb3, 0xb0, 0x8d, 0x2a, 0xdd, 0xcf, 0x35, 0x86, 0x8a, 0x78, 0x38, 0xf4, 0xbf, 0xf3, 0x64, - 0xe3, 0x20, 0x25, 0xda, 0x29, 0x8d, 0x10, 0xed, 0x08, 0xeb, 0xbb, 0x22, 0x9e, 0x8d, 0xc4, 0xb3, - 0x8d, 0x21, 0x82, 0x1d, 0x41, 0x12, 0x3c, 0xd8, 0x78, 0x1f, 0xe6, 0x7b, 0xf8, 0xd1, 0x5d, 0x00, - 0xdd, 0x6a, 0x11, 0xcd, 0xb5, 0xb0, 0x1d, 0xa6, 0x75, 0x07, 0xd0, 0x6e, 0x59, 0x2d, 0x22, 0x68, - 0xa7, 0x74, 0x59, 0xa2, 0x85, 0x3f, 0x45, 0x41, 0x94, 0x60, 0x3d, 0x65, 0x10, 0xc5, 0x39, 0xce, - 0x30, 0x88, 0x92, 0x74, 0xa7, 0x08, 0xa2, 0x24, 0xc3, 0x59, 0x04, 0x51, 0x92, 0xea, 0xfc, 0xe9, - 0xc4, 0x93, 0x18, 0xe1, 0x9c, 0x69, 0xbc, 0x2c, 0x3d, 0xe9, 0x8b, 0xf0, 0x7c, 0xe2, 0xf3, 0x3d, - 0xed, 0xbf, 0x5c, 0x31, 0x9a, 0x9e, 0x1e, 0xa3, 0xdd, 0x18, 0x35, 0x46, 0x93, 0x53, 0xdc, 0x1b, - 0xa7, 0x7d, 0x78, 0x72, 0x9c, 0x76, 0xeb, 0x31, 0xe2, 0x34, 0xae, 0xeb, 0xcb, 0xf9, 0x4a, 0xa3, - 0x96, 0xfa, 0x4a, 0xe3, 0xe6, 0xc8, 0x77, 0x59, 0x39, 0xe2, 0xe7, 0x2f, 0x35, 0xce, 0x5f, 0x6a, - 0xfc, 0x6f, 0xc4, 0x82, 0xd2, 0xa1, 0x4f, 0x88, 0x05, 0x63, 0xcf, 0x29, 0xbe, 0x9f, 0x85, 0xc9, - 0xf0, 0x7a, 0x87, 0x6e, 0xc3, 0x45, 0xf9, 0xf5, 0x5f, 0x5e, 0xe3, 0x56, 0x4e, 0x7e, 0x30, 0xa0, - 0x86, 0xe2, 0x68, 0x11, 0x2e, 0x78, 0x94, 0x90, 0xe0, 0x23, 0xda, 0xb4, 0x1a, 0x54, 0xd0, 0x0b, - 0x30, 0xeb, 0x7a, 0x44, 0x37, 0x29, 0xef, 0x64, 0xcd, 0x64, 0x54, 0xdc, 0xc0, 0xc6, 0xd5, 0x99, - 0xa8, 0xb5, 0x62, 0x32, 0x5a, 0x38, 0x84, 0xc9, 0xf0, 0xe2, 0x8a, 0x76, 0x60, 0xca, 0xb5, 0xb0, - 0x69, 0x33, 0x72, 0x1c, 0x7e, 0xde, 0xbb, 0x3a, 0xd4, 0x9d, 0x37, 0x80, 0xa8, 0x1d, 0x34, 0x9a, - 0x83, 0xb1, 0x87, 0xa4, 0x2d, 0x2d, 0xe2, 0xc5, 0xc2, 0x15, 0x98, 0x4d, 0x3e, 0x6c, 0xe6, 0x76, - 0x9b, 0xb6, 0x2d, 0x3f, 0x79, 0x4d, 0xab, 0x41, 0xa5, 0xf0, 0x01, 0xcc, 0x24, 0x58, 0xd1, 0x5d, - 0x98, 0xf5, 0x08, 0x6b, 0x79, 0xb6, 0x36, 0xda, 0xf8, 0xcc, 0x04, 0x28, 0x59, 0x45, 0x08, 0xc6, - 0x45, 0xbf, 0x82, 0xd7, 0xcf, 0xa2, 0x5c, 0xf0, 0x60, 0x3e, 0xa1, 0x4b, 0x7c, 0x92, 0xd8, 0x49, - 0xd1, 0x37, 0xcc, 0x03, 0x8e, 0x21, 0x74, 0xfe, 0x7a, 0x2c, 0x18, 0x71, 0xa1, 0xeb, 0x4d, 0xb8, - 0xe8, 0x9b, 0xd4, 0xac, 0x59, 0x44, 0x2a, 0x29, 0x0e, 0xf7, 0x41, 0xa5, 0x78, 0x10, 0xa0, 0xaa, - 0x19, 0x35, 0x24, 0x40, 0xf7, 0x60, 0xc2, 0x71, 0xf1, 0x87, 0xad, 0xf0, 0xf3, 0xdf, 0xb5, 0x21, - 0xa9, 0xde, 0x16, 0x20, 0x71, 0x63, 0x17, 0xa5, 0xe5, 0x5f, 0x66, 0xe1, 0xa2, 0xe4, 0x47, 0x5f, - 0x07, 0xd0, 0xa3, 0x19, 0x93, 0x36, 0x8e, 0xf6, 0x7c, 0x3d, 0x86, 0x47, 0xf7, 0xe3, 0x0e, 0x96, - 0x1b, 0x26, 0x44, 0xeb, 0x99, 0x9e, 0x98, 0x93, 0x2d, 0x1f, 0xc0, 0x44, 0x60, 0xfc, 0xd9, 0x9a, - 0x59, 0xc9, 0xc7, 0x3e, 0x74, 0x55, 0xfe, 0x98, 0xfb, 0xe4, 0xd1, 0x4a, 0xf6, 0xd3, 0x47, 0x2b, - 0xd9, 0xbf, 0x3f, 0x5a, 0xc9, 0xfe, 0xe8, 0xb3, 0x95, 0xcc, 0xa7, 0x9f, 0xad, 0x64, 0xfe, 0xf6, - 0xd9, 0x4a, 0x06, 0x56, 0x75, 0xa7, 0x79, 0xa2, 0x92, 0xca, 0x5c, 0x3c, 0x8c, 0xf5, 0x1c, 0xe6, - 0xec, 0x65, 0xdf, 0xaf, 0x1d, 0x9a, 0xac, 0xd1, 0xaa, 0xf1, 0x9d, 0xa5, 0x44, 0xb9, 0xfc, 0x21, - 0xb1, 0x1c, 0x9f, 0x5c, 0xf3, 0x89, 0xcd, 0x5a, 0x1e, 0xa1, 0x25, 0xde, 0x3b, 0x4f, 0xbc, 0xce, - 0x67, 0x84, 0xb2, 0x92, 0x7f, 0xbb, 0x24, 0x2a, 0xa5, 0x93, 0xfe, 0x35, 0xea, 0xf5, 0x58, 0xd5, - 0x2f, 0xff, 0x22, 0x37, 0xb6, 0xb7, 0xf5, 0xce, 0xaf, 0x72, 0x4f, 0xef, 0x85, 0xc6, 0x6d, 0x71, - 0xe3, 0x62, 0xc6, 0x14, 0x0f, 0xca, 0x7f, 0xee, 0xfc, 0xfc, 0x80, 0xff, 0xfc, 0x20, 0xf6, 0xf3, - 0x83, 0x83, 0xf2, 0xa3, 0xdc, 0xda, 0x49, 0x3f, 0x3f, 0xb8, 0xb7, 0x57, 0x09, 0x1f, 0x40, 0xfc, - 0x2b, 0xf7, 0x4c, 0x28, 0xba, 0xb1, 0xc1, 0x65, 0x37, 0x36, 0x62, 0xc2, 0x1b, 0x1b, 0x07, 0xe5, - 0xda, 0x84, 0x78, 0x42, 0x71, 0xfd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x6c, 0x7a, 0x68, - 0xe0, 0x35, 0x00, 0x00, -} - -func (m *Transaction) Marshal() (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 *Transaction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Transaction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Anchor != nil { - { - size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.BindingSig != nil { - { - size, err := m.BindingSig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Body != nil { - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionBody) Marshal() (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 *TransactionBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Memo != nil { - { - size, err := m.Memo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.DetectionData != nil { - { - size, err := m.DetectionData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.TransactionParameters != nil { - { - size, err := m.TransactionParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Actions) > 0 { - for iNdEx := len(m.Actions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Actions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TransactionParameters) Marshal() (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 *TransactionParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTransaction(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if m.ExpiryHeight != 0 { - i = encodeVarintTransaction(dAtA, i, uint64(m.ExpiryHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *DetectionData) Marshal() (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 *DetectionData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DetectionData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FmdClues) > 0 { - for iNdEx := len(m.FmdClues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FmdClues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - return len(dAtA) - i, nil -} - -func (m *Action) Marshal() (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 *Action) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Action != nil { - { - size := m.Action.Size() - i -= size - if _, err := m.Action.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Action_Spend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_Spend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Spend != nil { - { - size, err := m.Spend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Action_Output) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *Action_Swap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_Swap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *Action_SwapClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_SwapClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SwapClaim != nil { - { - size, err := m.SwapClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *Action_ValidatorDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ValidatorDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorDefinition != nil { - { - size, err := m.ValidatorDefinition.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - return len(dAtA) - i, nil -} -func (m *Action_IbcRelayAction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_IbcRelayAction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IbcRelayAction != nil { - { - size, err := m.IbcRelayAction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - return len(dAtA) - i, nil -} -func (m *Action_ProposalSubmit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ProposalSubmit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalSubmit != nil { - { - size, err := m.ProposalSubmit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *Action_ProposalWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ProposalWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalWithdraw != nil { - { - size, err := m.ProposalWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - return len(dAtA) - i, nil -} -func (m *Action_ValidatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ValidatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorVote != nil { - { - size, err := m.ValidatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *Action_DelegatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_DelegatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DelegatorVote != nil { - { - size, err := m.DelegatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - return len(dAtA) - i, nil -} -func (m *Action_ProposalDepositClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ProposalDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalDepositClaim != nil { - { - size, err := m.ProposalDepositClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - return len(dAtA) - i, nil -} -func (m *Action_PositionOpen) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_PositionOpen) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionOpen != nil { - { - size, err := m.PositionOpen.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - return len(dAtA) - i, nil -} -func (m *Action_PositionClose) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_PositionClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionClose != nil { - { - size, err := m.PositionClose.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - return len(dAtA) - i, nil -} -func (m *Action_PositionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_PositionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionWithdraw != nil { - { - size, err := m.PositionWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - return len(dAtA) - i, nil -} -func (m *Action_PositionRewardClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_PositionRewardClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionRewardClaim != nil { - { - size, err := m.PositionRewardClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *Action_Delegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_Delegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Delegate != nil { - { - size, err := m.Delegate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *Action_Undelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_Undelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Undelegate != nil { - { - size, err := m.Undelegate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - return len(dAtA) - i, nil -} -func (m *Action_UndelegateClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_UndelegateClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.UndelegateClaim != nil { - { - size, err := m.UndelegateClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xd2 - } - return len(dAtA) - i, nil -} -func (m *Action_CommunityPoolSpend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_CommunityPoolSpend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolSpend != nil { - { - size, err := m.CommunityPoolSpend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *Action_CommunityPoolOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_CommunityPoolOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolOutput != nil { - { - size, err := m.CommunityPoolOutput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x9a - } - return len(dAtA) - i, nil -} -func (m *Action_CommunityPoolDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_CommunityPoolDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolDeposit != nil { - { - size, err := m.CommunityPoolDeposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *Action_ActionDutchAuctionSchedule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ActionDutchAuctionSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionSchedule != nil { - { - size, err := m.ActionDutchAuctionSchedule.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xaa - } - return len(dAtA) - i, nil -} -func (m *Action_ActionDutchAuctionEnd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ActionDutchAuctionEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionEnd != nil { - { - size, err := m.ActionDutchAuctionEnd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xb2 - } - return len(dAtA) - i, nil -} -func (m *Action_ActionDutchAuctionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_ActionDutchAuctionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionWithdraw != nil { - { - size, err := m.ActionDutchAuctionWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xba - } - return len(dAtA) - i, nil -} -func (m *Action_Ics20Withdrawal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action_Ics20Withdrawal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Ics20Withdrawal != nil { - { - size, err := m.Ics20Withdrawal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xc - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *TransactionPerspective) Marshal() (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 *TransactionPerspective) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPerspective) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BatchSwapOutputData) > 0 { - for iNdEx := len(m.BatchSwapOutputData) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BatchSwapOutputData[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xe2 - } - } - if len(m.NullificationTransactionIdsByCommitment) > 0 { - for iNdEx := len(m.NullificationTransactionIdsByCommitment) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.NullificationTransactionIdsByCommitment[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x92 - } - } - if len(m.CreationTransactionIdsByNullifier) > 0 { - for iNdEx := len(m.CreationTransactionIdsByNullifier) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CreationTransactionIdsByNullifier[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc2 - } - } - if len(m.ExtendedMetadata) > 0 { - for iNdEx := len(m.ExtendedMetadata) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExtendedMetadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - } - if len(m.Prices) > 0 { - for iNdEx := len(m.Prices) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Prices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if m.TransactionId != nil { - { - size, err := m.TransactionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.Denoms) > 0 { - for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Denoms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.AddressViews) > 0 { - for iNdEx := len(m.AddressViews) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AddressViews[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.AdviceNotes) > 0 { - for iNdEx := len(m.AdviceNotes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AdviceNotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.SpendNullifiers) > 0 { - for iNdEx := len(m.SpendNullifiers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SpendNullifiers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.PayloadKeys) > 0 { - for iNdEx := len(m.PayloadKeys) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PayloadKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TransactionPerspective_ExtendedMetadataById) Marshal() (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 *TransactionPerspective_ExtendedMetadataById) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPerspective_ExtendedMetadataById) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ExtendedMetadata != nil { - { - size, err := m.ExtendedMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPerspective_CreationTransactionIdByNullifier) Marshal() (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 *TransactionPerspective_CreationTransactionIdByNullifier) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPerspective_CreationTransactionIdByNullifier) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TransactionId != nil { - { - size, err := m.TransactionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) Marshal() (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 *TransactionPerspective_NullificationTransactionIdByCommitment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TransactionId != nil { - { - size, err := m.TransactionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Commitment != nil { - { - size, err := m.Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PayloadKeyWithCommitment) Marshal() (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 *PayloadKeyWithCommitment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PayloadKeyWithCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Commitment != nil { - { - size, err := m.Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PayloadKey != nil { - { - size, err := m.PayloadKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NullifierWithNote) Marshal() (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 *NullifierWithNote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NullifierWithNote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionView) Marshal() (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 *TransactionView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Anchor != nil { - { - size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.BindingSig != nil { - { - size, err := m.BindingSig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BodyView != nil { - { - size, err := m.BodyView.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionBodyView) Marshal() (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 *TransactionBodyView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionBodyView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MemoView != nil { - { - size, err := m.MemoView.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.DetectionData != nil { - { - size, err := m.DetectionData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.TransactionParameters != nil { - { - size, err := m.TransactionParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ActionViews) > 0 { - for iNdEx := len(m.ActionViews) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ActionViews[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ActionView) Marshal() (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 *ActionView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ActionView != nil { - { - size := m.ActionView.Size() - i -= size - if _, err := m.ActionView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ActionView_Spend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_Spend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Spend != nil { - { - size, err := m.Spend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *ActionView_Output) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ActionView_Swap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_Swap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *ActionView_SwapClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_SwapClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SwapClaim != nil { - { - size, err := m.SwapClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *ActionView_ValidatorDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ValidatorDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorDefinition != nil { - { - size, err := m.ValidatorDefinition.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - return len(dAtA) - i, nil -} -func (m *ActionView_IbcRelayAction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_IbcRelayAction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IbcRelayAction != nil { - { - size, err := m.IbcRelayAction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - return len(dAtA) - i, nil -} -func (m *ActionView_ProposalSubmit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ProposalSubmit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalSubmit != nil { - { - size, err := m.ProposalSubmit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *ActionView_ProposalWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ProposalWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalWithdraw != nil { - { - size, err := m.ProposalWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - return len(dAtA) - i, nil -} -func (m *ActionView_ValidatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ValidatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorVote != nil { - { - size, err := m.ValidatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *ActionView_DelegatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_DelegatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DelegatorVote != nil { - { - size, err := m.DelegatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - return len(dAtA) - i, nil -} -func (m *ActionView_ProposalDepositClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ProposalDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalDepositClaim != nil { - { - size, err := m.ProposalDepositClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - return len(dAtA) - i, nil -} -func (m *ActionView_PositionOpen) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_PositionOpen) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionOpen != nil { - { - size, err := m.PositionOpen.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - return len(dAtA) - i, nil -} -func (m *ActionView_PositionClose) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_PositionClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionClose != nil { - { - size, err := m.PositionClose.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - return len(dAtA) - i, nil -} -func (m *ActionView_PositionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_PositionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionWithdraw != nil { - { - size, err := m.PositionWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - return len(dAtA) - i, nil -} -func (m *ActionView_PositionRewardClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_PositionRewardClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionRewardClaim != nil { - { - size, err := m.PositionRewardClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *ActionView_Delegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_Delegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Delegate != nil { - { - size, err := m.Delegate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - return len(dAtA) - i, nil -} -func (m *ActionView_Undelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_Undelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Undelegate != nil { - { - size, err := m.Undelegate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xd2 - } - return len(dAtA) - i, nil -} -func (m *ActionView_UndelegateClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_UndelegateClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.UndelegateClaim != nil { - { - size, err := m.UndelegateClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xda - } - return len(dAtA) - i, nil -} -func (m *ActionView_CommunityPoolSpend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_CommunityPoolSpend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolSpend != nil { - { - size, err := m.CommunityPoolSpend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *ActionView_CommunityPoolOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_CommunityPoolOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolOutput != nil { - { - size, err := m.CommunityPoolOutput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x9a - } - return len(dAtA) - i, nil -} -func (m *ActionView_CommunityPoolDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_CommunityPoolDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolDeposit != nil { - { - size, err := m.CommunityPoolDeposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *ActionView_ActionDutchAuctionSchedule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ActionDutchAuctionSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionSchedule != nil { - { - size, err := m.ActionDutchAuctionSchedule.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xaa - } - return len(dAtA) - i, nil -} -func (m *ActionView_ActionDutchAuctionEnd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ActionDutchAuctionEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionEnd != nil { - { - size, err := m.ActionDutchAuctionEnd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xb2 - } - return len(dAtA) - i, nil -} -func (m *ActionView_ActionDutchAuctionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_ActionDutchAuctionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionWithdraw != nil { - { - size, err := m.ActionDutchAuctionWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xba - } - return len(dAtA) - i, nil -} -func (m *ActionView_Ics20Withdrawal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionView_Ics20Withdrawal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Ics20Withdrawal != nil { - { - size, err := m.Ics20Withdrawal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xc - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *AuthorizationData) Marshal() (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 *AuthorizationData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizationData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DelegatorVoteAuths) > 0 { - for iNdEx := len(m.DelegatorVoteAuths) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DelegatorVoteAuths[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.SpendAuths) > 0 { - for iNdEx := len(m.SpendAuths) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SpendAuths[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.EffectHash != nil { - { - size, err := m.EffectHash.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WitnessData) Marshal() (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 *WitnessData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StateCommitmentProofs) > 0 { - for iNdEx := len(m.StateCommitmentProofs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StateCommitmentProofs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Anchor != nil { - { - size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlan) Marshal() (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 *TransactionPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Memo != nil { - { - size, err := m.Memo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.DetectionData != nil { - { - size, err := m.DetectionData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.TransactionParameters != nil { - { - size, err := m.TransactionParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Actions) > 0 { - for iNdEx := len(m.Actions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Actions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DetectionDataPlan) Marshal() (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 *DetectionDataPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DetectionDataPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CluePlans) > 0 { - for iNdEx := len(m.CluePlans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CluePlans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - return len(dAtA) - i, nil -} - -func (m *ActionPlan) Marshal() (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 *ActionPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Action != nil { - { - size := m.Action.Size() - i -= size - if _, err := m.Action.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ActionPlan_Spend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_Spend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Spend != nil { - { - size, err := m.Spend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_Output) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Output != nil { - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_Swap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_Swap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_SwapClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_SwapClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SwapClaim != nil { - { - size, err := m.SwapClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ValidatorDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ValidatorDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorDefinition != nil { - { - size, err := m.ValidatorDefinition.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_IbcRelayAction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_IbcRelayAction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IbcRelayAction != nil { - { - size, err := m.IbcRelayAction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ProposalSubmit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ProposalSubmit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalSubmit != nil { - { - size, err := m.ProposalSubmit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ProposalWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ProposalWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalWithdraw != nil { - { - size, err := m.ProposalWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ValidatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ValidatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorVote != nil { - { - size, err := m.ValidatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_DelegatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_DelegatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DelegatorVote != nil { - { - size, err := m.DelegatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ProposalDepositClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ProposalDepositClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ProposalDepositClaim != nil { - { - size, err := m.ProposalDepositClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_PositionOpen) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_PositionOpen) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionOpen != nil { - { - size, err := m.PositionOpen.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_PositionClose) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_PositionClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionClose != nil { - { - size, err := m.PositionClose.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_PositionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_PositionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionWithdraw != nil { - { - size, err := m.PositionWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_PositionRewardClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_PositionRewardClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.PositionRewardClaim != nil { - { - size, err := m.PositionRewardClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_Delegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_Delegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Delegate != nil { - { - size, err := m.Delegate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_Undelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_Undelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Undelegate != nil { - { - size, err := m.Undelegate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_UndelegateClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_UndelegateClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.UndelegateClaim != nil { - { - size, err := m.UndelegateClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xd2 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_CommunityPoolSpend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_CommunityPoolSpend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolSpend != nil { - { - size, err := m.CommunityPoolSpend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x92 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_CommunityPoolOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_CommunityPoolOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolOutput != nil { - { - size, err := m.CommunityPoolOutput.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x9a - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_CommunityPoolDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_CommunityPoolDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.CommunityPoolDeposit != nil { - { - size, err := m.CommunityPoolDeposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ActionDutchAuctionSchedule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ActionDutchAuctionSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionSchedule != nil { - { - size, err := m.ActionDutchAuctionSchedule.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xaa - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ActionDutchAuctionEnd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ActionDutchAuctionEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionEnd != nil { - { - size, err := m.ActionDutchAuctionEnd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xb2 - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_ActionDutchAuctionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_ActionDutchAuctionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ActionDutchAuctionWithdraw != nil { - { - size, err := m.ActionDutchAuctionWithdraw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xba - } - return len(dAtA) - i, nil -} -func (m *ActionPlan_Ics20Withdrawal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionPlan_Ics20Withdrawal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Ics20Withdrawal != nil { - { - size, err := m.Ics20Withdrawal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xc - i-- - dAtA[i] = 0xc2 - } - return len(dAtA) - i, nil -} -func (m *CluePlan) Marshal() (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 *CluePlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CluePlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PrecisionBits != 0 { - i = encodeVarintTransaction(dAtA, i, uint64(m.PrecisionBits)) - i-- - dAtA[i] = 0x18 - } - if len(m.Rseed) > 0 { - i -= len(m.Rseed) - copy(dAtA[i:], m.Rseed) - i = encodeVarintTransaction(dAtA, i, uint64(len(m.Rseed))) - i-- - dAtA[i] = 0x12 - } - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemoPlan) Marshal() (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 *MemoPlan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTransaction(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if m.Plaintext != nil { - { - size, err := m.Plaintext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemoCiphertext) Marshal() (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 *MemoCiphertext) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoCiphertext) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintTransaction(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemoPlaintext) Marshal() (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 *MemoPlaintext) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoPlaintext) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarintTransaction(dAtA, i, uint64(len(m.Text))) - i-- - dAtA[i] = 0x12 - } - if m.ReturnAddress != nil { - { - size, err := m.ReturnAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemoPlaintextView) Marshal() (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 *MemoPlaintextView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoPlaintextView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarintTransaction(dAtA, i, uint64(len(m.Text))) - i-- - dAtA[i] = 0x12 - } - if m.ReturnAddress != nil { - { - size, err := m.ReturnAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemoView) Marshal() (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 *MemoView) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoView) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MemoView != nil { - { - size := m.MemoView.Size() - i -= size - if _, err := m.MemoView.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *MemoView_Visible_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoView_Visible_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Visible != nil { - { - size, err := m.Visible.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *MemoView_Opaque_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoView_Opaque_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Opaque != nil { - { - size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *MemoView_Visible) Marshal() (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 *MemoView_Visible) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoView_Visible) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Plaintext != nil { - { - size, err := m.Plaintext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Ciphertext != nil { - { - size, err := m.Ciphertext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MemoView_Opaque) Marshal() (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 *MemoView_Opaque) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MemoView_Opaque) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Ciphertext != nil { - { - size, err := m.Ciphertext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTransaction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTransaction(dAtA []byte, offset int, v uint64) int { - offset -= sovTransaction(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Transaction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Body != nil { - l = m.Body.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.BindingSig != nil { - l = m.BindingSig.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Anchor != nil { - l = m.Anchor.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *TransactionBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Actions) > 0 { - for _, e := range m.Actions { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if m.TransactionParameters != nil { - l = m.TransactionParameters.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.DetectionData != nil { - l = m.DetectionData.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Memo != nil { - l = m.Memo.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *TransactionParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExpiryHeight != 0 { - n += 1 + sovTransaction(uint64(m.ExpiryHeight)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *DetectionData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.FmdClues) > 0 { - for _, e := range m.FmdClues { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - return n -} - -func (m *Action) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Action != nil { - n += m.Action.Size() - } - return n -} - -func (m *Action_Spend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Spend != nil { - l = m.Spend.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_Output) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_Swap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_SwapClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapClaim != nil { - l = m.SwapClaim.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ValidatorDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorDefinition != nil { - l = m.ValidatorDefinition.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_IbcRelayAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IbcRelayAction != nil { - l = m.IbcRelayAction.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ProposalSubmit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalSubmit != nil { - l = m.ProposalSubmit.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ProposalWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalWithdraw != nil { - l = m.ProposalWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ValidatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorVote != nil { - l = m.ValidatorVote.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_DelegatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DelegatorVote != nil { - l = m.DelegatorVote.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ProposalDepositClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalDepositClaim != nil { - l = m.ProposalDepositClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_PositionOpen) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionOpen != nil { - l = m.PositionOpen.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_PositionClose) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionClose != nil { - l = m.PositionClose.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_PositionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionWithdraw != nil { - l = m.PositionWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_PositionRewardClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionRewardClaim != nil { - l = m.PositionRewardClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_Delegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Delegate != nil { - l = m.Delegate.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_Undelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Undelegate != nil { - l = m.Undelegate.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_UndelegateClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UndelegateClaim != nil { - l = m.UndelegateClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_CommunityPoolSpend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolSpend != nil { - l = m.CommunityPoolSpend.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_CommunityPoolOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolOutput != nil { - l = m.CommunityPoolOutput.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_CommunityPoolDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolDeposit != nil { - l = m.CommunityPoolDeposit.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ActionDutchAuctionSchedule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionSchedule != nil { - l = m.ActionDutchAuctionSchedule.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ActionDutchAuctionEnd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionEnd != nil { - l = m.ActionDutchAuctionEnd.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_ActionDutchAuctionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionWithdraw != nil { - l = m.ActionDutchAuctionWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *Action_Ics20Withdrawal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ics20Withdrawal != nil { - l = m.Ics20Withdrawal.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *TransactionPerspective) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PayloadKeys) > 0 { - for _, e := range m.PayloadKeys { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if len(m.SpendNullifiers) > 0 { - for _, e := range m.SpendNullifiers { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if len(m.AdviceNotes) > 0 { - for _, e := range m.AdviceNotes { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if len(m.AddressViews) > 0 { - for _, e := range m.AddressViews { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if len(m.Denoms) > 0 { - for _, e := range m.Denoms { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if m.TransactionId != nil { - l = m.TransactionId.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if len(m.Prices) > 0 { - for _, e := range m.Prices { - l = e.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - } - if len(m.ExtendedMetadata) > 0 { - for _, e := range m.ExtendedMetadata { - l = e.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - } - if len(m.CreationTransactionIdsByNullifier) > 0 { - for _, e := range m.CreationTransactionIdsByNullifier { - l = e.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - } - if len(m.NullificationTransactionIdsByCommitment) > 0 { - for _, e := range m.NullificationTransactionIdsByCommitment { - l = e.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - } - if len(m.BatchSwapOutputData) > 0 { - for _, e := range m.BatchSwapOutputData { - l = e.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - } - return n -} - -func (m *TransactionPerspective_ExtendedMetadataById) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.ExtendedMetadata != nil { - l = m.ExtendedMetadata.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *TransactionPerspective_CreationTransactionIdByNullifier) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.TransactionId != nil { - l = m.TransactionId.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Commitment != nil { - l = m.Commitment.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.TransactionId != nil { - l = m.TransactionId.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *PayloadKeyWithCommitment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PayloadKey != nil { - l = m.PayloadKey.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Commitment != nil { - l = m.Commitment.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *NullifierWithNote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *TransactionView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BodyView != nil { - l = m.BodyView.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.BindingSig != nil { - l = m.BindingSig.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Anchor != nil { - l = m.Anchor.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *TransactionBodyView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ActionViews) > 0 { - for _, e := range m.ActionViews { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if m.TransactionParameters != nil { - l = m.TransactionParameters.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.DetectionData != nil { - l = m.DetectionData.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.MemoView != nil { - l = m.MemoView.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *ActionView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionView != nil { - n += m.ActionView.Size() - } - return n -} - -func (m *ActionView_Spend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Spend != nil { - l = m.Spend.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_Output) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_Swap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_SwapClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapClaim != nil { - l = m.SwapClaim.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ValidatorDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorDefinition != nil { - l = m.ValidatorDefinition.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_IbcRelayAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IbcRelayAction != nil { - l = m.IbcRelayAction.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ProposalSubmit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalSubmit != nil { - l = m.ProposalSubmit.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ProposalWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalWithdraw != nil { - l = m.ProposalWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ValidatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorVote != nil { - l = m.ValidatorVote.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_DelegatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DelegatorVote != nil { - l = m.DelegatorVote.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ProposalDepositClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalDepositClaim != nil { - l = m.ProposalDepositClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_PositionOpen) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionOpen != nil { - l = m.PositionOpen.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_PositionClose) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionClose != nil { - l = m.PositionClose.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_PositionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionWithdraw != nil { - l = m.PositionWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_PositionRewardClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionRewardClaim != nil { - l = m.PositionRewardClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_Delegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Delegate != nil { - l = m.Delegate.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_Undelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Undelegate != nil { - l = m.Undelegate.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_UndelegateClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UndelegateClaim != nil { - l = m.UndelegateClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_CommunityPoolSpend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolSpend != nil { - l = m.CommunityPoolSpend.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_CommunityPoolOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolOutput != nil { - l = m.CommunityPoolOutput.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_CommunityPoolDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolDeposit != nil { - l = m.CommunityPoolDeposit.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ActionDutchAuctionSchedule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionSchedule != nil { - l = m.ActionDutchAuctionSchedule.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ActionDutchAuctionEnd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionEnd != nil { - l = m.ActionDutchAuctionEnd.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_ActionDutchAuctionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionWithdraw != nil { - l = m.ActionDutchAuctionWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionView_Ics20Withdrawal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ics20Withdrawal != nil { - l = m.Ics20Withdrawal.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *AuthorizationData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EffectHash != nil { - l = m.EffectHash.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if len(m.SpendAuths) > 0 { - for _, e := range m.SpendAuths { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if len(m.DelegatorVoteAuths) > 0 { - for _, e := range m.DelegatorVoteAuths { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - return n -} - -func (m *WitnessData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Anchor != nil { - l = m.Anchor.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if len(m.StateCommitmentProofs) > 0 { - for _, e := range m.StateCommitmentProofs { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - return n -} - -func (m *TransactionPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Actions) > 0 { - for _, e := range m.Actions { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - if m.TransactionParameters != nil { - l = m.TransactionParameters.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.DetectionData != nil { - l = m.DetectionData.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Memo != nil { - l = m.Memo.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *DetectionDataPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.CluePlans) > 0 { - for _, e := range m.CluePlans { - l = e.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - } - return n -} - -func (m *ActionPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Action != nil { - n += m.Action.Size() - } - return n -} - -func (m *ActionPlan_Spend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Spend != nil { - l = m.Spend.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_Output) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Output != nil { - l = m.Output.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_Swap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_SwapClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapClaim != nil { - l = m.SwapClaim.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ValidatorDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorDefinition != nil { - l = m.ValidatorDefinition.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_IbcRelayAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IbcRelayAction != nil { - l = m.IbcRelayAction.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ProposalSubmit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalSubmit != nil { - l = m.ProposalSubmit.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ProposalWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalWithdraw != nil { - l = m.ProposalWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ValidatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorVote != nil { - l = m.ValidatorVote.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_DelegatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DelegatorVote != nil { - l = m.DelegatorVote.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ProposalDepositClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ProposalDepositClaim != nil { - l = m.ProposalDepositClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_PositionOpen) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionOpen != nil { - l = m.PositionOpen.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_PositionClose) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionClose != nil { - l = m.PositionClose.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_PositionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionWithdraw != nil { - l = m.PositionWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_PositionRewardClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionRewardClaim != nil { - l = m.PositionRewardClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_Delegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Delegate != nil { - l = m.Delegate.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_Undelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Undelegate != nil { - l = m.Undelegate.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_UndelegateClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UndelegateClaim != nil { - l = m.UndelegateClaim.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_CommunityPoolSpend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolSpend != nil { - l = m.CommunityPoolSpend.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_CommunityPoolOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolOutput != nil { - l = m.CommunityPoolOutput.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_CommunityPoolDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CommunityPoolDeposit != nil { - l = m.CommunityPoolDeposit.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ActionDutchAuctionSchedule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionSchedule != nil { - l = m.ActionDutchAuctionSchedule.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ActionDutchAuctionEnd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionEnd != nil { - l = m.ActionDutchAuctionEnd.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_ActionDutchAuctionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionDutchAuctionWithdraw != nil { - l = m.ActionDutchAuctionWithdraw.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *ActionPlan_Ics20Withdrawal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ics20Withdrawal != nil { - l = m.Ics20Withdrawal.Size() - n += 2 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *CluePlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - l = len(m.Rseed) - if l > 0 { - n += 1 + l + sovTransaction(uint64(l)) - } - if m.PrecisionBits != 0 { - n += 1 + sovTransaction(uint64(m.PrecisionBits)) - } - return n -} - -func (m *MemoPlan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Plaintext != nil { - l = m.Plaintext.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *MemoCiphertext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *MemoPlaintext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ReturnAddress != nil { - l = m.ReturnAddress.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - l = len(m.Text) - if l > 0 { - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *MemoPlaintextView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ReturnAddress != nil { - l = m.ReturnAddress.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - l = len(m.Text) - if l > 0 { - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *MemoView) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MemoView != nil { - n += m.MemoView.Size() - } - return n -} - -func (m *MemoView_Visible_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Visible != nil { - l = m.Visible.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *MemoView_Opaque_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Opaque != nil { - l = m.Opaque.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} -func (m *MemoView_Visible) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ciphertext != nil { - l = m.Ciphertext.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - if m.Plaintext != nil { - l = m.Plaintext.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func (m *MemoView_Opaque) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ciphertext != nil { - l = m.Ciphertext.Size() - n += 1 + l + sovTransaction(uint64(l)) - } - return n -} - -func sovTransaction(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTransaction(x uint64) (n int) { - return sovTransaction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Transaction) 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 ErrIntOverflowTransaction - } - 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: Transaction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Transaction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Body == nil { - m.Body = &TransactionBody{} - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BindingSig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BindingSig == nil { - m.BindingSig = &v1.BindingSignature{} - } - if err := m.BindingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Anchor == nil { - m.Anchor = &v11.MerkleRoot{} - } - if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionBody) 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 ErrIntOverflowTransaction - } - 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: TransactionBody: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionBody: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Actions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Actions = append(m.Actions, &Action{}) - if err := m.Actions[len(m.Actions)-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 TransactionParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionParameters == nil { - m.TransactionParameters = &TransactionParameters{} - } - if err := m.TransactionParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DetectionData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DetectionData == nil { - m.DetectionData = &DetectionData{} - } - if err := m.DetectionData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Memo == nil { - m.Memo = &MemoCiphertext{} - } - if err := m.Memo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionParameters) 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 ErrIntOverflowTransaction - } - 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: TransactionParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) - } - m.ExpiryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiryHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &v12.Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DetectionData) 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 ErrIntOverflowTransaction - } - 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: DetectionData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DetectionData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FmdClues", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FmdClues = append(m.FmdClues, &v13.Clue{}) - if err := m.FmdClues[len(m.FmdClues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Action) 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 ErrIntOverflowTransaction - } - 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: Action: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Action: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v14.Spend{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_Spend{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v14.Output{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_Output{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.Swap{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_Swap{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.SwapClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_SwapClaim{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDefinition", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.ValidatorDefinition{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ValidatorDefinition{v} - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcRelayAction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v17.IbcRelay{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_IbcRelayAction{v} - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalSubmit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalSubmit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ProposalSubmit{v} - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalWithdraw{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ProposalWithdraw{v} - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ValidatorVote{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ValidatorVote{v} - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.DelegatorVote{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_DelegatorVote{v} - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalDepositClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalDepositClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ProposalDepositClaim{v} - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionOpen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionOpen{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_PositionOpen{v} - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionClose", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionClose{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_PositionClose{v} - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionWithdraw{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_PositionWithdraw{v} - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionRewardClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionRewardClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_PositionRewardClaim{v} - iNdEx = postIndex - case 40: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.Delegate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_Delegate{v} - iNdEx = postIndex - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Undelegate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.Undelegate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_Undelegate{v} - iNdEx = postIndex - case 42: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndelegateClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.UndelegateClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_UndelegateClaim{v} - iNdEx = postIndex - case 50: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolSpend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolSpend{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_CommunityPoolSpend{v} - iNdEx = postIndex - case 51: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolOutput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolOutput{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_CommunityPoolOutput{v} - iNdEx = postIndex - case 52: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolDeposit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_CommunityPoolDeposit{v} - iNdEx = postIndex - case 53: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionSchedule", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionSchedule{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ActionDutchAuctionSchedule{v} - iNdEx = postIndex - case 54: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionEnd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionEnd{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ActionDutchAuctionEnd{v} - iNdEx = postIndex - case 55: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionWithdraw{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_ActionDutchAuctionWithdraw{v} - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ics20Withdrawal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v17.Ics20Withdrawal{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &Action_Ics20Withdrawal{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPerspective) 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 ErrIntOverflowTransaction - } - 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: TransactionPerspective: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionPerspective: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PayloadKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PayloadKeys = append(m.PayloadKeys, &PayloadKeyWithCommitment{}) - if err := m.PayloadKeys[len(m.PayloadKeys)-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 SpendNullifiers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpendNullifiers = append(m.SpendNullifiers, &NullifierWithNote{}) - if err := m.SpendNullifiers[len(m.SpendNullifiers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdviceNotes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdviceNotes = append(m.AdviceNotes, &v14.Note{}) - if err := m.AdviceNotes[len(m.AdviceNotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressViews", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddressViews = append(m.AddressViews, &v110.AddressView{}) - if err := m.AddressViews[len(m.AddressViews)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denoms = append(m.Denoms, &v111.Metadata{}) - if err := m.Denoms[len(m.Denoms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionId == nil { - m.TransactionId = &v112.TransactionId{} - } - if err := m.TransactionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Prices = append(m.Prices, &v111.EstimatedPrice{}) - if err := m.Prices[len(m.Prices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendedMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtendedMetadata = append(m.ExtendedMetadata, &TransactionPerspective_ExtendedMetadataById{}) - if err := m.ExtendedMetadata[len(m.ExtendedMetadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 40: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationTransactionIdsByNullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CreationTransactionIdsByNullifier = append(m.CreationTransactionIdsByNullifier, &TransactionPerspective_CreationTransactionIdByNullifier{}) - if err := m.CreationTransactionIdsByNullifier[len(m.CreationTransactionIdsByNullifier)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 50: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullificationTransactionIdsByCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullificationTransactionIdsByCommitment = append(m.NullificationTransactionIdsByCommitment, &TransactionPerspective_NullificationTransactionIdByCommitment{}) - if err := m.NullificationTransactionIdsByCommitment[len(m.NullificationTransactionIdsByCommitment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 60: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BatchSwapOutputData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BatchSwapOutputData = append(m.BatchSwapOutputData, &v15.BatchSwapOutputData{}) - if err := m.BatchSwapOutputData[len(m.BatchSwapOutputData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPerspective_ExtendedMetadataById) 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 ErrIntOverflowTransaction - } - 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: ExtendedMetadataById: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtendedMetadataById: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v111.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendedMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExtendedMetadata == nil { - m.ExtendedMetadata = &types.Any{} - } - if err := m.ExtendedMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPerspective_CreationTransactionIdByNullifier) 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 ErrIntOverflowTransaction - } - 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: CreationTransactionIdByNullifier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreationTransactionIdByNullifier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v113.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionId == nil { - m.TransactionId = &v112.TransactionId{} - } - if err := m.TransactionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPerspective_NullificationTransactionIdByCommitment) 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 ErrIntOverflowTransaction - } - 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: NullificationTransactionIdByCommitment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullificationTransactionIdByCommitment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commitment == nil { - m.Commitment = &v11.StateCommitment{} - } - if err := m.Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionId == nil { - m.TransactionId = &v112.TransactionId{} - } - if err := m.TransactionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PayloadKeyWithCommitment) 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 ErrIntOverflowTransaction - } - 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: PayloadKeyWithCommitment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PayloadKeyWithCommitment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PayloadKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PayloadKey == nil { - m.PayloadKey = &v110.PayloadKey{} - } - if err := m.PayloadKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commitment == nil { - m.Commitment = &v11.StateCommitment{} - } - if err := m.Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NullifierWithNote) 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 ErrIntOverflowTransaction - } - 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: NullifierWithNote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullifierWithNote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v113.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Note == nil { - m.Note = &v14.Note{} - } - if err := m.Note.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionView) 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 ErrIntOverflowTransaction - } - 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: TransactionView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BodyView", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BodyView == nil { - m.BodyView = &TransactionBodyView{} - } - if err := m.BodyView.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BindingSig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BindingSig == nil { - m.BindingSig = &v1.BindingSignature{} - } - if err := m.BindingSig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Anchor == nil { - m.Anchor = &v11.MerkleRoot{} - } - if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionBodyView) 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 ErrIntOverflowTransaction - } - 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: TransactionBodyView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionBodyView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionViews", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActionViews = append(m.ActionViews, &ActionView{}) - if err := m.ActionViews[len(m.ActionViews)-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 TransactionParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionParameters == nil { - m.TransactionParameters = &TransactionParameters{} - } - if err := m.TransactionParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DetectionData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DetectionData == nil { - m.DetectionData = &DetectionData{} - } - if err := m.DetectionData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoView", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MemoView == nil { - m.MemoView = &MemoView{} - } - if err := m.MemoView.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionView) 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 ErrIntOverflowTransaction - } - 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: ActionView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v14.SpendView{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_Spend{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v14.OutputView{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_Output{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.SwapView{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_Swap{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.SwapClaimView{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_SwapClaim{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDefinition", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.ValidatorDefinition{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ValidatorDefinition{v} - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcRelayAction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v17.IbcRelay{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_IbcRelayAction{v} - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalSubmit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalSubmit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ProposalSubmit{v} - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalWithdraw{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ProposalWithdraw{v} - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ValidatorVote{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ValidatorVote{v} - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.DelegatorVoteView{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_DelegatorVote{v} - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalDepositClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalDepositClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ProposalDepositClaim{v} - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionOpen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionOpen{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_PositionOpen{v} - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionClose", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionClose{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_PositionClose{v} - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionWithdraw{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_PositionWithdraw{v} - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionRewardClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionRewardClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_PositionRewardClaim{v} - iNdEx = postIndex - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.Delegate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_Delegate{v} - iNdEx = postIndex - case 42: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Undelegate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.Undelegate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_Undelegate{v} - iNdEx = postIndex - case 43: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndelegateClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.UndelegateClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_UndelegateClaim{v} - iNdEx = postIndex - case 50: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolSpend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolSpend{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_CommunityPoolSpend{v} - iNdEx = postIndex - case 51: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolOutput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolOutput{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_CommunityPoolOutput{v} - iNdEx = postIndex - case 52: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolDeposit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_CommunityPoolDeposit{v} - iNdEx = postIndex - case 53: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionSchedule", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionScheduleView{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ActionDutchAuctionSchedule{v} - iNdEx = postIndex - case 54: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionEnd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionEnd{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ActionDutchAuctionEnd{v} - iNdEx = postIndex - case 55: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionWithdrawView{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_ActionDutchAuctionWithdraw{v} - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ics20Withdrawal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v17.Ics20Withdrawal{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ActionView = &ActionView_Ics20Withdrawal{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizationData) 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 ErrIntOverflowTransaction - } - 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: AuthorizationData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizationData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EffectHash", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EffectHash == nil { - m.EffectHash = &v112.EffectHash{} - } - if err := m.EffectHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpendAuths", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpendAuths = append(m.SpendAuths, &v1.SpendAuthSignature{}) - if err := m.SpendAuths[len(m.SpendAuths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVoteAuths", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorVoteAuths = append(m.DelegatorVoteAuths, &v1.SpendAuthSignature{}) - if err := m.DelegatorVoteAuths[len(m.DelegatorVoteAuths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WitnessData) 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 ErrIntOverflowTransaction - } - 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: WitnessData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WitnessData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Anchor == nil { - m.Anchor = &v11.MerkleRoot{} - } - if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StateCommitmentProofs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StateCommitmentProofs = append(m.StateCommitmentProofs, &v11.StateCommitmentProof{}) - if err := m.StateCommitmentProofs[len(m.StateCommitmentProofs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlan) 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 ErrIntOverflowTransaction - } - 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: TransactionPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Actions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Actions = append(m.Actions, &ActionPlan{}) - if err := m.Actions[len(m.Actions)-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 TransactionParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionParameters == nil { - m.TransactionParameters = &TransactionParameters{} - } - if err := m.TransactionParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DetectionData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DetectionData == nil { - m.DetectionData = &DetectionDataPlan{} - } - if err := m.DetectionData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Memo == nil { - m.Memo = &MemoPlan{} - } - if err := m.Memo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DetectionDataPlan) 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 ErrIntOverflowTransaction - } - 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: DetectionDataPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DetectionDataPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CluePlans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CluePlans = append(m.CluePlans, &CluePlan{}) - if err := m.CluePlans[len(m.CluePlans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionPlan) 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 ErrIntOverflowTransaction - } - 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: ActionPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v14.SpendPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_Spend{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v14.OutputPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_Output{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.SwapPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_Swap{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.SwapClaimPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_SwapClaim{v} - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDefinition", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.ValidatorDefinition{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ValidatorDefinition{v} - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcRelayAction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v17.IbcRelay{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_IbcRelayAction{v} - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalSubmit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalSubmit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ProposalSubmit{v} - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalWithdraw{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ProposalWithdraw{v} - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ValidatorVote{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ValidatorVote{v} - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.DelegatorVotePlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_DelegatorVote{v} - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalDepositClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.ProposalDepositClaim{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ProposalDepositClaim{v} - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionOpen", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionOpen{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_PositionOpen{v} - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionClose", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionClose{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_PositionClose{v} - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionWithdrawPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_PositionWithdraw{v} - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionRewardClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v15.PositionRewardClaimPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_PositionRewardClaim{v} - iNdEx = postIndex - case 40: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.Delegate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_Delegate{v} - iNdEx = postIndex - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Undelegate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.Undelegate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_Undelegate{v} - iNdEx = postIndex - case 42: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndelegateClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.UndelegateClaimPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_UndelegateClaim{v} - iNdEx = postIndex - case 50: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolSpend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolSpend{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_CommunityPoolSpend{v} - iNdEx = postIndex - case 51: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolOutput", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolOutput{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_CommunityPoolOutput{v} - iNdEx = postIndex - case 52: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolDeposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v18.CommunityPoolDeposit{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_CommunityPoolDeposit{v} - iNdEx = postIndex - case 53: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionSchedule", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionSchedule{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ActionDutchAuctionSchedule{v} - iNdEx = postIndex - case 54: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionEnd", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionEnd{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ActionDutchAuctionEnd{v} - iNdEx = postIndex - case 55: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionDutchAuctionWithdraw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v19.ActionDutchAuctionWithdrawPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_ActionDutchAuctionWithdraw{v} - iNdEx = postIndex - case 200: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ics20Withdrawal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v17.Ics20Withdrawal{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Action = &ActionPlan_Ics20Withdrawal{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CluePlan) 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 ErrIntOverflowTransaction - } - 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: CluePlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CluePlan: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v110.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rseed", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rseed = append(m.Rseed[:0], dAtA[iNdEx:postIndex]...) - if m.Rseed == nil { - m.Rseed = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrecisionBits", wireType) - } - m.PrecisionBits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PrecisionBits |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemoPlan) 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 ErrIntOverflowTransaction - } - 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: MemoPlan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemoPlan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plaintext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Plaintext == nil { - m.Plaintext = &MemoPlaintext{} - } - if err := m.Plaintext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemoCiphertext) 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 ErrIntOverflowTransaction - } - 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: MemoCiphertext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemoCiphertext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemoPlaintext) 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 ErrIntOverflowTransaction - } - 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: MemoPlaintext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemoPlaintext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReturnAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReturnAddress == nil { - m.ReturnAddress = &v110.Address{} - } - if err := m.ReturnAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Text = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemoPlaintextView) 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 ErrIntOverflowTransaction - } - 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: MemoPlaintextView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemoPlaintextView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReturnAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReturnAddress == nil { - m.ReturnAddress = &v110.AddressView{} - } - if err := m.ReturnAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Text = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemoView) 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 ErrIntOverflowTransaction - } - 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: MemoView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MemoView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Visible", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MemoView_Visible{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.MemoView = &MemoView_Visible_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &MemoView_Opaque{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.MemoView = &MemoView_Opaque_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemoView_Visible) 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 ErrIntOverflowTransaction - } - 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: Visible: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Visible: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ciphertext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ciphertext == nil { - m.Ciphertext = &MemoCiphertext{} - } - if err := m.Ciphertext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plaintext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Plaintext == nil { - m.Plaintext = &MemoPlaintextView{} - } - if err := m.Plaintext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MemoView_Opaque) 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 ErrIntOverflowTransaction - } - 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: Opaque: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Opaque: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ciphertext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTransaction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTransaction - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTransaction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ciphertext == nil { - m.Ciphertext = &MemoCiphertext{} - } - if err := m.Ciphertext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTransaction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTransaction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTransaction(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTransaction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTransaction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTransaction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTransaction - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTransaction - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTransaction - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTransaction = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTransaction = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTransaction = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/core/txhash/v1/txhash.pb.go b/chain/penumbra/core/txhash/v1/txhash.pb.go deleted file mode 100644 index 7468f409..00000000 --- a/chain/penumbra/core/txhash/v1/txhash.pb.go +++ /dev/null @@ -1,504 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/core/txhash/v1/txhash.proto - -package txhashv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// The hash of a Penumbra transaction's _effecting data_, describing the effects -// of the transaction on the chain state. -type EffectHash struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *EffectHash) Reset() { *m = EffectHash{} } -func (m *EffectHash) String() string { return proto.CompactTextString(m) } -func (*EffectHash) ProtoMessage() {} -func (*EffectHash) Descriptor() ([]byte, []int) { - return fileDescriptor_c59a591286b5edd2, []int{0} -} -func (m *EffectHash) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EffectHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EffectHash.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 *EffectHash) XXX_Merge(src proto.Message) { - xxx_messageInfo_EffectHash.Merge(m, src) -} -func (m *EffectHash) XXX_Size() int { - return m.Size() -} -func (m *EffectHash) XXX_DiscardUnknown() { - xxx_messageInfo_EffectHash.DiscardUnknown(m) -} - -var xxx_messageInfo_EffectHash proto.InternalMessageInfo - -func (m *EffectHash) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A transaction ID, the Sha256 hash of a transaction. -// -// This is the hash of the plain byte encoding, used by Tendermint. -type TransactionId struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *TransactionId) Reset() { *m = TransactionId{} } -func (m *TransactionId) String() string { return proto.CompactTextString(m) } -func (*TransactionId) ProtoMessage() {} -func (*TransactionId) Descriptor() ([]byte, []int) { - return fileDescriptor_c59a591286b5edd2, []int{1} -} -func (m *TransactionId) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionId.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 *TransactionId) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionId.Merge(m, src) -} -func (m *TransactionId) XXX_Size() int { - return m.Size() -} -func (m *TransactionId) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionId.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionId proto.InternalMessageInfo - -func (m *TransactionId) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -func init() { - proto.RegisterType((*EffectHash)(nil), "penumbra.core.txhash.v1.EffectHash") - proto.RegisterType((*TransactionId)(nil), "penumbra.core.txhash.v1.TransactionId") -} - -func init() { - proto.RegisterFile("penumbra/core/txhash/v1/txhash.proto", fileDescriptor_c59a591286b5edd2) -} - -var fileDescriptor_c59a591286b5edd2 = []byte{ - // 299 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x29, 0x48, 0xcd, 0x2b, - 0xcd, 0x4d, 0x2a, 0x4a, 0xd4, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0xa9, 0xc8, 0x48, 0x2c, 0xce, - 0xd0, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0x61, 0xaa, 0xf4, - 0x40, 0xaa, 0xf4, 0xa0, 0x72, 0x65, 0x86, 0x4a, 0x4a, 0x5c, 0x5c, 0xae, 0x69, 0x69, 0xa9, 0xc9, - 0x25, 0x1e, 0x89, 0xc5, 0x19, 0x42, 0x22, 0x5c, 0xac, 0x99, 0x79, 0x79, 0xa9, 0x45, 0x12, 0x8c, - 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x10, 0x8e, 0x92, 0x2a, 0x17, 0x6f, 0x48, 0x51, 0x62, 0x5e, 0x71, - 0x62, 0x72, 0x49, 0x66, 0x7e, 0x9e, 0x67, 0x0a, 0x76, 0x65, 0x4e, 0xb3, 0x99, 0x4e, 0x3c, 0x92, - 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, - 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x81, 0x4b, 0x3a, 0x39, 0x3f, 0x57, 0x0f, 0x87, 0x13, 0x9c, - 0xb8, 0x43, 0xc0, 0xcc, 0x00, 0x90, 0x43, 0x03, 0x18, 0xa3, 0x22, 0xd2, 0x33, 0x4b, 0x32, 0x4a, - 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, 0x4b, 0x8a, 0x12, 0xf3, 0xd2, 0x53, 0x73, 0xf2, 0xcb, - 0x52, 0x75, 0xcb, 0x52, 0xf3, 0x4a, 0x4a, 0x8b, 0x52, 0x8b, 0xf5, 0x33, 0xf3, 0x4a, 0x52, 0x8b, - 0x92, 0x33, 0x12, 0x41, 0x74, 0x71, 0x89, 0x7e, 0x99, 0x85, 0x3e, 0x98, 0xa3, 0x8f, 0x23, 0x20, - 0xac, 0x21, 0xac, 0x32, 0xc3, 0x45, 0x4c, 0xcc, 0x01, 0xce, 0x21, 0xab, 0x98, 0xc4, 0x03, 0x60, - 0x0e, 0x71, 0x06, 0x39, 0x04, 0x62, 0xbb, 0x5e, 0x98, 0xe1, 0x29, 0x84, 0x4c, 0x0c, 0x48, 0x26, - 0x06, 0x22, 0x13, 0x13, 0x66, 0xf8, 0x88, 0x49, 0x19, 0x87, 0x4c, 0x8c, 0x7b, 0x80, 0x93, 0x6f, - 0x6a, 0x49, 0x62, 0x4a, 0x62, 0x49, 0xe2, 0x2b, 0x26, 0x29, 0x98, 0x2a, 0x2b, 0x2b, 0x90, 0x32, - 0x2b, 0x2b, 0x88, 0x3a, 0x2b, 0xab, 0x30, 0xc3, 0x24, 0x36, 0x70, 0x44, 0x18, 0x03, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x39, 0x63, 0x72, 0x49, 0xb0, 0x01, 0x00, 0x00, -} - -func (m *EffectHash) Marshal() (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 *EffectHash) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EffectHash) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintTxhash(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionId) Marshal() (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 *TransactionId) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionId) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintTxhash(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTxhash(dAtA []byte, offset int, v uint64) int { - offset -= sovTxhash(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EffectHash) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovTxhash(uint64(l)) - } - return n -} - -func (m *TransactionId) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovTxhash(uint64(l)) - } - return n -} - -func sovTxhash(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTxhash(x uint64) (n int) { - return sovTxhash(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EffectHash) 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 ErrIntOverflowTxhash - } - 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: EffectHash: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EffectHash: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTxhash - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTxhash - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTxhash - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTxhash(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTxhash - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionId) 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 ErrIntOverflowTxhash - } - 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: TransactionId: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionId: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTxhash - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTxhash - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTxhash - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTxhash(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTxhash - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTxhash(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTxhash - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTxhash - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTxhash - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTxhash - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTxhash - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTxhash - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTxhash = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTxhash = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTxhash = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/crypto/decaf377_fmd/v1/decaf377_fmd.pb.go b/chain/penumbra/crypto/decaf377_fmd/v1/decaf377_fmd.pb.go deleted file mode 100644 index 25e1fd5e..00000000 --- a/chain/penumbra/crypto/decaf377_fmd/v1/decaf377_fmd.pb.go +++ /dev/null @@ -1,327 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/crypto/decaf377_fmd/v1/decaf377_fmd.proto - -package decaf377_fmdv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A clue for use with Fuzzy Message Detection. -type Clue struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *Clue) Reset() { *m = Clue{} } -func (m *Clue) String() string { return proto.CompactTextString(m) } -func (*Clue) ProtoMessage() {} -func (*Clue) Descriptor() ([]byte, []int) { - return fileDescriptor_85fd7d84b4ad102e, []int{0} -} -func (m *Clue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Clue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Clue.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 *Clue) XXX_Merge(src proto.Message) { - xxx_messageInfo_Clue.Merge(m, src) -} -func (m *Clue) XXX_Size() int { - return m.Size() -} -func (m *Clue) XXX_DiscardUnknown() { - xxx_messageInfo_Clue.DiscardUnknown(m) -} - -var xxx_messageInfo_Clue proto.InternalMessageInfo - -func (m *Clue) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -func init() { - proto.RegisterType((*Clue)(nil), "penumbra.crypto.decaf377_fmd.v1.Clue") -} - -func init() { - proto.RegisterFile("penumbra/crypto/decaf377_fmd/v1/decaf377_fmd.proto", fileDescriptor_85fd7d84b4ad102e) -} - -var fileDescriptor_85fd7d84b4ad102e = []byte{ - // 286 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x2a, 0x48, 0xcd, 0x2b, - 0xcd, 0x4d, 0x2a, 0x4a, 0xd4, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x4f, 0x49, 0x4d, 0x4e, - 0x4c, 0x33, 0x36, 0x37, 0x8f, 0x4f, 0xcb, 0x4d, 0xd1, 0x2f, 0x33, 0x44, 0xe1, 0xeb, 0x15, 0x14, - 0xe5, 0x97, 0xe4, 0x0b, 0xc9, 0xc3, 0xf4, 0xe8, 0x41, 0xf4, 0xe8, 0xa1, 0xa8, 0x29, 0x33, 0x54, - 0x92, 0xe1, 0x62, 0x71, 0xce, 0x29, 0x4d, 0x15, 0x12, 0xe1, 0x62, 0xcd, 0xcc, 0xcb, 0x4b, 0x2d, - 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x82, 0x70, 0x9c, 0x2e, 0x31, 0x9d, 0x78, 0x24, 0xc7, - 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, - 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x03, 0x97, 0x72, 0x72, 0x7e, 0xae, 0x1e, 0x01, 0xd3, 0x9d, 0x04, - 0x5c, 0xa0, 0x02, 0x6e, 0xb9, 0x29, 0x01, 0x20, 0x07, 0x05, 0x30, 0x46, 0xa5, 0xa5, 0x67, 0x96, - 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x17, 0x97, 0x14, 0x25, 0xe6, 0xa5, 0xa7, 0xe6, - 0xe4, 0x97, 0xa5, 0xea, 0x96, 0xa5, 0xe6, 0x95, 0x94, 0x16, 0xa5, 0x16, 0xeb, 0x67, 0xe6, 0x95, - 0xa4, 0x16, 0x25, 0x67, 0x24, 0x82, 0xe8, 0xe2, 0x12, 0xfd, 0x32, 0x0b, 0x7d, 0x30, 0x47, 0x9f, - 0x80, 0xf7, 0xad, 0x91, 0xf9, 0x65, 0x86, 0x8b, 0x98, 0x98, 0x03, 0x9c, 0x5d, 0x56, 0x31, 0xc9, - 0x05, 0xc0, 0xdc, 0xe8, 0x0c, 0x71, 0x23, 0x92, 0x93, 0xf4, 0xc2, 0x0c, 0x4f, 0x21, 0x14, 0xc4, - 0x40, 0x14, 0xc4, 0x20, 0x29, 0x88, 0x09, 0x33, 0x7c, 0xc4, 0xa4, 0x85, 0x5f, 0x41, 0x8c, 0x7b, - 0x80, 0x93, 0x6f, 0x6a, 0x49, 0x62, 0x4a, 0x62, 0x49, 0xe2, 0x2b, 0x26, 0x45, 0x98, 0x62, 0x2b, - 0x2b, 0x88, 0x6a, 0x2b, 0x2b, 0x24, 0xe5, 0x56, 0x56, 0x61, 0x86, 0x49, 0x6c, 0xe0, 0xa8, 0x31, - 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x30, 0xc9, 0xc4, 0x1b, 0xd0, 0x01, 0x00, 0x00, -} - -func (m *Clue) Marshal() (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 *Clue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Clue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintDecaf377Fmd(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintDecaf377Fmd(dAtA []byte, offset int, v uint64) int { - offset -= sovDecaf377Fmd(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Clue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovDecaf377Fmd(uint64(l)) - } - return n -} - -func sovDecaf377Fmd(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDecaf377Fmd(x uint64) (n int) { - return sovDecaf377Fmd(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Clue) 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 ErrIntOverflowDecaf377Fmd - } - 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: Clue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Clue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Fmd - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Fmd - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Fmd - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Fmd(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Fmd - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDecaf377Fmd(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Fmd - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Fmd - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Fmd - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDecaf377Fmd - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDecaf377Fmd - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDecaf377Fmd - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDecaf377Fmd = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDecaf377Fmd = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDecaf377Fmd = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/crypto/decaf377_frost/v1/decaf377_frost.pb.go b/chain/penumbra/crypto/decaf377_frost/v1/decaf377_frost.pb.go deleted file mode 100644 index 043f78f9..00000000 --- a/chain/penumbra/crypto/decaf377_frost/v1/decaf377_frost.pb.go +++ /dev/null @@ -1,1525 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/crypto/decaf377_frost/v1/decaf377_frost.proto - -package decaf377_frostv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A commitment to a polynomial, as a list of group elements. -type VerifiableSecretSharingCommitment struct { - // Each of these bytes should be the serialization of a group element. - Elements [][]byte `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"` -} - -func (m *VerifiableSecretSharingCommitment) Reset() { *m = VerifiableSecretSharingCommitment{} } -func (m *VerifiableSecretSharingCommitment) String() string { return proto.CompactTextString(m) } -func (*VerifiableSecretSharingCommitment) ProtoMessage() {} -func (*VerifiableSecretSharingCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_b4822bfeb2663db2, []int{0} -} -func (m *VerifiableSecretSharingCommitment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerifiableSecretSharingCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerifiableSecretSharingCommitment.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 *VerifiableSecretSharingCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifiableSecretSharingCommitment.Merge(m, src) -} -func (m *VerifiableSecretSharingCommitment) XXX_Size() int { - return m.Size() -} -func (m *VerifiableSecretSharingCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_VerifiableSecretSharingCommitment.DiscardUnknown(m) -} - -var xxx_messageInfo_VerifiableSecretSharingCommitment proto.InternalMessageInfo - -func (m *VerifiableSecretSharingCommitment) GetElements() [][]byte { - if m != nil { - return m.Elements - } - return nil -} - -// The public package sent in round 1 of the DKG protocol. -type DKGRound1Package struct { - // A commitment to the polynomial for secret sharing. - Commitment *VerifiableSecretSharingCommitment `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` - // A proof of knowledge of the underlying secret being shared. - ProofOfKnowledge []byte `protobuf:"bytes,2,opt,name=proof_of_knowledge,json=proofOfKnowledge,proto3" json:"proof_of_knowledge,omitempty"` -} - -func (m *DKGRound1Package) Reset() { *m = DKGRound1Package{} } -func (m *DKGRound1Package) String() string { return proto.CompactTextString(m) } -func (*DKGRound1Package) ProtoMessage() {} -func (*DKGRound1Package) Descriptor() ([]byte, []int) { - return fileDescriptor_b4822bfeb2663db2, []int{1} -} -func (m *DKGRound1Package) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DKGRound1Package) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DKGRound1Package.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 *DKGRound1Package) XXX_Merge(src proto.Message) { - xxx_messageInfo_DKGRound1Package.Merge(m, src) -} -func (m *DKGRound1Package) XXX_Size() int { - return m.Size() -} -func (m *DKGRound1Package) XXX_DiscardUnknown() { - xxx_messageInfo_DKGRound1Package.DiscardUnknown(m) -} - -var xxx_messageInfo_DKGRound1Package proto.InternalMessageInfo - -func (m *DKGRound1Package) GetCommitment() *VerifiableSecretSharingCommitment { - if m != nil { - return m.Commitment - } - return nil -} - -func (m *DKGRound1Package) GetProofOfKnowledge() []byte { - if m != nil { - return m.ProofOfKnowledge - } - return nil -} - -// A share of the final signing key. -type SigningShare struct { - // These bytes should be a valid scalar. - Scalar []byte `protobuf:"bytes,1,opt,name=scalar,proto3" json:"scalar,omitempty"` -} - -func (m *SigningShare) Reset() { *m = SigningShare{} } -func (m *SigningShare) String() string { return proto.CompactTextString(m) } -func (*SigningShare) ProtoMessage() {} -func (*SigningShare) Descriptor() ([]byte, []int) { - return fileDescriptor_b4822bfeb2663db2, []int{2} -} -func (m *SigningShare) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SigningShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SigningShare.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 *SigningShare) XXX_Merge(src proto.Message) { - xxx_messageInfo_SigningShare.Merge(m, src) -} -func (m *SigningShare) XXX_Size() int { - return m.Size() -} -func (m *SigningShare) XXX_DiscardUnknown() { - xxx_messageInfo_SigningShare.DiscardUnknown(m) -} - -var xxx_messageInfo_SigningShare proto.InternalMessageInfo - -func (m *SigningShare) GetScalar() []byte { - if m != nil { - return m.Scalar - } - return nil -} - -// The per-participant package sent in round 2 of the DKG protocol. -type DKGRound2Package struct { - // This is the share we're sending to that participant. - SigningShare *SigningShare `protobuf:"bytes,1,opt,name=signing_share,json=signingShare,proto3" json:"signing_share,omitempty"` -} - -func (m *DKGRound2Package) Reset() { *m = DKGRound2Package{} } -func (m *DKGRound2Package) String() string { return proto.CompactTextString(m) } -func (*DKGRound2Package) ProtoMessage() {} -func (*DKGRound2Package) Descriptor() ([]byte, []int) { - return fileDescriptor_b4822bfeb2663db2, []int{3} -} -func (m *DKGRound2Package) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DKGRound2Package) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DKGRound2Package.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 *DKGRound2Package) XXX_Merge(src proto.Message) { - xxx_messageInfo_DKGRound2Package.Merge(m, src) -} -func (m *DKGRound2Package) XXX_Size() int { - return m.Size() -} -func (m *DKGRound2Package) XXX_DiscardUnknown() { - xxx_messageInfo_DKGRound2Package.DiscardUnknown(m) -} - -var xxx_messageInfo_DKGRound2Package proto.InternalMessageInfo - -func (m *DKGRound2Package) GetSigningShare() *SigningShare { - if m != nil { - return m.SigningShare - } - return nil -} - -// Represents a commitment to a nonce value. -type NonceCommitment struct { - // These bytes should be a valid group element. - Element []byte `protobuf:"bytes,1,opt,name=element,proto3" json:"element,omitempty"` -} - -func (m *NonceCommitment) Reset() { *m = NonceCommitment{} } -func (m *NonceCommitment) String() string { return proto.CompactTextString(m) } -func (*NonceCommitment) ProtoMessage() {} -func (*NonceCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_b4822bfeb2663db2, []int{4} -} -func (m *NonceCommitment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NonceCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NonceCommitment.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 *NonceCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_NonceCommitment.Merge(m, src) -} -func (m *NonceCommitment) XXX_Size() int { - return m.Size() -} -func (m *NonceCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_NonceCommitment.DiscardUnknown(m) -} - -var xxx_messageInfo_NonceCommitment proto.InternalMessageInfo - -func (m *NonceCommitment) GetElement() []byte { - if m != nil { - return m.Element - } - return nil -} - -// Represents the commitments to nonces needed for signing. -type SigningCommitments struct { - // One nonce to hide them. - Hiding *NonceCommitment `protobuf:"bytes,1,opt,name=hiding,proto3" json:"hiding,omitempty"` - // Another to bind them. - Binding *NonceCommitment `protobuf:"bytes,2,opt,name=binding,proto3" json:"binding,omitempty"` -} - -func (m *SigningCommitments) Reset() { *m = SigningCommitments{} } -func (m *SigningCommitments) String() string { return proto.CompactTextString(m) } -func (*SigningCommitments) ProtoMessage() {} -func (*SigningCommitments) Descriptor() ([]byte, []int) { - return fileDescriptor_b4822bfeb2663db2, []int{5} -} -func (m *SigningCommitments) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SigningCommitments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SigningCommitments.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 *SigningCommitments) XXX_Merge(src proto.Message) { - xxx_messageInfo_SigningCommitments.Merge(m, src) -} -func (m *SigningCommitments) XXX_Size() int { - return m.Size() -} -func (m *SigningCommitments) XXX_DiscardUnknown() { - xxx_messageInfo_SigningCommitments.DiscardUnknown(m) -} - -var xxx_messageInfo_SigningCommitments proto.InternalMessageInfo - -func (m *SigningCommitments) GetHiding() *NonceCommitment { - if m != nil { - return m.Hiding - } - return nil -} - -func (m *SigningCommitments) GetBinding() *NonceCommitment { - if m != nil { - return m.Binding - } - return nil -} - -// A share of the final signature. These get aggregated to make the actual thing. -type SignatureShare struct { - // These bytes should be a valid scalar. - Scalar []byte `protobuf:"bytes,1,opt,name=scalar,proto3" json:"scalar,omitempty"` -} - -func (m *SignatureShare) Reset() { *m = SignatureShare{} } -func (m *SignatureShare) String() string { return proto.CompactTextString(m) } -func (*SignatureShare) ProtoMessage() {} -func (*SignatureShare) Descriptor() ([]byte, []int) { - return fileDescriptor_b4822bfeb2663db2, []int{6} -} -func (m *SignatureShare) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SignatureShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SignatureShare.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 *SignatureShare) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignatureShare.Merge(m, src) -} -func (m *SignatureShare) XXX_Size() int { - return m.Size() -} -func (m *SignatureShare) XXX_DiscardUnknown() { - xxx_messageInfo_SignatureShare.DiscardUnknown(m) -} - -var xxx_messageInfo_SignatureShare proto.InternalMessageInfo - -func (m *SignatureShare) GetScalar() []byte { - if m != nil { - return m.Scalar - } - return nil -} - -func init() { - proto.RegisterType((*VerifiableSecretSharingCommitment)(nil), "penumbra.crypto.decaf377_frost.v1.VerifiableSecretSharingCommitment") - proto.RegisterType((*DKGRound1Package)(nil), "penumbra.crypto.decaf377_frost.v1.DKGRound1Package") - proto.RegisterType((*SigningShare)(nil), "penumbra.crypto.decaf377_frost.v1.SigningShare") - proto.RegisterType((*DKGRound2Package)(nil), "penumbra.crypto.decaf377_frost.v1.DKGRound2Package") - proto.RegisterType((*NonceCommitment)(nil), "penumbra.crypto.decaf377_frost.v1.NonceCommitment") - proto.RegisterType((*SigningCommitments)(nil), "penumbra.crypto.decaf377_frost.v1.SigningCommitments") - proto.RegisterType((*SignatureShare)(nil), "penumbra.crypto.decaf377_frost.v1.SignatureShare") -} - -func init() { - proto.RegisterFile("penumbra/crypto/decaf377_frost/v1/decaf377_frost.proto", fileDescriptor_b4822bfeb2663db2) -} - -var fileDescriptor_b4822bfeb2663db2 = []byte{ - // 520 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x8b, 0xd3, 0x40, - 0x18, 0xc6, 0x77, 0xb2, 0xd0, 0x95, 0xb1, 0xea, 0x32, 0x07, 0x29, 0x1e, 0x42, 0x37, 0xa2, 0x14, - 0x5c, 0x13, 0xd2, 0x05, 0x57, 0xe2, 0x41, 0x68, 0x8b, 0x0b, 0xae, 0x7f, 0x42, 0x2a, 0x3d, 0x48, - 0xa1, 0x4c, 0x27, 0x6f, 0xd2, 0x71, 0x9b, 0x99, 0x32, 0x99, 0x56, 0xfc, 0x16, 0x7e, 0x06, 0x0f, - 0x1e, 0x3c, 0xf8, 0x39, 0xc4, 0xd3, 0x1e, 0x3d, 0x4a, 0x7b, 0xf3, 0x53, 0x48, 0xda, 0x64, 0xfb, - 0xe7, 0x60, 0x16, 0x4f, 0xed, 0xfb, 0xe6, 0x79, 0x9e, 0xf9, 0xbd, 0x2f, 0x99, 0xe0, 0x27, 0x13, - 0x10, 0xd3, 0x64, 0xa8, 0xa8, 0xc3, 0xd4, 0xa7, 0x89, 0x96, 0x4e, 0x08, 0x8c, 0x46, 0x27, 0xa7, - 0xa7, 0x83, 0x48, 0xc9, 0x54, 0x3b, 0x33, 0x77, 0xa7, 0x63, 0x4f, 0x94, 0xd4, 0x92, 0x1c, 0x15, - 0x3e, 0x7b, 0xe5, 0xb3, 0x77, 0x54, 0x33, 0xd7, 0x7a, 0x8e, 0x8f, 0x7a, 0xa0, 0x78, 0xc4, 0xe9, - 0x70, 0x0c, 0x5d, 0x60, 0x0a, 0x74, 0x77, 0x44, 0x15, 0x17, 0x71, 0x5b, 0x26, 0x09, 0xd7, 0x09, - 0x08, 0x4d, 0xee, 0xe1, 0x1b, 0x30, 0x86, 0xec, 0x6f, 0x5a, 0x43, 0xf5, 0xfd, 0x46, 0x35, 0xb8, - 0xaa, 0xad, 0xaf, 0x08, 0x1f, 0x76, 0xce, 0xcf, 0x02, 0x39, 0x15, 0xa1, 0xeb, 0x53, 0x76, 0x41, - 0x63, 0x20, 0x21, 0xc6, 0xec, 0xca, 0x5e, 0x43, 0x75, 0xd4, 0xb8, 0xd9, 0xec, 0xd8, 0xa5, 0x34, - 0x76, 0x29, 0x4a, 0xb0, 0x91, 0x4b, 0x8e, 0x31, 0x99, 0x28, 0x29, 0xa3, 0x81, 0x8c, 0x06, 0x17, - 0x42, 0x7e, 0x1c, 0x43, 0x18, 0x43, 0xcd, 0xa8, 0xa3, 0x46, 0x35, 0x38, 0x5c, 0x3e, 0x79, 0x1b, - 0x9d, 0x17, 0x7d, 0xeb, 0x21, 0xae, 0x76, 0x79, 0x2c, 0xb8, 0x88, 0xb3, 0x54, 0x20, 0x77, 0x71, - 0x25, 0x65, 0x74, 0x4c, 0xd5, 0x92, 0xaf, 0x1a, 0xe4, 0x95, 0x35, 0x5a, 0xcf, 0xd3, 0x2c, 0xe6, - 0x79, 0x87, 0x6f, 0xa5, 0x2b, 0xef, 0x20, 0xcd, 0xcc, 0xf9, 0x48, 0xce, 0x35, 0x46, 0xda, 0x3c, - 0x33, 0xa8, 0xa6, 0x1b, 0x95, 0xf5, 0x08, 0xdf, 0x79, 0x23, 0x05, 0x83, 0x8d, 0x4d, 0xd7, 0xf0, - 0x41, 0xbe, 0xd9, 0x9c, 0xaa, 0x28, 0xad, 0xef, 0x08, 0x93, 0x3c, 0x6b, 0xad, 0x4f, 0xc9, 0x4b, - 0x5c, 0x19, 0xf1, 0x90, 0x8b, 0x38, 0x47, 0x6a, 0x5e, 0x03, 0x69, 0xe7, 0xd0, 0x20, 0x4f, 0x20, - 0xaf, 0xf0, 0xc1, 0x90, 0x8b, 0x65, 0x98, 0xf1, 0xdf, 0x61, 0x45, 0x84, 0xd5, 0xc0, 0xb7, 0x33, - 0x5e, 0xaa, 0xa7, 0x0a, 0xfe, 0xb9, 0xf1, 0xd6, 0xdc, 0xf8, 0x31, 0x37, 0xd1, 0xe5, 0xdc, 0x44, - 0xbf, 0xe7, 0x26, 0xfa, 0xbc, 0x30, 0xf7, 0x2e, 0x17, 0xe6, 0xde, 0xaf, 0x85, 0xb9, 0x87, 0x1f, - 0x30, 0x99, 0x94, 0x43, 0xb4, 0x48, 0x27, 0x6f, 0xbd, 0xc8, 0x3a, 0x7e, 0xf6, 0xf2, 0xfb, 0xe8, - 0xfd, 0x87, 0x98, 0xeb, 0xd1, 0x74, 0x68, 0x33, 0x99, 0x38, 0xa9, 0x56, 0x54, 0xc4, 0x30, 0x96, - 0x33, 0x78, 0x3c, 0x03, 0x91, 0x41, 0xa5, 0x0e, 0x17, 0x1a, 0x14, 0x1b, 0xd1, 0xec, 0x37, 0xbb, - 0x46, 0x4f, 0x9d, 0x65, 0xe1, 0x94, 0x5e, 0xb7, 0x67, 0xdb, 0x9d, 0x99, 0xfb, 0xc5, 0xd8, 0xf7, - 0xdb, 0x9d, 0x6f, 0x46, 0xdd, 0x2f, 0x58, 0xdb, 0x2b, 0xd6, 0x2d, 0x30, 0xbb, 0xe7, 0xfe, 0x5c, - 0x4b, 0xfa, 0x2b, 0x49, 0x7f, 0x4b, 0xd2, 0xef, 0xb9, 0x73, 0xe3, 0xb8, 0x4c, 0xd2, 0x3f, 0xf3, - 0x5b, 0xaf, 0x41, 0xd3, 0x90, 0x6a, 0xfa, 0xc7, 0xb8, 0x5f, 0xc8, 0x3d, 0x6f, 0xa5, 0xf7, 0xbc, - 0x2d, 0x83, 0xe7, 0xf5, 0xdc, 0x61, 0x65, 0xf9, 0x49, 0x38, 0xf9, 0x1b, 0x00, 0x00, 0xff, 0xff, - 0x39, 0x20, 0x1b, 0x74, 0x4c, 0x04, 0x00, 0x00, -} - -func (m *VerifiableSecretSharingCommitment) Marshal() (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 *VerifiableSecretSharingCommitment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerifiableSecretSharingCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Elements) > 0 { - for iNdEx := len(m.Elements) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Elements[iNdEx]) - copy(dAtA[i:], m.Elements[iNdEx]) - i = encodeVarintDecaf377Frost(dAtA, i, uint64(len(m.Elements[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DKGRound1Package) Marshal() (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 *DKGRound1Package) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DKGRound1Package) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProofOfKnowledge) > 0 { - i -= len(m.ProofOfKnowledge) - copy(dAtA[i:], m.ProofOfKnowledge) - i = encodeVarintDecaf377Frost(dAtA, i, uint64(len(m.ProofOfKnowledge))) - i-- - dAtA[i] = 0x12 - } - if m.Commitment != nil { - { - size, err := m.Commitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDecaf377Frost(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SigningShare) Marshal() (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 *SigningShare) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SigningShare) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Scalar) > 0 { - i -= len(m.Scalar) - copy(dAtA[i:], m.Scalar) - i = encodeVarintDecaf377Frost(dAtA, i, uint64(len(m.Scalar))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DKGRound2Package) Marshal() (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 *DKGRound2Package) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DKGRound2Package) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SigningShare != nil { - { - size, err := m.SigningShare.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDecaf377Frost(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NonceCommitment) Marshal() (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 *NonceCommitment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NonceCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Element) > 0 { - i -= len(m.Element) - copy(dAtA[i:], m.Element) - i = encodeVarintDecaf377Frost(dAtA, i, uint64(len(m.Element))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SigningCommitments) Marshal() (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 *SigningCommitments) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SigningCommitments) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Binding != nil { - { - size, err := m.Binding.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDecaf377Frost(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Hiding != nil { - { - size, err := m.Hiding.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDecaf377Frost(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SignatureShare) Marshal() (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 *SignatureShare) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignatureShare) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Scalar) > 0 { - i -= len(m.Scalar) - copy(dAtA[i:], m.Scalar) - i = encodeVarintDecaf377Frost(dAtA, i, uint64(len(m.Scalar))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintDecaf377Frost(dAtA []byte, offset int, v uint64) int { - offset -= sovDecaf377Frost(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *VerifiableSecretSharingCommitment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Elements) > 0 { - for _, b := range m.Elements { - l = len(b) - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - } - return n -} - -func (m *DKGRound1Package) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Commitment != nil { - l = m.Commitment.Size() - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - l = len(m.ProofOfKnowledge) - if l > 0 { - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - return n -} - -func (m *SigningShare) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Scalar) - if l > 0 { - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - return n -} - -func (m *DKGRound2Package) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SigningShare != nil { - l = m.SigningShare.Size() - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - return n -} - -func (m *NonceCommitment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Element) - if l > 0 { - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - return n -} - -func (m *SigningCommitments) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Hiding != nil { - l = m.Hiding.Size() - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - if m.Binding != nil { - l = m.Binding.Size() - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - return n -} - -func (m *SignatureShare) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Scalar) - if l > 0 { - n += 1 + l + sovDecaf377Frost(uint64(l)) - } - return n -} - -func sovDecaf377Frost(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDecaf377Frost(x uint64) (n int) { - return sovDecaf377Frost(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VerifiableSecretSharingCommitment) 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 ErrIntOverflowDecaf377Frost - } - 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: VerifiableSecretSharingCommitment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerifiableSecretSharingCommitment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Elements", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Elements = append(m.Elements, make([]byte, postIndex-iNdEx)) - copy(m.Elements[len(m.Elements)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Frost(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Frost - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DKGRound1Package) 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 ErrIntOverflowDecaf377Frost - } - 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: DKGRound1Package: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DKGRound1Package: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commitment == nil { - m.Commitment = &VerifiableSecretSharingCommitment{} - } - if err := m.Commitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofOfKnowledge", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProofOfKnowledge = append(m.ProofOfKnowledge[:0], dAtA[iNdEx:postIndex]...) - if m.ProofOfKnowledge == nil { - m.ProofOfKnowledge = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Frost(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Frost - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SigningShare) 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 ErrIntOverflowDecaf377Frost - } - 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: SigningShare: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SigningShare: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scalar = append(m.Scalar[:0], dAtA[iNdEx:postIndex]...) - if m.Scalar == nil { - m.Scalar = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Frost(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Frost - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DKGRound2Package) 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 ErrIntOverflowDecaf377Frost - } - 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: DKGRound2Package: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DKGRound2Package: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SigningShare", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SigningShare == nil { - m.SigningShare = &SigningShare{} - } - if err := m.SigningShare.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Frost(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Frost - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NonceCommitment) 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 ErrIntOverflowDecaf377Frost - } - 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: NonceCommitment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NonceCommitment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Element", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Element = append(m.Element[:0], dAtA[iNdEx:postIndex]...) - if m.Element == nil { - m.Element = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Frost(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Frost - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SigningCommitments) 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 ErrIntOverflowDecaf377Frost - } - 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: SigningCommitments: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SigningCommitments: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hiding", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Hiding == nil { - m.Hiding = &NonceCommitment{} - } - if err := m.Hiding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Binding", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Binding == nil { - m.Binding = &NonceCommitment{} - } - if err := m.Binding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Frost(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Frost - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignatureShare) 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 ErrIntOverflowDecaf377Frost - } - 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: SignatureShare: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignatureShare: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Frost - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Frost - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scalar = append(m.Scalar[:0], dAtA[iNdEx:postIndex]...) - if m.Scalar == nil { - m.Scalar = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Frost(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Frost - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDecaf377Frost(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Frost - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDecaf377Frost - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDecaf377Frost - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDecaf377Frost - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDecaf377Frost = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDecaf377Frost = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDecaf377Frost = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/crypto/decaf377_rdsa/v1/decaf377_rdsa.pb.go b/chain/penumbra/crypto/decaf377_rdsa/v1/decaf377_rdsa.pb.go deleted file mode 100644 index 1bea2c92..00000000 --- a/chain/penumbra/crypto/decaf377_rdsa/v1/decaf377_rdsa.pb.go +++ /dev/null @@ -1,673 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/crypto/decaf377_rdsa/v1/decaf377_rdsa.proto - -package decaf377_rdsav1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type SpendAuthSignature struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *SpendAuthSignature) Reset() { *m = SpendAuthSignature{} } -func (m *SpendAuthSignature) String() string { return proto.CompactTextString(m) } -func (*SpendAuthSignature) ProtoMessage() {} -func (*SpendAuthSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_70f2e93711fd8093, []int{0} -} -func (m *SpendAuthSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendAuthSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendAuthSignature.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 *SpendAuthSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendAuthSignature.Merge(m, src) -} -func (m *SpendAuthSignature) XXX_Size() int { - return m.Size() -} -func (m *SpendAuthSignature) XXX_DiscardUnknown() { - xxx_messageInfo_SpendAuthSignature.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendAuthSignature proto.InternalMessageInfo - -func (m *SpendAuthSignature) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type BindingSignature struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *BindingSignature) Reset() { *m = BindingSignature{} } -func (m *BindingSignature) String() string { return proto.CompactTextString(m) } -func (*BindingSignature) ProtoMessage() {} -func (*BindingSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_70f2e93711fd8093, []int{1} -} -func (m *BindingSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BindingSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BindingSignature.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 *BindingSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_BindingSignature.Merge(m, src) -} -func (m *BindingSignature) XXX_Size() int { - return m.Size() -} -func (m *BindingSignature) XXX_DiscardUnknown() { - xxx_messageInfo_BindingSignature.DiscardUnknown(m) -} - -var xxx_messageInfo_BindingSignature proto.InternalMessageInfo - -func (m *BindingSignature) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type SpendVerificationKey struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *SpendVerificationKey) Reset() { *m = SpendVerificationKey{} } -func (m *SpendVerificationKey) String() string { return proto.CompactTextString(m) } -func (*SpendVerificationKey) ProtoMessage() {} -func (*SpendVerificationKey) Descriptor() ([]byte, []int) { - return fileDescriptor_70f2e93711fd8093, []int{2} -} -func (m *SpendVerificationKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendVerificationKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendVerificationKey.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 *SpendVerificationKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendVerificationKey.Merge(m, src) -} -func (m *SpendVerificationKey) XXX_Size() int { - return m.Size() -} -func (m *SpendVerificationKey) XXX_DiscardUnknown() { - xxx_messageInfo_SpendVerificationKey.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendVerificationKey proto.InternalMessageInfo - -func (m *SpendVerificationKey) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -func init() { - proto.RegisterType((*SpendAuthSignature)(nil), "penumbra.crypto.decaf377_rdsa.v1.SpendAuthSignature") - proto.RegisterType((*BindingSignature)(nil), "penumbra.crypto.decaf377_rdsa.v1.BindingSignature") - proto.RegisterType((*SpendVerificationKey)(nil), "penumbra.crypto.decaf377_rdsa.v1.SpendVerificationKey") -} - -func init() { - proto.RegisterFile("penumbra/crypto/decaf377_rdsa/v1/decaf377_rdsa.proto", fileDescriptor_70f2e93711fd8093) -} - -var fileDescriptor_70f2e93711fd8093 = []byte{ - // 336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd2, 0xbf, 0x4b, 0xc3, 0x40, - 0x14, 0x07, 0xf0, 0x26, 0xa2, 0x43, 0x70, 0xd0, 0xd2, 0xc1, 0x29, 0x96, 0xe2, 0x50, 0xfc, 0x91, - 0x23, 0x54, 0xa8, 0xc4, 0xc9, 0xb4, 0xe0, 0x20, 0x42, 0x68, 0x21, 0x83, 0x04, 0xe4, 0x7a, 0xf7, - 0x9a, 0x1c, 0xd8, 0xbb, 0x70, 0xb9, 0x1c, 0xf4, 0xbf, 0xf0, 0x6f, 0x70, 0xf4, 0x2f, 0x11, 0xa7, - 0x8e, 0xe2, 0x24, 0xe9, 0xe6, 0x5f, 0x21, 0x6d, 0x2c, 0x36, 0x20, 0x64, 0x3a, 0xde, 0xe3, 0xf3, - 0x8e, 0xef, 0x3b, 0xce, 0xba, 0x4c, 0x81, 0xe7, 0xb3, 0x89, 0xc4, 0x88, 0xc8, 0x79, 0xaa, 0x04, - 0xa2, 0x40, 0xf0, 0xb4, 0xd7, 0xef, 0x3f, 0x4a, 0x9a, 0x61, 0xa4, 0xdd, 0x6a, 0xc3, 0x49, 0xa5, - 0x50, 0xa2, 0xd9, 0xde, 0x4c, 0x39, 0xe5, 0x94, 0x53, 0x45, 0xda, 0xed, 0x9c, 0x5a, 0xcd, 0x71, - 0x0a, 0x9c, 0xde, 0xe4, 0x2a, 0x19, 0xb3, 0x98, 0x63, 0x95, 0x4b, 0x68, 0xb6, 0xac, 0x5d, 0xc6, - 0x39, 0xc8, 0x23, 0xa3, 0x6d, 0x74, 0xf7, 0x47, 0x65, 0xd1, 0xe9, 0x5a, 0x07, 0x3e, 0xe3, 0x94, - 0xf1, 0xb8, 0x4e, 0x9e, 0x5b, 0xad, 0xf5, 0xad, 0x21, 0x48, 0x36, 0x65, 0x04, 0x2b, 0x26, 0xf8, - 0x1d, 0xcc, 0xff, 0xd7, 0xfe, 0xa7, 0xf9, 0x56, 0xd8, 0xc6, 0xa2, 0xb0, 0x8d, 0xaf, 0xc2, 0x36, - 0x9e, 0x97, 0x76, 0x63, 0xb1, 0xb4, 0x1b, 0x1f, 0x4b, 0xbb, 0x61, 0x9d, 0x10, 0x31, 0x73, 0xea, - 0x96, 0xf0, 0x0f, 0x87, 0xbf, 0x9d, 0x11, 0xcd, 0x70, 0xb0, 0xda, 0x3c, 0x30, 0x1e, 0x92, 0x98, - 0xa9, 0x24, 0x9f, 0x38, 0x44, 0xcc, 0x50, 0xa6, 0x24, 0xe6, 0x31, 0x3c, 0x09, 0x0d, 0x17, 0x1a, - 0xf8, 0x2a, 0x79, 0x86, 0x18, 0x57, 0x20, 0x49, 0x82, 0x57, 0x67, 0xa6, 0x90, 0xbe, 0x42, 0xeb, - 0x02, 0xd5, 0xbd, 0xf4, 0x75, 0xa5, 0xa1, 0xdd, 0x17, 0x73, 0x27, 0x18, 0x0c, 0x5f, 0xcd, 0xe3, - 0x60, 0x93, 0x73, 0x50, 0xe6, 0xdc, 0x4e, 0xe5, 0x84, 0xee, 0xfb, 0x9f, 0x88, 0x4a, 0x11, 0x6d, - 0x8b, 0x28, 0x74, 0x0b, 0xf3, 0xac, 0x46, 0x44, 0xb7, 0x81, 0x7f, 0x0f, 0x0a, 0x53, 0xac, 0xf0, - 0xb7, 0xd9, 0xd9, 0x68, 0xcf, 0x2b, 0xb9, 0xe7, 0x6d, 0x7b, 0xcf, 0x0b, 0xdd, 0xc9, 0xde, 0xfa, - 0x27, 0xf4, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0xab, 0x14, 0x0d, 0x16, 0x41, 0x02, 0x00, 0x00, -} - -func (m *SpendAuthSignature) Marshal() (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 *SpendAuthSignature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendAuthSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintDecaf377Rdsa(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BindingSignature) Marshal() (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 *BindingSignature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BindingSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintDecaf377Rdsa(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpendVerificationKey) Marshal() (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 *SpendVerificationKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendVerificationKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintDecaf377Rdsa(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintDecaf377Rdsa(dAtA []byte, offset int, v uint64) int { - offset -= sovDecaf377Rdsa(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SpendAuthSignature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovDecaf377Rdsa(uint64(l)) - } - return n -} - -func (m *BindingSignature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovDecaf377Rdsa(uint64(l)) - } - return n -} - -func (m *SpendVerificationKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovDecaf377Rdsa(uint64(l)) - } - return n -} - -func sovDecaf377Rdsa(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDecaf377Rdsa(x uint64) (n int) { - return sovDecaf377Rdsa(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SpendAuthSignature) 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 ErrIntOverflowDecaf377Rdsa - } - 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: SpendAuthSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpendAuthSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Rdsa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Rdsa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BindingSignature) 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 ErrIntOverflowDecaf377Rdsa - } - 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: BindingSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BindingSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Rdsa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Rdsa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendVerificationKey) 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 ErrIntOverflowDecaf377Rdsa - } - 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: SpendVerificationKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpendVerificationKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDecaf377Rdsa - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDecaf377Rdsa(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDecaf377Rdsa - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDecaf377Rdsa(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Rdsa - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Rdsa - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDecaf377Rdsa - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDecaf377Rdsa - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDecaf377Rdsa - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDecaf377Rdsa - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDecaf377Rdsa = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDecaf377Rdsa = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDecaf377Rdsa = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/crypto/tct/v1/tct.pb.go b/chain/penumbra/crypto/tct/v1/tct.pb.go deleted file mode 100644 index 5ec0d0d0..00000000 --- a/chain/penumbra/crypto/tct/v1/tct.pb.go +++ /dev/null @@ -1,1061 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/crypto/tct/v1/tct.proto - -package tctv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type StateCommitment struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *StateCommitment) Reset() { *m = StateCommitment{} } -func (m *StateCommitment) String() string { return proto.CompactTextString(m) } -func (*StateCommitment) ProtoMessage() {} -func (*StateCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_e171b1288fe7a145, []int{0} -} -func (m *StateCommitment) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StateCommitment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StateCommitment.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 *StateCommitment) XXX_Merge(src proto.Message) { - xxx_messageInfo_StateCommitment.Merge(m, src) -} -func (m *StateCommitment) XXX_Size() int { - return m.Size() -} -func (m *StateCommitment) XXX_DiscardUnknown() { - xxx_messageInfo_StateCommitment.DiscardUnknown(m) -} - -var xxx_messageInfo_StateCommitment proto.InternalMessageInfo - -func (m *StateCommitment) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -type MerkleRoot struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *MerkleRoot) Reset() { *m = MerkleRoot{} } -func (m *MerkleRoot) String() string { return proto.CompactTextString(m) } -func (*MerkleRoot) ProtoMessage() {} -func (*MerkleRoot) Descriptor() ([]byte, []int) { - return fileDescriptor_e171b1288fe7a145, []int{1} -} -func (m *MerkleRoot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MerkleRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MerkleRoot.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 *MerkleRoot) XXX_Merge(src proto.Message) { - xxx_messageInfo_MerkleRoot.Merge(m, src) -} -func (m *MerkleRoot) XXX_Size() int { - return m.Size() -} -func (m *MerkleRoot) XXX_DiscardUnknown() { - xxx_messageInfo_MerkleRoot.DiscardUnknown(m) -} - -var xxx_messageInfo_MerkleRoot proto.InternalMessageInfo - -func (m *MerkleRoot) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// An authentication path from a state commitment to the root of the state commitment tree. -type StateCommitmentProof struct { - NoteCommitment *StateCommitment `protobuf:"bytes,1,opt,name=note_commitment,json=noteCommitment,proto3" json:"note_commitment,omitempty"` - Position uint64 `protobuf:"varint,2,opt,name=position,proto3" json:"position,omitempty"` - AuthPath []*MerklePathChunk `protobuf:"bytes,3,rep,name=auth_path,json=authPath,proto3" json:"auth_path,omitempty"` -} - -func (m *StateCommitmentProof) Reset() { *m = StateCommitmentProof{} } -func (m *StateCommitmentProof) String() string { return proto.CompactTextString(m) } -func (*StateCommitmentProof) ProtoMessage() {} -func (*StateCommitmentProof) Descriptor() ([]byte, []int) { - return fileDescriptor_e171b1288fe7a145, []int{2} -} -func (m *StateCommitmentProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StateCommitmentProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StateCommitmentProof.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 *StateCommitmentProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_StateCommitmentProof.Merge(m, src) -} -func (m *StateCommitmentProof) XXX_Size() int { - return m.Size() -} -func (m *StateCommitmentProof) XXX_DiscardUnknown() { - xxx_messageInfo_StateCommitmentProof.DiscardUnknown(m) -} - -var xxx_messageInfo_StateCommitmentProof proto.InternalMessageInfo - -func (m *StateCommitmentProof) GetNoteCommitment() *StateCommitment { - if m != nil { - return m.NoteCommitment - } - return nil -} - -func (m *StateCommitmentProof) GetPosition() uint64 { - if m != nil { - return m.Position - } - return 0 -} - -func (m *StateCommitmentProof) GetAuthPath() []*MerklePathChunk { - if m != nil { - return m.AuthPath - } - return nil -} - -// A set of 3 sibling hashes in the auth path for some note commitment. -type MerklePathChunk struct { - Sibling_1 []byte `protobuf:"bytes,1,opt,name=sibling_1,json=sibling1,proto3" json:"sibling_1,omitempty"` - Sibling_2 []byte `protobuf:"bytes,2,opt,name=sibling_2,json=sibling2,proto3" json:"sibling_2,omitempty"` - Sibling_3 []byte `protobuf:"bytes,3,opt,name=sibling_3,json=sibling3,proto3" json:"sibling_3,omitempty"` -} - -func (m *MerklePathChunk) Reset() { *m = MerklePathChunk{} } -func (m *MerklePathChunk) String() string { return proto.CompactTextString(m) } -func (*MerklePathChunk) ProtoMessage() {} -func (*MerklePathChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_e171b1288fe7a145, []int{3} -} -func (m *MerklePathChunk) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MerklePathChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MerklePathChunk.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 *MerklePathChunk) XXX_Merge(src proto.Message) { - xxx_messageInfo_MerklePathChunk.Merge(m, src) -} -func (m *MerklePathChunk) XXX_Size() int { - return m.Size() -} -func (m *MerklePathChunk) XXX_DiscardUnknown() { - xxx_messageInfo_MerklePathChunk.DiscardUnknown(m) -} - -var xxx_messageInfo_MerklePathChunk proto.InternalMessageInfo - -func (m *MerklePathChunk) GetSibling_1() []byte { - if m != nil { - return m.Sibling_1 - } - return nil -} - -func (m *MerklePathChunk) GetSibling_2() []byte { - if m != nil { - return m.Sibling_2 - } - return nil -} - -func (m *MerklePathChunk) GetSibling_3() []byte { - if m != nil { - return m.Sibling_3 - } - return nil -} - -func init() { - proto.RegisterType((*StateCommitment)(nil), "penumbra.crypto.tct.v1.StateCommitment") - proto.RegisterType((*MerkleRoot)(nil), "penumbra.crypto.tct.v1.MerkleRoot") - proto.RegisterType((*StateCommitmentProof)(nil), "penumbra.crypto.tct.v1.StateCommitmentProof") - proto.RegisterType((*MerklePathChunk)(nil), "penumbra.crypto.tct.v1.MerklePathChunk") -} - -func init() { proto.RegisterFile("penumbra/crypto/tct/v1/tct.proto", fileDescriptor_e171b1288fe7a145) } - -var fileDescriptor_e171b1288fe7a145 = []byte{ - // 423 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xc7, 0x3b, 0xa9, 0x4a, 0x77, 0x14, 0x0b, 0x61, 0x59, 0xea, 0x0a, 0xa1, 0xe4, 0xb2, 0x7b, - 0x31, 0xc3, 0xb4, 0x17, 0x89, 0xb7, 0x56, 0xf0, 0xb4, 0x10, 0x62, 0xe8, 0x41, 0x02, 0x65, 0x32, - 0x8e, 0xcd, 0xb0, 0xcd, 0x4c, 0x98, 0xbc, 0x04, 0xfc, 0x14, 0xfa, 0x19, 0x3c, 0xfa, 0x49, 0x64, - 0x4f, 0x7b, 0xf4, 0x28, 0xe9, 0xcd, 0x4f, 0x21, 0x49, 0xb6, 0xbb, 0xb5, 0xb4, 0x7b, 0x1a, 0xfe, - 0xef, 0xf7, 0x7f, 0x2f, 0xff, 0x17, 0x1e, 0x1e, 0xe7, 0x42, 0x95, 0x59, 0x62, 0x18, 0xe1, 0xe6, - 0x6b, 0x0e, 0x9a, 0x00, 0x07, 0x52, 0xd1, 0xe6, 0xf1, 0x72, 0xa3, 0x41, 0xdb, 0x67, 0x5b, 0x87, - 0xd7, 0x39, 0xbc, 0x06, 0x55, 0xd4, 0xbd, 0xc0, 0xc3, 0x8f, 0xc0, 0x40, 0xcc, 0x75, 0x96, 0x49, - 0xc8, 0x84, 0x02, 0xfb, 0x14, 0x3f, 0x95, 0x4a, 0x09, 0x33, 0x42, 0x63, 0x74, 0xf9, 0x22, 0xec, - 0x84, 0xeb, 0x62, 0x7c, 0x25, 0xcc, 0xf5, 0x5a, 0x84, 0x5a, 0x1f, 0xf3, 0xdc, 0x20, 0x7c, 0xba, - 0x37, 0x2d, 0x30, 0x5a, 0x7f, 0xb1, 0x03, 0x3c, 0x54, 0x1a, 0xc4, 0x92, 0xdf, 0xd7, 0xdb, 0xc6, - 0xe7, 0x93, 0x0b, 0xef, 0x70, 0x2e, 0x6f, 0x6f, 0x4c, 0xf8, 0xb2, 0xe9, 0xdf, 0x09, 0x79, 0x8e, - 0x07, 0xb9, 0x2e, 0x24, 0x48, 0xad, 0x46, 0xd6, 0x18, 0x5d, 0x3e, 0x09, 0xef, 0xb5, 0xfd, 0x1e, - 0x9f, 0xb0, 0x12, 0xd2, 0x65, 0xce, 0x20, 0x1d, 0xf5, 0xc7, 0xfd, 0xc7, 0xbe, 0xd3, 0xed, 0x14, - 0x30, 0x48, 0xe7, 0x69, 0xa9, 0xae, 0xc3, 0x41, 0xd3, 0xd9, 0x48, 0x37, 0xc5, 0xc3, 0x3d, 0x68, - 0xbf, 0xc6, 0x27, 0x85, 0x4c, 0xd6, 0x52, 0xad, 0x96, 0xf4, 0x6e, 0xf3, 0xc1, 0x5d, 0x81, 0xee, - 0xc2, 0x49, 0x1b, 0xe9, 0x01, 0x4e, 0x76, 0xe1, 0x74, 0xd4, 0xff, 0x0f, 0x4e, 0x67, 0xdf, 0xac, - 0x5f, 0xb5, 0x83, 0x6e, 0x6b, 0x07, 0xfd, 0xa9, 0x1d, 0xf4, 0x7d, 0xe3, 0xf4, 0x6e, 0x37, 0x4e, - 0xef, 0xf7, 0xc6, 0xe9, 0xe1, 0x73, 0xae, 0xb3, 0x23, 0xd1, 0x67, 0x83, 0x88, 0x37, 0xbf, 0x17, - 0x74, 0x80, 0x3e, 0x45, 0x2b, 0x09, 0x69, 0x99, 0x78, 0x5c, 0x67, 0xa4, 0x00, 0xc3, 0xd4, 0x4a, - 0xac, 0x75, 0x25, 0xde, 0x54, 0x42, 0x41, 0x69, 0x44, 0x41, 0xa4, 0x02, 0x61, 0x78, 0xca, 0x9a, - 0xb7, 0x00, 0x52, 0xbd, 0x25, 0xad, 0x20, 0x87, 0x0f, 0xe7, 0x1d, 0x70, 0xa8, 0xe8, 0x0f, 0xab, - 0x1f, 0xcc, 0xa3, 0x9f, 0xd6, 0x59, 0xb0, 0x0d, 0x30, 0xef, 0x02, 0x44, 0x1c, 0xbc, 0x05, 0xbd, - 0x79, 0x00, 0x71, 0x07, 0xe2, 0x88, 0x43, 0xbc, 0xa0, 0xb5, 0xe5, 0x1e, 0x06, 0xf1, 0x87, 0x60, - 0x76, 0x25, 0x80, 0x7d, 0x66, 0xc0, 0xfe, 0x5a, 0xaf, 0xb6, 0x26, 0xdf, 0xef, 0x5c, 0xbe, 0x1f, - 0x71, 0xf0, 0xfd, 0x05, 0x4d, 0x9e, 0xb5, 0x47, 0x3b, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x2a, - 0xa9, 0x4c, 0x1b, 0xd8, 0x02, 0x00, 0x00, -} - -func (m *StateCommitment) Marshal() (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 *StateCommitment) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StateCommitment) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintTct(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MerkleRoot) Marshal() (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 *MerkleRoot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MerkleRoot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintTct(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StateCommitmentProof) Marshal() (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 *StateCommitmentProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StateCommitmentProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AuthPath) > 0 { - for iNdEx := len(m.AuthPath) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AuthPath[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Position != 0 { - i = encodeVarintTct(dAtA, i, uint64(m.Position)) - i-- - dAtA[i] = 0x10 - } - if m.NoteCommitment != nil { - { - size, err := m.NoteCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MerklePathChunk) Marshal() (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 *MerklePathChunk) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MerklePathChunk) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sibling_3) > 0 { - i -= len(m.Sibling_3) - copy(dAtA[i:], m.Sibling_3) - i = encodeVarintTct(dAtA, i, uint64(len(m.Sibling_3))) - i-- - dAtA[i] = 0x1a - } - if len(m.Sibling_2) > 0 { - i -= len(m.Sibling_2) - copy(dAtA[i:], m.Sibling_2) - i = encodeVarintTct(dAtA, i, uint64(len(m.Sibling_2))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sibling_1) > 0 { - i -= len(m.Sibling_1) - copy(dAtA[i:], m.Sibling_1) - i = encodeVarintTct(dAtA, i, uint64(len(m.Sibling_1))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTct(dAtA []byte, offset int, v uint64) int { - offset -= sovTct(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StateCommitment) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovTct(uint64(l)) - } - return n -} - -func (m *MerkleRoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovTct(uint64(l)) - } - return n -} - -func (m *StateCommitmentProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoteCommitment != nil { - l = m.NoteCommitment.Size() - n += 1 + l + sovTct(uint64(l)) - } - if m.Position != 0 { - n += 1 + sovTct(uint64(m.Position)) - } - if len(m.AuthPath) > 0 { - for _, e := range m.AuthPath { - l = e.Size() - n += 1 + l + sovTct(uint64(l)) - } - } - return n -} - -func (m *MerklePathChunk) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sibling_1) - if l > 0 { - n += 1 + l + sovTct(uint64(l)) - } - l = len(m.Sibling_2) - if l > 0 { - n += 1 + l + sovTct(uint64(l)) - } - l = len(m.Sibling_3) - if l > 0 { - n += 1 + l + sovTct(uint64(l)) - } - return n -} - -func sovTct(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTct(x uint64) (n int) { - return sovTct(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StateCommitment) 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 ErrIntOverflowTct - } - 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: StateCommitment: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateCommitment: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MerkleRoot) 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 ErrIntOverflowTct - } - 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: MerkleRoot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MerkleRoot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StateCommitmentProof) 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 ErrIntOverflowTct - } - 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: StateCommitmentProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StateCommitmentProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteCommitment == nil { - m.NoteCommitment = &StateCommitment{} - } - if err := m.NoteCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - m.Position = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Position |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthPath", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthPath = append(m.AuthPath, &MerklePathChunk{}) - if err := m.AuthPath[len(m.AuthPath)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MerklePathChunk) 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 ErrIntOverflowTct - } - 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: MerklePathChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MerklePathChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sibling_1", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sibling_1 = append(m.Sibling_1[:0], dAtA[iNdEx:postIndex]...) - if m.Sibling_1 == nil { - m.Sibling_1 = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sibling_2", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sibling_2 = append(m.Sibling_2[:0], dAtA[iNdEx:postIndex]...) - if m.Sibling_2 == nil { - m.Sibling_2 = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sibling_3", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTct - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sibling_3 = append(m.Sibling_3[:0], dAtA[iNdEx:postIndex]...) - if m.Sibling_3 == nil { - m.Sibling_3 = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTct(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTct - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTct - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTct - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTct = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTct = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTct = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/custody/threshold/v1/threshold.pb.go b/chain/penumbra/custody/threshold/v1/threshold.pb.go deleted file mode 100644 index 1c0ea4a6..00000000 --- a/chain/penumbra/custody/threshold/v1/threshold.pb.go +++ /dev/null @@ -1,3619 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/custody/threshold/v1/threshold.proto - -package thresholdv1 - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/governance/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/stake/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/transaction/v1" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/decaf377_frost/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A key one can use to verify signatures. -// -// This key can also serve as a unique identifier for users. -type VerificationKey struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *VerificationKey) Reset() { *m = VerificationKey{} } -func (m *VerificationKey) String() string { return proto.CompactTextString(m) } -func (*VerificationKey) ProtoMessage() {} -func (*VerificationKey) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{0} -} -func (m *VerificationKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerificationKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerificationKey.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 *VerificationKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerificationKey.Merge(m, src) -} -func (m *VerificationKey) XXX_Size() int { - return m.Size() -} -func (m *VerificationKey) XXX_DiscardUnknown() { - xxx_messageInfo_VerificationKey.DiscardUnknown(m) -} - -var xxx_messageInfo_VerificationKey proto.InternalMessageInfo - -func (m *VerificationKey) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// A signature proving that a message was created by the owner of a verification key. -type Signature struct { - Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` -} - -func (m *Signature) Reset() { *m = Signature{} } -func (m *Signature) String() string { return proto.CompactTextString(m) } -func (*Signature) ProtoMessage() {} -func (*Signature) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{1} -} -func (m *Signature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Signature.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 *Signature) XXX_Merge(src proto.Message) { - xxx_messageInfo_Signature.Merge(m, src) -} -func (m *Signature) XXX_Size() int { - return m.Size() -} -func (m *Signature) XXX_DiscardUnknown() { - xxx_messageInfo_Signature.DiscardUnknown(m) -} - -var xxx_messageInfo_Signature proto.InternalMessageInfo - -func (m *Signature) GetInner() []byte { - if m != nil { - return m.Inner - } - return nil -} - -// The message the coordinator sends in round 1 of the signing protocol. -type CoordinatorRound1 struct { - // Types that are valid to be assigned to Request: - // *CoordinatorRound1_Plan - // *CoordinatorRound1_ValidatorDefinition - // *CoordinatorRound1_ValidatorVote - Request isCoordinatorRound1_Request `protobuf_oneof:"request"` -} - -func (m *CoordinatorRound1) Reset() { *m = CoordinatorRound1{} } -func (m *CoordinatorRound1) String() string { return proto.CompactTextString(m) } -func (*CoordinatorRound1) ProtoMessage() {} -func (*CoordinatorRound1) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{2} -} -func (m *CoordinatorRound1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CoordinatorRound1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CoordinatorRound1.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 *CoordinatorRound1) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoordinatorRound1.Merge(m, src) -} -func (m *CoordinatorRound1) XXX_Size() int { - return m.Size() -} -func (m *CoordinatorRound1) XXX_DiscardUnknown() { - xxx_messageInfo_CoordinatorRound1.DiscardUnknown(m) -} - -var xxx_messageInfo_CoordinatorRound1 proto.InternalMessageInfo - -type isCoordinatorRound1_Request interface { - isCoordinatorRound1_Request() - MarshalTo([]byte) (int, error) - Size() int -} - -type CoordinatorRound1_Plan struct { - Plan *v1.TransactionPlan `protobuf:"bytes,1,opt,name=plan,proto3,oneof" json:"plan,omitempty"` -} -type CoordinatorRound1_ValidatorDefinition struct { - ValidatorDefinition *v11.Validator `protobuf:"bytes,2,opt,name=validator_definition,json=validatorDefinition,proto3,oneof" json:"validator_definition,omitempty"` -} -type CoordinatorRound1_ValidatorVote struct { - ValidatorVote *v12.ValidatorVoteBody `protobuf:"bytes,3,opt,name=validator_vote,json=validatorVote,proto3,oneof" json:"validator_vote,omitempty"` -} - -func (*CoordinatorRound1_Plan) isCoordinatorRound1_Request() {} -func (*CoordinatorRound1_ValidatorDefinition) isCoordinatorRound1_Request() {} -func (*CoordinatorRound1_ValidatorVote) isCoordinatorRound1_Request() {} - -func (m *CoordinatorRound1) GetRequest() isCoordinatorRound1_Request { - if m != nil { - return m.Request - } - return nil -} - -func (m *CoordinatorRound1) GetPlan() *v1.TransactionPlan { - if x, ok := m.GetRequest().(*CoordinatorRound1_Plan); ok { - return x.Plan - } - return nil -} - -func (m *CoordinatorRound1) GetValidatorDefinition() *v11.Validator { - if x, ok := m.GetRequest().(*CoordinatorRound1_ValidatorDefinition); ok { - return x.ValidatorDefinition - } - return nil -} - -func (m *CoordinatorRound1) GetValidatorVote() *v12.ValidatorVoteBody { - if x, ok := m.GetRequest().(*CoordinatorRound1_ValidatorVote); ok { - return x.ValidatorVote - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*CoordinatorRound1) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*CoordinatorRound1_Plan)(nil), - (*CoordinatorRound1_ValidatorDefinition)(nil), - (*CoordinatorRound1_ValidatorVote)(nil), - } -} - -// The message the coordinator sends in round 2 of the signing protocol. -type CoordinatorRound2 struct { - // The underlying signing packages being sent to the followers, for each signature. - SigningPackages []*CoordinatorRound2_PartialSigningPackage `protobuf:"bytes,1,rep,name=signing_packages,json=signingPackages,proto3" json:"signing_packages,omitempty"` -} - -func (m *CoordinatorRound2) Reset() { *m = CoordinatorRound2{} } -func (m *CoordinatorRound2) String() string { return proto.CompactTextString(m) } -func (*CoordinatorRound2) ProtoMessage() {} -func (*CoordinatorRound2) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{3} -} -func (m *CoordinatorRound2) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CoordinatorRound2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CoordinatorRound2.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 *CoordinatorRound2) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoordinatorRound2.Merge(m, src) -} -func (m *CoordinatorRound2) XXX_Size() int { - return m.Size() -} -func (m *CoordinatorRound2) XXX_DiscardUnknown() { - xxx_messageInfo_CoordinatorRound2.DiscardUnknown(m) -} - -var xxx_messageInfo_CoordinatorRound2 proto.InternalMessageInfo - -func (m *CoordinatorRound2) GetSigningPackages() []*CoordinatorRound2_PartialSigningPackage { - if m != nil { - return m.SigningPackages - } - return nil -} - -// A commitment along with a FROST identifier. -type CoordinatorRound2_IdentifiedCommitments struct { - // The serialization of a FROST identifier. - Identifier []byte `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - // The commitments this person has produced for this round of signing. - Commitments *v13.SigningCommitments `protobuf:"bytes,2,opt,name=commitments,proto3" json:"commitments,omitempty"` -} - -func (m *CoordinatorRound2_IdentifiedCommitments) Reset() { - *m = CoordinatorRound2_IdentifiedCommitments{} -} -func (m *CoordinatorRound2_IdentifiedCommitments) String() string { return proto.CompactTextString(m) } -func (*CoordinatorRound2_IdentifiedCommitments) ProtoMessage() {} -func (*CoordinatorRound2_IdentifiedCommitments) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{3, 0} -} -func (m *CoordinatorRound2_IdentifiedCommitments) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CoordinatorRound2_IdentifiedCommitments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CoordinatorRound2_IdentifiedCommitments.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 *CoordinatorRound2_IdentifiedCommitments) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoordinatorRound2_IdentifiedCommitments.Merge(m, src) -} -func (m *CoordinatorRound2_IdentifiedCommitments) XXX_Size() int { - return m.Size() -} -func (m *CoordinatorRound2_IdentifiedCommitments) XXX_DiscardUnknown() { - xxx_messageInfo_CoordinatorRound2_IdentifiedCommitments.DiscardUnknown(m) -} - -var xxx_messageInfo_CoordinatorRound2_IdentifiedCommitments proto.InternalMessageInfo - -func (m *CoordinatorRound2_IdentifiedCommitments) GetIdentifier() []byte { - if m != nil { - return m.Identifier - } - return nil -} - -func (m *CoordinatorRound2_IdentifiedCommitments) GetCommitments() *v13.SigningCommitments { - if m != nil { - return m.Commitments - } - return nil -} - -// A FROST signing package without a message. -// -// We structure things this way because the message is derived from the transaction plan. -// FROST expects the signing package to include the identified commitments *and* -// the message, but we have no need to include the message. -type CoordinatorRound2_PartialSigningPackage struct { - AllCommitments []*CoordinatorRound2_IdentifiedCommitments `protobuf:"bytes,1,rep,name=all_commitments,json=allCommitments,proto3" json:"all_commitments,omitempty"` -} - -func (m *CoordinatorRound2_PartialSigningPackage) Reset() { - *m = CoordinatorRound2_PartialSigningPackage{} -} -func (m *CoordinatorRound2_PartialSigningPackage) String() string { return proto.CompactTextString(m) } -func (*CoordinatorRound2_PartialSigningPackage) ProtoMessage() {} -func (*CoordinatorRound2_PartialSigningPackage) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{3, 1} -} -func (m *CoordinatorRound2_PartialSigningPackage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CoordinatorRound2_PartialSigningPackage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CoordinatorRound2_PartialSigningPackage.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 *CoordinatorRound2_PartialSigningPackage) XXX_Merge(src proto.Message) { - xxx_messageInfo_CoordinatorRound2_PartialSigningPackage.Merge(m, src) -} -func (m *CoordinatorRound2_PartialSigningPackage) XXX_Size() int { - return m.Size() -} -func (m *CoordinatorRound2_PartialSigningPackage) XXX_DiscardUnknown() { - xxx_messageInfo_CoordinatorRound2_PartialSigningPackage.DiscardUnknown(m) -} - -var xxx_messageInfo_CoordinatorRound2_PartialSigningPackage proto.InternalMessageInfo - -func (m *CoordinatorRound2_PartialSigningPackage) GetAllCommitments() []*CoordinatorRound2_IdentifiedCommitments { - if m != nil { - return m.AllCommitments - } - return nil -} - -// The first message the followers send back to the coordinator when signing. -type FollowerRound1 struct { - Inner *FollowerRound1_Inner `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` - // The verification key identifying the sender. - Pk *VerificationKey `protobuf:"bytes,2,opt,name=pk,proto3" json:"pk,omitempty"` - // A signature over the proto-encoded bytes of inner. - Sig *Signature `protobuf:"bytes,3,opt,name=sig,proto3" json:"sig,omitempty"` -} - -func (m *FollowerRound1) Reset() { *m = FollowerRound1{} } -func (m *FollowerRound1) String() string { return proto.CompactTextString(m) } -func (*FollowerRound1) ProtoMessage() {} -func (*FollowerRound1) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{4} -} -func (m *FollowerRound1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FollowerRound1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FollowerRound1.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 *FollowerRound1) XXX_Merge(src proto.Message) { - xxx_messageInfo_FollowerRound1.Merge(m, src) -} -func (m *FollowerRound1) XXX_Size() int { - return m.Size() -} -func (m *FollowerRound1) XXX_DiscardUnknown() { - xxx_messageInfo_FollowerRound1.DiscardUnknown(m) -} - -var xxx_messageInfo_FollowerRound1 proto.InternalMessageInfo - -func (m *FollowerRound1) GetInner() *FollowerRound1_Inner { - if m != nil { - return m.Inner - } - return nil -} - -func (m *FollowerRound1) GetPk() *VerificationKey { - if m != nil { - return m.Pk - } - return nil -} - -func (m *FollowerRound1) GetSig() *Signature { - if m != nil { - return m.Sig - } - return nil -} - -// The inner message that will be signed by the follower. -type FollowerRound1_Inner struct { - // One signing commitment pair for each signature requested by the plan, in order. - Commitments []*v13.SigningCommitments `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` -} - -func (m *FollowerRound1_Inner) Reset() { *m = FollowerRound1_Inner{} } -func (m *FollowerRound1_Inner) String() string { return proto.CompactTextString(m) } -func (*FollowerRound1_Inner) ProtoMessage() {} -func (*FollowerRound1_Inner) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{4, 0} -} -func (m *FollowerRound1_Inner) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FollowerRound1_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FollowerRound1_Inner.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 *FollowerRound1_Inner) XXX_Merge(src proto.Message) { - xxx_messageInfo_FollowerRound1_Inner.Merge(m, src) -} -func (m *FollowerRound1_Inner) XXX_Size() int { - return m.Size() -} -func (m *FollowerRound1_Inner) XXX_DiscardUnknown() { - xxx_messageInfo_FollowerRound1_Inner.DiscardUnknown(m) -} - -var xxx_messageInfo_FollowerRound1_Inner proto.InternalMessageInfo - -func (m *FollowerRound1_Inner) GetCommitments() []*v13.SigningCommitments { - if m != nil { - return m.Commitments - } - return nil -} - -// The second message the followers send back to the coordinator when signing. -type FollowerRound2 struct { - Inner *FollowerRound2_Inner `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` - // The verification key identifying the sender. - Pk *VerificationKey `protobuf:"bytes,2,opt,name=pk,proto3" json:"pk,omitempty"` - // A signature over the proto-encoded bytes of inner. - Sig *Signature `protobuf:"bytes,3,opt,name=sig,proto3" json:"sig,omitempty"` -} - -func (m *FollowerRound2) Reset() { *m = FollowerRound2{} } -func (m *FollowerRound2) String() string { return proto.CompactTextString(m) } -func (*FollowerRound2) ProtoMessage() {} -func (*FollowerRound2) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{5} -} -func (m *FollowerRound2) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FollowerRound2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FollowerRound2.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 *FollowerRound2) XXX_Merge(src proto.Message) { - xxx_messageInfo_FollowerRound2.Merge(m, src) -} -func (m *FollowerRound2) XXX_Size() int { - return m.Size() -} -func (m *FollowerRound2) XXX_DiscardUnknown() { - xxx_messageInfo_FollowerRound2.DiscardUnknown(m) -} - -var xxx_messageInfo_FollowerRound2 proto.InternalMessageInfo - -func (m *FollowerRound2) GetInner() *FollowerRound2_Inner { - if m != nil { - return m.Inner - } - return nil -} - -func (m *FollowerRound2) GetPk() *VerificationKey { - if m != nil { - return m.Pk - } - return nil -} - -func (m *FollowerRound2) GetSig() *Signature { - if m != nil { - return m.Sig - } - return nil -} - -// The inner message that will be signed by the follower. -type FollowerRound2_Inner struct { - // One share for each signature requested by the plan, in order. - Shares []*v13.SignatureShare `protobuf:"bytes,1,rep,name=shares,proto3" json:"shares,omitempty"` -} - -func (m *FollowerRound2_Inner) Reset() { *m = FollowerRound2_Inner{} } -func (m *FollowerRound2_Inner) String() string { return proto.CompactTextString(m) } -func (*FollowerRound2_Inner) ProtoMessage() {} -func (*FollowerRound2_Inner) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{5, 0} -} -func (m *FollowerRound2_Inner) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FollowerRound2_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FollowerRound2_Inner.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 *FollowerRound2_Inner) XXX_Merge(src proto.Message) { - xxx_messageInfo_FollowerRound2_Inner.Merge(m, src) -} -func (m *FollowerRound2_Inner) XXX_Size() int { - return m.Size() -} -func (m *FollowerRound2_Inner) XXX_DiscardUnknown() { - xxx_messageInfo_FollowerRound2_Inner.DiscardUnknown(m) -} - -var xxx_messageInfo_FollowerRound2_Inner proto.InternalMessageInfo - -func (m *FollowerRound2_Inner) GetShares() []*v13.SignatureShare { - if m != nil { - return m.Shares - } - return nil -} - -// The first message we broadcast in the DKG protocol. -type DKGRound1 struct { - // The package we're sending to other people - Pkg *v13.DKGRound1Package `protobuf:"bytes,1,opt,name=pkg,proto3" json:"pkg,omitempty"` - // A commitment to a share of the nullifier-deriving key - NullifierCommitment []byte `protobuf:"bytes,2,opt,name=nullifier_commitment,json=nullifierCommitment,proto3" json:"nullifier_commitment,omitempty"` - // An encryption key for the second round. - Epk []byte `protobuf:"bytes,3,opt,name=epk,proto3" json:"epk,omitempty"` - // A verification key establishing an identity for the sender of this message. - Vk []byte `protobuf:"bytes,4,opt,name=vk,proto3" json:"vk,omitempty"` -} - -func (m *DKGRound1) Reset() { *m = DKGRound1{} } -func (m *DKGRound1) String() string { return proto.CompactTextString(m) } -func (*DKGRound1) ProtoMessage() {} -func (*DKGRound1) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{6} -} -func (m *DKGRound1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DKGRound1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DKGRound1.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 *DKGRound1) XXX_Merge(src proto.Message) { - xxx_messageInfo_DKGRound1.Merge(m, src) -} -func (m *DKGRound1) XXX_Size() int { - return m.Size() -} -func (m *DKGRound1) XXX_DiscardUnknown() { - xxx_messageInfo_DKGRound1.DiscardUnknown(m) -} - -var xxx_messageInfo_DKGRound1 proto.InternalMessageInfo - -func (m *DKGRound1) GetPkg() *v13.DKGRound1Package { - if m != nil { - return m.Pkg - } - return nil -} - -func (m *DKGRound1) GetNullifierCommitment() []byte { - if m != nil { - return m.NullifierCommitment - } - return nil -} - -func (m *DKGRound1) GetEpk() []byte { - if m != nil { - return m.Epk - } - return nil -} - -func (m *DKGRound1) GetVk() []byte { - if m != nil { - return m.Vk - } - return nil -} - -// The second message we broadcast in the DKG protocol. -type DKGRound2 struct { - Inner *DKGRound2_Inner `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` - // The verification key identifying the sender. - Vk []byte `protobuf:"bytes,2,opt,name=vk,proto3" json:"vk,omitempty"` - // A signature over the proto-encoded inner message. - Sig []byte `protobuf:"bytes,3,opt,name=sig,proto3" json:"sig,omitempty"` -} - -func (m *DKGRound2) Reset() { *m = DKGRound2{} } -func (m *DKGRound2) String() string { return proto.CompactTextString(m) } -func (*DKGRound2) ProtoMessage() {} -func (*DKGRound2) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{7} -} -func (m *DKGRound2) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DKGRound2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DKGRound2.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 *DKGRound2) XXX_Merge(src proto.Message) { - xxx_messageInfo_DKGRound2.Merge(m, src) -} -func (m *DKGRound2) XXX_Size() int { - return m.Size() -} -func (m *DKGRound2) XXX_DiscardUnknown() { - xxx_messageInfo_DKGRound2.DiscardUnknown(m) -} - -var xxx_messageInfo_DKGRound2 proto.InternalMessageInfo - -func (m *DKGRound2) GetInner() *DKGRound2_Inner { - if m != nil { - return m.Inner - } - return nil -} - -func (m *DKGRound2) GetVk() []byte { - if m != nil { - return m.Vk - } - return nil -} - -func (m *DKGRound2) GetSig() []byte { - if m != nil { - return m.Sig - } - return nil -} - -// A round2 package, encrypted, along with an identifier for the recipient. -type DKGRound2_TargetedPackage struct { - // A verification key identifying the recipient. - Vk []byte `protobuf:"bytes,1,opt,name=vk,proto3" json:"vk,omitempty"` - // The ciphertext of an encrypted frost package for round 2. - EncryptedPackage []byte `protobuf:"bytes,2,opt,name=encrypted_package,json=encryptedPackage,proto3" json:"encrypted_package,omitempty"` -} - -func (m *DKGRound2_TargetedPackage) Reset() { *m = DKGRound2_TargetedPackage{} } -func (m *DKGRound2_TargetedPackage) String() string { return proto.CompactTextString(m) } -func (*DKGRound2_TargetedPackage) ProtoMessage() {} -func (*DKGRound2_TargetedPackage) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{7, 0} -} -func (m *DKGRound2_TargetedPackage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DKGRound2_TargetedPackage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DKGRound2_TargetedPackage.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 *DKGRound2_TargetedPackage) XXX_Merge(src proto.Message) { - xxx_messageInfo_DKGRound2_TargetedPackage.Merge(m, src) -} -func (m *DKGRound2_TargetedPackage) XXX_Size() int { - return m.Size() -} -func (m *DKGRound2_TargetedPackage) XXX_DiscardUnknown() { - xxx_messageInfo_DKGRound2_TargetedPackage.DiscardUnknown(m) -} - -var xxx_messageInfo_DKGRound2_TargetedPackage proto.InternalMessageInfo - -func (m *DKGRound2_TargetedPackage) GetVk() []byte { - if m != nil { - return m.Vk - } - return nil -} - -func (m *DKGRound2_TargetedPackage) GetEncryptedPackage() []byte { - if m != nil { - return m.EncryptedPackage - } - return nil -} - -// An inner message that will be signed. -type DKGRound2_Inner struct { - // Encrypted packages for each recipient. - EncryptedPackages []*DKGRound2_TargetedPackage `protobuf:"bytes,1,rep,name=encrypted_packages,json=encryptedPackages,proto3" json:"encrypted_packages,omitempty"` - // An opening of the share of the nullifier-deriving key commitment - Nullifier []byte `protobuf:"bytes,2,opt,name=nullifier,proto3" json:"nullifier,omitempty"` -} - -func (m *DKGRound2_Inner) Reset() { *m = DKGRound2_Inner{} } -func (m *DKGRound2_Inner) String() string { return proto.CompactTextString(m) } -func (*DKGRound2_Inner) ProtoMessage() {} -func (*DKGRound2_Inner) Descriptor() ([]byte, []int) { - return fileDescriptor_d60f2e30e69d733f, []int{7, 1} -} -func (m *DKGRound2_Inner) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DKGRound2_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DKGRound2_Inner.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 *DKGRound2_Inner) XXX_Merge(src proto.Message) { - xxx_messageInfo_DKGRound2_Inner.Merge(m, src) -} -func (m *DKGRound2_Inner) XXX_Size() int { - return m.Size() -} -func (m *DKGRound2_Inner) XXX_DiscardUnknown() { - xxx_messageInfo_DKGRound2_Inner.DiscardUnknown(m) -} - -var xxx_messageInfo_DKGRound2_Inner proto.InternalMessageInfo - -func (m *DKGRound2_Inner) GetEncryptedPackages() []*DKGRound2_TargetedPackage { - if m != nil { - return m.EncryptedPackages - } - return nil -} - -func (m *DKGRound2_Inner) GetNullifier() []byte { - if m != nil { - return m.Nullifier - } - return nil -} - -func init() { - proto.RegisterType((*VerificationKey)(nil), "penumbra.custody.threshold.v1.VerificationKey") - proto.RegisterType((*Signature)(nil), "penumbra.custody.threshold.v1.Signature") - proto.RegisterType((*CoordinatorRound1)(nil), "penumbra.custody.threshold.v1.CoordinatorRound1") - proto.RegisterType((*CoordinatorRound2)(nil), "penumbra.custody.threshold.v1.CoordinatorRound2") - proto.RegisterType((*CoordinatorRound2_IdentifiedCommitments)(nil), "penumbra.custody.threshold.v1.CoordinatorRound2.IdentifiedCommitments") - proto.RegisterType((*CoordinatorRound2_PartialSigningPackage)(nil), "penumbra.custody.threshold.v1.CoordinatorRound2.PartialSigningPackage") - proto.RegisterType((*FollowerRound1)(nil), "penumbra.custody.threshold.v1.FollowerRound1") - proto.RegisterType((*FollowerRound1_Inner)(nil), "penumbra.custody.threshold.v1.FollowerRound1.Inner") - proto.RegisterType((*FollowerRound2)(nil), "penumbra.custody.threshold.v1.FollowerRound2") - proto.RegisterType((*FollowerRound2_Inner)(nil), "penumbra.custody.threshold.v1.FollowerRound2.Inner") - proto.RegisterType((*DKGRound1)(nil), "penumbra.custody.threshold.v1.DKGRound1") - proto.RegisterType((*DKGRound2)(nil), "penumbra.custody.threshold.v1.DKGRound2") - proto.RegisterType((*DKGRound2_TargetedPackage)(nil), "penumbra.custody.threshold.v1.DKGRound2.TargetedPackage") - proto.RegisterType((*DKGRound2_Inner)(nil), "penumbra.custody.threshold.v1.DKGRound2.Inner") -} - -func init() { - proto.RegisterFile("penumbra/custody/threshold/v1/threshold.proto", fileDescriptor_d60f2e30e69d733f) -} - -var fileDescriptor_d60f2e30e69d733f = []byte{ - // 937 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0xae, 0xdb, 0xa2, 0x4c, 0x82, 0x93, 0x4c, 0x53, 0xc9, 0xb2, 0xa8, 0x95, 0xfa, 0x42, - 0x50, 0xc9, 0xac, 0xd6, 0x11, 0x34, 0x32, 0x12, 0x87, 0x38, 0xb4, 0x89, 0x2a, 0x90, 0xb5, 0x89, - 0x8c, 0x84, 0x22, 0xa5, 0x93, 0xdd, 0xf1, 0x7a, 0xb4, 0xeb, 0x99, 0xed, 0xec, 0x78, 0x51, 0xfe, - 0x01, 0x27, 0xd4, 0xdf, 0x80, 0x90, 0x40, 0xf0, 0x0b, 0xf8, 0x01, 0x48, 0x88, 0x53, 0x0f, 0x1c, - 0x38, 0xa2, 0xe4, 0xc6, 0xaf, 0x40, 0x33, 0xfb, 0x69, 0xe7, 0xc3, 0x15, 0x70, 0xe8, 0xc9, 0x7e, - 0x67, 0xde, 0xe7, 0x79, 0x9f, 0x7d, 0xde, 0x77, 0x76, 0x07, 0x6c, 0x47, 0x84, 0x4d, 0x27, 0x67, - 0x02, 0x5b, 0xee, 0x34, 0x96, 0xdc, 0x3b, 0xb7, 0xe4, 0x58, 0x90, 0x78, 0xcc, 0x43, 0xcf, 0x4a, - 0xec, 0x32, 0x40, 0x91, 0xe0, 0x92, 0xc3, 0x87, 0x79, 0x3a, 0xca, 0xd2, 0x51, 0x99, 0x91, 0xd8, - 0xad, 0x8f, 0x4b, 0x36, 0x2e, 0x88, 0xe5, 0xf2, 0x49, 0xc4, 0x19, 0x61, 0xd2, 0xf2, 0x79, 0x42, - 0x04, 0xc3, 0xcc, 0x25, 0x8a, 0xb5, 0x8c, 0x52, 0xda, 0xd6, 0x87, 0x37, 0xe1, 0x62, 0x89, 0x03, - 0x0d, 0xd1, 0x7f, 0xb2, 0x6c, 0x34, 0x9b, 0x2d, 0x05, 0x66, 0x31, 0x76, 0x25, 0xe5, 0x4c, 0x4b, - 0x2e, 0xc3, 0x2c, 0xbf, 0xa2, 0x4a, 0x9c, 0x47, 0x92, 0x5b, 0x1e, 0x71, 0xf1, 0x68, 0xe7, 0xc9, - 0x93, 0xd3, 0x91, 0xe0, 0xb1, 0x54, 0xa0, 0xd9, 0x95, 0x14, 0xd7, 0x79, 0x1f, 0xac, 0x0e, 0x89, - 0xa0, 0x23, 0xea, 0x62, 0xc5, 0xf6, 0x9c, 0x9c, 0xc3, 0x0d, 0x70, 0x97, 0x32, 0x46, 0x44, 0xd3, - 0xd8, 0x34, 0xb6, 0x56, 0x9c, 0x34, 0xe8, 0x3c, 0x02, 0x4b, 0x47, 0xd4, 0x67, 0x58, 0x4e, 0x05, - 0xb9, 0x21, 0xe5, 0x47, 0x13, 0xac, 0xf7, 0x39, 0x17, 0x1e, 0x65, 0x58, 0x72, 0xe1, 0xf0, 0x29, - 0xf3, 0x6c, 0xd8, 0x07, 0x77, 0xa2, 0x10, 0x33, 0x9d, 0xba, 0xdc, 0xdd, 0x46, 0xa5, 0xbb, 0x5c, - 0x10, 0x54, 0x7d, 0x92, 0xc4, 0x46, 0xc7, 0x65, 0x38, 0x08, 0x31, 0x3b, 0xa8, 0x39, 0x1a, 0x0c, - 0x5f, 0x80, 0x8d, 0x04, 0x87, 0xd4, 0x53, 0xbc, 0xa7, 0x1e, 0x19, 0x51, 0x46, 0x55, 0x4e, 0xd3, - 0xd4, 0xa4, 0x8f, 0xe7, 0x48, 0x0b, 0x6f, 0x51, 0x6a, 0x69, 0x62, 0xa3, 0x61, 0x8e, 0x3e, 0xa8, - 0x39, 0xf7, 0x0b, 0xaa, 0xfd, 0x82, 0x09, 0x62, 0xd0, 0x28, 0x2b, 0x24, 0x5c, 0x92, 0x66, 0x5d, - 0x73, 0xef, 0xde, 0xc8, 0x5d, 0xe9, 0x70, 0xb5, 0xc0, 0x90, 0x4b, 0xb2, 0xc7, 0xbd, 0xf3, 0x83, - 0x9a, 0xf3, 0x6e, 0x32, 0xb3, 0xb8, 0x04, 0xde, 0x11, 0xe4, 0xe5, 0x94, 0xc4, 0xb2, 0xf3, 0x7d, - 0xfd, 0xaa, 0x55, 0x5d, 0xf8, 0x12, 0xac, 0xc5, 0xd4, 0x67, 0x94, 0xf9, 0xa7, 0x11, 0x76, 0x03, - 0xec, 0x93, 0xb8, 0x69, 0x6c, 0xd6, 0xb7, 0x96, 0xbb, 0x4f, 0xd1, 0xad, 0x43, 0x89, 0xae, 0x70, - 0xa1, 0x01, 0x16, 0x92, 0xe2, 0xf0, 0x28, 0xe5, 0x1b, 0xa4, 0x74, 0xce, 0x6a, 0x3c, 0x13, 0xc7, - 0xad, 0x57, 0x06, 0x78, 0x70, 0xe8, 0x11, 0x26, 0xe9, 0x88, 0x12, 0xaf, 0xcf, 0x27, 0x13, 0x2a, - 0x27, 0x84, 0xc9, 0x18, 0xb6, 0x01, 0xa0, 0xf9, 0x46, 0xde, 0xe8, 0xca, 0x0a, 0xfc, 0x12, 0x2c, - 0xbb, 0x65, 0x7a, 0xd6, 0x89, 0x8f, 0x2a, 0x3a, 0xf5, 0x1c, 0xa2, 0xb9, 0xa9, 0x4b, 0x6c, 0x94, - 0x49, 0xaa, 0xd4, 0x72, 0xaa, 0x4c, 0xad, 0x6f, 0x0c, 0xf0, 0xe0, 0x5a, 0xf5, 0x90, 0x83, 0x55, - 0x1c, 0x86, 0xa7, 0xd5, 0xb2, 0xff, 0xd6, 0x9e, 0x6b, 0x9f, 0xd9, 0x69, 0xe0, 0x30, 0xac, 0xc4, - 0x9d, 0x5f, 0x4c, 0xd0, 0x78, 0xca, 0xc3, 0x90, 0x7f, 0x4d, 0xf2, 0x71, 0x3e, 0xac, 0x8e, 0xfe, - 0x72, 0x77, 0x67, 0x41, 0xe5, 0x59, 0x34, 0x3a, 0x54, 0xd0, 0xec, 0xbc, 0xc0, 0x4f, 0x81, 0x19, - 0x05, 0x99, 0x71, 0x68, 0x01, 0xcf, 0xdc, 0x21, 0x75, 0xcc, 0x28, 0x80, 0x3d, 0x50, 0x8f, 0xa9, - 0x9f, 0xcd, 0xe9, 0xd6, 0x02, 0x82, 0xe2, 0xf0, 0x3a, 0x0a, 0xd4, 0x7a, 0x01, 0xee, 0x6a, 0x2d, - 0xf3, 0x6d, 0x4c, 0xfd, 0xfc, 0x1f, 0xda, 0xd8, 0xf9, 0x79, 0xde, 0xbb, 0xee, 0x7f, 0xf2, 0xae, - 0xfb, 0xf6, 0x78, 0xe7, 0xe4, 0xde, 0x1d, 0x82, 0x7b, 0xf1, 0x18, 0x8b, 0xe2, 0x94, 0xda, 0x6f, - 0x68, 0x9b, 0xe6, 0x3a, 0x52, 0x48, 0x27, 0x23, 0xe8, 0xfc, 0x60, 0x80, 0xa5, 0xfd, 0xe7, 0xcf, - 0xb2, 0x21, 0xfb, 0x0c, 0xd4, 0xa3, 0xc0, 0xbf, 0xc6, 0xa6, 0x9b, 0x58, 0x0b, 0x68, 0x7e, 0xd0, - 0x15, 0x1e, 0xda, 0x60, 0x83, 0x4d, 0xc3, 0x50, 0x9f, 0xd7, 0xca, 0xa9, 0xd1, 0xb6, 0xad, 0x38, - 0xf7, 0x8b, 0xbd, 0xb2, 0x87, 0x70, 0x0d, 0xd4, 0x49, 0x14, 0x68, 0x5f, 0x56, 0x1c, 0xf5, 0x17, - 0x36, 0x80, 0x99, 0x04, 0xcd, 0x3b, 0x7a, 0xc1, 0x4c, 0x82, 0xce, 0x1f, 0x66, 0xa9, 0xb4, 0x0b, - 0xf7, 0x67, 0x5b, 0xba, 0xa8, 0x15, 0x05, 0x70, 0xb6, 0x9b, 0x69, 0x0d, 0x33, 0xaf, 0xa1, 0x54, - 0xe4, 0xdd, 0x59, 0x49, 0x3d, 0xff, 0x02, 0xac, 0x1e, 0x63, 0xe1, 0x13, 0x49, 0xbc, 0xfc, 0x6d, - 0x90, 0x82, 0x8c, 0x02, 0xf4, 0x18, 0xac, 0x13, 0xa6, 0x1d, 0x22, 0x5e, 0xfe, 0xfe, 0xcc, 0x38, - 0xd7, 0x8a, 0x8d, 0x0c, 0xdc, 0xfa, 0xd6, 0xc8, 0x9b, 0xe8, 0x03, 0x78, 0x05, 0x96, 0x37, 0x74, - 0xf7, 0x8d, 0x1f, 0x67, 0x4e, 0x9c, 0xb3, 0x3e, 0x5f, 0x31, 0x86, 0xef, 0x81, 0xa5, 0xc2, 0xf1, - 0x4c, 0x57, 0xb9, 0xb0, 0xf7, 0xab, 0xf9, 0xdb, 0x45, 0xdb, 0x78, 0x7d, 0xd1, 0x36, 0xfe, 0xba, - 0x68, 0x1b, 0xaf, 0x2e, 0xdb, 0xb5, 0xd7, 0x97, 0xed, 0xda, 0x9f, 0x97, 0xed, 0x1a, 0x78, 0xe4, - 0xf2, 0xc9, 0xed, 0x42, 0xf6, 0x1a, 0xc7, 0x79, 0x34, 0x50, 0x9f, 0xf5, 0x81, 0xf1, 0x15, 0xf6, - 0xa9, 0x1c, 0x4f, 0xcf, 0xd4, 0xf7, 0xca, 0x8a, 0xd5, 0x57, 0xd6, 0x27, 0x21, 0x4f, 0xc8, 0x76, - 0x42, 0x98, 0x9a, 0xbe, 0xd8, 0xa2, 0x4c, 0x12, 0xe1, 0x8e, 0xb1, 0xfa, 0x55, 0x17, 0x84, 0x5d, - 0x4b, 0x07, 0xd6, 0xad, 0x97, 0xa5, 0x4f, 0x8a, 0x20, 0xb1, 0xbf, 0x33, 0xeb, 0x83, 0xfe, 0xf1, - 0x4f, 0xe6, 0xc3, 0x41, 0x2e, 0xad, 0x9f, 0x49, 0x2b, 0xc4, 0xa0, 0xa1, 0xfd, 0x7b, 0xb9, 0x7f, - 0x92, 0xed, 0x9f, 0x14, 0xfb, 0x27, 0x43, 0xfb, 0xc2, 0xfc, 0xe0, 0xd6, 0xfd, 0x93, 0x67, 0x83, - 0xbd, 0xcf, 0x89, 0xc4, 0x1e, 0x96, 0xf8, 0x6f, 0x73, 0x33, 0xcf, 0xed, 0xf5, 0xb2, 0xe4, 0x5e, - 0xaf, 0xc8, 0xee, 0xf5, 0x86, 0xf6, 0xd9, 0x3d, 0x7d, 0xaf, 0xd9, 0xf9, 0x27, 0x00, 0x00, 0xff, - 0xff, 0x31, 0xc4, 0xce, 0xb8, 0xf5, 0x09, 0x00, 0x00, -} - -func (m *VerificationKey) Marshal() (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 *VerificationKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerificationKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Signature) Marshal() (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 *Signature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Signature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Inner) > 0 { - i -= len(m.Inner) - copy(dAtA[i:], m.Inner) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Inner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CoordinatorRound1) Marshal() (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 *CoordinatorRound1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CoordinatorRound1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Request != nil { - { - size := m.Request.Size() - i -= size - if _, err := m.Request.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *CoordinatorRound1_Plan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CoordinatorRound1_Plan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Plan != nil { - { - size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *CoordinatorRound1_ValidatorDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CoordinatorRound1_ValidatorDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorDefinition != nil { - { - size, err := m.ValidatorDefinition.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *CoordinatorRound1_ValidatorVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CoordinatorRound1_ValidatorVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ValidatorVote != nil { - { - size, err := m.ValidatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *CoordinatorRound2) Marshal() (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 *CoordinatorRound2) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CoordinatorRound2) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SigningPackages) > 0 { - for iNdEx := len(m.SigningPackages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SigningPackages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CoordinatorRound2_IdentifiedCommitments) Marshal() (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 *CoordinatorRound2_IdentifiedCommitments) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CoordinatorRound2_IdentifiedCommitments) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Commitments != nil { - { - size, err := m.Commitments.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Identifier) > 0 { - i -= len(m.Identifier) - copy(dAtA[i:], m.Identifier) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Identifier))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CoordinatorRound2_PartialSigningPackage) Marshal() (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 *CoordinatorRound2_PartialSigningPackage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CoordinatorRound2_PartialSigningPackage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AllCommitments) > 0 { - for iNdEx := len(m.AllCommitments) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AllCommitments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *FollowerRound1) Marshal() (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 *FollowerRound1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FollowerRound1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sig != nil { - { - size, err := m.Sig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Pk != nil { - { - size, err := m.Pk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Inner != nil { - { - size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FollowerRound1_Inner) Marshal() (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 *FollowerRound1_Inner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FollowerRound1_Inner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Commitments) > 0 { - for iNdEx := len(m.Commitments) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Commitments[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *FollowerRound2) Marshal() (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 *FollowerRound2) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FollowerRound2) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sig != nil { - { - size, err := m.Sig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Pk != nil { - { - size, err := m.Pk.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Inner != nil { - { - size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FollowerRound2_Inner) Marshal() (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 *FollowerRound2_Inner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FollowerRound2_Inner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Shares) > 0 { - for iNdEx := len(m.Shares) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Shares[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DKGRound1) Marshal() (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 *DKGRound1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DKGRound1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Vk) > 0 { - i -= len(m.Vk) - copy(dAtA[i:], m.Vk) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Vk))) - i-- - dAtA[i] = 0x22 - } - if len(m.Epk) > 0 { - i -= len(m.Epk) - copy(dAtA[i:], m.Epk) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Epk))) - i-- - dAtA[i] = 0x1a - } - if len(m.NullifierCommitment) > 0 { - i -= len(m.NullifierCommitment) - copy(dAtA[i:], m.NullifierCommitment) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.NullifierCommitment))) - i-- - dAtA[i] = 0x12 - } - if m.Pkg != nil { - { - size, err := m.Pkg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DKGRound2) Marshal() (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 *DKGRound2) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DKGRound2) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sig) > 0 { - i -= len(m.Sig) - copy(dAtA[i:], m.Sig) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Sig))) - i-- - dAtA[i] = 0x1a - } - if len(m.Vk) > 0 { - i -= len(m.Vk) - copy(dAtA[i:], m.Vk) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Vk))) - i-- - dAtA[i] = 0x12 - } - if m.Inner != nil { - { - size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DKGRound2_TargetedPackage) Marshal() (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 *DKGRound2_TargetedPackage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DKGRound2_TargetedPackage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EncryptedPackage) > 0 { - i -= len(m.EncryptedPackage) - copy(dAtA[i:], m.EncryptedPackage) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.EncryptedPackage))) - i-- - dAtA[i] = 0x12 - } - if len(m.Vk) > 0 { - i -= len(m.Vk) - copy(dAtA[i:], m.Vk) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Vk))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DKGRound2_Inner) Marshal() (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 *DKGRound2_Inner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DKGRound2_Inner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Nullifier) > 0 { - i -= len(m.Nullifier) - copy(dAtA[i:], m.Nullifier) - i = encodeVarintThreshold(dAtA, i, uint64(len(m.Nullifier))) - i-- - dAtA[i] = 0x12 - } - if len(m.EncryptedPackages) > 0 { - for iNdEx := len(m.EncryptedPackages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EncryptedPackages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintThreshold(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintThreshold(dAtA []byte, offset int, v uint64) int { - offset -= sovThreshold(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *VerificationKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *Signature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Inner) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *CoordinatorRound1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - n += m.Request.Size() - } - return n -} - -func (m *CoordinatorRound1_Plan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Plan != nil { - l = m.Plan.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} -func (m *CoordinatorRound1_ValidatorDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorDefinition != nil { - l = m.ValidatorDefinition.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} -func (m *CoordinatorRound1_ValidatorVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorVote != nil { - l = m.ValidatorVote.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} -func (m *CoordinatorRound2) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SigningPackages) > 0 { - for _, e := range m.SigningPackages { - l = e.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - } - return n -} - -func (m *CoordinatorRound2_IdentifiedCommitments) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identifier) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - if m.Commitments != nil { - l = m.Commitments.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *CoordinatorRound2_PartialSigningPackage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AllCommitments) > 0 { - for _, e := range m.AllCommitments { - l = e.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - } - return n -} - -func (m *FollowerRound1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Inner != nil { - l = m.Inner.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - if m.Pk != nil { - l = m.Pk.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - if m.Sig != nil { - l = m.Sig.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *FollowerRound1_Inner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Commitments) > 0 { - for _, e := range m.Commitments { - l = e.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - } - return n -} - -func (m *FollowerRound2) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Inner != nil { - l = m.Inner.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - if m.Pk != nil { - l = m.Pk.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - if m.Sig != nil { - l = m.Sig.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *FollowerRound2_Inner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Shares) > 0 { - for _, e := range m.Shares { - l = e.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - } - return n -} - -func (m *DKGRound1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pkg != nil { - l = m.Pkg.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - l = len(m.NullifierCommitment) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - l = len(m.Epk) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - l = len(m.Vk) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *DKGRound2) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Inner != nil { - l = m.Inner.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - l = len(m.Vk) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - l = len(m.Sig) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *DKGRound2_TargetedPackage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Vk) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - l = len(m.EncryptedPackage) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func (m *DKGRound2_Inner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EncryptedPackages) > 0 { - for _, e := range m.EncryptedPackages { - l = e.Size() - n += 1 + l + sovThreshold(uint64(l)) - } - } - l = len(m.Nullifier) - if l > 0 { - n += 1 + l + sovThreshold(uint64(l)) - } - return n -} - -func sovThreshold(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozThreshold(x uint64) (n int) { - return sovThreshold(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *VerificationKey) 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 ErrIntOverflowThreshold - } - 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: VerificationKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerificationKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Signature) 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 ErrIntOverflowThreshold - } - 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: Signature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Inner = append(m.Inner[:0], dAtA[iNdEx:postIndex]...) - if m.Inner == nil { - m.Inner = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CoordinatorRound1) 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 ErrIntOverflowThreshold - } - 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: CoordinatorRound1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CoordinatorRound1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v1.TransactionPlan{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &CoordinatorRound1_Plan{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDefinition", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v11.Validator{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &CoordinatorRound1_ValidatorDefinition{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v12.ValidatorVoteBody{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Request = &CoordinatorRound1_ValidatorVote{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CoordinatorRound2) 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 ErrIntOverflowThreshold - } - 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: CoordinatorRound2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CoordinatorRound2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SigningPackages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SigningPackages = append(m.SigningPackages, &CoordinatorRound2_PartialSigningPackage{}) - if err := m.SigningPackages[len(m.SigningPackages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CoordinatorRound2_IdentifiedCommitments) 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 ErrIntOverflowThreshold - } - 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: IdentifiedCommitments: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IdentifiedCommitments: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identifier = append(m.Identifier[:0], dAtA[iNdEx:postIndex]...) - if m.Identifier == nil { - m.Identifier = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitments", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Commitments == nil { - m.Commitments = &v13.SigningCommitments{} - } - if err := m.Commitments.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CoordinatorRound2_PartialSigningPackage) 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 ErrIntOverflowThreshold - } - 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: PartialSigningPackage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PartialSigningPackage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllCommitments", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllCommitments = append(m.AllCommitments, &CoordinatorRound2_IdentifiedCommitments{}) - if err := m.AllCommitments[len(m.AllCommitments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FollowerRound1) 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 ErrIntOverflowThreshold - } - 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: FollowerRound1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FollowerRound1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Inner == nil { - m.Inner = &FollowerRound1_Inner{} - } - if err := m.Inner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pk", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pk == nil { - m.Pk = &VerificationKey{} - } - if err := m.Pk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Sig == nil { - m.Sig = &Signature{} - } - if err := m.Sig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FollowerRound1_Inner) 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 ErrIntOverflowThreshold - } - 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: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitments", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Commitments = append(m.Commitments, &v13.SigningCommitments{}) - if err := m.Commitments[len(m.Commitments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FollowerRound2) 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 ErrIntOverflowThreshold - } - 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: FollowerRound2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FollowerRound2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Inner == nil { - m.Inner = &FollowerRound2_Inner{} - } - if err := m.Inner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pk", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pk == nil { - m.Pk = &VerificationKey{} - } - if err := m.Pk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Sig == nil { - m.Sig = &Signature{} - } - if err := m.Sig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FollowerRound2_Inner) 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 ErrIntOverflowThreshold - } - 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: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Shares = append(m.Shares, &v13.SignatureShare{}) - if err := m.Shares[len(m.Shares)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DKGRound1) 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 ErrIntOverflowThreshold - } - 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: DKGRound1: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DKGRound1: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pkg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pkg == nil { - m.Pkg = &v13.DKGRound1Package{} - } - if err := m.Pkg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullifierCommitment", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullifierCommitment = append(m.NullifierCommitment[:0], dAtA[iNdEx:postIndex]...) - if m.NullifierCommitment == nil { - m.NullifierCommitment = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Epk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Epk = append(m.Epk[:0], dAtA[iNdEx:postIndex]...) - if m.Epk == nil { - m.Epk = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Vk = append(m.Vk[:0], dAtA[iNdEx:postIndex]...) - if m.Vk == nil { - m.Vk = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DKGRound2) 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 ErrIntOverflowThreshold - } - 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: DKGRound2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DKGRound2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inner", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Inner == nil { - m.Inner = &DKGRound2_Inner{} - } - if err := m.Inner.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Vk = append(m.Vk[:0], dAtA[iNdEx:postIndex]...) - if m.Vk == nil { - m.Vk = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...) - if m.Sig == nil { - m.Sig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DKGRound2_TargetedPackage) 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 ErrIntOverflowThreshold - } - 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: TargetedPackage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TargetedPackage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Vk = append(m.Vk[:0], dAtA[iNdEx:postIndex]...) - if m.Vk == nil { - m.Vk = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedPackage", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedPackage = append(m.EncryptedPackage[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptedPackage == nil { - m.EncryptedPackage = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DKGRound2_Inner) 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 ErrIntOverflowThreshold - } - 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: Inner: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptedPackages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptedPackages = append(m.EncryptedPackages, &DKGRound2_TargetedPackage{}) - if err := m.EncryptedPackages[len(m.EncryptedPackages)-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 Nullifier", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThreshold - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthThreshold - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthThreshold - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Nullifier = append(m.Nullifier[:0], dAtA[iNdEx:postIndex]...) - if m.Nullifier == nil { - m.Nullifier = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipThreshold(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthThreshold - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipThreshold(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThreshold - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThreshold - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowThreshold - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthThreshold - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupThreshold - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthThreshold - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthThreshold = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowThreshold = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupThreshold = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/custody/v1/custody.pb.go b/chain/penumbra/custody/v1/custody.pb.go deleted file mode 100644 index f0228172..00000000 --- a/chain/penumbra/custody/v1/custody.pb.go +++ /dev/null @@ -1,2860 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/custody/v1/custody.proto - -package custodyv1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/governance/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/stake/v1" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/transaction/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/decaf377_rdsa/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type AuthorizeRequest struct { - // The transaction plan to authorize. - Plan *v1.TransactionPlan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` - // Optionally, pre-authorization data, if required by the custodian. - // - // Pre-authorization data is backend-specific, and backends are free to ignore it. - // - // Multiple `PreAuthorization` packets can be included in a single request, - // to support multi-party pre-authorizations. - PreAuthorizations []*PreAuthorization `protobuf:"bytes,3,rep,name=pre_authorizations,json=preAuthorizations,proto3" json:"pre_authorizations,omitempty"` -} - -func (m *AuthorizeRequest) Reset() { *m = AuthorizeRequest{} } -func (m *AuthorizeRequest) String() string { return proto.CompactTextString(m) } -func (*AuthorizeRequest) ProtoMessage() {} -func (*AuthorizeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{0} -} -func (m *AuthorizeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeRequest.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 *AuthorizeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeRequest.Merge(m, src) -} -func (m *AuthorizeRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeRequest proto.InternalMessageInfo - -func (m *AuthorizeRequest) GetPlan() *v1.TransactionPlan { - if m != nil { - return m.Plan - } - return nil -} - -func (m *AuthorizeRequest) GetPreAuthorizations() []*PreAuthorization { - if m != nil { - return m.PreAuthorizations - } - return nil -} - -type AuthorizeResponse struct { - Data *v1.AuthorizationData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *AuthorizeResponse) Reset() { *m = AuthorizeResponse{} } -func (m *AuthorizeResponse) String() string { return proto.CompactTextString(m) } -func (*AuthorizeResponse) ProtoMessage() {} -func (*AuthorizeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{1} -} -func (m *AuthorizeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeResponse.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 *AuthorizeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeResponse.Merge(m, src) -} -func (m *AuthorizeResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeResponse proto.InternalMessageInfo - -func (m *AuthorizeResponse) GetData() *v1.AuthorizationData { - if m != nil { - return m.Data - } - return nil -} - -type AuthorizeValidatorDefinitionRequest struct { - // The validator definition to authorize. - ValidatorDefinition *v11.Validator `protobuf:"bytes,1,opt,name=validator_definition,json=validatorDefinition,proto3" json:"validator_definition,omitempty"` - // Optionally, pre-authorization data, if required by the custodian. - // - // Pre-authorization data is backend-specific, and backends are free to ignore it. - // - // Multiple `PreAuthorization` packets can be included in a single request, - // to support multi-party pre-authorizations. - PreAuthorizations []*PreAuthorization `protobuf:"bytes,3,rep,name=pre_authorizations,json=preAuthorizations,proto3" json:"pre_authorizations,omitempty"` -} - -func (m *AuthorizeValidatorDefinitionRequest) Reset() { *m = AuthorizeValidatorDefinitionRequest{} } -func (m *AuthorizeValidatorDefinitionRequest) String() string { return proto.CompactTextString(m) } -func (*AuthorizeValidatorDefinitionRequest) ProtoMessage() {} -func (*AuthorizeValidatorDefinitionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{2} -} -func (m *AuthorizeValidatorDefinitionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeValidatorDefinitionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeValidatorDefinitionRequest.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 *AuthorizeValidatorDefinitionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeValidatorDefinitionRequest.Merge(m, src) -} -func (m *AuthorizeValidatorDefinitionRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeValidatorDefinitionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeValidatorDefinitionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeValidatorDefinitionRequest proto.InternalMessageInfo - -func (m *AuthorizeValidatorDefinitionRequest) GetValidatorDefinition() *v11.Validator { - if m != nil { - return m.ValidatorDefinition - } - return nil -} - -func (m *AuthorizeValidatorDefinitionRequest) GetPreAuthorizations() []*PreAuthorization { - if m != nil { - return m.PreAuthorizations - } - return nil -} - -type AuthorizeValidatorDefinitionResponse struct { - // The authorization signature for the validator definition. - ValidatorDefinitionAuth *v12.SpendAuthSignature `protobuf:"bytes,1,opt,name=validator_definition_auth,json=validatorDefinitionAuth,proto3" json:"validator_definition_auth,omitempty"` -} - -func (m *AuthorizeValidatorDefinitionResponse) Reset() { *m = AuthorizeValidatorDefinitionResponse{} } -func (m *AuthorizeValidatorDefinitionResponse) String() string { return proto.CompactTextString(m) } -func (*AuthorizeValidatorDefinitionResponse) ProtoMessage() {} -func (*AuthorizeValidatorDefinitionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{3} -} -func (m *AuthorizeValidatorDefinitionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeValidatorDefinitionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeValidatorDefinitionResponse.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 *AuthorizeValidatorDefinitionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeValidatorDefinitionResponse.Merge(m, src) -} -func (m *AuthorizeValidatorDefinitionResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeValidatorDefinitionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeValidatorDefinitionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeValidatorDefinitionResponse proto.InternalMessageInfo - -func (m *AuthorizeValidatorDefinitionResponse) GetValidatorDefinitionAuth() *v12.SpendAuthSignature { - if m != nil { - return m.ValidatorDefinitionAuth - } - return nil -} - -type AuthorizeValidatorVoteRequest struct { - // The validator vote to authorize. - ValidatorVote *v13.ValidatorVoteBody `protobuf:"bytes,1,opt,name=validator_vote,json=validatorVote,proto3" json:"validator_vote,omitempty"` - // Optionally, pre-authorization data, if required by the custodian. - // - // Pre-authorization data is backend-specific, and backends are free to ignore it. - // - // Multiple `PreAuthorization` packets can be included in a single request, - // to support multi-party pre-authorizations. - PreAuthorizations []*PreAuthorization `protobuf:"bytes,3,rep,name=pre_authorizations,json=preAuthorizations,proto3" json:"pre_authorizations,omitempty"` -} - -func (m *AuthorizeValidatorVoteRequest) Reset() { *m = AuthorizeValidatorVoteRequest{} } -func (m *AuthorizeValidatorVoteRequest) String() string { return proto.CompactTextString(m) } -func (*AuthorizeValidatorVoteRequest) ProtoMessage() {} -func (*AuthorizeValidatorVoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{4} -} -func (m *AuthorizeValidatorVoteRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeValidatorVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeValidatorVoteRequest.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 *AuthorizeValidatorVoteRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeValidatorVoteRequest.Merge(m, src) -} -func (m *AuthorizeValidatorVoteRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeValidatorVoteRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeValidatorVoteRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeValidatorVoteRequest proto.InternalMessageInfo - -func (m *AuthorizeValidatorVoteRequest) GetValidatorVote() *v13.ValidatorVoteBody { - if m != nil { - return m.ValidatorVote - } - return nil -} - -func (m *AuthorizeValidatorVoteRequest) GetPreAuthorizations() []*PreAuthorization { - if m != nil { - return m.PreAuthorizations - } - return nil -} - -type AuthorizeValidatorVoteResponse struct { - // The authorization signature for the validator vote. - ValidatorVoteAuth *v12.SpendAuthSignature `protobuf:"bytes,1,opt,name=validator_vote_auth,json=validatorVoteAuth,proto3" json:"validator_vote_auth,omitempty"` -} - -func (m *AuthorizeValidatorVoteResponse) Reset() { *m = AuthorizeValidatorVoteResponse{} } -func (m *AuthorizeValidatorVoteResponse) String() string { return proto.CompactTextString(m) } -func (*AuthorizeValidatorVoteResponse) ProtoMessage() {} -func (*AuthorizeValidatorVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{5} -} -func (m *AuthorizeValidatorVoteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeValidatorVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeValidatorVoteResponse.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 *AuthorizeValidatorVoteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeValidatorVoteResponse.Merge(m, src) -} -func (m *AuthorizeValidatorVoteResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeValidatorVoteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeValidatorVoteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeValidatorVoteResponse proto.InternalMessageInfo - -func (m *AuthorizeValidatorVoteResponse) GetValidatorVoteAuth() *v12.SpendAuthSignature { - if m != nil { - return m.ValidatorVoteAuth - } - return nil -} - -// A pre-authorization packet. This allows a custodian to delegate (partial) -// signing authority to other authorization mechanisms. Details of how a -// custodian manages those keys are out-of-scope for the custody protocol and -// are custodian-specific. -type PreAuthorization struct { - // Types that are valid to be assigned to PreAuthorization: - // *PreAuthorization_Ed25519_ - PreAuthorization isPreAuthorization_PreAuthorization `protobuf_oneof:"pre_authorization"` -} - -func (m *PreAuthorization) Reset() { *m = PreAuthorization{} } -func (m *PreAuthorization) String() string { return proto.CompactTextString(m) } -func (*PreAuthorization) ProtoMessage() {} -func (*PreAuthorization) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{6} -} -func (m *PreAuthorization) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PreAuthorization.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 *PreAuthorization) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreAuthorization.Merge(m, src) -} -func (m *PreAuthorization) XXX_Size() int { - return m.Size() -} -func (m *PreAuthorization) XXX_DiscardUnknown() { - xxx_messageInfo_PreAuthorization.DiscardUnknown(m) -} - -var xxx_messageInfo_PreAuthorization proto.InternalMessageInfo - -type isPreAuthorization_PreAuthorization interface { - isPreAuthorization_PreAuthorization() - MarshalTo([]byte) (int, error) - Size() int -} - -type PreAuthorization_Ed25519_ struct { - Ed25519 *PreAuthorization_Ed25519 `protobuf:"bytes,1,opt,name=ed25519,proto3,oneof" json:"ed25519,omitempty"` -} - -func (*PreAuthorization_Ed25519_) isPreAuthorization_PreAuthorization() {} - -func (m *PreAuthorization) GetPreAuthorization() isPreAuthorization_PreAuthorization { - if m != nil { - return m.PreAuthorization - } - return nil -} - -func (m *PreAuthorization) GetEd25519() *PreAuthorization_Ed25519 { - if x, ok := m.GetPreAuthorization().(*PreAuthorization_Ed25519_); ok { - return x.Ed25519 - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PreAuthorization) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PreAuthorization_Ed25519_)(nil), - } -} - -// An Ed25519-based preauthorization, containing an Ed25519 signature over the -// `TransactionPlan`. -type PreAuthorization_Ed25519 struct { - // The Ed25519 verification key used to verify the signature. - Vk []byte `protobuf:"bytes,1,opt,name=vk,proto3" json:"vk,omitempty"` - // The Ed25519 signature over the `TransactionPlan`. - Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` -} - -func (m *PreAuthorization_Ed25519) Reset() { *m = PreAuthorization_Ed25519{} } -func (m *PreAuthorization_Ed25519) String() string { return proto.CompactTextString(m) } -func (*PreAuthorization_Ed25519) ProtoMessage() {} -func (*PreAuthorization_Ed25519) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{6, 0} -} -func (m *PreAuthorization_Ed25519) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PreAuthorization_Ed25519) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PreAuthorization_Ed25519.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 *PreAuthorization_Ed25519) XXX_Merge(src proto.Message) { - xxx_messageInfo_PreAuthorization_Ed25519.Merge(m, src) -} -func (m *PreAuthorization_Ed25519) XXX_Size() int { - return m.Size() -} -func (m *PreAuthorization_Ed25519) XXX_DiscardUnknown() { - xxx_messageInfo_PreAuthorization_Ed25519.DiscardUnknown(m) -} - -var xxx_messageInfo_PreAuthorization_Ed25519 proto.InternalMessageInfo - -func (m *PreAuthorization_Ed25519) GetVk() []byte { - if m != nil { - return m.Vk - } - return nil -} - -func (m *PreAuthorization_Ed25519) GetSig() []byte { - if m != nil { - return m.Sig - } - return nil -} - -type ExportFullViewingKeyRequest struct { -} - -func (m *ExportFullViewingKeyRequest) Reset() { *m = ExportFullViewingKeyRequest{} } -func (m *ExportFullViewingKeyRequest) String() string { return proto.CompactTextString(m) } -func (*ExportFullViewingKeyRequest) ProtoMessage() {} -func (*ExportFullViewingKeyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{7} -} -func (m *ExportFullViewingKeyRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportFullViewingKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportFullViewingKeyRequest.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 *ExportFullViewingKeyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportFullViewingKeyRequest.Merge(m, src) -} -func (m *ExportFullViewingKeyRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportFullViewingKeyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportFullViewingKeyRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportFullViewingKeyRequest proto.InternalMessageInfo - -type ExportFullViewingKeyResponse struct { - // The full viewing key. - FullViewingKey *v14.FullViewingKey `protobuf:"bytes,1,opt,name=full_viewing_key,json=fullViewingKey,proto3" json:"full_viewing_key,omitempty"` -} - -func (m *ExportFullViewingKeyResponse) Reset() { *m = ExportFullViewingKeyResponse{} } -func (m *ExportFullViewingKeyResponse) String() string { return proto.CompactTextString(m) } -func (*ExportFullViewingKeyResponse) ProtoMessage() {} -func (*ExportFullViewingKeyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{8} -} -func (m *ExportFullViewingKeyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportFullViewingKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportFullViewingKeyResponse.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 *ExportFullViewingKeyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportFullViewingKeyResponse.Merge(m, src) -} -func (m *ExportFullViewingKeyResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportFullViewingKeyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportFullViewingKeyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportFullViewingKeyResponse proto.InternalMessageInfo - -func (m *ExportFullViewingKeyResponse) GetFullViewingKey() *v14.FullViewingKey { - if m != nil { - return m.FullViewingKey - } - return nil -} - -type ConfirmAddressRequest struct { - AddressIndex *v14.AddressIndex `protobuf:"bytes,1,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` -} - -func (m *ConfirmAddressRequest) Reset() { *m = ConfirmAddressRequest{} } -func (m *ConfirmAddressRequest) String() string { return proto.CompactTextString(m) } -func (*ConfirmAddressRequest) ProtoMessage() {} -func (*ConfirmAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{9} -} -func (m *ConfirmAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfirmAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConfirmAddressRequest.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 *ConfirmAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfirmAddressRequest.Merge(m, src) -} -func (m *ConfirmAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *ConfirmAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ConfirmAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfirmAddressRequest proto.InternalMessageInfo - -func (m *ConfirmAddressRequest) GetAddressIndex() *v14.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -type ConfirmAddressResponse struct { - Address *v14.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *ConfirmAddressResponse) Reset() { *m = ConfirmAddressResponse{} } -func (m *ConfirmAddressResponse) String() string { return proto.CompactTextString(m) } -func (*ConfirmAddressResponse) ProtoMessage() {} -func (*ConfirmAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e460ce3850593522, []int{10} -} -func (m *ConfirmAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfirmAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConfirmAddressResponse.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 *ConfirmAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfirmAddressResponse.Merge(m, src) -} -func (m *ConfirmAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *ConfirmAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConfirmAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfirmAddressResponse proto.InternalMessageInfo - -func (m *ConfirmAddressResponse) GetAddress() *v14.Address { - if m != nil { - return m.Address - } - return nil -} - -func init() { - proto.RegisterType((*AuthorizeRequest)(nil), "penumbra.custody.v1.AuthorizeRequest") - proto.RegisterType((*AuthorizeResponse)(nil), "penumbra.custody.v1.AuthorizeResponse") - proto.RegisterType((*AuthorizeValidatorDefinitionRequest)(nil), "penumbra.custody.v1.AuthorizeValidatorDefinitionRequest") - proto.RegisterType((*AuthorizeValidatorDefinitionResponse)(nil), "penumbra.custody.v1.AuthorizeValidatorDefinitionResponse") - proto.RegisterType((*AuthorizeValidatorVoteRequest)(nil), "penumbra.custody.v1.AuthorizeValidatorVoteRequest") - proto.RegisterType((*AuthorizeValidatorVoteResponse)(nil), "penumbra.custody.v1.AuthorizeValidatorVoteResponse") - proto.RegisterType((*PreAuthorization)(nil), "penumbra.custody.v1.PreAuthorization") - proto.RegisterType((*PreAuthorization_Ed25519)(nil), "penumbra.custody.v1.PreAuthorization.Ed25519") - proto.RegisterType((*ExportFullViewingKeyRequest)(nil), "penumbra.custody.v1.ExportFullViewingKeyRequest") - proto.RegisterType((*ExportFullViewingKeyResponse)(nil), "penumbra.custody.v1.ExportFullViewingKeyResponse") - proto.RegisterType((*ConfirmAddressRequest)(nil), "penumbra.custody.v1.ConfirmAddressRequest") - proto.RegisterType((*ConfirmAddressResponse)(nil), "penumbra.custody.v1.ConfirmAddressResponse") -} - -func init() { proto.RegisterFile("penumbra/custody/v1/custody.proto", fileDescriptor_e460ce3850593522) } - -var fileDescriptor_e460ce3850593522 = []byte{ - // 922 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x3a, 0x11, 0x11, 0xaf, 0xa9, 0x95, 0xac, 0xfb, 0x23, 0x98, 0xd6, 0x04, 0x97, 0xa2, - 0x8a, 0xd0, 0x5d, 0xd6, 0x69, 0x69, 0x1a, 0x4e, 0x71, 0x5a, 0x68, 0x85, 0x10, 0xd6, 0xa6, 0x58, - 0x55, 0x15, 0x61, 0x4d, 0xbc, 0x63, 0x67, 0xe5, 0xcd, 0xcc, 0x32, 0x33, 0x3b, 0xd4, 0x70, 0x42, - 0x42, 0x9c, 0x91, 0xb8, 0x70, 0x43, 0xe2, 0x08, 0xff, 0x08, 0xe2, 0xd4, 0x13, 0x42, 0xe2, 0x82, - 0x9c, 0x1b, 0x07, 0xfe, 0x06, 0x34, 0xbb, 0xb3, 0xf6, 0xae, 0xb3, 0x36, 0x2d, 0x28, 0x27, 0xef, - 0xbc, 0xf9, 0xde, 0xf7, 0xbe, 0xf7, 0xf6, 0xdb, 0xf1, 0xc0, 0xeb, 0x21, 0x26, 0xd1, 0xf1, 0x21, - 0x43, 0x76, 0x37, 0xe2, 0x82, 0x7a, 0x43, 0x5b, 0x3a, 0xe9, 0xa3, 0x15, 0x32, 0x2a, 0xa8, 0x59, - 0x49, 0x21, 0x56, 0x1a, 0x97, 0x4e, 0xf5, 0xdd, 0x49, 0x1e, 0x65, 0xd8, 0xee, 0xd2, 0xe3, 0x90, - 0x12, 0x4c, 0x84, 0xdd, 0xa7, 0x12, 0x33, 0x82, 0x48, 0x17, 0x2b, 0xa6, 0xc9, 0x2a, 0x21, 0xab, - 0xbe, 0x3d, 0x2b, 0x8f, 0x0b, 0x34, 0x88, 0x53, 0xe2, 0x07, 0x8d, 0xde, 0xc8, 0xa3, 0x07, 0x78, - 0xc8, 0x15, 0x44, 0xfd, 0x6a, 0x84, 0x95, 0x47, 0x08, 0x86, 0x08, 0x47, 0x5d, 0xe1, 0x53, 0xa2, - 0x80, 0x99, 0xa5, 0xc6, 0xdf, 0x9a, 0xe0, 0xd9, 0x30, 0x14, 0xd4, 0xf6, 0x70, 0x17, 0xf5, 0xb6, - 0xee, 0xdc, 0xe9, 0x30, 0x8f, 0x23, 0x95, 0x93, 0x0b, 0x24, 0x59, 0xf5, 0x9f, 0x0d, 0x58, 0xdd, - 0x8d, 0xc4, 0x11, 0x65, 0xfe, 0x17, 0xd8, 0xc5, 0x9f, 0x45, 0x98, 0x0b, 0x73, 0x17, 0x96, 0xc2, - 0x00, 0x91, 0x75, 0x63, 0xc3, 0xb8, 0x71, 0xae, 0x71, 0xd3, 0x9a, 0x8c, 0x89, 0x32, 0x6c, 0x65, - 0x4b, 0x4b, 0xc7, 0x7a, 0x34, 0x59, 0xb6, 0x02, 0x44, 0xdc, 0x38, 0xd5, 0x7c, 0x04, 0x66, 0xc8, - 0x70, 0x07, 0x69, 0x6a, 0xa4, 0xb6, 0xf9, 0xfa, 0xe2, 0xc6, 0xe2, 0x8d, 0x73, 0x8d, 0xeb, 0x56, - 0xc1, 0xdc, 0xad, 0x16, 0xc3, 0xbb, 0x59, 0xb4, 0xbb, 0x16, 0x4e, 0x45, 0x78, 0xfd, 0x31, 0xac, - 0x65, 0xc4, 0xf2, 0x90, 0x12, 0x8e, 0xcd, 0x3d, 0x58, 0xf2, 0x90, 0x40, 0x5a, 0xad, 0x3d, 0x5f, - 0x6d, 0x8e, 0xf0, 0x1e, 0x12, 0xc8, 0x8d, 0x93, 0xeb, 0x7f, 0x18, 0x70, 0x6d, 0x4c, 0xdd, 0x46, - 0x81, 0xef, 0x21, 0x41, 0xd9, 0x3d, 0xdc, 0xf3, 0x89, 0x1f, 0xab, 0xd1, 0xa3, 0xf9, 0x14, 0x2e, - 0xc8, 0x74, 0xb7, 0xe3, 0x8d, 0xb7, 0x75, 0xf1, 0xcd, 0xa9, 0xe2, 0x63, 0x13, 0x58, 0xc9, 0xbb, - 0x97, 0x8e, 0x35, 0xe6, 0x76, 0x2b, 0xf2, 0x74, 0x99, 0x33, 0x9a, 0xdb, 0xf7, 0x06, 0xbc, 0x31, - 0xbf, 0x3b, 0x3d, 0xcb, 0x10, 0x5e, 0x29, 0x6a, 0x2f, 0xd6, 0xa3, 0x7b, 0xbc, 0x95, 0x51, 0x11, - 0x1b, 0xcd, 0xca, 0xfb, 0x4a, 0x3a, 0xd6, 0x7e, 0x88, 0x89, 0xa7, 0xea, 0xed, 0xfb, 0x7d, 0x82, - 0x44, 0xc4, 0xb0, 0x7b, 0xb9, 0xa0, 0x59, 0x85, 0xa8, 0xff, 0x66, 0xc0, 0xd5, 0xd3, 0xd2, 0xda, - 0x54, 0x8c, 0xdd, 0xd8, 0x81, 0xf2, 0x44, 0x93, 0xa4, 0x02, 0x6b, 0x21, 0xdb, 0x33, 0x87, 0x9d, - 0xf9, 0x36, 0xb3, 0x13, 0x57, 0xa4, 0x4d, 0xea, 0x0d, 0xdd, 0xf3, 0x32, 0x1b, 0x3a, 0xa3, 0x99, - 0x7f, 0x63, 0x40, 0x6d, 0x56, 0x63, 0x7a, 0xda, 0x1e, 0x54, 0xf2, 0x9d, 0xfd, 0xff, 0x39, 0xaf, - 0xe5, 0x5a, 0x8b, 0x27, 0xfc, 0x83, 0x01, 0xab, 0xd3, 0x82, 0xcd, 0x87, 0xb0, 0x8c, 0xbd, 0xc6, - 0xed, 0xdb, 0xce, 0xdd, 0x82, 0xaf, 0x7c, 0x76, 0xa3, 0xd6, 0xfd, 0x24, 0xe9, 0xc1, 0x82, 0x9b, - 0xe6, 0x57, 0x37, 0x61, 0x59, 0x47, 0xcd, 0x32, 0x94, 0xe4, 0x20, 0x26, 0x5c, 0x71, 0x4b, 0x72, - 0x60, 0xae, 0xc2, 0x22, 0xf7, 0xfb, 0xeb, 0xa5, 0x38, 0xa0, 0x1e, 0x9b, 0x15, 0x58, 0x3b, 0x35, - 0xeb, 0xfa, 0x55, 0x78, 0xf5, 0xfe, 0xd3, 0x90, 0x32, 0xf1, 0x7e, 0x14, 0x04, 0x6d, 0x1f, 0x7f, - 0xee, 0x93, 0xfe, 0x87, 0x78, 0xa8, 0x0d, 0x50, 0xa7, 0x70, 0xa5, 0x78, 0x5b, 0x8f, 0xf1, 0x63, - 0x58, 0xed, 0x45, 0x41, 0xd0, 0x91, 0xc9, 0x56, 0x67, 0x80, 0x87, 0xba, 0xa9, 0xeb, 0x53, 0x16, - 0x89, 0x8f, 0x57, 0xe9, 0x58, 0x53, 0x44, 0xe5, 0x5e, 0x6e, 0x5d, 0x47, 0x70, 0x71, 0x8f, 0x92, - 0x9e, 0xcf, 0x8e, 0x77, 0x3d, 0x8f, 0x61, 0xce, 0x53, 0x2b, 0x3e, 0x80, 0xf3, 0x28, 0x89, 0x74, - 0x7c, 0xe2, 0xe1, 0xa7, 0xba, 0xcc, 0xb5, 0x19, 0x65, 0x74, 0xf6, 0x43, 0x05, 0x75, 0x57, 0x50, - 0x66, 0x55, 0x77, 0xe1, 0xd2, 0x74, 0x09, 0xdd, 0xcd, 0x36, 0x2c, 0x6b, 0xa4, 0x66, 0xaf, 0xcd, - 0x67, 0x77, 0x53, 0x78, 0xe3, 0xef, 0x25, 0x28, 0xef, 0x25, 0xef, 0x6e, 0x1f, 0x33, 0xe9, 0x77, - 0xb1, 0xf9, 0x04, 0x5e, 0x1e, 0x7b, 0xd0, 0x2c, 0xf6, 0xf2, 0xf4, 0xe9, 0x5f, 0x7d, 0xf3, 0xdf, - 0x60, 0x5a, 0xe8, 0x77, 0x06, 0x5c, 0x99, 0x77, 0xa8, 0x98, 0xdb, 0xf3, 0x89, 0x66, 0x9f, 0xb2, - 0xd5, 0xbb, 0xff, 0x21, 0x53, 0xab, 0xfa, 0xca, 0x80, 0x4b, 0xc5, 0x9f, 0x9d, 0xd9, 0x78, 0x4e, - 0xd6, 0xcc, 0xe1, 0x53, 0xdd, 0x7a, 0xa1, 0x1c, 0xad, 0xe1, 0x4b, 0xb8, 0x50, 0x64, 0x58, 0xf3, - 0x9d, 0x42, 0xb2, 0x39, 0xd6, 0xaf, 0x3a, 0x2f, 0x90, 0xa1, 0x8b, 0xfb, 0x50, 0xce, 0x3b, 0xcb, - 0x7c, 0xab, 0x90, 0xa4, 0xd0, 0xe1, 0xd5, 0xcd, 0xe7, 0xc2, 0x26, 0xa5, 0x9a, 0x5f, 0x97, 0x7e, - 0x19, 0xd5, 0x8c, 0x67, 0xa3, 0x9a, 0xf1, 0xe7, 0xa8, 0x66, 0x7c, 0x7b, 0x52, 0x5b, 0x78, 0x76, - 0x52, 0x5b, 0xf8, 0xfd, 0xa4, 0xb6, 0x00, 0x97, 0xbb, 0xf4, 0xb8, 0x88, 0xaa, 0xb9, 0xa2, 0x1d, - 0xda, 0x52, 0xd7, 0x8f, 0x96, 0xf1, 0xe4, 0x93, 0xbe, 0x2f, 0x8e, 0xa2, 0x43, 0x75, 0x7a, 0xdb, - 0x5c, 0xfd, 0x59, 0xf7, 0x71, 0x40, 0x25, 0xbe, 0x29, 0x31, 0x51, 0x07, 0x1a, 0xb7, 0x7d, 0x22, - 0x30, 0xeb, 0x1e, 0x21, 0xf5, 0xcb, 0x85, 0x2d, 0xb7, 0xed, 0x78, 0x61, 0x17, 0x5c, 0xef, 0xde, - 0xd3, 0x8f, 0xd2, 0xf9, 0xb1, 0xb4, 0xd8, 0xda, 0x7b, 0xfc, 0x53, 0xa9, 0xd2, 0x4a, 0x25, 0xe8, - 0xb2, 0x56, 0xdb, 0xf9, 0x75, 0x12, 0x3d, 0xd0, 0xd1, 0x83, 0xb6, 0x33, 0x2a, 0xbd, 0x56, 0x10, - 0x3d, 0xf8, 0xa0, 0xd5, 0xfc, 0x08, 0x0b, 0xa4, 0xee, 0x08, 0x7f, 0x95, 0x2e, 0xa6, 0x88, 0x9d, - 0x1d, 0x0d, 0xd9, 0xd9, 0x69, 0x3b, 0x87, 0x2f, 0xc5, 0x57, 0xa9, 0xad, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x48, 0x4f, 0x94, 0x2d, 0x72, 0x0a, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// CustodyServiceClient is the client API for CustodyService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type CustodyServiceClient interface { - // Requests authorization of the transaction with the given description. - Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeResponse, error) - // Requests authorization of the given validator definition update. - AuthorizeValidatorDefinition(ctx context.Context, in *AuthorizeValidatorDefinitionRequest, opts ...grpc.CallOption) (*AuthorizeValidatorDefinitionResponse, error) - // Requests authorization of the given validator vote. - AuthorizeValidatorVote(ctx context.Context, in *AuthorizeValidatorVoteRequest, opts ...grpc.CallOption) (*AuthorizeValidatorVoteResponse, error) - // Requests the full viewing key from the custodian. - // - // Custody backends should decide whether to honor this request, and how to - // control access to it. - ExportFullViewingKey(ctx context.Context, in *ExportFullViewingKeyRequest, opts ...grpc.CallOption) (*ExportFullViewingKeyResponse, error) - // Displays an address to a user for confirmation. - // - // Custody backends with user interaction should present the address to the - // user and wait for explicit confirmation before returning. - // - // Non-interactive custody backends may return immediately. - ConfirmAddress(ctx context.Context, in *ConfirmAddressRequest, opts ...grpc.CallOption) (*ConfirmAddressResponse, error) -} - -type custodyServiceClient struct { - cc grpc1.ClientConn -} - -func NewCustodyServiceClient(cc grpc1.ClientConn) CustodyServiceClient { - return &custodyServiceClient{cc} -} - -func (c *custodyServiceClient) Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeResponse, error) { - out := new(AuthorizeResponse) - err := c.cc.Invoke(ctx, "/penumbra.custody.v1.CustodyService/Authorize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *custodyServiceClient) AuthorizeValidatorDefinition(ctx context.Context, in *AuthorizeValidatorDefinitionRequest, opts ...grpc.CallOption) (*AuthorizeValidatorDefinitionResponse, error) { - out := new(AuthorizeValidatorDefinitionResponse) - err := c.cc.Invoke(ctx, "/penumbra.custody.v1.CustodyService/AuthorizeValidatorDefinition", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *custodyServiceClient) AuthorizeValidatorVote(ctx context.Context, in *AuthorizeValidatorVoteRequest, opts ...grpc.CallOption) (*AuthorizeValidatorVoteResponse, error) { - out := new(AuthorizeValidatorVoteResponse) - err := c.cc.Invoke(ctx, "/penumbra.custody.v1.CustodyService/AuthorizeValidatorVote", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *custodyServiceClient) ExportFullViewingKey(ctx context.Context, in *ExportFullViewingKeyRequest, opts ...grpc.CallOption) (*ExportFullViewingKeyResponse, error) { - out := new(ExportFullViewingKeyResponse) - err := c.cc.Invoke(ctx, "/penumbra.custody.v1.CustodyService/ExportFullViewingKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *custodyServiceClient) ConfirmAddress(ctx context.Context, in *ConfirmAddressRequest, opts ...grpc.CallOption) (*ConfirmAddressResponse, error) { - out := new(ConfirmAddressResponse) - err := c.cc.Invoke(ctx, "/penumbra.custody.v1.CustodyService/ConfirmAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CustodyServiceServer is the server API for CustodyService service. -type CustodyServiceServer interface { - // Requests authorization of the transaction with the given description. - Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error) - // Requests authorization of the given validator definition update. - AuthorizeValidatorDefinition(context.Context, *AuthorizeValidatorDefinitionRequest) (*AuthorizeValidatorDefinitionResponse, error) - // Requests authorization of the given validator vote. - AuthorizeValidatorVote(context.Context, *AuthorizeValidatorVoteRequest) (*AuthorizeValidatorVoteResponse, error) - // Requests the full viewing key from the custodian. - // - // Custody backends should decide whether to honor this request, and how to - // control access to it. - ExportFullViewingKey(context.Context, *ExportFullViewingKeyRequest) (*ExportFullViewingKeyResponse, error) - // Displays an address to a user for confirmation. - // - // Custody backends with user interaction should present the address to the - // user and wait for explicit confirmation before returning. - // - // Non-interactive custody backends may return immediately. - ConfirmAddress(context.Context, *ConfirmAddressRequest) (*ConfirmAddressResponse, error) -} - -// UnimplementedCustodyServiceServer can be embedded to have forward compatible implementations. -type UnimplementedCustodyServiceServer struct { -} - -func (*UnimplementedCustodyServiceServer) Authorize(ctx context.Context, req *AuthorizeRequest) (*AuthorizeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") -} -func (*UnimplementedCustodyServiceServer) AuthorizeValidatorDefinition(ctx context.Context, req *AuthorizeValidatorDefinitionRequest) (*AuthorizeValidatorDefinitionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthorizeValidatorDefinition not implemented") -} -func (*UnimplementedCustodyServiceServer) AuthorizeValidatorVote(ctx context.Context, req *AuthorizeValidatorVoteRequest) (*AuthorizeValidatorVoteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthorizeValidatorVote not implemented") -} -func (*UnimplementedCustodyServiceServer) ExportFullViewingKey(ctx context.Context, req *ExportFullViewingKeyRequest) (*ExportFullViewingKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExportFullViewingKey not implemented") -} -func (*UnimplementedCustodyServiceServer) ConfirmAddress(ctx context.Context, req *ConfirmAddressRequest) (*ConfirmAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConfirmAddress not implemented") -} - -func RegisterCustodyServiceServer(s grpc1.Server, srv CustodyServiceServer) { - s.RegisterService(&_CustodyService_serviceDesc, srv) -} - -func _CustodyService_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthorizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CustodyServiceServer).Authorize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.custody.v1.CustodyService/Authorize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CustodyServiceServer).Authorize(ctx, req.(*AuthorizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CustodyService_AuthorizeValidatorDefinition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthorizeValidatorDefinitionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CustodyServiceServer).AuthorizeValidatorDefinition(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.custody.v1.CustodyService/AuthorizeValidatorDefinition", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CustodyServiceServer).AuthorizeValidatorDefinition(ctx, req.(*AuthorizeValidatorDefinitionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CustodyService_AuthorizeValidatorVote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthorizeValidatorVoteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CustodyServiceServer).AuthorizeValidatorVote(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.custody.v1.CustodyService/AuthorizeValidatorVote", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CustodyServiceServer).AuthorizeValidatorVote(ctx, req.(*AuthorizeValidatorVoteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CustodyService_ExportFullViewingKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportFullViewingKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CustodyServiceServer).ExportFullViewingKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.custody.v1.CustodyService/ExportFullViewingKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CustodyServiceServer).ExportFullViewingKey(ctx, req.(*ExportFullViewingKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CustodyService_ConfirmAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CustodyServiceServer).ConfirmAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.custody.v1.CustodyService/ConfirmAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CustodyServiceServer).ConfirmAddress(ctx, req.(*ConfirmAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _CustodyService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.custody.v1.CustodyService", - HandlerType: (*CustodyServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Authorize", - Handler: _CustodyService_Authorize_Handler, - }, - { - MethodName: "AuthorizeValidatorDefinition", - Handler: _CustodyService_AuthorizeValidatorDefinition_Handler, - }, - { - MethodName: "AuthorizeValidatorVote", - Handler: _CustodyService_AuthorizeValidatorVote_Handler, - }, - { - MethodName: "ExportFullViewingKey", - Handler: _CustodyService_ExportFullViewingKey_Handler, - }, - { - MethodName: "ConfirmAddress", - Handler: _CustodyService_ConfirmAddress_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "penumbra/custody/v1/custody.proto", -} - -func (m *AuthorizeRequest) Marshal() (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 *AuthorizeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PreAuthorizations) > 0 { - for iNdEx := len(m.PreAuthorizations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PreAuthorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Plan != nil { - { - size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeResponse) Marshal() (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 *AuthorizeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeValidatorDefinitionRequest) Marshal() (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 *AuthorizeValidatorDefinitionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeValidatorDefinitionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PreAuthorizations) > 0 { - for iNdEx := len(m.PreAuthorizations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PreAuthorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.ValidatorDefinition != nil { - { - size, err := m.ValidatorDefinition.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeValidatorDefinitionResponse) Marshal() (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 *AuthorizeValidatorDefinitionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeValidatorDefinitionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorDefinitionAuth != nil { - { - size, err := m.ValidatorDefinitionAuth.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeValidatorVoteRequest) Marshal() (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 *AuthorizeValidatorVoteRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeValidatorVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PreAuthorizations) > 0 { - for iNdEx := len(m.PreAuthorizations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PreAuthorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.ValidatorVote != nil { - { - size, err := m.ValidatorVote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeValidatorVoteResponse) Marshal() (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 *AuthorizeValidatorVoteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeValidatorVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorVoteAuth != nil { - { - size, err := m.ValidatorVoteAuth.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PreAuthorization) Marshal() (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 *PreAuthorization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PreAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PreAuthorization != nil { - { - size := m.PreAuthorization.Size() - i -= size - if _, err := m.PreAuthorization.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *PreAuthorization_Ed25519_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PreAuthorization_Ed25519_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Ed25519 != nil { - { - size, err := m.Ed25519.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *PreAuthorization_Ed25519) Marshal() (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 *PreAuthorization_Ed25519) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PreAuthorization_Ed25519) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sig) > 0 { - i -= len(m.Sig) - copy(dAtA[i:], m.Sig) - i = encodeVarintCustody(dAtA, i, uint64(len(m.Sig))) - i-- - dAtA[i] = 0x12 - } - if len(m.Vk) > 0 { - i -= len(m.Vk) - copy(dAtA[i:], m.Vk) - i = encodeVarintCustody(dAtA, i, uint64(len(m.Vk))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExportFullViewingKeyRequest) Marshal() (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 *ExportFullViewingKeyRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportFullViewingKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ExportFullViewingKeyResponse) Marshal() (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 *ExportFullViewingKeyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportFullViewingKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FullViewingKey != nil { - { - size, err := m.FullViewingKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConfirmAddressRequest) Marshal() (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 *ConfirmAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfirmAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConfirmAddressResponse) Marshal() (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 *ConfirmAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfirmAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCustody(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCustody(dAtA []byte, offset int, v uint64) int { - offset -= sovCustody(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AuthorizeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Plan != nil { - l = m.Plan.Size() - n += 1 + l + sovCustody(uint64(l)) - } - if len(m.PreAuthorizations) > 0 { - for _, e := range m.PreAuthorizations { - l = e.Size() - n += 1 + l + sovCustody(uint64(l)) - } - } - return n -} - -func (m *AuthorizeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovCustody(uint64(l)) - } - return n -} - -func (m *AuthorizeValidatorDefinitionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorDefinition != nil { - l = m.ValidatorDefinition.Size() - n += 1 + l + sovCustody(uint64(l)) - } - if len(m.PreAuthorizations) > 0 { - for _, e := range m.PreAuthorizations { - l = e.Size() - n += 1 + l + sovCustody(uint64(l)) - } - } - return n -} - -func (m *AuthorizeValidatorDefinitionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorDefinitionAuth != nil { - l = m.ValidatorDefinitionAuth.Size() - n += 1 + l + sovCustody(uint64(l)) - } - return n -} - -func (m *AuthorizeValidatorVoteRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorVote != nil { - l = m.ValidatorVote.Size() - n += 1 + l + sovCustody(uint64(l)) - } - if len(m.PreAuthorizations) > 0 { - for _, e := range m.PreAuthorizations { - l = e.Size() - n += 1 + l + sovCustody(uint64(l)) - } - } - return n -} - -func (m *AuthorizeValidatorVoteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorVoteAuth != nil { - l = m.ValidatorVoteAuth.Size() - n += 1 + l + sovCustody(uint64(l)) - } - return n -} - -func (m *PreAuthorization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PreAuthorization != nil { - n += m.PreAuthorization.Size() - } - return n -} - -func (m *PreAuthorization_Ed25519_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Ed25519 != nil { - l = m.Ed25519.Size() - n += 1 + l + sovCustody(uint64(l)) - } - return n -} -func (m *PreAuthorization_Ed25519) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Vk) - if l > 0 { - n += 1 + l + sovCustody(uint64(l)) - } - l = len(m.Sig) - if l > 0 { - n += 1 + l + sovCustody(uint64(l)) - } - return n -} - -func (m *ExportFullViewingKeyRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ExportFullViewingKeyResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FullViewingKey != nil { - l = m.FullViewingKey.Size() - n += 1 + l + sovCustody(uint64(l)) - } - return n -} - -func (m *ConfirmAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovCustody(uint64(l)) - } - return n -} - -func (m *ConfirmAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovCustody(uint64(l)) - } - return n -} - -func sovCustody(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCustody(x uint64) (n int) { - return sovCustody(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AuthorizeRequest) 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 ErrIntOverflowCustody - } - 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: AuthorizeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Plan == nil { - m.Plan = &v1.TransactionPlan{} - } - if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreAuthorizations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreAuthorizations = append(m.PreAuthorizations, &PreAuthorization{}) - if err := m.PreAuthorizations[len(m.PreAuthorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeResponse) 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 ErrIntOverflowCustody - } - 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: AuthorizeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &v1.AuthorizationData{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeValidatorDefinitionRequest) 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 ErrIntOverflowCustody - } - 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: AuthorizeValidatorDefinitionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeValidatorDefinitionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDefinition", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorDefinition == nil { - m.ValidatorDefinition = &v11.Validator{} - } - if err := m.ValidatorDefinition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreAuthorizations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreAuthorizations = append(m.PreAuthorizations, &PreAuthorization{}) - if err := m.PreAuthorizations[len(m.PreAuthorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeValidatorDefinitionResponse) 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 ErrIntOverflowCustody - } - 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: AuthorizeValidatorDefinitionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeValidatorDefinitionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorDefinitionAuth", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorDefinitionAuth == nil { - m.ValidatorDefinitionAuth = &v12.SpendAuthSignature{} - } - if err := m.ValidatorDefinitionAuth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeValidatorVoteRequest) 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 ErrIntOverflowCustody - } - 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: AuthorizeValidatorVoteRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeValidatorVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorVote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorVote == nil { - m.ValidatorVote = &v13.ValidatorVoteBody{} - } - if err := m.ValidatorVote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreAuthorizations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PreAuthorizations = append(m.PreAuthorizations, &PreAuthorization{}) - if err := m.PreAuthorizations[len(m.PreAuthorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeValidatorVoteResponse) 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 ErrIntOverflowCustody - } - 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: AuthorizeValidatorVoteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeValidatorVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorVoteAuth", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorVoteAuth == nil { - m.ValidatorVoteAuth = &v12.SpendAuthSignature{} - } - if err := m.ValidatorVoteAuth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PreAuthorization) 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 ErrIntOverflowCustody - } - 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: PreAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PreAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PreAuthorization_Ed25519{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.PreAuthorization = &PreAuthorization_Ed25519_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PreAuthorization_Ed25519) 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 ErrIntOverflowCustody - } - 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: Ed25519: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ed25519: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vk", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Vk = append(m.Vk[:0], dAtA[iNdEx:postIndex]...) - if m.Vk == nil { - m.Vk = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...) - if m.Sig == nil { - m.Sig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportFullViewingKeyRequest) 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 ErrIntOverflowCustody - } - 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: ExportFullViewingKeyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportFullViewingKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportFullViewingKeyResponse) 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 ErrIntOverflowCustody - } - 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: ExportFullViewingKeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportFullViewingKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullViewingKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FullViewingKey == nil { - m.FullViewingKey = &v14.FullViewingKey{} - } - if err := m.FullViewingKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfirmAddressRequest) 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 ErrIntOverflowCustody - } - 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: ConfirmAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfirmAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v14.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfirmAddressResponse) 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 ErrIntOverflowCustody - } - 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: ConfirmAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfirmAddressResponse: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCustody - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCustody - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCustody - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v14.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCustody(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCustody - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCustody(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCustody - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCustody - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCustody - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCustody - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCustody - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCustody - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCustody = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCustody = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCustody = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/doc.go b/chain/penumbra/doc.go deleted file mode 100644 index 08a548e9..00000000 --- a/chain/penumbra/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package penumbra provides an implementation of ibc.Chain for the Penumbra blockchain. -package penumbra diff --git a/chain/penumbra/penumbra_app_node.go b/chain/penumbra/penumbra_app_node.go deleted file mode 100644 index e4fb7703..00000000 --- a/chain/penumbra/penumbra_app_node.go +++ /dev/null @@ -1,435 +0,0 @@ -package penumbra - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "path/filepath" - "strings" - - "github.com/BurntSushi/toml" - volumetypes "github.com/docker/docker/api/types/volume" - "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - "go.uber.org/zap" - - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" -) - -// PenumbraAppNode represents an instance of pcli. -type PenumbraAppNode struct { - log *zap.Logger - - Index int - VolumeName string - Chain *PenumbraChain - TestName string - NetworkID string - DockerClient *client.Client - Image ibc.DockerImage - - containerLifecycle *dockerutil.ContainerLifecycle - - // Set during StartContainer. - hostRPCPort string - hostGRPCPort string -} - -// NewPenumbraAppNode creates a new instance of PenumbraAppNode with the provided parameters. -// It initializes the PenumbraAppNode struct, sets the logger, index, chain, Docker client, -// network ID, test name, and Docker image. It also creates a container lifecycle instance with the provided logger, Docker client, -// and node name before creating a Docker volume with labels for cleanup and owner identification. Finally, -// the created PenumbraAppNode instance is returned along with a nil error, -// or a nil PenumbraAppNode and a non-nil error if any step in the process fails. -func NewPenumbraAppNode( - ctx context.Context, - log *zap.Logger, - chain *PenumbraChain, - index int, - testName string, - dockerClient *client.Client, - networkID string, - image ibc.DockerImage, -) (*PenumbraAppNode, error) { - pn := &PenumbraAppNode{ - log: log, Index: index, Chain: chain, - DockerClient: dockerClient, NetworkID: networkID, TestName: testName, Image: image, - } - - pn.containerLifecycle = dockerutil.NewContainerLifecycle(log, dockerClient, pn.Name()) - - pv, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - dockerutil.NodeOwnerLabel: pn.Name(), - }, - }) - if err != nil { - return nil, fmt.Errorf("creating penumbra volume: %w", err) - } - - pn.VolumeName = pv.Name - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: log, - - Client: dockerClient, - - VolumeName: pn.VolumeName, - ImageRef: pn.Image.Ref(), - TestName: pn.TestName, - UidGid: image.UIDGID, - }); err != nil { - return nil, fmt.Errorf("set penumbra volume owner: %w", err) - } - - return pn, nil -} - -const ( - valKey = "validator" - rpcPort = "26657/tcp" - abciPort = "26658/tcp" - grpcPort = "8080/tcp" - metricsPort = "9000/tcp" -) - -var exposedPorts = nat.PortMap{ - nat.Port(abciPort): {}, - nat.Port(grpcPort): {}, - nat.Port(metricsPort): {}, -} - -// Name of the test node container. -func (p *PenumbraAppNode) Name() string { - return fmt.Sprintf("pd-%d-%s-%s", p.Index, p.Chain.Config().ChainID, p.TestName) -} - -// HostName returns the hostname of the test node container. -func (p *PenumbraAppNode) HostName() string { - return dockerutil.CondenseHostName(p.Name()) -} - -// Bind returns the home folder bind point for running the node. -func (p *PenumbraAppNode) Bind() []string { - return []string{fmt.Sprintf("%s:%s", p.VolumeName, p.HomeDir())} -} - -// HomeDir returns the home directory location in the Docker filesystem. -func (p *PenumbraAppNode) HomeDir() string { - return "/home/heighliner" -} - -// CreateKey attempts to initialize a new pcli config file with a newly generated FullViewingKey and CustodyKey. -func (p *PenumbraAppNode) CreateKey(ctx context.Context, keyName string) error { - keyPath := filepath.Join(p.HomeDir(), "keys", keyName) - pdURL := fmt.Sprintf("http://%s:8080", p.HostName()) - cmd := []string{"pcli", "--home", keyPath, "init", "--grpc-url", pdURL, "soft-kms", "generate"} - - _, stderr, err := p.Exec(ctx, cmd, nil) - - // key already exists - if err != nil && !strings.Contains(string(stderr), "not empty;, refusing to initialize") { - return err - } - - return nil -} - -// PcliConfig represents the config.toml file associated with an instance of pcli. -type PcliConfig struct { - GrpcURL string `toml:"grpc_url"` - FullViewingKey string `toml:"full_viewing_key"` - Custody struct { - Backend string `toml:"backend"` - SpendKey string `toml:"spend_key"` - } `toml:"custody"` -} - -// ReadFile attempts to read a file from the Docker filesystem at the specified path. -// relPath describes the location of the file in the Docker volume relative to the home directory. -func (p *PenumbraAppNode) ReadFile(ctx context.Context, relPath string) ([]byte, error) { - fr := dockerutil.NewFileRetriever(p.log, p.DockerClient, p.TestName) - fileBz, err := fr.SingleFileContent(ctx, p.VolumeName, relPath) - if err != nil { - return nil, err - } - - return fileBz, nil -} - -// FullViewingKey attempts to read the FullViewingKey from the config.toml file associated with this instance of pcli. -func (p *PenumbraAppNode) FullViewingKey(ctx context.Context, keyName string) (string, error) { - keyPath := filepath.Join(p.HomeDir(), "keys", keyName) - fileBz, err := p.ReadFile(ctx, keyPath+"config.toml") - if err != nil { - return "", err - } - - c := PcliConfig{} - err = toml.Unmarshal(fileBz, &c) - if err != nil { - return "", err - } - - return c.FullViewingKey, nil -} - -// RecoverKey restores a key from a given mnemonic. -func (p *PenumbraAppNode) RecoverKey(ctx context.Context, keyName, mnemonic string) error { - keyPath := filepath.Join(p.HomeDir(), "keys", keyName) - cmd := []string{ - "sh", - "-c", - fmt.Sprintf(`echo %q | pcli --home %s init soft-kms import-phrase`, mnemonic, keyPath), - } - - _, stderr, err := p.Exec(ctx, cmd, nil) - - // key already exists - if err != nil && !strings.Contains(string(stderr), "already exists, refusing to overwrite it") { - return err - } - - return nil -} - -// InitValidatorFile initializes validator definition template file, wallet must be generated first. -func (p *PenumbraAppNode) InitValidatorFile(ctx context.Context, valKeyName string) error { - keyPath := filepath.Join(p.HomeDir(), "keys", valKeyName) - cmd := []string{ - "pcli", - "--home", keyPath, - "validator", "definition", "template", - "--file", p.ValidatorDefinitionTemplateFilePathContainer(), - } - - _, _, err := p.Exec(ctx, cmd, nil) - return err -} - -// ValidatorDefinitionTemplateFilePathContainer returns the path to the validator.toml file associated with -// this instance of pcli. -func (p *PenumbraAppNode) ValidatorDefinitionTemplateFilePathContainer() string { - return filepath.Join(p.HomeDir(), "validator.toml") -} - -// ValidatorsInputFileContainer returns the path to the validators.json file associated with -// this instance of pcli. -func (p *PenumbraAppNode) ValidatorsInputFileContainer() string { - return filepath.Join(p.HomeDir(), "validators.json") -} - -// AllocationsInputFileContainer returns the path to the allocations.csv file that should be used -// to generate the genesis file before spinning up the network from a fresh genesis. -func (p *PenumbraAppNode) AllocationsInputFileContainer() string { - return filepath.Join(p.HomeDir(), "allocations.csv") -} - -// genesisFileContent attempts to read the contents of the genesis.json file associated with the -// network that we are attempting to initialize from genesis. -func (p *PenumbraAppNode) genesisFileContent(ctx context.Context) ([]byte, error) { - fr := dockerutil.NewFileRetriever(p.log, p.DockerClient, p.TestName) - gen, err := fr.SingleFileContent(ctx, p.VolumeName, ".penumbra/testnet_data/node0/cometbft/config/genesis.json") - if err != nil { - return nil, fmt.Errorf("error getting genesis.json content: %w", err) - } - - return gen, nil -} - -// GenerateGenesisFile attempts to create the validators.json file and the allocations.csv file, write the files to -// the Docker filesystem, and then generate the directory structure containing necessary files to create a -// new testnet from genesis via an instance of pd. -func (p *PenumbraAppNode) GenerateGenesisFile( - ctx context.Context, - chainID string, - validators []PenumbraValidatorDefinition, - allocations []PenumbraGenesisAppStateAllocation, -) error { - validatorsJSON, err := json.Marshal(validators) - if err != nil { - return fmt.Errorf("error marshalling validators to json: %w", err) - } - - fw := dockerutil.NewFileWriter(p.log, p.DockerClient, p.TestName) - if err := fw.WriteFile(ctx, p.VolumeName, "validators.json", validatorsJSON); err != nil { - return fmt.Errorf("error writing validators to file: %w", err) - } - - allocationsCsv := []byte(`"amount","denom","address"` + "\n") - for _, allocation := range allocations { - allocationsCsv = append(allocationsCsv, []byte(fmt.Sprintf(`"%s","%s","%s"`+"\n", allocation.Amount.String(), allocation.Denom, allocation.Address))...) - } - - if err := fw.WriteFile(ctx, p.VolumeName, "allocations.csv", allocationsCsv); err != nil { - return fmt.Errorf("error writing allocations to file: %w", err) - } - - cmd := []string{ - "pd", - "testnet", - "generate", - "--chain-id", chainID, - "--preserve-chain-id", - "--validators-input-file", p.ValidatorsInputFileContainer(), - "--allocations-input-file", p.AllocationsInputFileContainer(), - } - _, _, err = p.Exec(ctx, cmd, nil) - if err != nil { - return fmt.Errorf("failed to exec testnet generate: %w", err) - } - - return err -} - -// GetAddress attempts to return a Penumbra address associated with a specified key name. -func (p *PenumbraAppNode) GetAddress(ctx context.Context, keyName string) ([]byte, error) { - keyPath := filepath.Join(p.HomeDir(), "keys", keyName) - cmd := []string{"pcli", "--home", keyPath, "view", "address"} - - stdout, _, err := p.Exec(ctx, cmd, nil) - if err != nil { - return nil, err - } - - if len(stdout) == 0 { - return []byte{}, errors.New("address not found") - } - - addr := strings.TrimSpace(string(stdout)) - return []byte(addr), nil -} - -// GetBalance attempts to query the token balances for a specified key name via an instance of pcli. -// TODO we need to change the func sig to take a denom then filter out the target denom bal from stdout. -func (p *PenumbraAppNode) GetBalance(ctx context.Context, keyName string) (int64, error) { - keyPath := filepath.Join(p.HomeDir(), "keys", keyName) - cmd := []string{"pcli", "--home", keyPath, "view", "balance"} - - stdout, _, err := p.Exec(ctx, cmd, nil) - if err != nil { - return 0, err - } - - p.log.Info("Balance query result", zap.String("key_name", keyName), zap.String("output", string(stdout))) - - return 0, nil -} - -// GetAddressBech32m retrieves the address associated with the specified key name. -// It executes the 'pcli' command and parses the output to find the desired address. -// The function returns the retrieved address as a string and an error if any occurred. -func (p *PenumbraAppNode) GetAddressBech32m(ctx context.Context, keyName string) (string, error) { - cmd := []string{"pcli", "--home", p.HomeDir(), "addr", "list"} - stdout, _, err := p.Exec(ctx, cmd, nil) - if err != nil { - return "", err - } - - addresses := strings.Split(string(stdout), "\n") - for _, address := range addresses { - fields := strings.Fields(address) - if len(fields) < 3 { - continue - } - - if fields[1] == keyName { - return fields[2], nil - } - } - - return "", errors.New("address not found") -} - -// CreateNodeContainer creates a container for the PenumbraAppNode. It starts the PenumbraAppNode process with the specified tendermintAddress. -// The method returns any errors encountered during the container creation process. -func (p *PenumbraAppNode) CreateNodeContainer(ctx context.Context, tendermintAddress string) error { - cmd := []string{ - "pd", "start", - "--abci-bind", "0.0.0.0:" + strings.Split(abciPort, "/")[0], - "--grpc-bind", "0.0.0.0:" + strings.Split(grpcPort, "/")[0], - "--metrics-bind", "0.0.0.0:" + strings.Split(metricsPort, "/")[0], - "--tendermint-addr", "http://" + tendermintAddress, - "--home", p.HomeDir(), - } - - return p.containerLifecycle.CreateContainer(ctx, p.TestName, p.NetworkID, p.Image, exposedPorts, "", p.Bind(), nil, p.HostName(), cmd, p.Chain.Config().Env, []string{}) -} - -// StopContainer stops the running container for the PenumbraAppNode. -func (p *PenumbraAppNode) StopContainer(ctx context.Context) error { - return p.containerLifecycle.StopContainer(ctx) -} - -// StartContainer starts the test node container, if an error occurs it is returned. -// The obtained host ports are assigned to the hostRPCPort and hostGRPCPort fields of the PenumbraAppNode struct. -// Finally, nil is returned if everything is successful. -func (p *PenumbraAppNode) StartContainer(ctx context.Context) error { - if err := p.containerLifecycle.StartContainer(ctx); err != nil { - return err - } - - hostPorts, err := p.containerLifecycle.GetHostPorts(ctx, rpcPort, grpcPort) - if err != nil { - return err - } - - p.hostRPCPort, p.hostGRPCPort = hostPorts[0], hostPorts[1] - - return nil -} - -// Exec run a container for a specific job and blocks until the container exits. -func (p *PenumbraAppNode) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) { - job := dockerutil.NewImage(p.log, p.DockerClient, p.NetworkID, p.TestName, p.Image.Repository, p.Image.Version) - opts := dockerutil.ContainerOptions{ - Binds: p.Bind(), - Env: env, - User: p.Image.UIDGID, - } - - res := job.Run(ctx, cmd, opts) - return res.Stdout, res.Stderr, res.Err -} - -// SendIBCTransfer sends an IBC transfer from the specified address to some destination address on a specified channel. -func (p *PenumbraAppNode) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, opts ibc.TransferOptions) (ibc.Tx, error) { - keyPath := filepath.Join(p.HomeDir(), "keys", keyName) - - parts := strings.Split(channelID, "-") - chanNum := parts[1] - - cmd := []string{ - "pcli", "--home", keyPath, "tx", "withdraw", - "--to", amount.Address, - "--channel", chanNum, - "--timeout-height", fmt.Sprintf("0-%d", opts.Timeout.Height), - fmt.Sprintf("%s%s", amount.Amount.String(), amount.Denom), - } - - _, _, err := p.Exec(ctx, cmd, nil) - if err != nil { - return ibc.Tx{}, err - } - - // TODO: fill in the rest of the Tx information for the ics_20 transfer - tx := ibc.Tx{ - Height: 0, - TxHash: "", - GasSpent: 0, - Packet: ibc.Packet{ - Sequence: 0, - SourcePort: "", - SourceChannel: "", - DestPort: "", - DestChannel: "", - Data: nil, - TimeoutHeight: "", - TimeoutTimestamp: 0, - }, - } - - return tx, nil -} diff --git a/chain/penumbra/penumbra_chain.go b/chain/penumbra/penumbra_chain.go deleted file mode 100644 index f4768ce9..00000000 --- a/chain/penumbra/penumbra_chain.go +++ /dev/null @@ -1,650 +0,0 @@ -package penumbra - -import ( - "context" - "encoding/json" - "fmt" - "io" - "path/filepath" - "strconv" - "strings" - "sync" - - "github.com/BurntSushi/toml" - dockerimage "github.com/docker/docker/api/types/image" - "github.com/docker/docker/client" - "go.uber.org/zap" - "golang.org/x/sync/errgroup" - - "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - - "github.com/cosmos/interchaintest/v10/chain/internal/tendermint" - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -type PenumbraChain struct { - log *zap.Logger - testName string - cfg ibc.ChainConfig - numValidators int - numFullNodes int - PenumbraNodes PenumbraNodes - keyring keyring.Keyring - - mutex sync.Mutex -} - -type PenumbraValidatorDefinition struct { - SequenceNumber int `json:"sequence_number" toml:"sequence_number"` - Enabled bool `json:"enabled" toml:"enabled"` - Name string `json:"name" toml:"name"` - Website string `json:"website" toml:"website"` - Description string `json:"description" toml:"description"` - IdentityKey string `json:"identity_key" toml:"identity_key"` - GovernanceKey string `json:"governance_key" toml:"governance_key"` - ConsensusKey PenumbraConsensusKey `json:"consensus_key" toml:"consensus_key"` - FundingStreams []PenumbraValidatorFundingStream `json:"funding_streams" toml:"funding_stream"` -} - -type PenumbraConsensusKey struct { - Type string `json:"type" toml:"type"` - Value string `json:"value" toml:"value"` -} - -type PenumbraCustodyKey struct { - SpendKey string `json:"spend_key"` -} - -type PenumbraValidatorFundingStream struct { - Recipient string `json:"address" toml:"recipient"` - RateBPS int64 `json:"rate_bps" toml:"rate_bps"` -} - -type PenumbraGenesisAppStateAllocation struct { - Amount math.Int `json:"amount"` - Denom string `json:"denom"` - Address string `json:"address"` -} - -// NewPenumbraChain returns a new instance of PenumbraChain. -func NewPenumbraChain(log *zap.Logger, testName string, chainConfig ibc.ChainConfig, numValidators int, numFullNodes int) *PenumbraChain { - registry := codectypes.NewInterfaceRegistry() - cryptocodec.RegisterInterfaces(registry) - cdc := codec.NewProtoCodec(registry) - kr := keyring.NewInMemory(cdc) - - return &PenumbraChain{ - log: log, - testName: testName, - cfg: chainConfig, - numValidators: numValidators, - numFullNodes: numFullNodes, - keyring: kr, - } -} - -// Acknowledgements implements Chain interface. -func (c *PenumbraChain) Acknowledgements(ctx context.Context, height int64) ([]ibc.PacketAcknowledgement, error) { - panic("implement me") -} - -// Timeouts implements Chain interface. -func (c *PenumbraChain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketTimeout, error) { - panic("implement me") -} - -// Config returns the Chain's ChainConfig. -func (c *PenumbraChain) Config() ibc.ChainConfig { - return c.cfg -} - -// Initialize creates the test node objects required for bootstrapping tests. -func (c *PenumbraChain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error { - return c.initializeChainNodes(ctx, testName, cli, networkID) -} - -// Exec attempts to execute an arbitrary cmd with specified env variables and returns the output returned to -// both stdout and stderr. -func (c *PenumbraChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error) { - return c.getFullNode().PenumbraAppNode.Exec(ctx, cmd, env) -} - -// getFullNode returns the first configured validator node in the network. -func (c *PenumbraChain) getFullNode() *PenumbraNode { - // use first validator - return c.PenumbraNodes[0] -} - -// GetRPCAddress returns the RPC address associated with an underlying node's Tendermint host name. -func (c *PenumbraChain) GetRPCAddress() string { - return fmt.Sprintf("http://%s:26657", c.getFullNode().TendermintNode.HostName()) -} - -// GetGRPCAddress returns the GRPC address associated with an underlying node's Tendermint host name. -func (c *PenumbraChain) GetGRPCAddress() string { - return fmt.Sprintf("%s:9090", c.getFullNode().TendermintNode.HostName()) -} - -// Implements Chain interface. -func (c *PenumbraChain) GetHostPeerAddress() string { - panic("NOT IMPLEMENTED") -} - -// GetHostRPCAddress returns the address of the RPC server accessible by the host. -// This will not return a valid address until the chain has been started. -func (c *PenumbraChain) GetHostRPCAddress() string { - return "http://" + c.getFullNode().PenumbraAppNode.hostRPCPort -} - -// GetHostGRPCAddress returns the address of the gRPC server accessible by the host. -// This will not return a valid address until the chain has been started. -func (c *PenumbraChain) GetHostGRPCAddress() string { - return c.getFullNode().PenumbraAppNode.hostGRPCPort -} - -// HomeDir returns the PenumbraAppNode's home directory in the Docker filesystem. -func (c *PenumbraChain) HomeDir() string { - return c.getFullNode().PenumbraAppNode.HomeDir() -} - -// CreateKey derives a new key with the given keyName. -func (c *PenumbraChain) CreateKey(ctx context.Context, keyName string) error { - fn := c.getFullNode() - if fn.PenumbraAppNode == nil { - return fmt.Errorf("no penumbra app nodes configured for key creation") - } - return fn.PenumbraAppNode.CreateKey(ctx, keyName) -} - -// RecoverKey restores an existing key with the given mnemonic and associates it with the specified key name in the keyring. -func (c *PenumbraChain) RecoverKey(ctx context.Context, name, mnemonic string) error { - fn := c.getFullNode() - if fn.PenumbraAppNode == nil { - return fmt.Errorf("no penumbra app nodes configured for key recovery") - } - return fn.PenumbraAppNode.RecoverKey(ctx, name, mnemonic) -} - -// GetAddress returns the byte representation of an address for the specified keyName. -func (c *PenumbraChain) GetAddress(ctx context.Context, keyName string) ([]byte, error) { - fn := c.getFullNode() - if fn.PenumbraAppNode == nil { - return nil, fmt.Errorf("no penumbra app nodes configured to retrieve an address from") - } - return fn.PenumbraAppNode.GetAddress(ctx, keyName) -} - -// BuildWallet will return a Penumbra wallet. -// If mnemonic != "", it will restore using that mnemonic. If mnemonic == "", it will create a new key. -func (c *PenumbraChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error) { - if mnemonic != "" { - if err := c.RecoverKey(ctx, keyName, mnemonic); err != nil { - return nil, fmt.Errorf("failed to recover key with name %q on chain %s: %w", keyName, c.cfg.Name, err) - } - } else { - if err := c.CreateKey(ctx, keyName); err != nil { - return nil, fmt.Errorf("failed to create key with name %q on chain %s: %w", keyName, c.cfg.Name, err) - } - } - - addrBytes, err := c.GetAddress(ctx, keyName) - if err != nil { - return nil, fmt.Errorf("failed to get account address for key %q on chain %s: %w", keyName, c.cfg.Name, err) - } - - return NewWallet(keyName, addrBytes, mnemonic, c.cfg), nil -} - -// BuildRelayerWallet will return a Penumbra wallet populated with the mnemonic so that the wallet can -// be restored in the relayer node using the mnemonic. After it is built, that address is included in -// genesis with some funds. -func (c *PenumbraChain) BuildRelayerWallet(ctx context.Context, keyName string) (ibc.Wallet, error) { - coinType, err := strconv.ParseUint(c.cfg.CoinType, 10, 32) - if err != nil { - return nil, fmt.Errorf("invalid coin type: %w", err) - } - - _, mnemonic, err := c.keyring.NewMnemonic( - keyName, - keyring.English, - hd.CreateHDPath(uint32(coinType), 0, 0).String(), - "", // Empty passphrase. - hd.Secp256k1, - ) - if err != nil { - return nil, fmt.Errorf("failed to create mnemonic: %w", err) - } - - return c.BuildWallet(ctx, keyName, mnemonic) -} - -// SendFunds will initiate a local transfer from the account associated with the specified keyName, -// amount, token denom, and recipient are specified in the amount. -func (c *PenumbraChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - fn := c.getFullNode() - if len(fn.PenumbraClientNodes) == 0 { - return fmt.Errorf("no pclientd instances configured to use when sending funds") - } - - return fn.PenumbraClientNodes[keyName].SendFunds(ctx, amount) -} - -// SendFundsWithNote will initiate a local transfer from the account associated with the specified keyName, -// amount, token denom, and recipient are specified in the amount and attach a note/memo. -func (c *PenumbraChain) SendFundsWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error) { - panic("Penumbrachain: SendFundsWithNote unimplemented") -} - -// SendIBCTransfer attempts to send a fungible token transfer via IBC from the specified account on the source chain -// to the specified account on the counterparty chain. -func (c *PenumbraChain) SendIBCTransfer( - ctx context.Context, - channelID string, - keyName string, - amount ibc.WalletAmount, - options ibc.TransferOptions, -) (ibc.Tx, error) { - fn := c.getFullNode() - if len(fn.PenumbraClientNodes) == 0 { - return ibc.Tx{}, fmt.Errorf("no pclientd instances configured to use when sending ibc transfers") - } - - return fn.PenumbraClientNodes[keyName].SendIBCTransfer(ctx, channelID, amount, options) -} - -// ExportState implements Chain interface. -func (c *PenumbraChain) ExportState(context.Context, int64) (string, error) { - panic("implement me") -} - -// Height returns the current chain block height. -func (c *PenumbraChain) Height(ctx context.Context) (int64, error) { - return c.getFullNode().TendermintNode.Height(ctx) -} - -// GetBalance attempts to make a balance request for the specified denom and the account associated with the -// specified keyName. -func (c *PenumbraChain) GetBalance(ctx context.Context, keyName string, denom string) (math.Int, error) { - fn := c.getFullNode() - if len(fn.PenumbraClientNodes) == 0 { - return math.Int{}, fmt.Errorf("no pclientd instances configured to use for balance requests") - } - - bal, err := fn.PenumbraClientNodes[keyName].GetBalance(ctx, denom) - if err != nil { - return math.Int{}, err - } - - return bal, nil -} - -// GetGasFeesInNativeDenom returns the fees used to pay for some compute with the local token denom, -// where fees = gasPaid * gasPrice. -func (c *PenumbraChain) GetGasFeesInNativeDenom(gasPaid int64) int64 { - gasPrice, _ := strconv.ParseFloat(strings.Replace(c.cfg.GasPrices, c.cfg.Denom, "", 1), 64) - fees := float64(gasPaid) * gasPrice - return int64(fees) -} - -// initializeChainNodes creates the test node objects required for bootstrapping tests. -func (c *PenumbraChain) initializeChainNodes( - ctx context.Context, - testName string, - cli *client.Client, - networkID string, -) error { - var penumbraNodes []*PenumbraNode - count := c.numValidators + c.numFullNodes - chainCfg := c.Config() - for _, image := range chainCfg.Images { - rc, err := cli.ImagePull( - ctx, - image.Repository+":"+image.Version, - dockerimage.PullOptions{}, - ) - if err != nil { - c.log.Error("Failed to pull image", - zap.Error(err), - zap.String("repository", image.Repository), - zap.String("tag", image.Version), - ) - } else { - _, _ = io.Copy(io.Discard, rc) - _ = rc.Close() - } - } - - for i := 0; i < count; i++ { - pn, err := NewPenumbraNode(ctx, i, c, cli, networkID, testName, chainCfg.Images[0], chainCfg.Images[1]) - if err != nil { - return err - } - penumbraNodes = append(penumbraNodes, &pn) - } - - c.PenumbraNodes = penumbraNodes - - return nil -} - -type GenesisValidatorPubKey struct { - Type string `json:"type"` - Value string `json:"value"` -} - -type GenesisValidators struct { - Address string `json:"address"` - Name string `json:"name"` - Power string `json:"power"` - PubKey GenesisValidatorPubKey `json:"pub_key"` -} - -type GenesisFile struct { - Validators []GenesisValidators `json:"validators"` -} - -type ValidatorWithIntPower struct { - Address string - Power int64 - PubKeyBase64 string -} - -// Start sets up everything needed, (validators, gentx, fullnodes, peering, additional accounts), -// for the chain to start from genesis. -func (c *PenumbraChain) Start(_ string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error { - validators := c.PenumbraNodes[:c.numValidators] - fullnodes := c.PenumbraNodes[c.numValidators:] - - chainCfg := c.Config() - - validatorDefinitions := make([]PenumbraValidatorDefinition, len(validators)) - var allocations []PenumbraGenesisAppStateAllocation - - eg, egCtx := errgroup.WithContext(ctx) - for i, v := range validators { - keyName := fmt.Sprintf("%s-%d", valKey, i) - eg.Go(func() error { - if err := v.TendermintNode.InitValidatorFiles(egCtx); err != nil { - return fmt.Errorf("error initializing validator files: %v", err) - } - - fr := dockerutil.NewFileRetriever(c.log, v.TendermintNode.DockerClient, v.TendermintNode.TestName) - privValKeyBytes, err := fr.SingleFileContent(egCtx, v.TendermintNode.VolumeName, "config/priv_validator_key.json") - if err != nil { - return fmt.Errorf("error reading tendermint privval key file: %v", err) - } - - privValKey := tendermint.PrivValidatorKeyFile{} - if err := json.Unmarshal(privValKeyBytes, &privValKey); err != nil { - return fmt.Errorf("error unmarshaling tendermint privval key: %v", err) - } - - if err := v.PenumbraAppNode.CreateKey(egCtx, keyName); err != nil { - return fmt.Errorf("error generating wallet on penumbra node: %v", err) - } - - if err := v.PenumbraAppNode.InitValidatorFile(egCtx, keyName); err != nil { - return fmt.Errorf("error initializing validator template on penumbra node: %v", err) - } - - // In all likelihood, the PenumbraAppNode and TendermintNode have the same DockerClient and TestName, - // but instantiate a new FileRetriever to be defensive. - fr = dockerutil.NewFileRetriever(c.log, v.PenumbraAppNode.DockerClient, v.PenumbraAppNode.TestName) - validatorTemplateDefinitionFileBytes, err := fr.SingleFileContent(egCtx, v.PenumbraAppNode.VolumeName, "validator.toml") - if err != nil { - return fmt.Errorf("error reading validator definition template file: %v", err) - } - - validatorTemplateDefinition := PenumbraValidatorDefinition{} - if err := toml.Unmarshal(validatorTemplateDefinitionFileBytes, &validatorTemplateDefinition); err != nil { - return fmt.Errorf("error unmarshaling validator definition template key: %v", err) - } - - validatorTemplateDefinition.SequenceNumber = i - validatorTemplateDefinition.Enabled = true - validatorTemplateDefinition.ConsensusKey.Value = privValKey.PubKey.Value - validatorTemplateDefinition.Name = fmt.Sprintf("validator-%d", i) - validatorTemplateDefinition.Description = fmt.Sprintf("validator-%d description", i) - validatorTemplateDefinition.Website = fmt.Sprintf("https://validator-%d", i) - - fundingStream := validatorTemplateDefinition.FundingStreams[0] - validatorTemplateDefinition.FundingStreams = []PenumbraValidatorFundingStream{fundingStream} - - v.addrString = fundingStream.Recipient - - // Assign validatorDefinitions and allocations at fixed indices to avoid data races across the error group's goroutines. - validatorDefinitions[i] = validatorTemplateDefinition - - // self delegation - c.mutex.Lock() - defer c.mutex.Unlock() - - allocations = append(allocations, - PenumbraGenesisAppStateAllocation{ - Amount: math.NewInt(100_000_000_000), - Denom: fmt.Sprintf("udelegation_%s", validatorTemplateDefinition.IdentityKey), - Address: fundingStream.Recipient, - }, - ) - - // liquid - allocations = append(allocations, - PenumbraGenesisAppStateAllocation{ - Amount: math.NewInt(1_000_000_000_000), - Denom: chainCfg.Denom, - Address: fundingStream.Recipient, - }, - ) - - return nil - }) - } - - for _, wallet := range additionalGenesisWallets { - c.mutex.Lock() - allocations = append(allocations, PenumbraGenesisAppStateAllocation{ - Address: wallet.Address, - Denom: wallet.Denom, - Amount: wallet.Amount, - }) - c.mutex.Unlock() - } - - for _, n := range fullnodes { - eg.Go(func() error { return n.TendermintNode.InitFullNodeFiles(egCtx) }) - } - - if err := eg.Wait(); err != nil { - return fmt.Errorf("waiting to init full nodes' files: %w", err) - } - - firstVal := c.PenumbraNodes[0] - if err := firstVal.PenumbraAppNode.GenerateGenesisFile(ctx, chainCfg.ChainID, validatorDefinitions, allocations); err != nil { - return fmt.Errorf("generating genesis file: %w", err) - } - - // penumbra generate-testnet right now overwrites new validator keys - eg, egCtx = errgroup.WithContext(ctx) - for i, val := range c.PenumbraNodes[:c.numValidators] { - // Use an errgroup to save some time doing many concurrent copies inside containers. - eg.Go(func() error { - firstValPrivKeyRelPath := fmt.Sprintf(".penumbra/testnet_data/node%d/cometbft/config/priv_validator_key.json", i) - - fr := dockerutil.NewFileRetriever(c.log, firstVal.PenumbraAppNode.DockerClient, firstVal.PenumbraAppNode.TestName) - pk, err := fr.SingleFileContent(egCtx, firstVal.PenumbraAppNode.VolumeName, firstValPrivKeyRelPath) - if err != nil { - return fmt.Errorf("error getting validator private key content: %w", err) - } - - fw := dockerutil.NewFileWriter(c.log, val.PenumbraAppNode.DockerClient, val.PenumbraAppNode.TestName) - if err := fw.WriteFile(egCtx, val.TendermintNode.VolumeName, "config/priv_validator_key.json", pk); err != nil { - return fmt.Errorf("overwriting priv_validator_key.json: %w", err) - } - - return nil - }) - } - - if err := eg.Wait(); err != nil { - return err - } - - return c.start(ctx) -} - -// start bootstraps the chain and starts it from genesis. -func (c *PenumbraChain) start(ctx context.Context) error { - // Copy the penumbra genesis to all tendermint nodes. - genesisContent, err := c.PenumbraNodes[0].PenumbraAppNode.genesisFileContent(ctx) - if err != nil { - return err - } - - tendermintNodes := make([]*tendermint.TendermintNode, len(c.PenumbraNodes)) - for i, node := range c.PenumbraNodes { - tendermintNodes[i] = node.TendermintNode - if err := node.TendermintNode.OverwriteGenesisFile(ctx, genesisContent); err != nil { - return err - } - } - - tmNodes := tendermint.TendermintNodes(tendermintNodes) - - if err := tmNodes.LogGenesisHashes(ctx); err != nil { - return err - } - - eg, egCtx := errgroup.WithContext(ctx) - for _, n := range c.PenumbraNodes { - sep, err := n.TendermintNode.GetConfigSeparator() - if err != nil { - return err - } - - tmPort := strings.Split(rpcPort, "/")[0] - eg.Go(func() error { - return n.TendermintNode.CreateNodeContainer( - egCtx, - fmt.Sprintf("--proxy%sapp=tcp://%s:%s", sep, n.PenumbraAppNode.HostName(), strings.Split(abciPort, "/")[0]), - "--rpc.laddr=tcp://0.0.0.0:"+tmPort, - ) - }) - - eg.Go(func() error { - return n.PenumbraAppNode.CreateNodeContainer(egCtx, n.TendermintNode.HostName()+":"+tmPort) - }) - } - if err := eg.Wait(); err != nil { - return err - } - - eg, egCtx = errgroup.WithContext(ctx) - for _, n := range c.PenumbraNodes { - c.log.Info("Starting tendermint container", zap.String("container", n.TendermintNode.Name())) - eg.Go(func() error { - peers := tmNodes.PeerString(egCtx, n.TendermintNode) - if err := n.TendermintNode.SetConfigAndPeers(egCtx, peers); err != nil { - return err - } - return n.TendermintNode.StartContainer(egCtx) - }) - - c.log.Info("Starting penumbra container", zap.String("container", n.PenumbraAppNode.Name())) - eg.Go(func() error { - return n.PenumbraAppNode.StartContainer(egCtx) - }) - } - if err := eg.Wait(); err != nil { - return err - } - - if err := testutil.WaitForBlocks(ctx, 2, c.getFullNode().TendermintNode); err != nil { - return err - } - - eg, egCtx = errgroup.WithContext(ctx) - for i, val := range c.PenumbraNodes[:c.numValidators] { - keyName := fmt.Sprintf("%s-%d", valKey, i) - - eg.Go(func() error { - keyPath := filepath.Join("keys", keyName, "config.toml") - fileBz, err := val.PenumbraAppNode.ReadFile(ctx, keyPath) - if err != nil { - return err - } - - cfg := PcliConfig{} - err = toml.Unmarshal(fileBz, &cfg) - if err != nil { - return err - } - - if err := val.CreateClientNode( - egCtx, - c.log, - val.PenumbraAppNode.DockerClient, - val.PenumbraAppNode.NetworkID, - val.PenumbraAppNode.Image, - c.testName, - i, - keyName, - cfg.Custody.SpendKey, - cfg.FullViewingKey, - ); err != nil { - return fmt.Errorf("error creating pclientd node: %w", err) - } - - return nil - }) - } - return eg.Wait() -} - -// CreateClientNode initializes a new instance of pclientd, with the FullViewingKey and CustodyKey, -// associated with the specified keyName. -func (c *PenumbraChain) CreateClientNode( - ctx context.Context, - keyName string, -) error { - val := c.getFullNode() - if val == nil { - return fmt.Errorf("there are no penumbra nodes configured to use when initializing a new instance of pclientd") - } - - keyPath := filepath.Join("keys", keyName, "config.toml") - fileBz, err := val.PenumbraAppNode.ReadFile(ctx, keyPath) - if err != nil { - return err - } - - cfg := PcliConfig{} - err = toml.Unmarshal(fileBz, &cfg) - if err != nil { - return err - } - - // each validator has a pclientd instance so current index should be: - // # of validator related pclientd instances + # of user configured pclientd instances - 1 - index := len(c.PenumbraNodes[:c.numValidators]) + len(c.getFullNode().PenumbraClientNodes) - 1 - - return val.CreateClientNode( - ctx, - c.log, - val.PenumbraAppNode.DockerClient, - val.PenumbraAppNode.NetworkID, - val.PenumbraAppNode.Image, - c.testName, - index, - keyName, - cfg.Custody.SpendKey, - cfg.FullViewingKey, - ) -} diff --git a/chain/penumbra/penumbra_client_node.go b/chain/penumbra/penumbra_client_node.go deleted file mode 100644 index 3e968fc7..00000000 --- a/chain/penumbra/penumbra_client_node.go +++ /dev/null @@ -1,654 +0,0 @@ -package penumbra - -import ( - "bytes" - "context" - "fmt" - "io" - "math/big" - "os" - "strings" - "time" - - "github.com/BurntSushi/toml" - volumetypes "github.com/docker/docker/api/types/volume" - "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - "go.uber.org/zap" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - sdkmath "cosmossdk.io/math" - - //nolint:staticcheck - clienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" - - asset "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - ibcv1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/ibc/v1" - pool "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/shielded_pool/v1" - keys "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - num "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - transactionv1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/transaction/v1" - custody "github.com/cosmos/interchaintest/v10/chain/penumbra/custody/v1" - view "github.com/cosmos/interchaintest/v10/chain/penumbra/view/v1" - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -// PenumbraClientNode represents an instance of pclientd. -type PenumbraClientNode struct { - log *zap.Logger - - KeyName string - Index int - VolumeName string - Chain ibc.Chain - TestName string - NetworkID string - DockerClient *client.Client - Image ibc.DockerImage - - GRPCConn *grpc.ClientConn - - address []byte - addrString string - - containerLifecycle *dockerutil.ContainerLifecycle - - // Set during StartContainer. - hostGRPCPort string -} - -// NewClientNode attempts to initialize a new instance of pclientd. -// It then attempts to create the Docker container lifecycle and the Docker volume before setting the volume owner. -func NewClientNode( - ctx context.Context, - log *zap.Logger, - chain *PenumbraChain, - keyName string, - index int, - testName string, - image ibc.DockerImage, - dockerClient *client.Client, - networkID string, - address []byte, - addrString string, -) (*PenumbraClientNode, error) { - p := &PenumbraClientNode{ - log: log, - KeyName: keyName, - Index: index, - Chain: chain, - TestName: testName, - Image: image, - DockerClient: dockerClient, - NetworkID: networkID, - address: address, - addrString: addrString, - } - - p.containerLifecycle = dockerutil.NewContainerLifecycle(log, dockerClient, p.Name()) - - tv, err := dockerClient.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - dockerutil.NodeOwnerLabel: p.Name(), - }, - }) - if err != nil { - return nil, fmt.Errorf("creating pclientd volume: %w", err) - } - - p.VolumeName = tv.Name - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: log, - - Client: dockerClient, - - VolumeName: p.VolumeName, - ImageRef: image.Ref(), - TestName: testName, - UidGid: image.UIDGID, - }); err != nil { - return nil, fmt.Errorf("set pclientd volume owner: %w", err) - } - - return p, nil -} - -const ( - pclientdPort = "8081/tcp" -) - -var pclientdPorts = nat.PortMap{ - nat.Port(pclientdPort): {}, -} - -// Name of the test node container. -func (p *PenumbraClientNode) Name() string { - return fmt.Sprintf("pclientd-%d-%s-%s-%s", p.Index, p.KeyName, p.Chain.Config().ChainID, p.TestName) -} - -// HostName returns the hostname of the test node container. -func (p *PenumbraClientNode) HostName() string { - return dockerutil.CondenseHostName(p.Name()) -} - -// Bind returns the home folder bind point for running the node. -func (p *PenumbraClientNode) Bind() []string { - return []string{fmt.Sprintf("%s:%s", p.VolumeName, p.HomeDir())} -} - -// HomeDir returns the home directory for this instance of pclientd in the Docker filesystem. -func (p *PenumbraClientNode) HomeDir() string { - return "/home/pclientd" -} - -// GetAddress returns the Bech32m encoded string of the inner bytes as a slice of bytes. -func (p *PenumbraClientNode) GetAddress(ctx context.Context) ([]byte, error) { - addrReq := &view.AddressByIndexRequest{ - AddressIndex: &keys.AddressIndex{ - Account: 0, - }, - } - - viewClient := view.NewViewServiceClient(p.GRPCConn) - - resp, err := viewClient.AddressByIndex(ctx, addrReq) - if err != nil { - return nil, err - } - - return resp.Address.Inner, nil -} - -// SendFunds sends funds from the PenumbraClientNode to a specified address. -// It generates a transaction plan, gets authorization data for the transaction, -// builds and signs the transaction, and broadcasts it. Returns an error if any step of the process fails. -func (p *PenumbraClientNode) SendFunds(ctx context.Context, amount ibc.WalletAmount) error { - ctx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - - hi, lo := translateBigInt(amount.Amount) - - // Generate a transaction plan sending funds to an address. - tpr := &view.TransactionPlannerRequest{ - Outputs: []*view.TransactionPlannerRequest_Output{{ - Value: &asset.Value{ - Amount: &num.Amount{ - Lo: lo, - Hi: hi, - }, - AssetId: &asset.AssetId{AltBaseDenom: amount.Denom}, - }, - Address: &keys.Address{AltBech32M: amount.Address}, - }}, - } - - viewClient := view.NewViewServiceClient(p.GRPCConn) - - resp, err := viewClient.TransactionPlanner(ctx, tpr) - if err != nil { - return err - } - - // Get authorization data for the transaction from pclientd (signing). - custodyClient := custody.NewCustodyServiceClient(p.GRPCConn) - authorizeReq := &custody.AuthorizeRequest{ - Plan: resp.Plan, - PreAuthorizations: []*custody.PreAuthorization{}, - } - - authData, err := custodyClient.Authorize(ctx, authorizeReq) - if err != nil { - return err - } - - // Have pclientd build and sign the planned transaction. - wbr := &view.WitnessAndBuildRequest{ - TransactionPlan: resp.Plan, - AuthorizationData: authData.Data, - } - - buildClient, err := viewClient.WitnessAndBuild(ctx, wbr) - if err != nil { - return err - } - - var tx *transactionv1.Transaction - for { - buildResp, err := buildClient.Recv() - if err != nil { - if err == io.EOF { - break - } else { - return err - } - } - - status := buildResp.GetBuildProgress() - - if status != nil { - // Progress is a float between 0 and 1 that is an approximation of the build progress. - // If the status is not complete we need to loop and wait for completion. - if status.Progress < 1 { - if ctx.Err() != nil { - return ctx.Err() - } - - continue - } - } - - tx = buildResp.GetComplete().Transaction - if tx == nil { - continue - } - } - - // Have pclientd broadcast and await confirmation of the built transaction. - btr := &view.BroadcastTransactionRequest{ - Transaction: tx, - AwaitDetection: true, - } - - _, err = viewClient.BroadcastTransaction(ctx, btr) - if err != nil { - return err - } - - return nil -} - -// SendIBCTransfer sends an IBC transfer from the current PenumbraClientNode to a specified destination address on a specified channel. -// The function validates the address string on the current PenumbraClientNode instance. If the address string is empty, it returns an error. -// It translates the amount to a big integer and creates an `ibcv1.Ics20Withdrawal` with the amount, denom, destination address, return address, timeout height, timeout timestamp. -func (p *PenumbraClientNode) SendIBCTransfer( - ctx context.Context, - channelID string, - amount ibc.WalletAmount, - options ibc.TransferOptions, -) (ibc.Tx, error) { - ctx, cancel := context.WithTimeout(ctx, time.Minute) - defer cancel() - - if p.addrString == "" { - return ibc.Tx{}, fmt.Errorf("address string was not cached on pclientd instance for key with name %s", p.KeyName) - } - - timeoutHeight, timeoutTimestamp := ibcTransferTimeouts(options) - - hi, lo := translateBigInt(amount.Amount) - - withdrawal := &ibcv1.Ics20Withdrawal{ - Amount: &num.Amount{ - Lo: lo, - Hi: hi, - }, - Denom: &asset.Denom{ - Denom: amount.Denom, - }, - DestinationChainAddress: amount.Address, - ReturnAddress: &keys.Address{ - AltBech32M: p.addrString, - }, - TimeoutHeight: &timeoutHeight, - TimeoutTime: timeoutTimestamp, - SourceChannel: channelID, - } - - if os.Getenv("ICTEST_DEBUG") != "" { - p.log.Info("Ics20 withdrawal info", - zap.String("denom", withdrawal.Denom.Denom), - zap.String("amount", amount.Amount.String()), - zap.String("destination_chain_address", withdrawal.DestinationChainAddress), - zap.String("return_address", withdrawal.ReturnAddress.String()), - zap.String("channel_id", channelID), - zap.String("timeout_height", withdrawal.TimeoutHeight.String()), - zap.Uint64("timeout_timestamp", timeoutTimestamp), - ) - } - - // Generate a transaction plan sending ics_20 transfer - tpr := &view.TransactionPlannerRequest{ - Ics20Withdrawals: []*ibcv1.Ics20Withdrawal{withdrawal}, - } - - viewClient := view.NewViewServiceClient(p.GRPCConn) - - resp, err := viewClient.TransactionPlanner(ctx, tpr) - if err != nil { - return ibc.Tx{}, err - } - - // Get authorization data for the transaction from pclientd (signing). - custodyClient := custody.NewCustodyServiceClient(p.GRPCConn) - authorizeReq := &custody.AuthorizeRequest{ - Plan: resp.Plan, - PreAuthorizations: []*custody.PreAuthorization{}, - } - - authData, err := custodyClient.Authorize(ctx, authorizeReq) - if err != nil { - return ibc.Tx{}, err - } - - // Have pclientd build and sign the planned transaction. - wbr := &view.WitnessAndBuildRequest{ - TransactionPlan: resp.Plan, - AuthorizationData: authData.Data, - } - - buildClient, err := viewClient.WitnessAndBuild(ctx, wbr) - if err != nil { - return ibc.Tx{}, err - } - - var tx *transactionv1.Transaction - for { - buildResp, err := buildClient.Recv() - if err != nil { - if err == io.EOF { - break - } else { - return ibc.Tx{}, err - } - } - - status := buildResp.GetBuildProgress() - - if status != nil { - if ctx.Err() != nil { - return ibc.Tx{}, ctx.Err() - } - - // Progress is a float between 0 and 1 that is an approximation of the build progress. - // If the status is not complete we need to loop and wait for completion. - if status.Progress < 1 { - continue - } - } - - tx = buildResp.GetComplete().Transaction - if tx == nil { - continue - } - } - - // Have pclientd broadcast and await confirmation of the built transaction. - btr := &view.BroadcastTransactionRequest{ - Transaction: tx, - AwaitDetection: true, - } - - txClient, err := viewClient.BroadcastTransaction(ctx, btr) - if err != nil { - return ibc.Tx{}, err - } - - var confirmed *view.BroadcastTransactionResponse_Confirmed - for { - txResp, err := txClient.Recv() - if err != nil { - if err == io.EOF { - break - } else { - return ibc.Tx{}, err - } - } - - // Wait until the tx is confirmed on-chain by the view server. - confirmed = txResp.GetConfirmed() - if confirmed == nil { - continue - } - } - - if confirmed == nil { - return ibc.Tx{}, fmt.Errorf("confirmed transaction is nil") - } - - // TODO: fill in rest of tx details - return ibc.Tx{ - Height: int64(confirmed.DetectionHeight), - TxHash: string(confirmed.Id.Inner), - GasSpent: 0, - Packet: ibc.Packet{ - Sequence: 0, - SourcePort: "", - SourceChannel: "", - DestPort: "", - DestChannel: "", - Data: nil, - TimeoutHeight: "", - TimeoutTimestamp: 0, - }, - }, nil -} - -// GetBalance retrieves the balance of a specific denom for the PenumbraClientNode. -// -// It creates a client for the ViewProtocolService and constructs a BalancesRequest with an AccountFilter and AssetIdFilter. -// A Balances stream response is obtained from the server. -// The balances are collected in a slice until the stream is done, or an error occurs. -// Otherwise, the first balance in the slice is used to construct a sdkmath.Int value and returned. -// Returns: -// - sdkmath.Int: The balance of the specified denom. -// - error: An error if any occurred during the balance retrieval. -func (p *PenumbraClientNode) GetBalance(ctx context.Context, denom string) (sdkmath.Int, error) { - viewClient := view.NewViewServiceClient(p.GRPCConn) - - balanceRequest := &view.BalancesRequest{ - AccountFilter: &keys.AddressIndex{ - Account: 0, - }, - AssetIdFilter: &asset.AssetId{ - AltBaseDenom: denom, - }, - } - - // The BalanceByAddress method returns a stream response, containing - // zero-or-more balances, including denom and amount info per balance. - balanceStream, err := viewClient.Balances(ctx, balanceRequest) - if err != nil { - return sdkmath.Int{}, err - } - - var balances []*view.BalancesResponse - for { - balance, err := balanceStream.Recv() - if err != nil { - // A gRPC streaming response will return EOF when it's done. - if err == io.EOF { - break - } else { - return sdkmath.Int{}, err - } - } - balances = append(balances, balance) - } - - if len(balances) == 0 { - return sdkmath.ZeroInt(), nil - } - - balance := balances[0] - hi := balance.GetBalanceView().GetKnownAssetId().GetAmount().GetHi() - lo := balance.GetBalanceView().GetKnownAssetId().GetAmount().GetLo() - return translateHiAndLo(hi, lo), nil -} - -// translateHiAndLo takes the high and low order bytes and decodes the two uint64 values into the single int128 value -// they represent. -// -// Since Go does not support native uint128 we make use of the big.Int type. -// see: https://github.com/penumbra-zone/penumbra/blob/4d175986f385e00638328c64d729091d45eb042a/crates/core/crypto/src/asset/amount.rs#L220-L240 -func translateHiAndLo(hi, lo uint64) sdkmath.Int { - hiBig := big.NewInt(0).SetUint64(hi) - loBig := big.NewInt(0).SetUint64(lo) - - // Shift hi 8 bytes to the left - hiBig.Lsh(hiBig, 64) - - // Add the lower order bytes - i := big.NewInt(0).Add(hiBig, loBig) - return sdkmath.NewIntFromBigInt(i) -} - -// translateBigInt converts a Cosmos SDK Int, which is a wrapper around Go's big.Int, into two uint64 values. -func translateBigInt(i sdkmath.Int) (uint64, uint64) { - bz := i.BigInt().Bytes() - - // Pad the byte slice with leading zeros to ensure it's 16 bytes long - paddedBytes := make([]byte, 16) - copy(paddedBytes[16-len(bz):], bz) - - // Extract the high and low parts from the padded byte slice - var hi uint64 - var lo uint64 - - for j := 0; j < 8; j++ { - hi <<= 8 - hi |= uint64(paddedBytes[j]) - } - - for j := 8; j < 16; j++ { - lo <<= 8 - lo |= uint64(paddedBytes[j]) - } - - return hi, lo -} - -// GetDenomMetadata invokes a gRPC request to obtain the DenomMetadata for a specified asset ID. -func (p *PenumbraClientNode) GetDenomMetadata(ctx context.Context, assetID *asset.AssetId) (*asset.Metadata, error) { - queryClient := pool.NewQueryServiceClient(p.GRPCConn) - req := &pool.AssetMetadataByIdRequest{ - AssetId: assetID, - } - - resp, err := queryClient.AssetMetadataById(ctx, req) - if err != nil { - return nil, err - } - - return resp.DenomMetadata, nil -} - -// WriteFile accepts file contents in a byte slice and writes the contents to -// the Docker filesystem. relPath describes the location of the file in the -// Docker volume relative to the home directory. -func (p *PenumbraClientNode) WriteFile(ctx context.Context, content []byte, relPath string) error { - fw := dockerutil.NewFileWriter(p.log, p.DockerClient, p.TestName) - return fw.WriteFile(ctx, p.VolumeName, relPath, content) -} - -// Initialize loads the view and spend keys into the pclientd config. -func (p *PenumbraClientNode) Initialize(ctx context.Context, pdAddress, spendKey, fullViewingKey string) error { - c := make(testutil.Toml) - - kmsConfig := make(testutil.Toml) - kmsConfig["spend_key"] = spendKey - c["kms_config"] = kmsConfig - c["full_viewing_key"] = fullViewingKey - c["grpc_url"] = pdAddress - c["bind_addr"] = "0.0.0.0:" + strings.Split(pclientdPort, "/")[0] - - buf := new(bytes.Buffer) - if err := toml.NewEncoder(buf).Encode(c); err != nil { - return err - } - - return p.WriteFile(ctx, buf.Bytes(), "config.toml") -} - -// CreateNodeContainer creates a container for the Penumbra client node. -func (p *PenumbraClientNode) CreateNodeContainer(ctx context.Context) error { - cmd := []string{ - "pclientd", - "--home", p.HomeDir(), - "start", - } - - return p.containerLifecycle.CreateContainer(ctx, p.TestName, p.NetworkID, p.Image, pclientdPorts, "", p.Bind(), nil, p.HostName(), cmd, p.Chain.Config().Env, []string{}) -} - -// StopContainer stops the container associated with the PenumbraClientNode. -func (p *PenumbraClientNode) StopContainer(ctx context.Context) error { - return p.containerLifecycle.StopContainer(ctx) -} - -// StartContainer starts the test node container. -func (p *PenumbraClientNode) StartContainer(ctx context.Context) error { - if err := p.containerLifecycle.StartContainer(ctx); err != nil { - return err - } - - hostPorts, err := p.containerLifecycle.GetHostPorts(ctx, pclientdPort) - if err != nil { - return err - } - - p.hostGRPCPort = hostPorts[0] - - p.GRPCConn, err = grpc.NewClient(p.hostGRPCPort, grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - return err - } - - return nil -} - -// Exec runs a container for a specific job and blocks until the container exits. -func (p *PenumbraClientNode) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) { - job := dockerutil.NewImage(p.log, p.DockerClient, p.NetworkID, p.TestName, p.Image.Repository, p.Image.Version) - opts := dockerutil.ContainerOptions{ - Binds: p.Bind(), - Env: env, - User: p.Image.UIDGID, - } - - res := job.Run(ctx, cmd, opts) - return res.Stdout, res.Stderr, res.Err -} - -// shouldUseDefaults checks if the provided timeout is nil or has both the NanoSeconds and Height fields set to zero. -// If the timeout is nil or both fields are zeros, it returns true, indicating that the defaults should be used. -// Otherwise, it returns false, indicating that the provided timeout should be used. -func shouldUseDefaults(timeout *ibc.IBCTimeout) bool { - return timeout == nil || (timeout.NanoSeconds == 0 && timeout.Height == 0) -} - -// ibcTransferTimeouts calculates the timeout height and timeout timestamp for an IBC transfer based on the provided options. -// -// If the options.Timeout is nil or both NanoSeconds and Height are equal to zero, it uses the defaultTransferTimeouts function to get the default timeout values. -// Otherwise, it sets the timeoutTimestamp to options.Timeout.NanoSeconds and timeoutHeight to clienttypes.NewHeight(0, options.Timeout.Height). -// -// The function then returns the timeoutHeight and timeoutTimestamp. -func ibcTransferTimeouts(options ibc.TransferOptions) (clienttypes.Height, uint64) { - var ( - timeoutHeight clienttypes.Height - timeoutTimestamp uint64 - ) - - if shouldUseDefaults(options.Timeout) { - timeoutHeight, timeoutTimestamp = defaultTransferTimeouts() - } else { - timeoutTimestamp = options.Timeout.NanoSeconds - timeoutHeight = clienttypes.NewHeight(0, uint64(options.Timeout.Height)) - } - - return timeoutHeight, timeoutTimestamp -} - -// defaultTransferTimeouts returns the default relative timeout values from ics-20 for both block height and timestamp -// based timeouts. -// see: https://github.com/cosmos/ibc-go/blob/0364aae96f0326651c411ed0f3486be570280e5c/modules/apps/transfer/types/packet.go#L22-L33 -func defaultTransferTimeouts() (clienttypes.Height, uint64) { - t, err := clienttypes.ParseHeight("0-1000") - if err != nil { - panic(fmt.Errorf("cannot parse packet timeout height string when retrieving default value: %w", err)) - } - return t, uint64((time.Duration(10) * time.Minute).Nanoseconds()) -} diff --git a/chain/penumbra/penumbra_client_node_test.go b/chain/penumbra/penumbra_client_node_test.go deleted file mode 100644 index 75a177f1..00000000 --- a/chain/penumbra/penumbra_client_node_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package penumbra - -import ( - "math/big" - "testing" - - "github.com/stretchr/testify/require" - - "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -// TestBigIntDecoding tests the decoding of big integers. -func TestBigIntDecoding(t *testing.T) { - bigInt := math.NewInt(11235813) - hi, lo := translateBigInt(bigInt) - converted := translateHiAndLo(hi, lo) - require.True(t, bigInt.Equal(converted)) - - b := big.NewInt(0) - b.SetString("18446744073709551620", 10) // use a number that is bigger than the maximum value an uint64 can hold - bInt := math.NewIntFromBigInt(b) - hi, lo = translateBigInt(bInt) - converted = translateHiAndLo(hi, lo) - require.True(t, converted.Equal(bInt)) -} - -// TestIbcTransferTimeout tests the function ibcTransferTimeouts -// in order to verify that it behaves correctly under different scenarios. -// Scenario 1: both timeout values equal zero - return default timeout values -// Scenario 2: options has nil timeout value - return default timeout values -// Scenario 3: both timeout values equal non-zero values - use specified timeout values -// Scenario 4: only nanoseconds equals non-zero value - use specified value for timestamp and zero for height -// Scenario 5: only height equals non-zero value - use specified value for height and zero for timestamp. -func TestIbcTransferTimeout(t *testing.T) { - defaultHeight, defaultTimestamp := defaultTransferTimeouts() - zero := uint64(0) - - t.Run("both timeout values equal zero - return default timeout values", func(t *testing.T) { - opts := ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: 0, - Height: 0, - }, - } - - height, timestamp := ibcTransferTimeouts(opts) - require.Equal(t, defaultHeight, height) - require.Equal(t, defaultTimestamp, timestamp) - }) - - t.Run("options has nil timeout value - return default timeout values", func(t *testing.T) { - var opts ibc.TransferOptions - - height, timestamp := ibcTransferTimeouts(opts) - require.Equal(t, defaultHeight, height) - require.Equal(t, defaultTimestamp, timestamp) - }) - - t.Run("both timeout values equal non-zero values - use specified timeout values", func(t *testing.T) { - opts := ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: 12345, - Height: 12345, - }, - } - - height, timestamp := ibcTransferTimeouts(opts) - require.Equal(t, opts.Timeout.Height, int64(height.RevisionHeight)) - require.Equal(t, zero, height.RevisionNumber) - require.Equal(t, opts.Timeout.NanoSeconds, timestamp) - }) - - t.Run("only nanoseconds equals non-zero value - use specified value for timestamp and zero for height", func(t *testing.T) { - opts := ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: 12345, - }, - } - - height, timestamp := ibcTransferTimeouts(opts) - require.Equal(t, zero, height.RevisionHeight) - require.Equal(t, zero, height.RevisionNumber) - require.Equal(t, opts.Timeout.NanoSeconds, timestamp) - }) - - t.Run("only height equals non-zero value - use specified value for height and zero for timestamp", func(t *testing.T) { - opts := ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - Height: 12345, - }, - } - - height, timestamp := ibcTransferTimeouts(opts) - require.Equal(t, opts.Timeout.Height, int64(height.RevisionHeight)) - require.Equal(t, zero, height.RevisionNumber) - require.Equal(t, zero, timestamp) - }) -} diff --git a/chain/penumbra/penumbra_node.go b/chain/penumbra/penumbra_node.go deleted file mode 100644 index 082ad466..00000000 --- a/chain/penumbra/penumbra_node.go +++ /dev/null @@ -1,111 +0,0 @@ -package penumbra - -import ( - "context" - "strings" - "sync" - - dockerclient "github.com/docker/docker/client" - "go.uber.org/zap" - - "github.com/cosmos/interchaintest/v10/chain/internal/tendermint" - "github.com/cosmos/interchaintest/v10/ibc" -) - -// PenumbraNode reporesents a node in the Penumbra network which consists of one instance of Tendermint, -// an instance of pcli, and zero or more instances of pclientd. -type PenumbraNode struct { - TendermintNode *tendermint.TendermintNode - PenumbraAppNode *PenumbraAppNode - PenumbraClientNodes map[string]*PenumbraClientNode - clientsMu sync.Locker - addrString string -} - -// PenumbraNodes is a slice of pointers that point to instances of PenumbraNode in memory. -type PenumbraNodes []*PenumbraNode - -// NewPenumbraNode returns a penumbra chain node with tendermint and penumbra nodes, along with docker volumes created. -func NewPenumbraNode( - ctx context.Context, - i int, - c *PenumbraChain, - dockerClient *dockerclient.Client, - networkID string, - testName string, - tendermintImage ibc.DockerImage, - penumbraImage ibc.DockerImage, -) (PenumbraNode, error) { - tn, err := tendermint.NewTendermintNode(ctx, c.log, i, c, dockerClient, networkID, testName, tendermintImage) - if err != nil { - return PenumbraNode{}, err - } - - pn, err := NewPenumbraAppNode(ctx, c.log, c, i, testName, dockerClient, networkID, penumbraImage) - if err != nil { - return PenumbraNode{}, err - } - - return PenumbraNode{ - TendermintNode: tn, - PenumbraAppNode: pn, - PenumbraClientNodes: make(map[string]*PenumbraClientNode), - clientsMu: &sync.Mutex{}, - }, nil -} - -// CreateClientNode initializes a new instance of pclientd, with the specified FullViewingKey and CustodyKey, -// before attempting to create and start pclientd in a new Docker container. -func (p *PenumbraNode) CreateClientNode( - ctx context.Context, - log *zap.Logger, - dockerClient *dockerclient.Client, - networkID string, - image ibc.DockerImage, - testName string, - index int, - keyName string, - spendKey string, - fullViewingKey string, -) error { - addr, err := p.PenumbraAppNode.GetAddress(ctx, keyName) - if err != nil { - return err - } - - p.clientsMu.Lock() - clientNode, err := NewClientNode( - ctx, - log, - p.PenumbraAppNode.Chain, - keyName, - index, - testName, - image, - dockerClient, - networkID, - addr, - string(addr), - ) - if err != nil { - p.clientsMu.Unlock() - return err - } - p.PenumbraClientNodes[keyName] = clientNode - p.clientsMu.Unlock() - - pdAddr := "tcp://" + p.PenumbraAppNode.HostName() + ":" + strings.Split(grpcPort, "/")[0] - if err := clientNode.Initialize(ctx, pdAddr, spendKey, fullViewingKey); err != nil { - return err - } - - if err := clientNode.CreateNodeContainer(ctx); err != nil { - return err - } - - if err := clientNode.StartContainer(ctx); err != nil { - return err - } - - return nil -} diff --git a/chain/penumbra/tools/summoning/v1/summoning.pb.go b/chain/penumbra/tools/summoning/v1/summoning.pb.go deleted file mode 100644 index bcf04c69..00000000 --- a/chain/penumbra/tools/summoning/v1/summoning.pb.go +++ /dev/null @@ -1,3694 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/tools/summoning/v1/summoning.proto - -package summoningv1 - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ParticipateRequest struct { - // Types that are valid to be assigned to Msg: - // *ParticipateRequest_Identify_ - // *ParticipateRequest_Contribution_ - Msg isParticipateRequest_Msg `protobuf_oneof:"msg"` -} - -func (m *ParticipateRequest) Reset() { *m = ParticipateRequest{} } -func (m *ParticipateRequest) String() string { return proto.CompactTextString(m) } -func (*ParticipateRequest) ProtoMessage() {} -func (*ParticipateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{0} -} -func (m *ParticipateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParticipateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParticipateRequest.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 *ParticipateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateRequest.Merge(m, src) -} -func (m *ParticipateRequest) XXX_Size() int { - return m.Size() -} -func (m *ParticipateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateRequest proto.InternalMessageInfo - -type isParticipateRequest_Msg interface { - isParticipateRequest_Msg() - MarshalTo([]byte) (int, error) - Size() int -} - -type ParticipateRequest_Identify_ struct { - Identify *ParticipateRequest_Identify `protobuf:"bytes,1,opt,name=identify,proto3,oneof" json:"identify,omitempty"` -} -type ParticipateRequest_Contribution_ struct { - Contribution *ParticipateRequest_Contribution `protobuf:"bytes,2,opt,name=contribution,proto3,oneof" json:"contribution,omitempty"` -} - -func (*ParticipateRequest_Identify_) isParticipateRequest_Msg() {} -func (*ParticipateRequest_Contribution_) isParticipateRequest_Msg() {} - -func (m *ParticipateRequest) GetMsg() isParticipateRequest_Msg { - if m != nil { - return m.Msg - } - return nil -} - -func (m *ParticipateRequest) GetIdentify() *ParticipateRequest_Identify { - if x, ok := m.GetMsg().(*ParticipateRequest_Identify_); ok { - return x.Identify - } - return nil -} - -func (m *ParticipateRequest) GetContribution() *ParticipateRequest_Contribution { - if x, ok := m.GetMsg().(*ParticipateRequest_Contribution_); ok { - return x.Contribution - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ParticipateRequest) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ParticipateRequest_Identify_)(nil), - (*ParticipateRequest_Contribution_)(nil), - } -} - -// Sent at the beginning of the connection to identify the participant. -type ParticipateRequest_Identify struct { - Address *v1.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *ParticipateRequest_Identify) Reset() { *m = ParticipateRequest_Identify{} } -func (m *ParticipateRequest_Identify) String() string { return proto.CompactTextString(m) } -func (*ParticipateRequest_Identify) ProtoMessage() {} -func (*ParticipateRequest_Identify) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{0, 0} -} -func (m *ParticipateRequest_Identify) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParticipateRequest_Identify) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParticipateRequest_Identify.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 *ParticipateRequest_Identify) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateRequest_Identify.Merge(m, src) -} -func (m *ParticipateRequest_Identify) XXX_Size() int { - return m.Size() -} -func (m *ParticipateRequest_Identify) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateRequest_Identify.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateRequest_Identify proto.InternalMessageInfo - -func (m *ParticipateRequest_Identify) GetAddress() *v1.Address { - if m != nil { - return m.Address - } - return nil -} - -// Sent by the participant after getting a `ContributeNow` message. -type ParticipateRequest_Contribution struct { - Updated *CeremonyCrs `protobuf:"bytes,1,opt,name=updated,proto3" json:"updated,omitempty"` - UpdateProofs *CeremonyLinkingProof `protobuf:"bytes,2,opt,name=update_proofs,json=updateProofs,proto3" json:"update_proofs,omitempty"` - ParentHashes *CeremonyParentHashes `protobuf:"bytes,3,opt,name=parent_hashes,json=parentHashes,proto3" json:"parent_hashes,omitempty"` -} - -func (m *ParticipateRequest_Contribution) Reset() { *m = ParticipateRequest_Contribution{} } -func (m *ParticipateRequest_Contribution) String() string { return proto.CompactTextString(m) } -func (*ParticipateRequest_Contribution) ProtoMessage() {} -func (*ParticipateRequest_Contribution) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{0, 1} -} -func (m *ParticipateRequest_Contribution) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParticipateRequest_Contribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParticipateRequest_Contribution.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 *ParticipateRequest_Contribution) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateRequest_Contribution.Merge(m, src) -} -func (m *ParticipateRequest_Contribution) XXX_Size() int { - return m.Size() -} -func (m *ParticipateRequest_Contribution) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateRequest_Contribution.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateRequest_Contribution proto.InternalMessageInfo - -func (m *ParticipateRequest_Contribution) GetUpdated() *CeremonyCrs { - if m != nil { - return m.Updated - } - return nil -} - -func (m *ParticipateRequest_Contribution) GetUpdateProofs() *CeremonyLinkingProof { - if m != nil { - return m.UpdateProofs - } - return nil -} - -func (m *ParticipateRequest_Contribution) GetParentHashes() *CeremonyParentHashes { - if m != nil { - return m.ParentHashes - } - return nil -} - -type CeremonyCrs struct { - Spend []byte `protobuf:"bytes,100,opt,name=spend,proto3" json:"spend,omitempty"` - Output []byte `protobuf:"bytes,101,opt,name=output,proto3" json:"output,omitempty"` - DelegatorVote []byte `protobuf:"bytes,102,opt,name=delegator_vote,json=delegatorVote,proto3" json:"delegator_vote,omitempty"` - UndelegateClaim []byte `protobuf:"bytes,103,opt,name=undelegate_claim,json=undelegateClaim,proto3" json:"undelegate_claim,omitempty"` - Swap []byte `protobuf:"bytes,104,opt,name=swap,proto3" json:"swap,omitempty"` - SwapClaim []byte `protobuf:"bytes,105,opt,name=swap_claim,json=swapClaim,proto3" json:"swap_claim,omitempty"` - NulliferDerivationCrs []byte `protobuf:"bytes,106,opt,name=nullifer_derivation_crs,json=nulliferDerivationCrs,proto3" json:"nullifer_derivation_crs,omitempty"` -} - -func (m *CeremonyCrs) Reset() { *m = CeremonyCrs{} } -func (m *CeremonyCrs) String() string { return proto.CompactTextString(m) } -func (*CeremonyCrs) ProtoMessage() {} -func (*CeremonyCrs) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{1} -} -func (m *CeremonyCrs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CeremonyCrs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CeremonyCrs.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 *CeremonyCrs) XXX_Merge(src proto.Message) { - xxx_messageInfo_CeremonyCrs.Merge(m, src) -} -func (m *CeremonyCrs) XXX_Size() int { - return m.Size() -} -func (m *CeremonyCrs) XXX_DiscardUnknown() { - xxx_messageInfo_CeremonyCrs.DiscardUnknown(m) -} - -var xxx_messageInfo_CeremonyCrs proto.InternalMessageInfo - -func (m *CeremonyCrs) GetSpend() []byte { - if m != nil { - return m.Spend - } - return nil -} - -func (m *CeremonyCrs) GetOutput() []byte { - if m != nil { - return m.Output - } - return nil -} - -func (m *CeremonyCrs) GetDelegatorVote() []byte { - if m != nil { - return m.DelegatorVote - } - return nil -} - -func (m *CeremonyCrs) GetUndelegateClaim() []byte { - if m != nil { - return m.UndelegateClaim - } - return nil -} - -func (m *CeremonyCrs) GetSwap() []byte { - if m != nil { - return m.Swap - } - return nil -} - -func (m *CeremonyCrs) GetSwapClaim() []byte { - if m != nil { - return m.SwapClaim - } - return nil -} - -func (m *CeremonyCrs) GetNulliferDerivationCrs() []byte { - if m != nil { - return m.NulliferDerivationCrs - } - return nil -} - -type CeremonyLinkingProof struct { - Spend []byte `protobuf:"bytes,100,opt,name=spend,proto3" json:"spend,omitempty"` - Output []byte `protobuf:"bytes,101,opt,name=output,proto3" json:"output,omitempty"` - DelegatorVote []byte `protobuf:"bytes,102,opt,name=delegator_vote,json=delegatorVote,proto3" json:"delegator_vote,omitempty"` - UndelegateClaim []byte `protobuf:"bytes,103,opt,name=undelegate_claim,json=undelegateClaim,proto3" json:"undelegate_claim,omitempty"` - Swap []byte `protobuf:"bytes,104,opt,name=swap,proto3" json:"swap,omitempty"` - SwapClaim []byte `protobuf:"bytes,105,opt,name=swap_claim,json=swapClaim,proto3" json:"swap_claim,omitempty"` - NulliferDerivationCrs []byte `protobuf:"bytes,106,opt,name=nullifer_derivation_crs,json=nulliferDerivationCrs,proto3" json:"nullifer_derivation_crs,omitempty"` -} - -func (m *CeremonyLinkingProof) Reset() { *m = CeremonyLinkingProof{} } -func (m *CeremonyLinkingProof) String() string { return proto.CompactTextString(m) } -func (*CeremonyLinkingProof) ProtoMessage() {} -func (*CeremonyLinkingProof) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{2} -} -func (m *CeremonyLinkingProof) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CeremonyLinkingProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CeremonyLinkingProof.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 *CeremonyLinkingProof) XXX_Merge(src proto.Message) { - xxx_messageInfo_CeremonyLinkingProof.Merge(m, src) -} -func (m *CeremonyLinkingProof) XXX_Size() int { - return m.Size() -} -func (m *CeremonyLinkingProof) XXX_DiscardUnknown() { - xxx_messageInfo_CeremonyLinkingProof.DiscardUnknown(m) -} - -var xxx_messageInfo_CeremonyLinkingProof proto.InternalMessageInfo - -func (m *CeremonyLinkingProof) GetSpend() []byte { - if m != nil { - return m.Spend - } - return nil -} - -func (m *CeremonyLinkingProof) GetOutput() []byte { - if m != nil { - return m.Output - } - return nil -} - -func (m *CeremonyLinkingProof) GetDelegatorVote() []byte { - if m != nil { - return m.DelegatorVote - } - return nil -} - -func (m *CeremonyLinkingProof) GetUndelegateClaim() []byte { - if m != nil { - return m.UndelegateClaim - } - return nil -} - -func (m *CeremonyLinkingProof) GetSwap() []byte { - if m != nil { - return m.Swap - } - return nil -} - -func (m *CeremonyLinkingProof) GetSwapClaim() []byte { - if m != nil { - return m.SwapClaim - } - return nil -} - -func (m *CeremonyLinkingProof) GetNulliferDerivationCrs() []byte { - if m != nil { - return m.NulliferDerivationCrs - } - return nil -} - -type CeremonyParentHashes struct { - Spend []byte `protobuf:"bytes,100,opt,name=spend,proto3" json:"spend,omitempty"` - Output []byte `protobuf:"bytes,101,opt,name=output,proto3" json:"output,omitempty"` - DelegatorVote []byte `protobuf:"bytes,102,opt,name=delegator_vote,json=delegatorVote,proto3" json:"delegator_vote,omitempty"` - UndelegateClaim []byte `protobuf:"bytes,103,opt,name=undelegate_claim,json=undelegateClaim,proto3" json:"undelegate_claim,omitempty"` - Swap []byte `protobuf:"bytes,104,opt,name=swap,proto3" json:"swap,omitempty"` - SwapClaim []byte `protobuf:"bytes,105,opt,name=swap_claim,json=swapClaim,proto3" json:"swap_claim,omitempty"` - NulliferDerivationCrs []byte `protobuf:"bytes,106,opt,name=nullifer_derivation_crs,json=nulliferDerivationCrs,proto3" json:"nullifer_derivation_crs,omitempty"` -} - -func (m *CeremonyParentHashes) Reset() { *m = CeremonyParentHashes{} } -func (m *CeremonyParentHashes) String() string { return proto.CompactTextString(m) } -func (*CeremonyParentHashes) ProtoMessage() {} -func (*CeremonyParentHashes) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{3} -} -func (m *CeremonyParentHashes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CeremonyParentHashes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CeremonyParentHashes.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 *CeremonyParentHashes) XXX_Merge(src proto.Message) { - xxx_messageInfo_CeremonyParentHashes.Merge(m, src) -} -func (m *CeremonyParentHashes) XXX_Size() int { - return m.Size() -} -func (m *CeremonyParentHashes) XXX_DiscardUnknown() { - xxx_messageInfo_CeremonyParentHashes.DiscardUnknown(m) -} - -var xxx_messageInfo_CeremonyParentHashes proto.InternalMessageInfo - -func (m *CeremonyParentHashes) GetSpend() []byte { - if m != nil { - return m.Spend - } - return nil -} - -func (m *CeremonyParentHashes) GetOutput() []byte { - if m != nil { - return m.Output - } - return nil -} - -func (m *CeremonyParentHashes) GetDelegatorVote() []byte { - if m != nil { - return m.DelegatorVote - } - return nil -} - -func (m *CeremonyParentHashes) GetUndelegateClaim() []byte { - if m != nil { - return m.UndelegateClaim - } - return nil -} - -func (m *CeremonyParentHashes) GetSwap() []byte { - if m != nil { - return m.Swap - } - return nil -} - -func (m *CeremonyParentHashes) GetSwapClaim() []byte { - if m != nil { - return m.SwapClaim - } - return nil -} - -func (m *CeremonyParentHashes) GetNulliferDerivationCrs() []byte { - if m != nil { - return m.NulliferDerivationCrs - } - return nil -} - -type ParticipateResponse struct { - // Types that are valid to be assigned to Msg: - // - // *ParticipateResponse_Position_ - // *ParticipateResponse_ContributeNow_ - // *ParticipateResponse_Confirm_ - Msg isParticipateResponse_Msg `protobuf_oneof:"msg"` -} - -func (m *ParticipateResponse) Reset() { *m = ParticipateResponse{} } -func (m *ParticipateResponse) String() string { return proto.CompactTextString(m) } -func (*ParticipateResponse) ProtoMessage() {} -func (*ParticipateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{4} -} -func (m *ParticipateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParticipateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParticipateResponse.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 *ParticipateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateResponse.Merge(m, src) -} -func (m *ParticipateResponse) XXX_Size() int { - return m.Size() -} -func (m *ParticipateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateResponse proto.InternalMessageInfo - -type isParticipateResponse_Msg interface { - isParticipateResponse_Msg() - MarshalTo([]byte) (int, error) - Size() int -} - -type ParticipateResponse_Position_ struct { - Position *ParticipateResponse_Position `protobuf:"bytes,1,opt,name=position,proto3,oneof" json:"position,omitempty"` -} -type ParticipateResponse_ContributeNow_ struct { - ContributeNow *ParticipateResponse_ContributeNow `protobuf:"bytes,2,opt,name=contribute_now,json=contributeNow,proto3,oneof" json:"contribute_now,omitempty"` -} -type ParticipateResponse_Confirm_ struct { - Confirm *ParticipateResponse_Confirm `protobuf:"bytes,3,opt,name=confirm,proto3,oneof" json:"confirm,omitempty"` -} - -func (*ParticipateResponse_Position_) isParticipateResponse_Msg() {} -func (*ParticipateResponse_ContributeNow_) isParticipateResponse_Msg() {} -func (*ParticipateResponse_Confirm_) isParticipateResponse_Msg() {} - -func (m *ParticipateResponse) GetMsg() isParticipateResponse_Msg { - if m != nil { - return m.Msg - } - return nil -} - -func (m *ParticipateResponse) GetPosition() *ParticipateResponse_Position { - if x, ok := m.GetMsg().(*ParticipateResponse_Position_); ok { - return x.Position - } - return nil -} - -func (m *ParticipateResponse) GetContributeNow() *ParticipateResponse_ContributeNow { - if x, ok := m.GetMsg().(*ParticipateResponse_ContributeNow_); ok { - return x.ContributeNow - } - return nil -} - -func (m *ParticipateResponse) GetConfirm() *ParticipateResponse_Confirm { - if x, ok := m.GetMsg().(*ParticipateResponse_Confirm_); ok { - return x.Confirm - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ParticipateResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ParticipateResponse_Position_)(nil), - (*ParticipateResponse_ContributeNow_)(nil), - (*ParticipateResponse_Confirm_)(nil), - } -} - -// Streamed to the participant to inform them of their position in the queue. -type ParticipateResponse_Position struct { - // The position of the participant in the queue. - Position uint32 `protobuf:"varint,1,opt,name=position,proto3" json:"position,omitempty"` - // The total number of participants in the queue. - ConnectedParticipants uint32 `protobuf:"varint,2,opt,name=connected_participants,json=connectedParticipants,proto3" json:"connected_participants,omitempty"` - // The bid for the most recently executed contribution slot. - LastSlotBid *v11.Amount `protobuf:"bytes,3,opt,name=last_slot_bid,json=lastSlotBid,proto3" json:"last_slot_bid,omitempty"` - // The participant's current bid. - YourBid *v11.Amount `protobuf:"bytes,4,opt,name=your_bid,json=yourBid,proto3" json:"your_bid,omitempty"` -} - -func (m *ParticipateResponse_Position) Reset() { *m = ParticipateResponse_Position{} } -func (m *ParticipateResponse_Position) String() string { return proto.CompactTextString(m) } -func (*ParticipateResponse_Position) ProtoMessage() {} -func (*ParticipateResponse_Position) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{4, 0} -} -func (m *ParticipateResponse_Position) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParticipateResponse_Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParticipateResponse_Position.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 *ParticipateResponse_Position) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateResponse_Position.Merge(m, src) -} -func (m *ParticipateResponse_Position) XXX_Size() int { - return m.Size() -} -func (m *ParticipateResponse_Position) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateResponse_Position.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateResponse_Position proto.InternalMessageInfo - -func (m *ParticipateResponse_Position) GetPosition() uint32 { - if m != nil { - return m.Position - } - return 0 -} - -func (m *ParticipateResponse_Position) GetConnectedParticipants() uint32 { - if m != nil { - return m.ConnectedParticipants - } - return 0 -} - -func (m *ParticipateResponse_Position) GetLastSlotBid() *v11.Amount { - if m != nil { - return m.LastSlotBid - } - return nil -} - -func (m *ParticipateResponse_Position) GetYourBid() *v11.Amount { - if m != nil { - return m.YourBid - } - return nil -} - -// Sent to the participant to inform them that they should contribute now. -type ParticipateResponse_ContributeNow struct { - // The most recent CRS, which the participant should update. - Parent *CeremonyCrs `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` -} - -func (m *ParticipateResponse_ContributeNow) Reset() { *m = ParticipateResponse_ContributeNow{} } -func (m *ParticipateResponse_ContributeNow) String() string { return proto.CompactTextString(m) } -func (*ParticipateResponse_ContributeNow) ProtoMessage() {} -func (*ParticipateResponse_ContributeNow) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{4, 1} -} -func (m *ParticipateResponse_ContributeNow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParticipateResponse_ContributeNow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParticipateResponse_ContributeNow.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 *ParticipateResponse_ContributeNow) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateResponse_ContributeNow.Merge(m, src) -} -func (m *ParticipateResponse_ContributeNow) XXX_Size() int { - return m.Size() -} -func (m *ParticipateResponse_ContributeNow) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateResponse_ContributeNow.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateResponse_ContributeNow proto.InternalMessageInfo - -func (m *ParticipateResponse_ContributeNow) GetParent() *CeremonyCrs { - if m != nil { - return m.Parent - } - return nil -} - -// Sent to the participant to confim their contribution was accepted. -type ParticipateResponse_Confirm struct { - Slot uint64 `protobuf:"varint,1,opt,name=slot,proto3" json:"slot,omitempty"` -} - -func (m *ParticipateResponse_Confirm) Reset() { *m = ParticipateResponse_Confirm{} } -func (m *ParticipateResponse_Confirm) String() string { return proto.CompactTextString(m) } -func (*ParticipateResponse_Confirm) ProtoMessage() {} -func (*ParticipateResponse_Confirm) Descriptor() ([]byte, []int) { - return fileDescriptor_71a21e7f4539269f, []int{4, 2} -} -func (m *ParticipateResponse_Confirm) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParticipateResponse_Confirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParticipateResponse_Confirm.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 *ParticipateResponse_Confirm) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParticipateResponse_Confirm.Merge(m, src) -} -func (m *ParticipateResponse_Confirm) XXX_Size() int { - return m.Size() -} -func (m *ParticipateResponse_Confirm) XXX_DiscardUnknown() { - xxx_messageInfo_ParticipateResponse_Confirm.DiscardUnknown(m) -} - -var xxx_messageInfo_ParticipateResponse_Confirm proto.InternalMessageInfo - -func (m *ParticipateResponse_Confirm) GetSlot() uint64 { - if m != nil { - return m.Slot - } - return 0 -} - -func init() { - proto.RegisterType((*ParticipateRequest)(nil), "penumbra.tools.summoning.v1.ParticipateRequest") - proto.RegisterType((*ParticipateRequest_Identify)(nil), "penumbra.tools.summoning.v1.ParticipateRequest.Identify") - proto.RegisterType((*ParticipateRequest_Contribution)(nil), "penumbra.tools.summoning.v1.ParticipateRequest.Contribution") - proto.RegisterType((*CeremonyCrs)(nil), "penumbra.tools.summoning.v1.CeremonyCrs") - proto.RegisterType((*CeremonyLinkingProof)(nil), "penumbra.tools.summoning.v1.CeremonyLinkingProof") - proto.RegisterType((*CeremonyParentHashes)(nil), "penumbra.tools.summoning.v1.CeremonyParentHashes") - proto.RegisterType((*ParticipateResponse)(nil), "penumbra.tools.summoning.v1.ParticipateResponse") - proto.RegisterType((*ParticipateResponse_Position)(nil), "penumbra.tools.summoning.v1.ParticipateResponse.Position") - proto.RegisterType((*ParticipateResponse_ContributeNow)(nil), "penumbra.tools.summoning.v1.ParticipateResponse.ContributeNow") - proto.RegisterType((*ParticipateResponse_Confirm)(nil), "penumbra.tools.summoning.v1.ParticipateResponse.Confirm") -} - -func init() { - proto.RegisterFile("penumbra/tools/summoning/v1/summoning.proto", fileDescriptor_71a21e7f4539269f) -} - -var fileDescriptor_71a21e7f4539269f = []byte{ - // 897 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0x8e, 0xd3, 0x9f, 0x84, 0x69, 0x52, 0xd0, 0xb0, 0xbb, 0x44, 0x5e, 0x36, 0x54, 0x95, 0x10, - 0x45, 0x08, 0x7b, 0xb3, 0x08, 0x28, 0x01, 0xa1, 0x25, 0x59, 0x89, 0x20, 0x01, 0x32, 0x6e, 0x15, - 0x24, 0x54, 0xc9, 0x72, 0xec, 0x93, 0x64, 0x58, 0x7b, 0xc6, 0xcc, 0x8c, 0x5d, 0xf5, 0x12, 0x9e, - 0x00, 0xf1, 0x08, 0x7b, 0xc9, 0x1b, 0xf0, 0x06, 0x88, 0xab, 0xbd, 0xdc, 0x4b, 0xd4, 0xde, 0xf1, - 0x04, 0x5c, 0xa2, 0x19, 0xff, 0xc4, 0x5d, 0x50, 0xd4, 0x70, 0xbb, 0x57, 0xf6, 0x39, 0xdf, 0xf9, - 0xbe, 0x39, 0x73, 0x26, 0xf9, 0x3c, 0xe8, 0x9d, 0x04, 0x68, 0x1a, 0xcf, 0xb8, 0x6f, 0x4b, 0xc6, - 0x22, 0x61, 0x8b, 0x34, 0x8e, 0x19, 0x25, 0x74, 0x61, 0x67, 0x83, 0x55, 0x60, 0x25, 0x9c, 0x49, - 0x86, 0xef, 0x96, 0xc5, 0x96, 0x2e, 0xb6, 0x56, 0x78, 0x36, 0x30, 0x0f, 0x2a, 0xa5, 0x80, 0x71, - 0xb0, 0x1f, 0xc3, 0x85, 0x50, 0x1a, 0xea, 0x99, 0xd3, 0xcd, 0xfe, 0xf5, 0x0a, 0x9a, 0xc6, 0xaa, - 0x80, 0xa6, 0x71, 0x8e, 0x1f, 0x3e, 0xd9, 0x46, 0xd8, 0xf1, 0xb9, 0x24, 0x01, 0x49, 0x7c, 0x09, - 0x2e, 0xfc, 0x90, 0x82, 0x90, 0x78, 0x8a, 0xda, 0x24, 0x04, 0x2a, 0xc9, 0xfc, 0xa2, 0x67, 0x1c, - 0x18, 0x47, 0x7b, 0x0f, 0x8e, 0xad, 0x35, 0x8d, 0x58, 0xff, 0x96, 0xb0, 0xbe, 0x28, 0xf8, 0x93, - 0x86, 0x5b, 0x69, 0xe1, 0x19, 0xea, 0x04, 0x8c, 0x4a, 0x4e, 0x66, 0xa9, 0x24, 0x8c, 0xf6, 0x9a, - 0x5a, 0xfb, 0x93, 0x4d, 0xb5, 0xc7, 0x35, 0x8d, 0x49, 0xc3, 0xbd, 0xa6, 0x69, 0x3e, 0x42, 0xed, - 0x72, 0x6d, 0x7c, 0x8c, 0x5a, 0x7e, 0x18, 0x72, 0x10, 0xa2, 0xd8, 0x46, 0x7f, 0xb5, 0x94, 0x1a, - 0x88, 0xa5, 0x47, 0x95, 0x0d, 0xac, 0xcf, 0xf2, 0x2a, 0xb7, 0x2c, 0x37, 0x7f, 0x6a, 0xa2, 0x4e, - 0x7d, 0x19, 0x3c, 0x42, 0xad, 0x34, 0x09, 0x7d, 0x09, 0x61, 0x21, 0x75, 0xb4, 0xb6, 0xeb, 0x31, - 0x70, 0x88, 0x19, 0xbd, 0x18, 0x73, 0xe1, 0x96, 0x44, 0x3c, 0x45, 0xdd, 0xfc, 0xd5, 0x4b, 0x38, - 0x63, 0x73, 0x51, 0xec, 0x7f, 0x70, 0x23, 0xa5, 0x2f, 0x09, 0x7d, 0x4c, 0xe8, 0xc2, 0x51, 0x4c, - 0xb7, 0x93, 0xeb, 0xe8, 0x40, 0x28, 0xdd, 0xc4, 0xe7, 0x40, 0xa5, 0xb7, 0xf4, 0xc5, 0x12, 0x44, - 0x6f, 0x6b, 0x03, 0x5d, 0x47, 0x33, 0x27, 0x9a, 0xe8, 0x76, 0x92, 0x5a, 0x34, 0xda, 0x41, 0x5b, - 0xb1, 0x58, 0x1c, 0xfe, 0x6d, 0xa0, 0xbd, 0xda, 0x7e, 0xf0, 0x2d, 0xb4, 0x23, 0x12, 0xa0, 0x61, - 0x2f, 0x3c, 0x30, 0x8e, 0x3a, 0x6e, 0x1e, 0xe0, 0x3b, 0x68, 0x97, 0xa5, 0x32, 0x49, 0x65, 0x0f, - 0x74, 0xba, 0x88, 0xf0, 0x9b, 0x68, 0x3f, 0x84, 0x08, 0x16, 0xbe, 0x64, 0xdc, 0xcb, 0x98, 0x84, - 0xde, 0x5c, 0xe3, 0xdd, 0x2a, 0x3b, 0x65, 0x12, 0xf0, 0xdb, 0xe8, 0x95, 0x94, 0x16, 0x29, 0xf0, - 0x82, 0xc8, 0x27, 0x71, 0x6f, 0xa1, 0x0b, 0x5f, 0x5e, 0xe5, 0xc7, 0x2a, 0x8d, 0x31, 0xda, 0x16, - 0xe7, 0x7e, 0xd2, 0x5b, 0x6a, 0x58, 0xbf, 0xe3, 0x7b, 0x08, 0xa9, 0x67, 0x41, 0x24, 0x1a, 0x79, - 0x49, 0x65, 0x72, 0xca, 0x07, 0xe8, 0x35, 0x9a, 0x46, 0x11, 0x99, 0x03, 0xf7, 0x42, 0xe0, 0x24, - 0xf3, 0xd5, 0xa1, 0x7a, 0x01, 0x17, 0xbd, 0xef, 0x75, 0xed, 0xed, 0x12, 0x7e, 0x54, 0xa1, 0x63, - 0x2e, 0x0e, 0x7f, 0x6c, 0xa2, 0x5b, 0xff, 0x75, 0x00, 0x2f, 0xea, 0x0c, 0xea, 0x3f, 0x96, 0x17, - 0x6a, 0x06, 0x3b, 0xe8, 0xd5, 0x6b, 0x46, 0x24, 0x12, 0x46, 0x05, 0xe0, 0x6f, 0x51, 0x3b, 0x61, - 0x82, 0x68, 0x33, 0xcb, 0x6d, 0xe1, 0xa3, 0x9b, 0x9b, 0x59, 0xae, 0x61, 0x39, 0x85, 0x80, 0x72, - 0xca, 0x52, 0x0c, 0x2f, 0xd0, 0x7e, 0xe5, 0x6a, 0xe0, 0x51, 0x76, 0x5e, 0x78, 0xc5, 0xa7, 0x1b, - 0xcb, 0x57, 0x2e, 0x06, 0x5f, 0xb3, 0xf3, 0x49, 0xc3, 0xed, 0x06, 0xf5, 0x04, 0x3e, 0x45, 0xad, - 0x80, 0xd1, 0x39, 0xe1, 0x71, 0xe1, 0x1a, 0xc7, 0xff, 0x67, 0x05, 0xc5, 0x9f, 0x34, 0xdc, 0x52, - 0xca, 0x7c, 0x66, 0xa0, 0x76, 0xb9, 0x2f, 0x6c, 0x3e, 0x37, 0xa4, 0x6e, 0x6d, 0x9f, 0xef, 0xa3, - 0x3b, 0x01, 0xa3, 0x14, 0x02, 0x09, 0xa1, 0x97, 0x94, 0xe2, 0x54, 0xe6, 0xde, 0xd8, 0x75, 0x6f, - 0x57, 0xa8, 0x53, 0x03, 0xf1, 0x43, 0xd4, 0x8d, 0x7c, 0x21, 0x3d, 0x11, 0x31, 0xe9, 0xcd, 0x48, - 0x58, 0xf4, 0xfe, 0xfa, 0x73, 0xf6, 0xae, 0x3e, 0x74, 0xca, 0xdd, 0x63, 0x96, 0x52, 0xe9, 0xee, - 0x29, 0xca, 0x49, 0xc4, 0xe4, 0x88, 0x84, 0xf8, 0x43, 0xd4, 0xbe, 0x60, 0x29, 0xd7, 0xe4, 0xed, - 0x1b, 0x90, 0x5b, 0xaa, 0x7a, 0x44, 0x42, 0xf3, 0x1b, 0xd4, 0xbd, 0x36, 0x52, 0xfc, 0x10, 0xed, - 0xe6, 0xae, 0xb9, 0xf1, 0x87, 0xa1, 0xe0, 0x99, 0xf7, 0x50, 0xab, 0x98, 0xa1, 0xfe, 0x4d, 0x47, - 0x2c, 0x97, 0xda, 0x76, 0xf5, 0x7b, 0x61, 0xc3, 0x0f, 0x7e, 0x31, 0x90, 0x59, 0xb1, 0x19, 0xe3, - 0x21, 0xa1, 0xea, 0x5f, 0x73, 0x02, 0x3c, 0x23, 0x01, 0x60, 0x89, 0xf6, 0x6a, 0x87, 0x83, 0xed, - 0x0d, 0x3f, 0xaa, 0xe6, 0xfd, 0x4d, 0xcf, 0xfd, 0xc8, 0xb8, 0x6f, 0x8c, 0x7e, 0x6b, 0xfe, 0x7e, - 0xd9, 0x37, 0x9e, 0x5e, 0xf6, 0x8d, 0x3f, 0x2f, 0xfb, 0xc6, 0xcf, 0x57, 0xfd, 0xc6, 0xd3, 0xab, - 0x7e, 0xe3, 0xd9, 0x55, 0xbf, 0x81, 0xde, 0x08, 0x58, 0xbc, 0x4e, 0x73, 0xb4, 0x7f, 0x52, 0x46, - 0x8e, 0xba, 0x8c, 0x38, 0xc6, 0x77, 0xde, 0x82, 0xc8, 0x65, 0x3a, 0xb3, 0x02, 0x16, 0xdb, 0x42, - 0x72, 0x9f, 0x2e, 0x20, 0x62, 0x19, 0xbc, 0x9b, 0x01, 0x95, 0x29, 0x07, 0x61, 0x13, 0x2a, 0x81, - 0x07, 0x4b, 0x5f, 0x3d, 0x85, 0xb4, 0xb3, 0x63, 0x5b, 0x07, 0xf6, 0x9a, 0x2b, 0xd5, 0xc7, 0x55, - 0x90, 0x0d, 0x9e, 0x34, 0xb7, 0x9c, 0xd3, 0x93, 0x5f, 0x9b, 0x77, 0x9d, 0xb2, 0xad, 0x53, 0xdd, - 0x56, 0xd5, 0x88, 0x35, 0x1d, 0xfc, 0xb1, 0x42, 0xcf, 0x34, 0x7a, 0x56, 0xa1, 0x67, 0xd3, 0xc1, - 0x65, 0xf3, 0xad, 0x35, 0xe8, 0xd9, 0xe7, 0xce, 0xe8, 0x2b, 0x90, 0x7e, 0xe8, 0x4b, 0xff, 0xaf, - 0x66, 0xbf, 0xac, 0x1c, 0x0e, 0x75, 0xe9, 0x70, 0x58, 0xd5, 0x0e, 0x87, 0xd3, 0xc1, 0x6c, 0x57, - 0xdf, 0xc1, 0xde, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x6f, 0xc2, 0xca, 0x11, 0x0a, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// CeremonyCoordinatorServiceClient is the client API for CeremonyCoordinatorService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type CeremonyCoordinatorServiceClient interface { - // The protocol used to participate in the ceremony. - // - // The message flow is - // ``` - // Client Server - // - // Identify ===========> - // <=========== Position (repeated) - // <=========== ContributeNow - // Contribution ===========> - // <=========== Confirm - // - // ``` - Participate(ctx context.Context, opts ...grpc.CallOption) (CeremonyCoordinatorService_ParticipateClient, error) -} - -type ceremonyCoordinatorServiceClient struct { - cc grpc1.ClientConn -} - -func NewCeremonyCoordinatorServiceClient(cc grpc1.ClientConn) CeremonyCoordinatorServiceClient { - return &ceremonyCoordinatorServiceClient{cc} -} - -func (c *ceremonyCoordinatorServiceClient) Participate(ctx context.Context, opts ...grpc.CallOption) (CeremonyCoordinatorService_ParticipateClient, error) { - stream, err := c.cc.NewStream(ctx, &_CeremonyCoordinatorService_serviceDesc.Streams[0], "/penumbra.tools.summoning.v1.CeremonyCoordinatorService/Participate", opts...) - if err != nil { - return nil, err - } - x := &ceremonyCoordinatorServiceParticipateClient{stream} - return x, nil -} - -type CeremonyCoordinatorService_ParticipateClient interface { - Send(*ParticipateRequest) error - Recv() (*ParticipateResponse, error) - grpc.ClientStream -} - -type ceremonyCoordinatorServiceParticipateClient struct { - grpc.ClientStream -} - -func (x *ceremonyCoordinatorServiceParticipateClient) Send(m *ParticipateRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *ceremonyCoordinatorServiceParticipateClient) Recv() (*ParticipateResponse, error) { - m := new(ParticipateResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// CeremonyCoordinatorServiceServer is the server API for CeremonyCoordinatorService service. -type CeremonyCoordinatorServiceServer interface { - // The protocol used to participate in the ceremony. - // - // The message flow is - // ``` - // Client Server - // - // Identify ===========> - // <=========== Position (repeated) - // <=========== ContributeNow - // Contribution ===========> - // <=========== Confirm - // - // ``` - Participate(CeremonyCoordinatorService_ParticipateServer) error -} - -// UnimplementedCeremonyCoordinatorServiceServer can be embedded to have forward compatible implementations. -type UnimplementedCeremonyCoordinatorServiceServer struct { -} - -func (*UnimplementedCeremonyCoordinatorServiceServer) Participate(srv CeremonyCoordinatorService_ParticipateServer) error { - return status.Errorf(codes.Unimplemented, "method Participate not implemented") -} - -func RegisterCeremonyCoordinatorServiceServer(s grpc1.Server, srv CeremonyCoordinatorServiceServer) { - s.RegisterService(&_CeremonyCoordinatorService_serviceDesc, srv) -} - -func _CeremonyCoordinatorService_Participate_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(CeremonyCoordinatorServiceServer).Participate(&ceremonyCoordinatorServiceParticipateServer{stream}) -} - -type CeremonyCoordinatorService_ParticipateServer interface { - Send(*ParticipateResponse) error - Recv() (*ParticipateRequest, error) - grpc.ServerStream -} - -type ceremonyCoordinatorServiceParticipateServer struct { - grpc.ServerStream -} - -func (x *ceremonyCoordinatorServiceParticipateServer) Send(m *ParticipateResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *ceremonyCoordinatorServiceParticipateServer) Recv() (*ParticipateRequest, error) { - m := new(ParticipateRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _CeremonyCoordinatorService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.tools.summoning.v1.CeremonyCoordinatorService", - HandlerType: (*CeremonyCoordinatorServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Participate", - Handler: _CeremonyCoordinatorService_Participate_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "penumbra/tools/summoning/v1/summoning.proto", -} - -func (m *ParticipateRequest) Marshal() (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 *ParticipateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Msg != nil { - { - size := m.Msg.Size() - i -= size - if _, err := m.Msg.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ParticipateRequest_Identify_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateRequest_Identify_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Identify != nil { - { - size, err := m.Identify.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *ParticipateRequest_Contribution_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateRequest_Contribution_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Contribution != nil { - { - size, err := m.Contribution.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ParticipateRequest_Identify) Marshal() (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 *ParticipateRequest_Identify) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateRequest_Identify) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ParticipateRequest_Contribution) Marshal() (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 *ParticipateRequest_Contribution) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateRequest_Contribution) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ParentHashes != nil { - { - size, err := m.ParentHashes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.UpdateProofs != nil { - { - size, err := m.UpdateProofs.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Updated != nil { - { - size, err := m.Updated.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CeremonyCrs) Marshal() (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 *CeremonyCrs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CeremonyCrs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NulliferDerivationCrs) > 0 { - i -= len(m.NulliferDerivationCrs) - copy(dAtA[i:], m.NulliferDerivationCrs) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.NulliferDerivationCrs))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xd2 - } - if len(m.SwapClaim) > 0 { - i -= len(m.SwapClaim) - copy(dAtA[i:], m.SwapClaim) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.SwapClaim))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xca - } - if len(m.Swap) > 0 { - i -= len(m.Swap) - copy(dAtA[i:], m.Swap) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Swap))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xc2 - } - if len(m.UndelegateClaim) > 0 { - i -= len(m.UndelegateClaim) - copy(dAtA[i:], m.UndelegateClaim) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.UndelegateClaim))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xba - } - if len(m.DelegatorVote) > 0 { - i -= len(m.DelegatorVote) - copy(dAtA[i:], m.DelegatorVote) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.DelegatorVote))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xb2 - } - if len(m.Output) > 0 { - i -= len(m.Output) - copy(dAtA[i:], m.Output) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Output))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xaa - } - if len(m.Spend) > 0 { - i -= len(m.Spend) - copy(dAtA[i:], m.Spend) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Spend))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} - -func (m *CeremonyLinkingProof) Marshal() (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 *CeremonyLinkingProof) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CeremonyLinkingProof) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NulliferDerivationCrs) > 0 { - i -= len(m.NulliferDerivationCrs) - copy(dAtA[i:], m.NulliferDerivationCrs) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.NulliferDerivationCrs))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xd2 - } - if len(m.SwapClaim) > 0 { - i -= len(m.SwapClaim) - copy(dAtA[i:], m.SwapClaim) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.SwapClaim))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xca - } - if len(m.Swap) > 0 { - i -= len(m.Swap) - copy(dAtA[i:], m.Swap) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Swap))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xc2 - } - if len(m.UndelegateClaim) > 0 { - i -= len(m.UndelegateClaim) - copy(dAtA[i:], m.UndelegateClaim) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.UndelegateClaim))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xba - } - if len(m.DelegatorVote) > 0 { - i -= len(m.DelegatorVote) - copy(dAtA[i:], m.DelegatorVote) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.DelegatorVote))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xb2 - } - if len(m.Output) > 0 { - i -= len(m.Output) - copy(dAtA[i:], m.Output) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Output))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xaa - } - if len(m.Spend) > 0 { - i -= len(m.Spend) - copy(dAtA[i:], m.Spend) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Spend))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} - -func (m *CeremonyParentHashes) Marshal() (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 *CeremonyParentHashes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CeremonyParentHashes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NulliferDerivationCrs) > 0 { - i -= len(m.NulliferDerivationCrs) - copy(dAtA[i:], m.NulliferDerivationCrs) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.NulliferDerivationCrs))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xd2 - } - if len(m.SwapClaim) > 0 { - i -= len(m.SwapClaim) - copy(dAtA[i:], m.SwapClaim) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.SwapClaim))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xca - } - if len(m.Swap) > 0 { - i -= len(m.Swap) - copy(dAtA[i:], m.Swap) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Swap))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xc2 - } - if len(m.UndelegateClaim) > 0 { - i -= len(m.UndelegateClaim) - copy(dAtA[i:], m.UndelegateClaim) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.UndelegateClaim))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xba - } - if len(m.DelegatorVote) > 0 { - i -= len(m.DelegatorVote) - copy(dAtA[i:], m.DelegatorVote) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.DelegatorVote))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xb2 - } - if len(m.Output) > 0 { - i -= len(m.Output) - copy(dAtA[i:], m.Output) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Output))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xaa - } - if len(m.Spend) > 0 { - i -= len(m.Spend) - copy(dAtA[i:], m.Spend) - i = encodeVarintSummoning(dAtA, i, uint64(len(m.Spend))) - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} - -func (m *ParticipateResponse) Marshal() (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 *ParticipateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Msg != nil { - { - size := m.Msg.Size() - i -= size - if _, err := m.Msg.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *ParticipateResponse_Position_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateResponse_Position_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Position != nil { - { - size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *ParticipateResponse_ContributeNow_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateResponse_ContributeNow_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ContributeNow != nil { - { - size, err := m.ContributeNow.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *ParticipateResponse_Confirm_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateResponse_Confirm_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Confirm != nil { - { - size, err := m.Confirm.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *ParticipateResponse_Position) Marshal() (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 *ParticipateResponse_Position) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateResponse_Position) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.YourBid != nil { - { - size, err := m.YourBid.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.LastSlotBid != nil { - { - size, err := m.LastSlotBid.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ConnectedParticipants != 0 { - i = encodeVarintSummoning(dAtA, i, uint64(m.ConnectedParticipants)) - i-- - dAtA[i] = 0x10 - } - if m.Position != 0 { - i = encodeVarintSummoning(dAtA, i, uint64(m.Position)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ParticipateResponse_ContributeNow) Marshal() (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 *ParticipateResponse_ContributeNow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateResponse_ContributeNow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Parent != nil { - { - size, err := m.Parent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSummoning(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ParticipateResponse_Confirm) Marshal() (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 *ParticipateResponse_Confirm) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParticipateResponse_Confirm) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Slot != 0 { - i = encodeVarintSummoning(dAtA, i, uint64(m.Slot)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintSummoning(dAtA []byte, offset int, v uint64) int { - offset -= sovSummoning(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ParticipateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Msg != nil { - n += m.Msg.Size() - } - return n -} - -func (m *ParticipateRequest_Identify_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Identify != nil { - l = m.Identify.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} -func (m *ParticipateRequest_Contribution_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Contribution != nil { - l = m.Contribution.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} -func (m *ParticipateRequest_Identify) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} - -func (m *ParticipateRequest_Contribution) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Updated != nil { - l = m.Updated.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - if m.UpdateProofs != nil { - l = m.UpdateProofs.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - if m.ParentHashes != nil { - l = m.ParentHashes.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} - -func (m *CeremonyCrs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Spend) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.Output) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.DelegatorVote) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.UndelegateClaim) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.Swap) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.SwapClaim) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.NulliferDerivationCrs) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - return n -} - -func (m *CeremonyLinkingProof) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Spend) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.Output) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.DelegatorVote) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.UndelegateClaim) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.Swap) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.SwapClaim) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.NulliferDerivationCrs) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - return n -} - -func (m *CeremonyParentHashes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Spend) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.Output) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.DelegatorVote) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.UndelegateClaim) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.Swap) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.SwapClaim) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - l = len(m.NulliferDerivationCrs) - if l > 0 { - n += 2 + l + sovSummoning(uint64(l)) - } - return n -} - -func (m *ParticipateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Msg != nil { - n += m.Msg.Size() - } - return n -} - -func (m *ParticipateResponse_Position_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Position != nil { - l = m.Position.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} -func (m *ParticipateResponse_ContributeNow_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ContributeNow != nil { - l = m.ContributeNow.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} -func (m *ParticipateResponse_Confirm_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Confirm != nil { - l = m.Confirm.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} -func (m *ParticipateResponse_Position) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Position != 0 { - n += 1 + sovSummoning(uint64(m.Position)) - } - if m.ConnectedParticipants != 0 { - n += 1 + sovSummoning(uint64(m.ConnectedParticipants)) - } - if m.LastSlotBid != nil { - l = m.LastSlotBid.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - if m.YourBid != nil { - l = m.YourBid.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} - -func (m *ParticipateResponse_ContributeNow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Parent != nil { - l = m.Parent.Size() - n += 1 + l + sovSummoning(uint64(l)) - } - return n -} - -func (m *ParticipateResponse_Confirm) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Slot != 0 { - n += 1 + sovSummoning(uint64(m.Slot)) - } - return n -} - -func sovSummoning(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSummoning(x uint64) (n int) { - return sovSummoning(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ParticipateRequest) 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 ErrIntOverflowSummoning - } - 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: ParticipateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParticipateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identify", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ParticipateRequest_Identify{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Msg = &ParticipateRequest_Identify_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contribution", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ParticipateRequest_Contribution{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Msg = &ParticipateRequest_Contribution_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParticipateRequest_Identify) 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 ErrIntOverflowSummoning - } - 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: Identify: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Identify: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v1.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParticipateRequest_Contribution) 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 ErrIntOverflowSummoning - } - 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: Contribution: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Contribution: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Updated", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Updated == nil { - m.Updated = &CeremonyCrs{} - } - if err := m.Updated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdateProofs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpdateProofs == nil { - m.UpdateProofs = &CeremonyLinkingProof{} - } - if err := m.UpdateProofs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentHashes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ParentHashes == nil { - m.ParentHashes = &CeremonyParentHashes{} - } - if err := m.ParentHashes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CeremonyCrs) 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 ErrIntOverflowSummoning - } - 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: CeremonyCrs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CeremonyCrs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spend = append(m.Spend[:0], dAtA[iNdEx:postIndex]...) - if m.Spend == nil { - m.Spend = []byte{} - } - iNdEx = postIndex - case 101: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Output = append(m.Output[:0], dAtA[iNdEx:postIndex]...) - if m.Output == nil { - m.Output = []byte{} - } - iNdEx = postIndex - case 102: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorVote = append(m.DelegatorVote[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorVote == nil { - m.DelegatorVote = []byte{} - } - iNdEx = postIndex - case 103: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndelegateClaim", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UndelegateClaim = append(m.UndelegateClaim[:0], dAtA[iNdEx:postIndex]...) - if m.UndelegateClaim == nil { - m.UndelegateClaim = []byte{} - } - iNdEx = postIndex - case 104: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Swap = append(m.Swap[:0], dAtA[iNdEx:postIndex]...) - if m.Swap == nil { - m.Swap = []byte{} - } - iNdEx = postIndex - case 105: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SwapClaim = append(m.SwapClaim[:0], dAtA[iNdEx:postIndex]...) - if m.SwapClaim == nil { - m.SwapClaim = []byte{} - } - iNdEx = postIndex - case 106: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NulliferDerivationCrs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NulliferDerivationCrs = append(m.NulliferDerivationCrs[:0], dAtA[iNdEx:postIndex]...) - if m.NulliferDerivationCrs == nil { - m.NulliferDerivationCrs = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CeremonyLinkingProof) 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 ErrIntOverflowSummoning - } - 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: CeremonyLinkingProof: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CeremonyLinkingProof: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spend = append(m.Spend[:0], dAtA[iNdEx:postIndex]...) - if m.Spend == nil { - m.Spend = []byte{} - } - iNdEx = postIndex - case 101: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Output = append(m.Output[:0], dAtA[iNdEx:postIndex]...) - if m.Output == nil { - m.Output = []byte{} - } - iNdEx = postIndex - case 102: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorVote = append(m.DelegatorVote[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorVote == nil { - m.DelegatorVote = []byte{} - } - iNdEx = postIndex - case 103: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndelegateClaim", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UndelegateClaim = append(m.UndelegateClaim[:0], dAtA[iNdEx:postIndex]...) - if m.UndelegateClaim == nil { - m.UndelegateClaim = []byte{} - } - iNdEx = postIndex - case 104: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Swap = append(m.Swap[:0], dAtA[iNdEx:postIndex]...) - if m.Swap == nil { - m.Swap = []byte{} - } - iNdEx = postIndex - case 105: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SwapClaim = append(m.SwapClaim[:0], dAtA[iNdEx:postIndex]...) - if m.SwapClaim == nil { - m.SwapClaim = []byte{} - } - iNdEx = postIndex - case 106: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NulliferDerivationCrs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NulliferDerivationCrs = append(m.NulliferDerivationCrs[:0], dAtA[iNdEx:postIndex]...) - if m.NulliferDerivationCrs == nil { - m.NulliferDerivationCrs = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CeremonyParentHashes) 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 ErrIntOverflowSummoning - } - 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: CeremonyParentHashes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CeremonyParentHashes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spend", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spend = append(m.Spend[:0], dAtA[iNdEx:postIndex]...) - if m.Spend == nil { - m.Spend = []byte{} - } - iNdEx = postIndex - case 101: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Output = append(m.Output[:0], dAtA[iNdEx:postIndex]...) - if m.Output == nil { - m.Output = []byte{} - } - iNdEx = postIndex - case 102: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorVote", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorVote = append(m.DelegatorVote[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorVote == nil { - m.DelegatorVote = []byte{} - } - iNdEx = postIndex - case 103: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndelegateClaim", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UndelegateClaim = append(m.UndelegateClaim[:0], dAtA[iNdEx:postIndex]...) - if m.UndelegateClaim == nil { - m.UndelegateClaim = []byte{} - } - iNdEx = postIndex - case 104: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Swap = append(m.Swap[:0], dAtA[iNdEx:postIndex]...) - if m.Swap == nil { - m.Swap = []byte{} - } - iNdEx = postIndex - case 105: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaim", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SwapClaim = append(m.SwapClaim[:0], dAtA[iNdEx:postIndex]...) - if m.SwapClaim == nil { - m.SwapClaim = []byte{} - } - iNdEx = postIndex - case 106: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NulliferDerivationCrs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NulliferDerivationCrs = append(m.NulliferDerivationCrs[:0], dAtA[iNdEx:postIndex]...) - if m.NulliferDerivationCrs == nil { - m.NulliferDerivationCrs = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParticipateResponse) 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 ErrIntOverflowSummoning - } - 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: ParticipateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParticipateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ParticipateResponse_Position{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Msg = &ParticipateResponse_Position_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContributeNow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ParticipateResponse_ContributeNow{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Msg = &ParticipateResponse_ContributeNow_{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirm", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ParticipateResponse_Confirm{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Msg = &ParticipateResponse_Confirm_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParticipateResponse_Position) 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 ErrIntOverflowSummoning - } - 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: Position: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Position: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - m.Position = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Position |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectedParticipants", wireType) - } - m.ConnectedParticipants = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ConnectedParticipants |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastSlotBid", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastSlotBid == nil { - m.LastSlotBid = &v11.Amount{} - } - if err := m.LastSlotBid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field YourBid", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.YourBid == nil { - m.YourBid = &v11.Amount{} - } - if err := m.YourBid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParticipateResponse_ContributeNow) 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 ErrIntOverflowSummoning - } - 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: ContributeNow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContributeNow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSummoning - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSummoning - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Parent == nil { - m.Parent = &CeremonyCrs{} - } - if err := m.Parent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParticipateResponse_Confirm) 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 ErrIntOverflowSummoning - } - 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: Confirm: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Confirm: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) - } - m.Slot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSummoning - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Slot |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSummoning(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSummoning - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSummoning(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSummoning - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSummoning - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSummoning - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSummoning - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSummoning - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSummoning - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSummoning = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSummoning = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSummoning = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/util/tendermint_proxy/v1/tendermint_proxy.pb.go b/chain/penumbra/util/tendermint_proxy/v1/tendermint_proxy.pb.go deleted file mode 100644 index 4712be8f..00000000 --- a/chain/penumbra/util/tendermint_proxy/v1/tendermint_proxy.pb.go +++ /dev/null @@ -1,4706 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/util/tendermint_proxy/v1/tendermint_proxy.proto - -package tendermint_proxyv1 - -import ( - context "context" - fmt "fmt" - crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" - p2p "github.com/cometbft/cometbft/proto/tendermint/p2p" - types "github.com/cometbft/cometbft/proto/tendermint/types" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - types1 "github.com/cosmos/gogoproto/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GetTxRequest is the request type for the GetTx RPC method. -type GetTxRequest struct { - // Hash of transaction to retrieve - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // Include proofs of the transaction's inclusion in the block - Prove bool `protobuf:"varint,2,opt,name=prove,proto3" json:"prove,omitempty"` -} - -func (m *GetTxRequest) Reset() { *m = GetTxRequest{} } -func (m *GetTxRequest) String() string { return proto.CompactTextString(m) } -func (*GetTxRequest) ProtoMessage() {} -func (*GetTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{0} -} -func (m *GetTxRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetTxRequest.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 *GetTxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTxRequest.Merge(m, src) -} -func (m *GetTxRequest) XXX_Size() int { - return m.Size() -} -func (m *GetTxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetTxRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetTxRequest proto.InternalMessageInfo - -func (m *GetTxRequest) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *GetTxRequest) GetProve() bool { - if m != nil { - return m.Prove - } - return false -} - -// GetTxResponse is the response type for the GetTx RPC method. -type GetTxResponse struct { - // Hash of transaction - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - Index uint64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` - TxResult *TxResult `protobuf:"bytes,4,opt,name=tx_result,json=txResult,proto3" json:"tx_result,omitempty"` - Tx []byte `protobuf:"bytes,5,opt,name=tx,proto3" json:"tx,omitempty"` -} - -func (m *GetTxResponse) Reset() { *m = GetTxResponse{} } -func (m *GetTxResponse) String() string { return proto.CompactTextString(m) } -func (*GetTxResponse) ProtoMessage() {} -func (*GetTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{1} -} -func (m *GetTxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetTxResponse.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 *GetTxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTxResponse.Merge(m, src) -} -func (m *GetTxResponse) XXX_Size() int { - return m.Size() -} -func (m *GetTxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetTxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetTxResponse proto.InternalMessageInfo - -func (m *GetTxResponse) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *GetTxResponse) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *GetTxResponse) GetIndex() uint64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *GetTxResponse) GetTxResult() *TxResult { - if m != nil { - return m.TxResult - } - return nil -} - -func (m *GetTxResponse) GetTx() []byte { - if m != nil { - return m.Tx - } - return nil -} - -type TxResult struct { - Log string `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"` - GasWanted uint64 `protobuf:"varint,2,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed uint64 `protobuf:"varint,3,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Tags []*Tag `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` -} - -func (m *TxResult) Reset() { *m = TxResult{} } -func (m *TxResult) String() string { return proto.CompactTextString(m) } -func (*TxResult) ProtoMessage() {} -func (*TxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{2} -} -func (m *TxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxResult.Merge(m, src) -} -func (m *TxResult) XXX_Size() int { - return m.Size() -} -func (m *TxResult) XXX_DiscardUnknown() { - xxx_messageInfo_TxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_TxResult proto.InternalMessageInfo - -func (m *TxResult) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *TxResult) GetGasWanted() uint64 { - if m != nil { - return m.GasWanted - } - return 0 -} - -func (m *TxResult) GetGasUsed() uint64 { - if m != nil { - return m.GasUsed - } - return 0 -} - -func (m *TxResult) GetTags() []*Tag { - if m != nil { - return m.Tags - } - return nil -} - -type Tag struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` -} - -func (m *Tag) Reset() { *m = Tag{} } -func (m *Tag) String() string { return proto.CompactTextString(m) } -func (*Tag) ProtoMessage() {} -func (*Tag) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{3} -} -func (m *Tag) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tag.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 *Tag) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tag.Merge(m, src) -} -func (m *Tag) XXX_Size() int { - return m.Size() -} -func (m *Tag) XXX_DiscardUnknown() { - xxx_messageInfo_Tag.DiscardUnknown(m) -} - -var xxx_messageInfo_Tag proto.InternalMessageInfo - -func (m *Tag) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *Tag) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *Tag) GetIndex() bool { - if m != nil { - return m.Index - } - return false -} - -// BroadcastTxAsyncRequest is the request type for the BroadcastTxAsync RPC method. -type BroadcastTxAsyncRequest struct { - Params []byte `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - ReqId uint64 `protobuf:"varint,2,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"` -} - -func (m *BroadcastTxAsyncRequest) Reset() { *m = BroadcastTxAsyncRequest{} } -func (m *BroadcastTxAsyncRequest) String() string { return proto.CompactTextString(m) } -func (*BroadcastTxAsyncRequest) ProtoMessage() {} -func (*BroadcastTxAsyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{4} -} -func (m *BroadcastTxAsyncRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTxAsyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTxAsyncRequest.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 *BroadcastTxAsyncRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTxAsyncRequest.Merge(m, src) -} -func (m *BroadcastTxAsyncRequest) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTxAsyncRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTxAsyncRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTxAsyncRequest proto.InternalMessageInfo - -func (m *BroadcastTxAsyncRequest) GetParams() []byte { - if m != nil { - return m.Params - } - return nil -} - -func (m *BroadcastTxAsyncRequest) GetReqId() uint64 { - if m != nil { - return m.ReqId - } - return 0 -} - -// BroadcastTxAsyncResponse is the response type for the BroadcastTxAsync RPC method. -type BroadcastTxAsyncResponse struct { - Code uint64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *BroadcastTxAsyncResponse) Reset() { *m = BroadcastTxAsyncResponse{} } -func (m *BroadcastTxAsyncResponse) String() string { return proto.CompactTextString(m) } -func (*BroadcastTxAsyncResponse) ProtoMessage() {} -func (*BroadcastTxAsyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{5} -} -func (m *BroadcastTxAsyncResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTxAsyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTxAsyncResponse.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 *BroadcastTxAsyncResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTxAsyncResponse.Merge(m, src) -} -func (m *BroadcastTxAsyncResponse) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTxAsyncResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTxAsyncResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTxAsyncResponse proto.InternalMessageInfo - -func (m *BroadcastTxAsyncResponse) GetCode() uint64 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *BroadcastTxAsyncResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *BroadcastTxAsyncResponse) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *BroadcastTxAsyncResponse) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -// BroadcastTxSyncRequest is the request type for the BroadcastTxSync RPC method. -type BroadcastTxSyncRequest struct { - Params []byte `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - ReqId uint64 `protobuf:"varint,2,opt,name=req_id,json=reqId,proto3" json:"req_id,omitempty"` -} - -func (m *BroadcastTxSyncRequest) Reset() { *m = BroadcastTxSyncRequest{} } -func (m *BroadcastTxSyncRequest) String() string { return proto.CompactTextString(m) } -func (*BroadcastTxSyncRequest) ProtoMessage() {} -func (*BroadcastTxSyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{6} -} -func (m *BroadcastTxSyncRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTxSyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTxSyncRequest.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 *BroadcastTxSyncRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTxSyncRequest.Merge(m, src) -} -func (m *BroadcastTxSyncRequest) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTxSyncRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTxSyncRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTxSyncRequest proto.InternalMessageInfo - -func (m *BroadcastTxSyncRequest) GetParams() []byte { - if m != nil { - return m.Params - } - return nil -} - -func (m *BroadcastTxSyncRequest) GetReqId() uint64 { - if m != nil { - return m.ReqId - } - return 0 -} - -// BroadcastTxSyncResponse is the response type for the BroadcastTxSync RPC method. -type BroadcastTxSyncResponse struct { - Code uint64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *BroadcastTxSyncResponse) Reset() { *m = BroadcastTxSyncResponse{} } -func (m *BroadcastTxSyncResponse) String() string { return proto.CompactTextString(m) } -func (*BroadcastTxSyncResponse) ProtoMessage() {} -func (*BroadcastTxSyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{7} -} -func (m *BroadcastTxSyncResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTxSyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTxSyncResponse.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 *BroadcastTxSyncResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTxSyncResponse.Merge(m, src) -} -func (m *BroadcastTxSyncResponse) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTxSyncResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTxSyncResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTxSyncResponse proto.InternalMessageInfo - -func (m *BroadcastTxSyncResponse) GetCode() uint64 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *BroadcastTxSyncResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *BroadcastTxSyncResponse) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *BroadcastTxSyncResponse) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -// GetStatusRequest is the request type for the Query/GetStatus RPC method. -type GetStatusRequest struct { -} - -func (m *GetStatusRequest) Reset() { *m = GetStatusRequest{} } -func (m *GetStatusRequest) String() string { return proto.CompactTextString(m) } -func (*GetStatusRequest) ProtoMessage() {} -func (*GetStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{8} -} -func (m *GetStatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetStatusRequest.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 *GetStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetStatusRequest.Merge(m, src) -} -func (m *GetStatusRequest) XXX_Size() int { - return m.Size() -} -func (m *GetStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetStatusRequest proto.InternalMessageInfo - -// GetStatusResponse is the response type for the Query/GetStatus RPC method. -type GetStatusResponse struct { - NodeInfo *p2p.DefaultNodeInfo `protobuf:"bytes,1,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` - SyncInfo *SyncInfo `protobuf:"bytes,2,opt,name=sync_info,json=syncInfo,proto3" json:"sync_info,omitempty"` - ValidatorInfo *types.Validator `protobuf:"bytes,3,opt,name=validator_info,json=validatorInfo,proto3" json:"validator_info,omitempty"` -} - -func (m *GetStatusResponse) Reset() { *m = GetStatusResponse{} } -func (m *GetStatusResponse) String() string { return proto.CompactTextString(m) } -func (*GetStatusResponse) ProtoMessage() {} -func (*GetStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{9} -} -func (m *GetStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetStatusResponse.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 *GetStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetStatusResponse.Merge(m, src) -} -func (m *GetStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *GetStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetStatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetStatusResponse proto.InternalMessageInfo - -func (m *GetStatusResponse) GetNodeInfo() *p2p.DefaultNodeInfo { - if m != nil { - return m.NodeInfo - } - return nil -} - -func (m *GetStatusResponse) GetSyncInfo() *SyncInfo { - if m != nil { - return m.SyncInfo - } - return nil -} - -func (m *GetStatusResponse) GetValidatorInfo() *types.Validator { - if m != nil { - return m.ValidatorInfo - } - return nil -} - -type SyncInfo struct { - LatestBlockHash []byte `protobuf:"bytes,1,opt,name=latest_block_hash,json=latestBlockHash,proto3" json:"latest_block_hash,omitempty"` - LatestAppHash []byte `protobuf:"bytes,2,opt,name=latest_app_hash,json=latestAppHash,proto3" json:"latest_app_hash,omitempty"` - LatestBlockHeight uint64 `protobuf:"varint,3,opt,name=latest_block_height,json=latestBlockHeight,proto3" json:"latest_block_height,omitempty"` - LatestBlockTime *types1.Timestamp `protobuf:"bytes,4,opt,name=latest_block_time,json=latestBlockTime,proto3" json:"latest_block_time,omitempty"` - // These are implemented in tendermint, but not - // in tendermint-rpc. - // bytes earliest_block_hash = 5; - // bytes earliest_app_hash = 6; - // uint64 earliest_block_height = 7; - // google.protobuf.Timestamp earliest_block_time = 8; - CatchingUp bool `protobuf:"varint,9,opt,name=catching_up,json=catchingUp,proto3" json:"catching_up,omitempty"` -} - -func (m *SyncInfo) Reset() { *m = SyncInfo{} } -func (m *SyncInfo) String() string { return proto.CompactTextString(m) } -func (*SyncInfo) ProtoMessage() {} -func (*SyncInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{10} -} -func (m *SyncInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SyncInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SyncInfo.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 *SyncInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncInfo.Merge(m, src) -} -func (m *SyncInfo) XXX_Size() int { - return m.Size() -} -func (m *SyncInfo) XXX_DiscardUnknown() { - xxx_messageInfo_SyncInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_SyncInfo proto.InternalMessageInfo - -func (m *SyncInfo) GetLatestBlockHash() []byte { - if m != nil { - return m.LatestBlockHash - } - return nil -} - -func (m *SyncInfo) GetLatestAppHash() []byte { - if m != nil { - return m.LatestAppHash - } - return nil -} - -func (m *SyncInfo) GetLatestBlockHeight() uint64 { - if m != nil { - return m.LatestBlockHeight - } - return 0 -} - -func (m *SyncInfo) GetLatestBlockTime() *types1.Timestamp { - if m != nil { - return m.LatestBlockTime - } - return nil -} - -func (m *SyncInfo) GetCatchingUp() bool { - if m != nil { - return m.CatchingUp - } - return false -} - -// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. -type ABCIQueryRequest struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - Prove bool `protobuf:"varint,4,opt,name=prove,proto3" json:"prove,omitempty"` -} - -func (m *ABCIQueryRequest) Reset() { *m = ABCIQueryRequest{} } -func (m *ABCIQueryRequest) String() string { return proto.CompactTextString(m) } -func (*ABCIQueryRequest) ProtoMessage() {} -func (*ABCIQueryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{11} -} -func (m *ABCIQueryRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ABCIQueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ABCIQueryRequest.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 *ABCIQueryRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ABCIQueryRequest.Merge(m, src) -} -func (m *ABCIQueryRequest) XXX_Size() int { - return m.Size() -} -func (m *ABCIQueryRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ABCIQueryRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ABCIQueryRequest proto.InternalMessageInfo - -func (m *ABCIQueryRequest) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *ABCIQueryRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *ABCIQueryRequest) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ABCIQueryRequest) GetProve() bool { - if m != nil { - return m.Prove - } - return false -} - -// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. -// -// Note: This type is a duplicate of the ResponseQuery proto type defined in -// Tendermint. -type ABCIQueryResponse struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` - Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"` - ProofOps *crypto.ProofOps `protobuf:"bytes,8,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"` - Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` - Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (m *ABCIQueryResponse) Reset() { *m = ABCIQueryResponse{} } -func (m *ABCIQueryResponse) String() string { return proto.CompactTextString(m) } -func (*ABCIQueryResponse) ProtoMessage() {} -func (*ABCIQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{12} -} -func (m *ABCIQueryResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ABCIQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ABCIQueryResponse.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 *ABCIQueryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ABCIQueryResponse.Merge(m, src) -} -func (m *ABCIQueryResponse) XXX_Size() int { - return m.Size() -} -func (m *ABCIQueryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ABCIQueryResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ABCIQueryResponse proto.InternalMessageInfo - -func (m *ABCIQueryResponse) GetCode() uint32 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *ABCIQueryResponse) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *ABCIQueryResponse) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -func (m *ABCIQueryResponse) GetIndex() int64 { - if m != nil { - return m.Index - } - return 0 -} - -func (m *ABCIQueryResponse) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *ABCIQueryResponse) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *ABCIQueryResponse) GetProofOps() *crypto.ProofOps { - if m != nil { - return m.ProofOps - } - return nil -} - -func (m *ABCIQueryResponse) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ABCIQueryResponse) GetCodespace() string { - if m != nil { - return m.Codespace - } - return "" -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightRequest struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *GetBlockByHeightRequest) Reset() { *m = GetBlockByHeightRequest{} } -func (m *GetBlockByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*GetBlockByHeightRequest) ProtoMessage() {} -func (*GetBlockByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{13} -} -func (m *GetBlockByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockByHeightRequest.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 *GetBlockByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockByHeightRequest.Merge(m, src) -} -func (m *GetBlockByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *GetBlockByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockByHeightRequest proto.InternalMessageInfo - -func (m *GetBlockByHeightRequest) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightResponse struct { - BlockId *types.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (m *GetBlockByHeightResponse) Reset() { *m = GetBlockByHeightResponse{} } -func (m *GetBlockByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*GetBlockByHeightResponse) ProtoMessage() {} -func (*GetBlockByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bd0bcec0a31e257c, []int{14} -} -func (m *GetBlockByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockByHeightResponse.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 *GetBlockByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockByHeightResponse.Merge(m, src) -} -func (m *GetBlockByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *GetBlockByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockByHeightResponse proto.InternalMessageInfo - -func (m *GetBlockByHeightResponse) GetBlockId() *types.BlockID { - if m != nil { - return m.BlockId - } - return nil -} - -func (m *GetBlockByHeightResponse) GetBlock() *types.Block { - if m != nil { - return m.Block - } - return nil -} - -func init() { - proto.RegisterType((*GetTxRequest)(nil), "penumbra.util.tendermint_proxy.v1.GetTxRequest") - proto.RegisterType((*GetTxResponse)(nil), "penumbra.util.tendermint_proxy.v1.GetTxResponse") - proto.RegisterType((*TxResult)(nil), "penumbra.util.tendermint_proxy.v1.TxResult") - proto.RegisterType((*Tag)(nil), "penumbra.util.tendermint_proxy.v1.Tag") - proto.RegisterType((*BroadcastTxAsyncRequest)(nil), "penumbra.util.tendermint_proxy.v1.BroadcastTxAsyncRequest") - proto.RegisterType((*BroadcastTxAsyncResponse)(nil), "penumbra.util.tendermint_proxy.v1.BroadcastTxAsyncResponse") - proto.RegisterType((*BroadcastTxSyncRequest)(nil), "penumbra.util.tendermint_proxy.v1.BroadcastTxSyncRequest") - proto.RegisterType((*BroadcastTxSyncResponse)(nil), "penumbra.util.tendermint_proxy.v1.BroadcastTxSyncResponse") - proto.RegisterType((*GetStatusRequest)(nil), "penumbra.util.tendermint_proxy.v1.GetStatusRequest") - proto.RegisterType((*GetStatusResponse)(nil), "penumbra.util.tendermint_proxy.v1.GetStatusResponse") - proto.RegisterType((*SyncInfo)(nil), "penumbra.util.tendermint_proxy.v1.SyncInfo") - proto.RegisterType((*ABCIQueryRequest)(nil), "penumbra.util.tendermint_proxy.v1.ABCIQueryRequest") - proto.RegisterType((*ABCIQueryResponse)(nil), "penumbra.util.tendermint_proxy.v1.ABCIQueryResponse") - proto.RegisterType((*GetBlockByHeightRequest)(nil), "penumbra.util.tendermint_proxy.v1.GetBlockByHeightRequest") - proto.RegisterType((*GetBlockByHeightResponse)(nil), "penumbra.util.tendermint_proxy.v1.GetBlockByHeightResponse") -} - -func init() { - proto.RegisterFile("penumbra/util/tendermint_proxy/v1/tendermint_proxy.proto", fileDescriptor_bd0bcec0a31e257c) -} - -var fileDescriptor_bd0bcec0a31e257c = []byte{ - // 1196 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xfa, 0x57, 0xed, 0x97, 0xa6, 0x4d, 0xf6, 0xdb, 0x6f, 0xea, 0x9a, 0xd6, 0x35, 0x8b, - 0xa8, 0x22, 0xa0, 0xbb, 0xd8, 0xed, 0x21, 0xb8, 0x5c, 0xea, 0x56, 0xa4, 0x41, 0x02, 0xcc, 0xc6, - 0x09, 0x12, 0x8a, 0x64, 0x4d, 0x76, 0x27, 0xeb, 0x55, 0xd7, 0xbb, 0xd3, 0x9d, 0x59, 0x63, 0x9f, - 0x10, 0x57, 0x24, 0x24, 0xc4, 0x9f, 0xc0, 0x05, 0x09, 0xfe, 0x11, 0xc4, 0xa9, 0x47, 0x6e, 0xa0, - 0x54, 0xe2, 0xc0, 0x3f, 0xc0, 0x15, 0xcd, 0x8f, 0xb5, 0x37, 0x76, 0xa2, 0xb8, 0x91, 0x38, 0xe5, - 0xcd, 0x9b, 0xf7, 0x79, 0xf3, 0x99, 0xb7, 0xef, 0x7d, 0xc6, 0x81, 0x6d, 0x82, 0xc3, 0x64, 0x78, - 0x14, 0x23, 0x2b, 0x61, 0x7e, 0x60, 0x31, 0x1c, 0xba, 0x38, 0x1e, 0xfa, 0x21, 0xeb, 0x93, 0x38, - 0x1a, 0x4f, 0xac, 0x51, 0x73, 0xc1, 0x67, 0x92, 0x38, 0x62, 0x91, 0xfe, 0x66, 0x8a, 0x34, 0x39, - 0xd2, 0x5c, 0x88, 0x1a, 0x35, 0x6b, 0x77, 0xbd, 0x28, 0xf2, 0x02, 0x6c, 0x09, 0xc0, 0x51, 0x72, - 0x6c, 0x31, 0x7f, 0x88, 0x29, 0x43, 0x43, 0x22, 0x73, 0xd4, 0xee, 0xcc, 0x50, 0x96, 0x13, 0x4f, - 0x08, 0x8b, 0x78, 0x6c, 0x74, 0xac, 0xb6, 0x6b, 0x99, 0x6d, 0xd2, 0x22, 0x16, 0x9b, 0x10, 0x4c, - 0xd5, 0xde, 0xed, 0xcc, 0x9e, 0xf0, 0x5b, 0x47, 0x41, 0xe4, 0x3c, 0x3f, 0x77, 0x37, 0x8b, 0x6d, - 0x2c, 0xec, 0x8e, 0x50, 0xe0, 0xbb, 0x88, 0x45, 0xb1, 0x8c, 0x30, 0xb6, 0xe1, 0xea, 0x0e, 0x66, - 0xbd, 0xb1, 0x8d, 0x5f, 0x24, 0x98, 0x32, 0x5d, 0x87, 0xc2, 0x00, 0xd1, 0x41, 0x55, 0x6b, 0x68, - 0x5b, 0x57, 0x6d, 0x61, 0xeb, 0x37, 0xa0, 0x48, 0xe2, 0x68, 0x84, 0xab, 0xb9, 0x86, 0xb6, 0x55, - 0xb6, 0xe5, 0xc2, 0xf8, 0x45, 0x83, 0x35, 0x05, 0xa5, 0x24, 0x0a, 0x29, 0x3e, 0x13, 0xbb, 0x09, - 0xa5, 0x01, 0xf6, 0xbd, 0x01, 0x13, 0xe0, 0x82, 0xad, 0x56, 0x3c, 0xa7, 0x1f, 0xba, 0x78, 0x5c, - 0xcd, 0x0b, 0xb7, 0x5c, 0xe8, 0xcf, 0xa0, 0xc2, 0xc6, 0xfd, 0x18, 0xd3, 0x24, 0x60, 0xd5, 0x42, - 0x43, 0xdb, 0x5a, 0x6d, 0xbd, 0x6b, 0x5e, 0x58, 0x7e, 0x53, 0x70, 0x48, 0x02, 0x66, 0x97, 0x99, - 0xb2, 0xf4, 0x6b, 0x90, 0x63, 0xe3, 0x6a, 0x51, 0x30, 0xc9, 0xb1, 0xb1, 0xf1, 0x83, 0x06, 0xe5, - 0x34, 0x4c, 0x5f, 0x87, 0x7c, 0x10, 0x79, 0x82, 0x67, 0xc5, 0xe6, 0xa6, 0x7e, 0x07, 0xc0, 0x43, - 0xb4, 0xff, 0x15, 0x0a, 0x19, 0x76, 0x15, 0xd5, 0x8a, 0x87, 0xe8, 0x17, 0xc2, 0xa1, 0xdf, 0x82, - 0x32, 0xdf, 0x4e, 0x28, 0x76, 0x15, 0xe1, 0x2b, 0x1e, 0xa2, 0xfb, 0x14, 0xbb, 0x7a, 0x1b, 0x0a, - 0x0c, 0x79, 0xb4, 0x5a, 0x68, 0xe4, 0xb7, 0x56, 0x5b, 0xf7, 0x96, 0x61, 0x8b, 0x3c, 0x5b, 0x60, - 0x8c, 0x27, 0x90, 0xef, 0x21, 0x8f, 0xd3, 0x79, 0x8e, 0x27, 0xaa, 0x6c, 0xdc, 0xe4, 0xd5, 0x19, - 0xa1, 0x20, 0x91, 0x15, 0xbf, 0x6a, 0xcb, 0xc5, 0xe9, 0x9a, 0x95, 0x55, 0xcd, 0x8c, 0x67, 0x70, - 0xb3, 0x13, 0x47, 0xc8, 0x75, 0x10, 0x65, 0xbd, 0xf1, 0x63, 0x3a, 0x09, 0x9d, 0xf4, 0x63, 0x6e, - 0x42, 0x89, 0xa0, 0x18, 0x0d, 0xa9, 0xca, 0xad, 0x56, 0xfa, 0xff, 0xa1, 0x14, 0xe3, 0x17, 0x7d, - 0x3f, 0xbd, 0x69, 0x31, 0xc6, 0x2f, 0x76, 0x5d, 0x63, 0x00, 0xd5, 0xc5, 0x4c, 0xb3, 0x6f, 0xeb, - 0x44, 0x2e, 0x16, 0x89, 0x0a, 0xb6, 0xb0, 0xb9, 0xcf, 0x45, 0x0c, 0x29, 0x92, 0xc2, 0x4e, 0x4b, - 0x9b, 0x9f, 0x95, 0x36, 0xed, 0x8a, 0xc2, 0xac, 0x2b, 0x8c, 0x1d, 0xd8, 0xcc, 0x9c, 0xb4, 0x77, - 0x79, 0xca, 0xde, 0xa9, 0xcb, 0xef, 0xfd, 0x77, 0x8c, 0x75, 0x58, 0xdf, 0xc1, 0x6c, 0x8f, 0x21, - 0x96, 0x50, 0xc5, 0xd5, 0xf8, 0x43, 0x83, 0x8d, 0x8c, 0x53, 0x9d, 0xfb, 0x21, 0x54, 0xc2, 0xc8, - 0xc5, 0x7d, 0x3f, 0x3c, 0x8e, 0xc4, 0xe1, 0xab, 0xad, 0xbb, 0x99, 0x3e, 0x30, 0x49, 0x8b, 0x98, - 0x4f, 0xf1, 0x31, 0x4a, 0x02, 0xf6, 0x69, 0xe4, 0xe2, 0xdd, 0xf0, 0x38, 0xb2, 0xcb, 0xa1, 0xb2, - 0xf8, 0x04, 0xf0, 0xba, 0x4b, 0x74, 0x6e, 0xe9, 0x09, 0xe0, 0x37, 0x97, 0x99, 0xa8, 0xb2, 0xf4, - 0x0e, 0x5c, 0x9b, 0x0e, 0xbb, 0x4c, 0x97, 0x17, 0xe9, 0xde, 0xc8, 0x92, 0x91, 0x62, 0x71, 0x90, - 0xc6, 0xd9, 0x6b, 0x53, 0x08, 0xcf, 0x61, 0xfc, 0xa3, 0x41, 0x39, 0x4d, 0xad, 0xbf, 0x03, 0x1b, - 0x01, 0x62, 0x98, 0xb2, 0xbe, 0x10, 0xa0, 0x7e, 0x66, 0xd6, 0xaf, 0xcb, 0x8d, 0x0e, 0xf7, 0x3f, - 0xe3, 0x63, 0x7f, 0x0f, 0x94, 0xab, 0x8f, 0x08, 0x91, 0x91, 0xb2, 0xe6, 0x6b, 0xd2, 0xfd, 0x98, - 0x10, 0x11, 0x67, 0xc2, 0xff, 0x4e, 0xe7, 0x94, 0x5a, 0x21, 0x67, 0x6c, 0x23, 0x9b, 0x55, 0xca, - 0xc6, 0x47, 0x73, 0x1c, 0xb8, 0xce, 0x2a, 0xa1, 0xa8, 0x99, 0x52, 0x84, 0xcd, 0x54, 0x84, 0xcd, - 0x5e, 0x2a, 0xc2, 0xa7, 0xf8, 0x71, 0xaf, 0x7e, 0x17, 0x56, 0x1d, 0xc4, 0x9c, 0x81, 0x1f, 0x7a, - 0xfd, 0x84, 0x54, 0x2b, 0x62, 0xa0, 0x20, 0x75, 0xed, 0x13, 0x63, 0x00, 0xeb, 0x8f, 0x3b, 0x4f, - 0x76, 0x3f, 0x4f, 0x70, 0x3c, 0xc9, 0x68, 0xa3, 0xe8, 0x1e, 0x2d, 0xd3, 0x3d, 0x3a, 0x14, 0x08, - 0x62, 0xf2, 0x76, 0x15, 0x5b, 0xd8, 0x19, 0xcd, 0xe3, 0xf7, 0xc8, 0x67, 0x35, 0x4f, 0xea, 0x68, - 0x21, 0xab, 0xa3, 0xdf, 0xe4, 0x60, 0x23, 0x73, 0xd4, 0x19, 0xdd, 0xbb, 0xa6, 0xba, 0xf7, 0xcc, - 0x4e, 0x15, 0x5f, 0xb6, 0x20, 0x4f, 0xe7, 0xf6, 0x4c, 0x25, 0x8a, 0xe2, 0x70, 0xa5, 0xac, 0x4a, - 0x63, 0x4a, 0x67, 0x68, 0xcc, 0x95, 0xac, 0xc6, 0x6c, 0x43, 0x45, 0x3c, 0x4c, 0xfd, 0x88, 0xd0, - 0x6a, 0x79, 0xb1, 0x61, 0xe4, 0xe3, 0x65, 0x76, 0x79, 0xcc, 0x67, 0x84, 0xda, 0x65, 0xa2, 0xac, - 0xcc, 0xad, 0x2b, 0xa7, 0x6e, 0x7d, 0x1b, 0x2a, 0x9c, 0x3d, 0x25, 0xc8, 0xc1, 0x55, 0x10, 0x44, - 0x67, 0x8e, 0x8f, 0x0b, 0xe5, 0xdc, 0x7a, 0xde, 0x68, 0xc2, 0xcd, 0x1d, 0x2c, 0x3f, 0x4f, 0x67, - 0x22, 0x3f, 0x75, 0x46, 0x10, 0x54, 0x5a, 0x2d, 0x9b, 0xd6, 0xf8, 0x1a, 0xaa, 0x8b, 0x10, 0x55, - 0xbc, 0x87, 0x50, 0x96, 0xed, 0xe1, 0xbb, 0x6a, 0x02, 0x6f, 0x2d, 0x36, 0xbd, 0x80, 0xee, 0x3e, - 0xb5, 0xaf, 0x88, 0xd0, 0x5d, 0x57, 0xbf, 0x0f, 0x45, 0x61, 0xaa, 0xb1, 0xbb, 0x79, 0x0e, 0xc4, - 0x96, 0x51, 0xad, 0x9f, 0x4a, 0xb0, 0xd9, 0x9b, 0x46, 0x74, 0xf9, 0x24, 0xee, 0xe1, 0x78, 0xe4, - 0x3b, 0x58, 0x1f, 0x43, 0x65, 0xaa, 0x0b, 0xfa, 0x83, 0x25, 0xc6, 0x77, 0x5e, 0x5a, 0x6a, 0x0f, - 0x5f, 0x0f, 0x24, 0xef, 0x6d, 0xac, 0xe8, 0xdf, 0x69, 0xb0, 0x3e, 0xaf, 0xe1, 0x7a, 0x7b, 0x89, - 0x64, 0xe7, 0x3c, 0x21, 0xb5, 0x47, 0x97, 0xc2, 0x4e, 0xf9, 0x7c, 0xab, 0xc1, 0xf5, 0x39, 0x81, - 0xd6, 0x3f, 0x78, 0xbd, 0x94, 0x99, 0xd7, 0xa1, 0xd6, 0xbe, 0x0c, 0x74, 0x4a, 0x26, 0x80, 0xa2, - 0xf8, 0xc1, 0xa2, 0x5b, 0xcb, 0x55, 0x77, 0xfa, 0xab, 0xa8, 0xf6, 0xfe, 0xf2, 0x80, 0xe9, 0x69, - 0x63, 0xa8, 0x4c, 0xc7, 0x7a, 0xa9, 0x26, 0x98, 0xd7, 0x9b, 0xa5, 0x9a, 0x60, 0x41, 0x39, 0x54, - 0x13, 0xcc, 0xcf, 0xc6, 0x52, 0x4d, 0x70, 0xce, 0x0c, 0x2e, 0xd5, 0x04, 0xe7, 0x0d, 0xa3, 0xb1, - 0xd2, 0xf9, 0x2b, 0xf7, 0xeb, 0x49, 0x5d, 0x7b, 0x79, 0x52, 0xd7, 0xfe, 0x3c, 0xa9, 0x6b, 0xdf, - 0xbf, 0xaa, 0xaf, 0xbc, 0x7c, 0x55, 0x5f, 0xf9, 0xfd, 0x55, 0x7d, 0x05, 0xde, 0x76, 0xa2, 0xe1, - 0xc5, 0xc9, 0x3b, 0x37, 0xe6, 0x06, 0xad, 0xcb, 0x25, 0xbe, 0xab, 0x7d, 0x19, 0x78, 0x3e, 0x1b, - 0x24, 0x47, 0xa6, 0x13, 0x0d, 0x2d, 0xca, 0x62, 0x14, 0x7a, 0x38, 0x88, 0x46, 0xf8, 0xfe, 0x08, - 0x87, 0x2c, 0x89, 0x31, 0xb5, 0xfc, 0x90, 0xe1, 0xd8, 0x19, 0x20, 0xfe, 0x97, 0x32, 0x6b, 0xb4, - 0x6d, 0x89, 0x85, 0x75, 0xe1, 0x3f, 0x03, 0x8f, 0xe6, 0x7d, 0xa3, 0xe6, 0x8f, 0xb9, 0x7c, 0x77, - 0xbf, 0xf7, 0x73, 0xae, 0xd1, 0x4d, 0xf9, 0xee, 0x73, 0xbe, 0x73, 0xd4, 0xcc, 0x83, 0xe6, 0x6f, - 0xb3, 0x90, 0x43, 0x1e, 0x72, 0x38, 0x17, 0x72, 0x78, 0xd0, 0x3c, 0xc9, 0xbd, 0x77, 0x51, 0xc8, - 0xe1, 0x4e, 0xb7, 0xf3, 0x09, 0x66, 0x88, 0x3f, 0x33, 0x7f, 0xe7, 0xde, 0x4a, 0xc3, 0xdb, 0x6d, - 0x1e, 0xdf, 0x6e, 0xcf, 0x01, 0xda, 0xed, 0x83, 0xe6, 0x51, 0x49, 0x3c, 0x7d, 0x0f, 0xfe, 0x0d, - 0x00, 0x00, 0xff, 0xff, 0xaa, 0xf1, 0x43, 0xde, 0xec, 0x0c, 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 - -// TendermintProxyServiceClient is the client API for TendermintProxyService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TendermintProxyServiceClient interface { - // Status queries the current status. - GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) - // Broadcast a transaction asynchronously. - BroadcastTxAsync(ctx context.Context, in *BroadcastTxAsyncRequest, opts ...grpc.CallOption) (*BroadcastTxAsyncResponse, error) - // Broadcast a transaction synchronously. - BroadcastTxSync(ctx context.Context, in *BroadcastTxSyncRequest, opts ...grpc.CallOption) (*BroadcastTxSyncResponse, error) - // Fetch a transaction by hash. - GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. - ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) -} - -type tendermintProxyServiceClient struct { - cc grpc1.ClientConn -} - -func NewTendermintProxyServiceClient(cc grpc1.ClientConn) TendermintProxyServiceClient { - return &tendermintProxyServiceClient{cc} -} - -func (c *tendermintProxyServiceClient) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) { - out := new(GetStatusResponse) - err := c.cc.Invoke(ctx, "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/GetStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tendermintProxyServiceClient) BroadcastTxAsync(ctx context.Context, in *BroadcastTxAsyncRequest, opts ...grpc.CallOption) (*BroadcastTxAsyncResponse, error) { - out := new(BroadcastTxAsyncResponse) - err := c.cc.Invoke(ctx, "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/BroadcastTxAsync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tendermintProxyServiceClient) BroadcastTxSync(ctx context.Context, in *BroadcastTxSyncRequest, opts ...grpc.CallOption) (*BroadcastTxSyncResponse, error) { - out := new(BroadcastTxSyncResponse) - err := c.cc.Invoke(ctx, "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/BroadcastTxSync", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tendermintProxyServiceClient) GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) { - out := new(GetTxResponse) - err := c.cc.Invoke(ctx, "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/GetTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tendermintProxyServiceClient) ABCIQuery(ctx context.Context, in *ABCIQueryRequest, opts ...grpc.CallOption) (*ABCIQueryResponse, error) { - out := new(ABCIQueryResponse) - err := c.cc.Invoke(ctx, "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/ABCIQuery", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tendermintProxyServiceClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) { - out := new(GetBlockByHeightResponse) - err := c.cc.Invoke(ctx, "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/GetBlockByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TendermintProxyServiceServer is the server API for TendermintProxyService service. -type TendermintProxyServiceServer interface { - // Status queries the current status. - GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) - // Broadcast a transaction asynchronously. - BroadcastTxAsync(context.Context, *BroadcastTxAsyncRequest) (*BroadcastTxAsyncResponse, error) - // Broadcast a transaction synchronously. - BroadcastTxSync(context.Context, *BroadcastTxSyncRequest) (*BroadcastTxSyncResponse, error) - // Fetch a transaction by hash. - GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. - ABCIQuery(context.Context, *ABCIQueryRequest) (*ABCIQueryResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) -} - -// UnimplementedTendermintProxyServiceServer can be embedded to have forward compatible implementations. -type UnimplementedTendermintProxyServiceServer struct { -} - -func (*UnimplementedTendermintProxyServiceServer) GetStatus(ctx context.Context, req *GetStatusRequest) (*GetStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") -} -func (*UnimplementedTendermintProxyServiceServer) BroadcastTxAsync(ctx context.Context, req *BroadcastTxAsyncRequest) (*BroadcastTxAsyncResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxAsync not implemented") -} -func (*UnimplementedTendermintProxyServiceServer) BroadcastTxSync(ctx context.Context, req *BroadcastTxSyncRequest) (*BroadcastTxSyncResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTxSync not implemented") -} -func (*UnimplementedTendermintProxyServiceServer) GetTx(ctx context.Context, req *GetTxRequest) (*GetTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTx not implemented") -} -func (*UnimplementedTendermintProxyServiceServer) ABCIQuery(ctx context.Context, req *ABCIQueryRequest) (*ABCIQueryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ABCIQuery not implemented") -} -func (*UnimplementedTendermintProxyServiceServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHeight not implemented") -} - -func RegisterTendermintProxyServiceServer(s grpc1.Server, srv TendermintProxyServiceServer) { - s.RegisterService(&_TendermintProxyService_serviceDesc, srv) -} - -func _TendermintProxyService_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TendermintProxyServiceServer).GetStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/GetStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TendermintProxyServiceServer).GetStatus(ctx, req.(*GetStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TendermintProxyService_BroadcastTxAsync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BroadcastTxAsyncRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TendermintProxyServiceServer).BroadcastTxAsync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/BroadcastTxAsync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TendermintProxyServiceServer).BroadcastTxAsync(ctx, req.(*BroadcastTxAsyncRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TendermintProxyService_BroadcastTxSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BroadcastTxSyncRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TendermintProxyServiceServer).BroadcastTxSync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/BroadcastTxSync", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TendermintProxyServiceServer).BroadcastTxSync(ctx, req.(*BroadcastTxSyncRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TendermintProxyService_GetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TendermintProxyServiceServer).GetTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/GetTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TendermintProxyServiceServer).GetTx(ctx, req.(*GetTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TendermintProxyService_ABCIQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ABCIQueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TendermintProxyServiceServer).ABCIQuery(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/ABCIQuery", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TendermintProxyServiceServer).ABCIQuery(ctx, req.(*ABCIQueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TendermintProxyService_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TendermintProxyServiceServer).GetBlockByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.util.tendermint_proxy.v1.TendermintProxyService/GetBlockByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TendermintProxyServiceServer).GetBlockByHeight(ctx, req.(*GetBlockByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TendermintProxyService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.util.tendermint_proxy.v1.TendermintProxyService", - HandlerType: (*TendermintProxyServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetStatus", - Handler: _TendermintProxyService_GetStatus_Handler, - }, - { - MethodName: "BroadcastTxAsync", - Handler: _TendermintProxyService_BroadcastTxAsync_Handler, - }, - { - MethodName: "BroadcastTxSync", - Handler: _TendermintProxyService_BroadcastTxSync_Handler, - }, - { - MethodName: "GetTx", - Handler: _TendermintProxyService_GetTx_Handler, - }, - { - MethodName: "ABCIQuery", - Handler: _TendermintProxyService_ABCIQuery_Handler, - }, - { - MethodName: "GetBlockByHeight", - Handler: _TendermintProxyService_GetBlockByHeight_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "penumbra/util/tendermint_proxy/v1/tendermint_proxy.proto", -} - -func (m *GetTxRequest) Marshal() (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 *GetTxRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Prove { - i-- - if m.Prove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetTxResponse) Marshal() (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 *GetTxResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Tx) > 0 { - i -= len(m.Tx) - copy(dAtA[i:], m.Tx) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Tx))) - i-- - dAtA[i] = 0x2a - } - if m.TxResult != nil { - { - size, err := m.TxResult.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Index != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x18 - } - if m.Height != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TxResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.GasUsed != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x18 - } - if m.GasWanted != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x10 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Tag) Marshal() (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 *Tag) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tag) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Index { - i-- - if m.Index { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTxAsyncRequest) Marshal() (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 *BroadcastTxAsyncRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTxAsyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ReqId != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.ReqId)) - i-- - dAtA[i] = 0x10 - } - if len(m.Params) > 0 { - i -= len(m.Params) - copy(dAtA[i:], m.Params) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Params))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTxAsyncResponse) Marshal() (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 *BroadcastTxAsyncResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTxAsyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTxSyncRequest) Marshal() (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 *BroadcastTxSyncRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTxSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ReqId != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.ReqId)) - i-- - dAtA[i] = 0x10 - } - if len(m.Params) > 0 { - i -= len(m.Params) - copy(dAtA[i:], m.Params) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Params))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTxSyncResponse) Marshal() (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 *BroadcastTxSyncResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTxSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetStatusRequest) Marshal() (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 *GetStatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GetStatusResponse) Marshal() (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 *GetStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorInfo != nil { - { - size, err := m.ValidatorInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.SyncInfo != nil { - { - size, err := m.SyncInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.NodeInfo != nil { - { - size, err := m.NodeInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SyncInfo) Marshal() (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 *SyncInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SyncInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CatchingUp { - i-- - if m.CatchingUp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.LatestBlockTime != nil { - { - size, err := m.LatestBlockTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.LatestBlockHeight != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.LatestBlockHeight)) - i-- - dAtA[i] = 0x18 - } - if len(m.LatestAppHash) > 0 { - i -= len(m.LatestAppHash) - copy(dAtA[i:], m.LatestAppHash) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.LatestAppHash))) - i-- - dAtA[i] = 0x12 - } - if len(m.LatestBlockHash) > 0 { - i -= len(m.LatestBlockHash) - copy(dAtA[i:], m.LatestBlockHash) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.LatestBlockHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ABCIQueryRequest) Marshal() (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 *ABCIQueryRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ABCIQueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Prove { - i-- - if m.Prove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Height != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 - } - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x12 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ABCIQueryResponse) Marshal() (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 *ABCIQueryResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ABCIQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x52 - } - if m.Height != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x48 - } - if m.ProofOps != nil { - { - size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x3a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x32 - } - if m.Index != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Index)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintTendermintProxy(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if m.Code != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetBlockByHeightRequest) Marshal() (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 *GetBlockByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintTendermintProxy(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetBlockByHeightResponse) Marshal() (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 *GetBlockByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockId != nil { - { - size, err := m.BlockId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTendermintProxy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTendermintProxy(dAtA []byte, offset int, v uint64) int { - offset -= sovTendermintProxy(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GetTxRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.Prove { - n += 2 - } - return n -} - -func (m *GetTxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTendermintProxy(uint64(m.Height)) - } - if m.Index != 0 { - n += 1 + sovTendermintProxy(uint64(m.Index)) - } - if m.TxResult != nil { - l = m.TxResult.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Tx) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - return n -} - -func (m *TxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.GasWanted != 0 { - n += 1 + sovTendermintProxy(uint64(m.GasWanted)) - } - if m.GasUsed != 0 { - n += 1 + sovTendermintProxy(uint64(m.GasUsed)) - } - if len(m.Tags) > 0 { - for _, e := range m.Tags { - l = e.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - } - return n -} - -func (m *Tag) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.Index { - n += 2 - } - return n -} - -func (m *BroadcastTxAsyncRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Params) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.ReqId != 0 { - n += 1 + sovTendermintProxy(uint64(m.ReqId)) - } - return n -} - -func (m *BroadcastTxAsyncResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTendermintProxy(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - return n -} - -func (m *BroadcastTxSyncRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Params) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.ReqId != 0 { - n += 1 + sovTendermintProxy(uint64(m.ReqId)) - } - return n -} - -func (m *BroadcastTxSyncResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTendermintProxy(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - return n -} - -func (m *GetStatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GetStatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NodeInfo != nil { - l = m.NodeInfo.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.SyncInfo != nil { - l = m.SyncInfo.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.ValidatorInfo != nil { - l = m.ValidatorInfo.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - return n -} - -func (m *SyncInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LatestBlockHash) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.LatestAppHash) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.LatestBlockHeight != 0 { - n += 1 + sovTendermintProxy(uint64(m.LatestBlockHeight)) - } - if m.LatestBlockTime != nil { - l = m.LatestBlockTime.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.CatchingUp { - n += 2 - } - return n -} - -func (m *ABCIQueryRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTendermintProxy(uint64(m.Height)) - } - if m.Prove { - n += 2 - } - return n -} - -func (m *ABCIQueryResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovTendermintProxy(uint64(m.Code)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.Index != 0 { - n += 1 + sovTendermintProxy(uint64(m.Index)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.ProofOps != nil { - l = m.ProofOps.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovTendermintProxy(uint64(m.Height)) - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovTendermintProxy(uint64(l)) - } - return n -} - -func (m *GetBlockByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTendermintProxy(uint64(m.Height)) - } - return n -} - -func (m *GetBlockByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockId != nil { - l = m.BlockId.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovTendermintProxy(uint64(l)) - } - return n -} - -func sovTendermintProxy(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTendermintProxy(x uint64) (n int) { - return sovTendermintProxy(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GetTxRequest) 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 ErrIntOverflowTendermintProxy - } - 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: GetTxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Prove = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetTxResponse) 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 ErrIntOverflowTendermintProxy - } - 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: GetTxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxResult", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TxResult == nil { - m.TxResult = &TxResult{} - } - if err := m.TxResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tx = append(m.Tx[:0], dAtA[iNdEx:postIndex]...) - if m.Tx == nil { - m.Tx = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - m.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasWanted |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tags = append(m.Tags, &Tag{}) - if err := m.Tags[len(m.Tags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tag) 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 ErrIntOverflowTendermintProxy - } - 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: Tag: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tag: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Index = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTxAsyncRequest) 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 ErrIntOverflowTendermintProxy - } - 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: BroadcastTxAsyncRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastTxAsyncRequest: 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 byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Params = append(m.Params[:0], dAtA[iNdEx:postIndex]...) - if m.Params == nil { - m.Params = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) - } - m.ReqId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReqId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTxAsyncResponse) 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 ErrIntOverflowTendermintProxy - } - 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: BroadcastTxAsyncResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastTxAsyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTxSyncRequest) 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 ErrIntOverflowTendermintProxy - } - 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: BroadcastTxSyncRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastTxSyncRequest: 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 byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Params = append(m.Params[:0], dAtA[iNdEx:postIndex]...) - if m.Params == nil { - m.Params = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReqId", wireType) - } - m.ReqId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReqId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTxSyncResponse) 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 ErrIntOverflowTendermintProxy - } - 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: BroadcastTxSyncResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastTxSyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetStatusRequest) 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 ErrIntOverflowTendermintProxy - } - 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: GetStatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetStatusResponse) 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 ErrIntOverflowTendermintProxy - } - 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: GetStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NodeInfo == nil { - m.NodeInfo = &p2p.DefaultNodeInfo{} - } - if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SyncInfo == nil { - m.SyncInfo = &SyncInfo{} - } - if err := m.SyncInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorInfo == nil { - m.ValidatorInfo = &types.Validator{} - } - if err := m.ValidatorInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SyncInfo) 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 ErrIntOverflowTendermintProxy - } - 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: SyncInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SyncInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LatestBlockHash = append(m.LatestBlockHash[:0], dAtA[iNdEx:postIndex]...) - if m.LatestBlockHash == nil { - m.LatestBlockHash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestAppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LatestAppHash = append(m.LatestAppHash[:0], dAtA[iNdEx:postIndex]...) - if m.LatestAppHash == nil { - m.LatestAppHash = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockHeight", wireType) - } - m.LatestBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LatestBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LatestBlockTime == nil { - m.LatestBlockTime = &types1.Timestamp{} - } - if err := m.LatestBlockTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CatchingUp", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CatchingUp = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ABCIQueryRequest) 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 ErrIntOverflowTendermintProxy - } - 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: ABCIQueryRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ABCIQueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Prove = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ABCIQueryResponse) 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 ErrIntOverflowTendermintProxy - } - 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: ABCIQueryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ABCIQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - m.Index = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Index |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProofOps == nil { - m.ProofOps = &crypto.ProofOps{} - } - if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockByHeightRequest) 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 ErrIntOverflowTendermintProxy - } - 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: GetBlockByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockByHeightResponse) 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 ErrIntOverflowTendermintProxy - } - 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: GetBlockByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockId == nil { - m.BlockId = &types.BlockID{} - } - if err := m.BlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTendermintProxy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTendermintProxy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &types.Block{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTendermintProxy(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermintProxy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTendermintProxy(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTendermintProxy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTendermintProxy - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTendermintProxy - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTendermintProxy - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTendermintProxy = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTendermintProxy = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTendermintProxy = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/view/v1/view.pb.go b/chain/penumbra/view/v1/view.pb.go deleted file mode 100644 index 417ed281..00000000 --- a/chain/penumbra/view/v1/view.pb.go +++ /dev/null @@ -1,21290 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: penumbra/view/v1/view.proto - -package viewv1 - -import ( - context "context" - encoding_binary "encoding/binary" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - v112 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/app/v1" - v18 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/asset/v1" - v11 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/auction/v1" - v12 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/dex/v1" - v16 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/fee/v1" - v15 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/ibc/v1" - v17 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/sct/v1" - v113 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/shielded_pool/v1" - v111 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/component/stake/v1" - v1 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/keys/v1" - v110 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/num/v1" - v13 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/transaction/v1" - v14 "github.com/cosmos/interchaintest/v10/chain/penumbra/core/txhash/v1" - v19 "github.com/cosmos/interchaintest/v10/chain/penumbra/crypto/tct/v1" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type DelegationsByAddressIndexRequest_Filter int32 - -const ( - // By default, returns delegations for all active validators. For validators - // that the given address index has no delegation tokens for, a `ValueView` - // with a balance of `0` will be returned. - DelegationsByAddressIndexRequest_FILTER_UNSPECIFIED DelegationsByAddressIndexRequest_Filter = 0 - // Returns only delegations to active validators that the given address - // index holds delegation tokens for. - DelegationsByAddressIndexRequest_FILTER_ALL_ACTIVE_WITH_NONZERO_BALANCES DelegationsByAddressIndexRequest_Filter = 1 - // Return delegations for all validators, whether active or not. For - // validators that the given address index has no delegation tokens for, a - // `ValueView` with a balance of `0` will be returned. - DelegationsByAddressIndexRequest_FILTER_ALL DelegationsByAddressIndexRequest_Filter = 2 -) - -var DelegationsByAddressIndexRequest_Filter_name = map[int32]string{ - 0: "FILTER_UNSPECIFIED", - 1: "FILTER_ALL_ACTIVE_WITH_NONZERO_BALANCES", - 2: "FILTER_ALL", -} - -var DelegationsByAddressIndexRequest_Filter_value = map[string]int32{ - "FILTER_UNSPECIFIED": 0, - "FILTER_ALL_ACTIVE_WITH_NONZERO_BALANCES": 1, - "FILTER_ALL": 2, -} - -func (x DelegationsByAddressIndexRequest_Filter) String() string { - return proto.EnumName(DelegationsByAddressIndexRequest_Filter_name, int32(x)) -} - -func (DelegationsByAddressIndexRequest_Filter) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{57, 0} -} - -type UnbondingTokensByAddressIndexRequest_Filter int32 - -const ( - // Return all unbonding tokens, regardless of whether they're claimable - // right now. - UnbondingTokensByAddressIndexRequest_FILTER_UNSPECIFIED UnbondingTokensByAddressIndexRequest_Filter = 0 - // Return all unbonding tokens that are currently claimable. This includes: - // - tokens that have passed the `unbonding_delay` (from `StakeParameters`) - // - tokens for unbonded validators - UnbondingTokensByAddressIndexRequest_FILTER_CLAIMABLE UnbondingTokensByAddressIndexRequest_Filter = 1 - // Return all unbonding tokens that are not yet claimable, because they are - // still in the `unbonding_delay` (from `StakeParameters`) period. - UnbondingTokensByAddressIndexRequest_FILTER_NOT_YET_CLAIMABLE UnbondingTokensByAddressIndexRequest_Filter = 2 -) - -var UnbondingTokensByAddressIndexRequest_Filter_name = map[int32]string{ - 0: "FILTER_UNSPECIFIED", - 1: "FILTER_CLAIMABLE", - 2: "FILTER_NOT_YET_CLAIMABLE", -} - -var UnbondingTokensByAddressIndexRequest_Filter_value = map[string]int32{ - "FILTER_UNSPECIFIED": 0, - "FILTER_CLAIMABLE": 1, - "FILTER_NOT_YET_CLAIMABLE": 2, -} - -func (x UnbondingTokensByAddressIndexRequest_Filter) String() string { - return proto.EnumName(UnbondingTokensByAddressIndexRequest_Filter_name, int32(x)) -} - -func (UnbondingTokensByAddressIndexRequest_Filter) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{59, 0} -} - -// Filters in an `AuctionsRequest` will be combined using `AND` logic -- that -// is, the more filters you add, the fewer responses you're likely to get. -type AuctionsRequest struct { - // If present, filter balances to only include the account specified by the `AddressIndex`. - AccountFilter *v1.AddressIndex `protobuf:"bytes,1,opt,name=account_filter,json=accountFilter,proto3" json:"account_filter,omitempty"` - // If present, include inactive auctions as well as active ones. - IncludeInactive bool `protobuf:"varint,2,opt,name=include_inactive,json=includeInactive,proto3" json:"include_inactive,omitempty"` - // If set, query a fullnode for the current state of the auctions. - QueryLatestState bool `protobuf:"varint,3,opt,name=query_latest_state,json=queryLatestState,proto3" json:"query_latest_state,omitempty"` - // If present, filter to only include auctions whose IDs are in this array. - AuctionIdsFilter []*v11.AuctionId `protobuf:"bytes,4,rep,name=auction_ids_filter,json=auctionIdsFilter,proto3" json:"auction_ids_filter,omitempty"` -} - -func (m *AuctionsRequest) Reset() { *m = AuctionsRequest{} } -func (m *AuctionsRequest) String() string { return proto.CompactTextString(m) } -func (*AuctionsRequest) ProtoMessage() {} -func (*AuctionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{0} -} -func (m *AuctionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionsRequest.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 *AuctionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionsRequest.Merge(m, src) -} -func (m *AuctionsRequest) XXX_Size() int { - return m.Size() -} -func (m *AuctionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionsRequest proto.InternalMessageInfo - -func (m *AuctionsRequest) GetAccountFilter() *v1.AddressIndex { - if m != nil { - return m.AccountFilter - } - return nil -} - -func (m *AuctionsRequest) GetIncludeInactive() bool { - if m != nil { - return m.IncludeInactive - } - return false -} - -func (m *AuctionsRequest) GetQueryLatestState() bool { - if m != nil { - return m.QueryLatestState - } - return false -} - -func (m *AuctionsRequest) GetAuctionIdsFilter() []*v11.AuctionId { - if m != nil { - return m.AuctionIdsFilter - } - return nil -} - -type AuctionsResponse struct { - Id *v11.AuctionId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The state of the returned auction. - // - // Only present when `query_latest_state` was provided. - Auction *types.Any `protobuf:"bytes,2,opt,name=auction,proto3" json:"auction,omitempty"` - // The state of any DEX positions relevant to the returned auction. - // - // Only present when `query_latest_state` was provided. - // Could be empty, depending on the auction state. - Positions []*v12.Position `protobuf:"bytes,3,rep,name=positions,proto3" json:"positions,omitempty"` - // The note recording the auction NFT. - NoteRecord *SpendableNoteRecord `protobuf:"bytes,4,opt,name=note_record,json=noteRecord,proto3" json:"note_record,omitempty"` - // The sequence number of the auction state _as known to the local view - // service_. Note that the local view service may lag behind the fullnode. For - // example, if the chain hits an auction's `end_height`, but the user hasn't - // yet exchanged their sequence-0 (opened) auction NFT for a sequence-1 - // (closed) auction NFT, the local view service will have a sequnce number of - // 0. - // - // Dutch auctions move from: - // 0 (opened) => 1 (closed) => n (withdrawn) - LocalSeq uint64 `protobuf:"varint,5,opt,name=local_seq,json=localSeq,proto3" json:"local_seq,omitempty"` -} - -func (m *AuctionsResponse) Reset() { *m = AuctionsResponse{} } -func (m *AuctionsResponse) String() string { return proto.CompactTextString(m) } -func (*AuctionsResponse) ProtoMessage() {} -func (*AuctionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{1} -} -func (m *AuctionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuctionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuctionsResponse.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 *AuctionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuctionsResponse.Merge(m, src) -} -func (m *AuctionsResponse) XXX_Size() int { - return m.Size() -} -func (m *AuctionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuctionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuctionsResponse proto.InternalMessageInfo - -func (m *AuctionsResponse) GetId() *v11.AuctionId { - if m != nil { - return m.Id - } - return nil -} - -func (m *AuctionsResponse) GetAuction() *types.Any { - if m != nil { - return m.Auction - } - return nil -} - -func (m *AuctionsResponse) GetPositions() []*v12.Position { - if m != nil { - return m.Positions - } - return nil -} - -func (m *AuctionsResponse) GetNoteRecord() *SpendableNoteRecord { - if m != nil { - return m.NoteRecord - } - return nil -} - -func (m *AuctionsResponse) GetLocalSeq() uint64 { - if m != nil { - return m.LocalSeq - } - return 0 -} - -type AuthorizeAndBuildRequest struct { - // The transaction plan to authorize and build. - TransactionPlan *v13.TransactionPlan `protobuf:"bytes,1,opt,name=transaction_plan,json=transactionPlan,proto3" json:"transaction_plan,omitempty"` -} - -func (m *AuthorizeAndBuildRequest) Reset() { *m = AuthorizeAndBuildRequest{} } -func (m *AuthorizeAndBuildRequest) String() string { return proto.CompactTextString(m) } -func (*AuthorizeAndBuildRequest) ProtoMessage() {} -func (*AuthorizeAndBuildRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{2} -} -func (m *AuthorizeAndBuildRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeAndBuildRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeAndBuildRequest.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 *AuthorizeAndBuildRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeAndBuildRequest.Merge(m, src) -} -func (m *AuthorizeAndBuildRequest) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeAndBuildRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeAndBuildRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeAndBuildRequest proto.InternalMessageInfo - -func (m *AuthorizeAndBuildRequest) GetTransactionPlan() *v13.TransactionPlan { - if m != nil { - return m.TransactionPlan - } - return nil -} - -type AuthorizeAndBuildResponse struct { - // Types that are valid to be assigned to Status: - // *AuthorizeAndBuildResponse_BuildProgress_ - // *AuthorizeAndBuildResponse_Complete_ - Status isAuthorizeAndBuildResponse_Status `protobuf_oneof:"status"` -} - -func (m *AuthorizeAndBuildResponse) Reset() { *m = AuthorizeAndBuildResponse{} } -func (m *AuthorizeAndBuildResponse) String() string { return proto.CompactTextString(m) } -func (*AuthorizeAndBuildResponse) ProtoMessage() {} -func (*AuthorizeAndBuildResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{3} -} -func (m *AuthorizeAndBuildResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeAndBuildResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeAndBuildResponse.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 *AuthorizeAndBuildResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeAndBuildResponse.Merge(m, src) -} -func (m *AuthorizeAndBuildResponse) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeAndBuildResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeAndBuildResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeAndBuildResponse proto.InternalMessageInfo - -type isAuthorizeAndBuildResponse_Status interface { - isAuthorizeAndBuildResponse_Status() - MarshalTo([]byte) (int, error) - Size() int -} - -type AuthorizeAndBuildResponse_BuildProgress_ struct { - BuildProgress *AuthorizeAndBuildResponse_BuildProgress `protobuf:"bytes,1,opt,name=build_progress,json=buildProgress,proto3,oneof" json:"build_progress,omitempty"` -} -type AuthorizeAndBuildResponse_Complete_ struct { - Complete *AuthorizeAndBuildResponse_Complete `protobuf:"bytes,2,opt,name=complete,proto3,oneof" json:"complete,omitempty"` -} - -func (*AuthorizeAndBuildResponse_BuildProgress_) isAuthorizeAndBuildResponse_Status() {} -func (*AuthorizeAndBuildResponse_Complete_) isAuthorizeAndBuildResponse_Status() {} - -func (m *AuthorizeAndBuildResponse) GetStatus() isAuthorizeAndBuildResponse_Status { - if m != nil { - return m.Status - } - return nil -} - -func (m *AuthorizeAndBuildResponse) GetBuildProgress() *AuthorizeAndBuildResponse_BuildProgress { - if x, ok := m.GetStatus().(*AuthorizeAndBuildResponse_BuildProgress_); ok { - return x.BuildProgress - } - return nil -} - -func (m *AuthorizeAndBuildResponse) GetComplete() *AuthorizeAndBuildResponse_Complete { - if x, ok := m.GetStatus().(*AuthorizeAndBuildResponse_Complete_); ok { - return x.Complete - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AuthorizeAndBuildResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AuthorizeAndBuildResponse_BuildProgress_)(nil), - (*AuthorizeAndBuildResponse_Complete_)(nil), - } -} - -// Signals that building is in progress. -type AuthorizeAndBuildResponse_BuildProgress struct { - // An approximate progress of the build, from 0 to 1. - Progress float32 `protobuf:"fixed32,1,opt,name=progress,proto3" json:"progress,omitempty"` -} - -func (m *AuthorizeAndBuildResponse_BuildProgress) Reset() { - *m = AuthorizeAndBuildResponse_BuildProgress{} -} -func (m *AuthorizeAndBuildResponse_BuildProgress) String() string { return proto.CompactTextString(m) } -func (*AuthorizeAndBuildResponse_BuildProgress) ProtoMessage() {} -func (*AuthorizeAndBuildResponse_BuildProgress) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{3, 0} -} -func (m *AuthorizeAndBuildResponse_BuildProgress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeAndBuildResponse_BuildProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeAndBuildResponse_BuildProgress.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 *AuthorizeAndBuildResponse_BuildProgress) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeAndBuildResponse_BuildProgress.Merge(m, src) -} -func (m *AuthorizeAndBuildResponse_BuildProgress) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeAndBuildResponse_BuildProgress) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeAndBuildResponse_BuildProgress.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeAndBuildResponse_BuildProgress proto.InternalMessageInfo - -func (m *AuthorizeAndBuildResponse_BuildProgress) GetProgress() float32 { - if m != nil { - return m.Progress - } - return 0 -} - -// Signals that the transaction is complete. -type AuthorizeAndBuildResponse_Complete struct { - // The finished transaction. - Transaction *v13.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` -} - -func (m *AuthorizeAndBuildResponse_Complete) Reset() { *m = AuthorizeAndBuildResponse_Complete{} } -func (m *AuthorizeAndBuildResponse_Complete) String() string { return proto.CompactTextString(m) } -func (*AuthorizeAndBuildResponse_Complete) ProtoMessage() {} -func (*AuthorizeAndBuildResponse_Complete) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{3, 1} -} -func (m *AuthorizeAndBuildResponse_Complete) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizeAndBuildResponse_Complete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizeAndBuildResponse_Complete.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 *AuthorizeAndBuildResponse_Complete) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizeAndBuildResponse_Complete.Merge(m, src) -} -func (m *AuthorizeAndBuildResponse_Complete) XXX_Size() int { - return m.Size() -} -func (m *AuthorizeAndBuildResponse_Complete) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizeAndBuildResponse_Complete.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizeAndBuildResponse_Complete proto.InternalMessageInfo - -func (m *AuthorizeAndBuildResponse_Complete) GetTransaction() *v13.Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -type BroadcastTransactionRequest struct { - // The transaction to broadcast. - Transaction *v13.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` - // If true, wait for the view service to detect the transaction during sync. - AwaitDetection bool `protobuf:"varint,2,opt,name=await_detection,json=awaitDetection,proto3" json:"await_detection,omitempty"` -} - -func (m *BroadcastTransactionRequest) Reset() { *m = BroadcastTransactionRequest{} } -func (m *BroadcastTransactionRequest) String() string { return proto.CompactTextString(m) } -func (*BroadcastTransactionRequest) ProtoMessage() {} -func (*BroadcastTransactionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{4} -} -func (m *BroadcastTransactionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTransactionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTransactionRequest.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 *BroadcastTransactionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTransactionRequest.Merge(m, src) -} -func (m *BroadcastTransactionRequest) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTransactionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTransactionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTransactionRequest proto.InternalMessageInfo - -func (m *BroadcastTransactionRequest) GetTransaction() *v13.Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *BroadcastTransactionRequest) GetAwaitDetection() bool { - if m != nil { - return m.AwaitDetection - } - return false -} - -type BroadcastTransactionResponse struct { - // Types that are valid to be assigned to Status: - // *BroadcastTransactionResponse_BroadcastSuccess_ - // *BroadcastTransactionResponse_Confirmed_ - Status isBroadcastTransactionResponse_Status `protobuf_oneof:"status"` -} - -func (m *BroadcastTransactionResponse) Reset() { *m = BroadcastTransactionResponse{} } -func (m *BroadcastTransactionResponse) String() string { return proto.CompactTextString(m) } -func (*BroadcastTransactionResponse) ProtoMessage() {} -func (*BroadcastTransactionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{5} -} -func (m *BroadcastTransactionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTransactionResponse.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 *BroadcastTransactionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTransactionResponse.Merge(m, src) -} -func (m *BroadcastTransactionResponse) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTransactionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTransactionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTransactionResponse proto.InternalMessageInfo - -type isBroadcastTransactionResponse_Status interface { - isBroadcastTransactionResponse_Status() - MarshalTo([]byte) (int, error) - Size() int -} - -type BroadcastTransactionResponse_BroadcastSuccess_ struct { - BroadcastSuccess *BroadcastTransactionResponse_BroadcastSuccess `protobuf:"bytes,1,opt,name=broadcast_success,json=broadcastSuccess,proto3,oneof" json:"broadcast_success,omitempty"` -} -type BroadcastTransactionResponse_Confirmed_ struct { - Confirmed *BroadcastTransactionResponse_Confirmed `protobuf:"bytes,2,opt,name=confirmed,proto3,oneof" json:"confirmed,omitempty"` -} - -func (*BroadcastTransactionResponse_BroadcastSuccess_) isBroadcastTransactionResponse_Status() {} -func (*BroadcastTransactionResponse_Confirmed_) isBroadcastTransactionResponse_Status() {} - -func (m *BroadcastTransactionResponse) GetStatus() isBroadcastTransactionResponse_Status { - if m != nil { - return m.Status - } - return nil -} - -func (m *BroadcastTransactionResponse) GetBroadcastSuccess() *BroadcastTransactionResponse_BroadcastSuccess { - if x, ok := m.GetStatus().(*BroadcastTransactionResponse_BroadcastSuccess_); ok { - return x.BroadcastSuccess - } - return nil -} - -func (m *BroadcastTransactionResponse) GetConfirmed() *BroadcastTransactionResponse_Confirmed { - if x, ok := m.GetStatus().(*BroadcastTransactionResponse_Confirmed_); ok { - return x.Confirmed - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*BroadcastTransactionResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*BroadcastTransactionResponse_BroadcastSuccess_)(nil), - (*BroadcastTransactionResponse_Confirmed_)(nil), - } -} - -// Signals that the transaction was broadcast successfully (but has not been confirmed). -type BroadcastTransactionResponse_BroadcastSuccess struct { - // The hash of the transaction that was broadcast. - Id *v14.TransactionId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *BroadcastTransactionResponse_BroadcastSuccess) Reset() { - *m = BroadcastTransactionResponse_BroadcastSuccess{} -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) String() string { - return proto.CompactTextString(m) -} -func (*BroadcastTransactionResponse_BroadcastSuccess) ProtoMessage() {} -func (*BroadcastTransactionResponse_BroadcastSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{5, 0} -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTransactionResponse_BroadcastSuccess.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 *BroadcastTransactionResponse_BroadcastSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTransactionResponse_BroadcastSuccess.Merge(m, src) -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTransactionResponse_BroadcastSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTransactionResponse_BroadcastSuccess proto.InternalMessageInfo - -func (m *BroadcastTransactionResponse_BroadcastSuccess) GetId() *v14.TransactionId { - if m != nil { - return m.Id - } - return nil -} - -// Signals that the transaction has been confirmed on-chain and detected by the view server. -// -// Will not be sent unless await_detection was true. -type BroadcastTransactionResponse_Confirmed struct { - // The hash of the transaction that was broadcast. - Id *v14.TransactionId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The height in which the transaction was detected as included in the chain, if any. - DetectionHeight uint64 `protobuf:"varint,2,opt,name=detection_height,json=detectionHeight,proto3" json:"detection_height,omitempty"` -} - -func (m *BroadcastTransactionResponse_Confirmed) Reset() { - *m = BroadcastTransactionResponse_Confirmed{} -} -func (m *BroadcastTransactionResponse_Confirmed) String() string { return proto.CompactTextString(m) } -func (*BroadcastTransactionResponse_Confirmed) ProtoMessage() {} -func (*BroadcastTransactionResponse_Confirmed) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{5, 1} -} -func (m *BroadcastTransactionResponse_Confirmed) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BroadcastTransactionResponse_Confirmed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BroadcastTransactionResponse_Confirmed.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 *BroadcastTransactionResponse_Confirmed) XXX_Merge(src proto.Message) { - xxx_messageInfo_BroadcastTransactionResponse_Confirmed.Merge(m, src) -} -func (m *BroadcastTransactionResponse_Confirmed) XXX_Size() int { - return m.Size() -} -func (m *BroadcastTransactionResponse_Confirmed) XXX_DiscardUnknown() { - xxx_messageInfo_BroadcastTransactionResponse_Confirmed.DiscardUnknown(m) -} - -var xxx_messageInfo_BroadcastTransactionResponse_Confirmed proto.InternalMessageInfo - -func (m *BroadcastTransactionResponse_Confirmed) GetId() *v14.TransactionId { - if m != nil { - return m.Id - } - return nil -} - -func (m *BroadcastTransactionResponse_Confirmed) GetDetectionHeight() uint64 { - if m != nil { - return m.DetectionHeight - } - return 0 -} - -type TransactionPlannerRequest struct { - // The expiry height for the requested TransactionPlan - ExpiryHeight uint64 `protobuf:"varint,1,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` - // The memo for the requested TransactionPlan. - // The memo must be unspecified unless `outputs` is nonempty. - Memo *v13.MemoPlaintext `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` - // If present, only spends funds from the given account. - Source *v1.AddressIndex `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` - // Request contents - Outputs []*TransactionPlannerRequest_Output `protobuf:"bytes,20,rep,name=outputs,proto3" json:"outputs,omitempty"` - Spends []*TransactionPlannerRequest_Spend `protobuf:"bytes,21,rep,name=spends,proto3" json:"spends,omitempty"` - Swaps []*TransactionPlannerRequest_Swap `protobuf:"bytes,30,rep,name=swaps,proto3" json:"swaps,omitempty"` - SwapClaims []*TransactionPlannerRequest_SwapClaim `protobuf:"bytes,31,rep,name=swap_claims,json=swapClaims,proto3" json:"swap_claims,omitempty"` - Delegations []*TransactionPlannerRequest_Delegate `protobuf:"bytes,40,rep,name=delegations,proto3" json:"delegations,omitempty"` - Undelegations []*TransactionPlannerRequest_Undelegate `protobuf:"bytes,50,rep,name=undelegations,proto3" json:"undelegations,omitempty"` - UndelegationClaims []*TransactionPlannerRequest_UndelegateClaim `protobuf:"bytes,51,rep,name=undelegation_claims,json=undelegationClaims,proto3" json:"undelegation_claims,omitempty"` - IbcRelayActions []*v15.IbcRelay `protobuf:"bytes,60,rep,name=ibc_relay_actions,json=ibcRelayActions,proto3" json:"ibc_relay_actions,omitempty"` - Ics20Withdrawals []*v15.Ics20Withdrawal `protobuf:"bytes,61,rep,name=ics20_withdrawals,json=ics20Withdrawals,proto3" json:"ics20_withdrawals,omitempty"` - PositionOpens []*TransactionPlannerRequest_PositionOpen `protobuf:"bytes,70,rep,name=position_opens,json=positionOpens,proto3" json:"position_opens,omitempty"` - PositionCloses []*TransactionPlannerRequest_PositionClose `protobuf:"bytes,71,rep,name=position_closes,json=positionCloses,proto3" json:"position_closes,omitempty"` - PositionWithdraws []*TransactionPlannerRequest_PositionWithdraw `protobuf:"bytes,72,rep,name=position_withdraws,json=positionWithdraws,proto3" json:"position_withdraws,omitempty"` - DutchAuctionScheduleActions []*TransactionPlannerRequest_ActionDutchAuctionSchedule `protobuf:"bytes,73,rep,name=dutch_auction_schedule_actions,json=dutchAuctionScheduleActions,proto3" json:"dutch_auction_schedule_actions,omitempty"` - DutchAuctionEndActions []*TransactionPlannerRequest_ActionDutchAuctionEnd `protobuf:"bytes,74,rep,name=dutch_auction_end_actions,json=dutchAuctionEndActions,proto3" json:"dutch_auction_end_actions,omitempty"` - DutchAuctionWithdrawActions []*TransactionPlannerRequest_ActionDutchAuctionWithdraw `protobuf:"bytes,75,rep,name=dutch_auction_withdraw_actions,json=dutchAuctionWithdrawActions,proto3" json:"dutch_auction_withdraw_actions,omitempty"` - // Specifies either that the planner should compute fees automatically or that it should use a fixed fee amount. - // - // Types that are valid to be assigned to FeeMode: - // *TransactionPlannerRequest_AutoFee - // *TransactionPlannerRequest_ManualFee - FeeMode isTransactionPlannerRequest_FeeMode `protobuf_oneof:"fee_mode"` - // The epoch index of the transaction being planned. - EpochIndex uint64 `protobuf:"varint,200,opt,name=epoch_index,json=epochIndex,proto3" json:"epoch_index,omitempty"` // Deprecated: Do not use. - // The epoch of the transaction being planned. - Epoch *v17.Epoch `protobuf:"bytes,201,opt,name=epoch,proto3" json:"epoch,omitempty"` -} - -func (m *TransactionPlannerRequest) Reset() { *m = TransactionPlannerRequest{} } -func (m *TransactionPlannerRequest) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest) ProtoMessage() {} -func (*TransactionPlannerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6} -} -func (m *TransactionPlannerRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest.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 *TransactionPlannerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest.Merge(m, src) -} -func (m *TransactionPlannerRequest) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest proto.InternalMessageInfo - -type isTransactionPlannerRequest_FeeMode interface { - isTransactionPlannerRequest_FeeMode() - MarshalTo([]byte) (int, error) - Size() int -} - -type TransactionPlannerRequest_AutoFee struct { - AutoFee *v16.FeeTier `protobuf:"bytes,100,opt,name=auto_fee,json=autoFee,proto3,oneof" json:"auto_fee,omitempty"` -} -type TransactionPlannerRequest_ManualFee struct { - ManualFee *v16.Fee `protobuf:"bytes,101,opt,name=manual_fee,json=manualFee,proto3,oneof" json:"manual_fee,omitempty"` -} - -func (*TransactionPlannerRequest_AutoFee) isTransactionPlannerRequest_FeeMode() {} -func (*TransactionPlannerRequest_ManualFee) isTransactionPlannerRequest_FeeMode() {} - -func (m *TransactionPlannerRequest) GetFeeMode() isTransactionPlannerRequest_FeeMode { - if m != nil { - return m.FeeMode - } - return nil -} - -func (m *TransactionPlannerRequest) GetExpiryHeight() uint64 { - if m != nil { - return m.ExpiryHeight - } - return 0 -} - -func (m *TransactionPlannerRequest) GetMemo() *v13.MemoPlaintext { - if m != nil { - return m.Memo - } - return nil -} - -func (m *TransactionPlannerRequest) GetSource() *v1.AddressIndex { - if m != nil { - return m.Source - } - return nil -} - -func (m *TransactionPlannerRequest) GetOutputs() []*TransactionPlannerRequest_Output { - if m != nil { - return m.Outputs - } - return nil -} - -func (m *TransactionPlannerRequest) GetSpends() []*TransactionPlannerRequest_Spend { - if m != nil { - return m.Spends - } - return nil -} - -func (m *TransactionPlannerRequest) GetSwaps() []*TransactionPlannerRequest_Swap { - if m != nil { - return m.Swaps - } - return nil -} - -func (m *TransactionPlannerRequest) GetSwapClaims() []*TransactionPlannerRequest_SwapClaim { - if m != nil { - return m.SwapClaims - } - return nil -} - -func (m *TransactionPlannerRequest) GetDelegations() []*TransactionPlannerRequest_Delegate { - if m != nil { - return m.Delegations - } - return nil -} - -func (m *TransactionPlannerRequest) GetUndelegations() []*TransactionPlannerRequest_Undelegate { - if m != nil { - return m.Undelegations - } - return nil -} - -func (m *TransactionPlannerRequest) GetUndelegationClaims() []*TransactionPlannerRequest_UndelegateClaim { - if m != nil { - return m.UndelegationClaims - } - return nil -} - -func (m *TransactionPlannerRequest) GetIbcRelayActions() []*v15.IbcRelay { - if m != nil { - return m.IbcRelayActions - } - return nil -} - -func (m *TransactionPlannerRequest) GetIcs20Withdrawals() []*v15.Ics20Withdrawal { - if m != nil { - return m.Ics20Withdrawals - } - return nil -} - -func (m *TransactionPlannerRequest) GetPositionOpens() []*TransactionPlannerRequest_PositionOpen { - if m != nil { - return m.PositionOpens - } - return nil -} - -func (m *TransactionPlannerRequest) GetPositionCloses() []*TransactionPlannerRequest_PositionClose { - if m != nil { - return m.PositionCloses - } - return nil -} - -func (m *TransactionPlannerRequest) GetPositionWithdraws() []*TransactionPlannerRequest_PositionWithdraw { - if m != nil { - return m.PositionWithdraws - } - return nil -} - -func (m *TransactionPlannerRequest) GetDutchAuctionScheduleActions() []*TransactionPlannerRequest_ActionDutchAuctionSchedule { - if m != nil { - return m.DutchAuctionScheduleActions - } - return nil -} - -func (m *TransactionPlannerRequest) GetDutchAuctionEndActions() []*TransactionPlannerRequest_ActionDutchAuctionEnd { - if m != nil { - return m.DutchAuctionEndActions - } - return nil -} - -func (m *TransactionPlannerRequest) GetDutchAuctionWithdrawActions() []*TransactionPlannerRequest_ActionDutchAuctionWithdraw { - if m != nil { - return m.DutchAuctionWithdrawActions - } - return nil -} - -func (m *TransactionPlannerRequest) GetAutoFee() *v16.FeeTier { - if x, ok := m.GetFeeMode().(*TransactionPlannerRequest_AutoFee); ok { - return x.AutoFee - } - return nil -} - -func (m *TransactionPlannerRequest) GetManualFee() *v16.Fee { - if x, ok := m.GetFeeMode().(*TransactionPlannerRequest_ManualFee); ok { - return x.ManualFee - } - return nil -} - -// Deprecated: Do not use. -func (m *TransactionPlannerRequest) GetEpochIndex() uint64 { - if m != nil { - return m.EpochIndex - } - return 0 -} - -func (m *TransactionPlannerRequest) GetEpoch() *v17.Epoch { - if m != nil { - return m.Epoch - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TransactionPlannerRequest) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TransactionPlannerRequest_AutoFee)(nil), - (*TransactionPlannerRequest_ManualFee)(nil), - } -} - -// Request message subtypes -type TransactionPlannerRequest_Output struct { - // The amount and denomination in which the Output is issued. - Value *v18.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // The address to which Output will be sent. - Address *v1.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *TransactionPlannerRequest_Output) Reset() { *m = TransactionPlannerRequest_Output{} } -func (m *TransactionPlannerRequest_Output) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_Output) ProtoMessage() {} -func (*TransactionPlannerRequest_Output) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 0} -} -func (m *TransactionPlannerRequest_Output) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_Output.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 *TransactionPlannerRequest_Output) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_Output.Merge(m, src) -} -func (m *TransactionPlannerRequest_Output) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_Output) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_Output.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_Output proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_Output) GetValue() *v18.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *TransactionPlannerRequest_Output) GetAddress() *v1.Address { - if m != nil { - return m.Address - } - return nil -} - -type TransactionPlannerRequest_Spend struct { - // The input amount and denomination in which the Spend is issued. - Value *v18.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // The source address from which the Spend will be sent. - Address *v1.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *TransactionPlannerRequest_Spend) Reset() { *m = TransactionPlannerRequest_Spend{} } -func (m *TransactionPlannerRequest_Spend) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_Spend) ProtoMessage() {} -func (*TransactionPlannerRequest_Spend) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 1} -} -func (m *TransactionPlannerRequest_Spend) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_Spend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_Spend.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 *TransactionPlannerRequest_Spend) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_Spend.Merge(m, src) -} -func (m *TransactionPlannerRequest_Spend) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_Spend) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_Spend.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_Spend proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_Spend) GetValue() *v18.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *TransactionPlannerRequest_Spend) GetAddress() *v1.Address { - if m != nil { - return m.Address - } - return nil -} - -type TransactionPlannerRequest_Swap struct { - // The input amount and denomination to be traded in the Swap. - Value *v18.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // The denomination to be received as a Output of the Swap. - TargetAsset *v18.AssetId `protobuf:"bytes,2,opt,name=target_asset,json=targetAsset,proto3" json:"target_asset,omitempty"` - // The pre-paid fee to be paid for claiming the Swap outputs. - Fee *v16.Fee `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"` - // The address to which swap claim output will be sent. - ClaimAddress *v1.Address `protobuf:"bytes,4,opt,name=claim_address,json=claimAddress,proto3" json:"claim_address,omitempty"` -} - -func (m *TransactionPlannerRequest_Swap) Reset() { *m = TransactionPlannerRequest_Swap{} } -func (m *TransactionPlannerRequest_Swap) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_Swap) ProtoMessage() {} -func (*TransactionPlannerRequest_Swap) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 2} -} -func (m *TransactionPlannerRequest_Swap) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_Swap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_Swap.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 *TransactionPlannerRequest_Swap) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_Swap.Merge(m, src) -} -func (m *TransactionPlannerRequest_Swap) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_Swap) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_Swap.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_Swap proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_Swap) GetValue() *v18.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *TransactionPlannerRequest_Swap) GetTargetAsset() *v18.AssetId { - if m != nil { - return m.TargetAsset - } - return nil -} - -func (m *TransactionPlannerRequest_Swap) GetFee() *v16.Fee { - if m != nil { - return m.Fee - } - return nil -} - -func (m *TransactionPlannerRequest_Swap) GetClaimAddress() *v1.Address { - if m != nil { - return m.ClaimAddress - } - return nil -} - -type TransactionPlannerRequest_SwapClaim struct { - // SwapCommitment to identify the Swap to be claimed. - // Use the commitment from the Swap message: - // penumbra.core.component.dex.v1.Swap.body.payload.commitment. - SwapCommitment *v19.StateCommitment `protobuf:"bytes,1,opt,name=swap_commitment,json=swapCommitment,proto3" json:"swap_commitment,omitempty"` -} - -func (m *TransactionPlannerRequest_SwapClaim) Reset() { *m = TransactionPlannerRequest_SwapClaim{} } -func (m *TransactionPlannerRequest_SwapClaim) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_SwapClaim) ProtoMessage() {} -func (*TransactionPlannerRequest_SwapClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 3} -} -func (m *TransactionPlannerRequest_SwapClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_SwapClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_SwapClaim.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 *TransactionPlannerRequest_SwapClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_SwapClaim.Merge(m, src) -} -func (m *TransactionPlannerRequest_SwapClaim) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_SwapClaim) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_SwapClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_SwapClaim proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_SwapClaim) GetSwapCommitment() *v19.StateCommitment { - if m != nil { - return m.SwapCommitment - } - return nil -} - -type TransactionPlannerRequest_Delegate struct { - Amount *v110.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` - RateData *v111.RateData `protobuf:"bytes,3,opt,name=rate_data,json=rateData,proto3" json:"rate_data,omitempty"` -} - -func (m *TransactionPlannerRequest_Delegate) Reset() { *m = TransactionPlannerRequest_Delegate{} } -func (m *TransactionPlannerRequest_Delegate) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_Delegate) ProtoMessage() {} -func (*TransactionPlannerRequest_Delegate) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 4} -} -func (m *TransactionPlannerRequest_Delegate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_Delegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_Delegate.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 *TransactionPlannerRequest_Delegate) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_Delegate.Merge(m, src) -} -func (m *TransactionPlannerRequest_Delegate) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_Delegate) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_Delegate.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_Delegate proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_Delegate) GetAmount() *v110.Amount { - if m != nil { - return m.Amount - } - return nil -} - -func (m *TransactionPlannerRequest_Delegate) GetRateData() *v111.RateData { - if m != nil { - return m.RateData - } - return nil -} - -type TransactionPlannerRequest_Undelegate struct { - Value *v18.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - RateData *v111.RateData `protobuf:"bytes,2,opt,name=rate_data,json=rateData,proto3" json:"rate_data,omitempty"` -} - -func (m *TransactionPlannerRequest_Undelegate) Reset() { *m = TransactionPlannerRequest_Undelegate{} } -func (m *TransactionPlannerRequest_Undelegate) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_Undelegate) ProtoMessage() {} -func (*TransactionPlannerRequest_Undelegate) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 5} -} -func (m *TransactionPlannerRequest_Undelegate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_Undelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_Undelegate.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 *TransactionPlannerRequest_Undelegate) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_Undelegate.Merge(m, src) -} -func (m *TransactionPlannerRequest_Undelegate) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_Undelegate) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_Undelegate.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_Undelegate proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_Undelegate) GetValue() *v18.Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *TransactionPlannerRequest_Undelegate) GetRateData() *v111.RateData { - if m != nil { - return m.RateData - } - return nil -} - -type TransactionPlannerRequest_UndelegateClaim struct { - // The identity key of the validator to finish undelegating from. - ValidatorIdentity *v1.IdentityKey `protobuf:"bytes,1,opt,name=validator_identity,json=validatorIdentity,proto3" json:"validator_identity,omitempty"` - // The epoch in which unbonding began, used to verify the penalty. - StartEpochIndex uint64 `protobuf:"varint,2,opt,name=start_epoch_index,json=startEpochIndex,proto3" json:"start_epoch_index,omitempty"` // Deprecated: Do not use. - // The penalty applied to undelegation, in bps^2 (10e-8). - // In the happy path (no slashing), this is 0. - Penalty *v111.Penalty `protobuf:"bytes,3,opt,name=penalty,proto3" json:"penalty,omitempty"` - // The amount of unbonding tokens to claim. - // This is a bare number because its denom is determined by the preceding data. - UnbondingAmount *v110.Amount `protobuf:"bytes,4,opt,name=unbonding_amount,json=unbondingAmount,proto3" json:"unbonding_amount,omitempty"` - // The height at which unbonding began. - UnbondingStartHeight uint64 `protobuf:"varint,5,opt,name=unbonding_start_height,json=unbondingStartHeight,proto3" json:"unbonding_start_height,omitempty"` -} - -func (m *TransactionPlannerRequest_UndelegateClaim) Reset() { - *m = TransactionPlannerRequest_UndelegateClaim{} -} -func (m *TransactionPlannerRequest_UndelegateClaim) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPlannerRequest_UndelegateClaim) ProtoMessage() {} -func (*TransactionPlannerRequest_UndelegateClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 6} -} -func (m *TransactionPlannerRequest_UndelegateClaim) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_UndelegateClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_UndelegateClaim.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 *TransactionPlannerRequest_UndelegateClaim) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_UndelegateClaim.Merge(m, src) -} -func (m *TransactionPlannerRequest_UndelegateClaim) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_UndelegateClaim) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_UndelegateClaim.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_UndelegateClaim proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_UndelegateClaim) GetValidatorIdentity() *v1.IdentityKey { - if m != nil { - return m.ValidatorIdentity - } - return nil -} - -// Deprecated: Do not use. -func (m *TransactionPlannerRequest_UndelegateClaim) GetStartEpochIndex() uint64 { - if m != nil { - return m.StartEpochIndex - } - return 0 -} - -func (m *TransactionPlannerRequest_UndelegateClaim) GetPenalty() *v111.Penalty { - if m != nil { - return m.Penalty - } - return nil -} - -func (m *TransactionPlannerRequest_UndelegateClaim) GetUnbondingAmount() *v110.Amount { - if m != nil { - return m.UnbondingAmount - } - return nil -} - -func (m *TransactionPlannerRequest_UndelegateClaim) GetUnbondingStartHeight() uint64 { - if m != nil { - return m.UnbondingStartHeight - } - return 0 -} - -type TransactionPlannerRequest_PositionOpen struct { - // Contains the data defining the position, sufficient to compute its `PositionId`. - // - // Positions are immutable, so the `PositionData` (and hence the `PositionId`) - // are unchanged over the entire lifetime of the position. - Position *v12.Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` -} - -func (m *TransactionPlannerRequest_PositionOpen) Reset() { - *m = TransactionPlannerRequest_PositionOpen{} -} -func (m *TransactionPlannerRequest_PositionOpen) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_PositionOpen) ProtoMessage() {} -func (*TransactionPlannerRequest_PositionOpen) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 7} -} -func (m *TransactionPlannerRequest_PositionOpen) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_PositionOpen) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_PositionOpen.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 *TransactionPlannerRequest_PositionOpen) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_PositionOpen.Merge(m, src) -} -func (m *TransactionPlannerRequest_PositionOpen) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_PositionOpen) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_PositionOpen.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_PositionOpen proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_PositionOpen) GetPosition() *v12.Position { - if m != nil { - return m.Position - } - return nil -} - -type TransactionPlannerRequest_PositionClose struct { - // The position to close. - PositionId *v12.PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` -} - -func (m *TransactionPlannerRequest_PositionClose) Reset() { - *m = TransactionPlannerRequest_PositionClose{} -} -func (m *TransactionPlannerRequest_PositionClose) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerRequest_PositionClose) ProtoMessage() {} -func (*TransactionPlannerRequest_PositionClose) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 8} -} -func (m *TransactionPlannerRequest_PositionClose) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_PositionClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_PositionClose.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 *TransactionPlannerRequest_PositionClose) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_PositionClose.Merge(m, src) -} -func (m *TransactionPlannerRequest_PositionClose) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_PositionClose) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_PositionClose.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_PositionClose proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_PositionClose) GetPositionId() *v12.PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -type TransactionPlannerRequest_PositionWithdraw struct { - // The position to withdraw. - PositionId *v12.PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` - // The position's final reserves. - Reserves *v12.Reserves `protobuf:"bytes,2,opt,name=reserves,proto3" json:"reserves,omitempty"` - // The trading pair of the position. - TradingPair *v12.TradingPair `protobuf:"bytes,3,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` -} - -func (m *TransactionPlannerRequest_PositionWithdraw) Reset() { - *m = TransactionPlannerRequest_PositionWithdraw{} -} -func (m *TransactionPlannerRequest_PositionWithdraw) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPlannerRequest_PositionWithdraw) ProtoMessage() {} -func (*TransactionPlannerRequest_PositionWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 9} -} -func (m *TransactionPlannerRequest_PositionWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_PositionWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_PositionWithdraw.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 *TransactionPlannerRequest_PositionWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_PositionWithdraw.Merge(m, src) -} -func (m *TransactionPlannerRequest_PositionWithdraw) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_PositionWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_PositionWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_PositionWithdraw proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_PositionWithdraw) GetPositionId() *v12.PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -func (m *TransactionPlannerRequest_PositionWithdraw) GetReserves() *v12.Reserves { - if m != nil { - return m.Reserves - } - return nil -} - -func (m *TransactionPlannerRequest_PositionWithdraw) GetTradingPair() *v12.TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -type TransactionPlannerRequest_ActionDutchAuctionSchedule struct { - // The description of the auction to schedule. - Description *v11.DutchAuctionDescription `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) Reset() { - *m = TransactionPlannerRequest_ActionDutchAuctionSchedule{} -} -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPlannerRequest_ActionDutchAuctionSchedule) ProtoMessage() {} -func (*TransactionPlannerRequest_ActionDutchAuctionSchedule) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 10} -} -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionSchedule.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 *TransactionPlannerRequest_ActionDutchAuctionSchedule) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionSchedule.Merge(m, src) -} -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionSchedule.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionSchedule proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) GetDescription() *v11.DutchAuctionDescription { - if m != nil { - return m.Description - } - return nil -} - -type TransactionPlannerRequest_ActionDutchAuctionEnd struct { - // The unique id of the auction to close. - AuctionId *v11.AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) Reset() { - *m = TransactionPlannerRequest_ActionDutchAuctionEnd{} -} -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPlannerRequest_ActionDutchAuctionEnd) ProtoMessage() {} -func (*TransactionPlannerRequest_ActionDutchAuctionEnd) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 11} -} -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionEnd.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 *TransactionPlannerRequest_ActionDutchAuctionEnd) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionEnd.Merge(m, src) -} -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionEnd.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionEnd proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) GetAuctionId() *v11.AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -type TransactionPlannerRequest_ActionDutchAuctionWithdraw struct { - // The auction to withdraw funds from. - AuctionId *v11.AuctionId `protobuf:"bytes,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` - // The sequence number of the withdrawal. - Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"` -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) Reset() { - *m = TransactionPlannerRequest_ActionDutchAuctionWithdraw{} -} -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) String() string { - return proto.CompactTextString(m) -} -func (*TransactionPlannerRequest_ActionDutchAuctionWithdraw) ProtoMessage() {} -func (*TransactionPlannerRequest_ActionDutchAuctionWithdraw) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{6, 12} -} -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionWithdraw.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 *TransactionPlannerRequest_ActionDutchAuctionWithdraw) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionWithdraw.Merge(m, src) -} -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionWithdraw.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerRequest_ActionDutchAuctionWithdraw proto.InternalMessageInfo - -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) GetAuctionId() *v11.AuctionId { - if m != nil { - return m.AuctionId - } - return nil -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) GetSeq() uint64 { - if m != nil { - return m.Seq - } - return 0 -} - -type TransactionPlannerResponse struct { - Plan *v13.TransactionPlan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` -} - -func (m *TransactionPlannerResponse) Reset() { *m = TransactionPlannerResponse{} } -func (m *TransactionPlannerResponse) String() string { return proto.CompactTextString(m) } -func (*TransactionPlannerResponse) ProtoMessage() {} -func (*TransactionPlannerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{7} -} -func (m *TransactionPlannerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionPlannerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionPlannerResponse.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 *TransactionPlannerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionPlannerResponse.Merge(m, src) -} -func (m *TransactionPlannerResponse) XXX_Size() int { - return m.Size() -} -func (m *TransactionPlannerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionPlannerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionPlannerResponse proto.InternalMessageInfo - -func (m *TransactionPlannerResponse) GetPlan() *v13.TransactionPlan { - if m != nil { - return m.Plan - } - return nil -} - -type AddressByIndexRequest struct { - AddressIndex *v1.AddressIndex `protobuf:"bytes,1,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` -} - -func (m *AddressByIndexRequest) Reset() { *m = AddressByIndexRequest{} } -func (m *AddressByIndexRequest) String() string { return proto.CompactTextString(m) } -func (*AddressByIndexRequest) ProtoMessage() {} -func (*AddressByIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{8} -} -func (m *AddressByIndexRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressByIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressByIndexRequest.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 *AddressByIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressByIndexRequest.Merge(m, src) -} -func (m *AddressByIndexRequest) XXX_Size() int { - return m.Size() -} -func (m *AddressByIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddressByIndexRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressByIndexRequest proto.InternalMessageInfo - -func (m *AddressByIndexRequest) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -type AddressByIndexResponse struct { - Address *v1.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *AddressByIndexResponse) Reset() { *m = AddressByIndexResponse{} } -func (m *AddressByIndexResponse) String() string { return proto.CompactTextString(m) } -func (*AddressByIndexResponse) ProtoMessage() {} -func (*AddressByIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{9} -} -func (m *AddressByIndexResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressByIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressByIndexResponse.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 *AddressByIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressByIndexResponse.Merge(m, src) -} -func (m *AddressByIndexResponse) XXX_Size() int { - return m.Size() -} -func (m *AddressByIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddressByIndexResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressByIndexResponse proto.InternalMessageInfo - -func (m *AddressByIndexResponse) GetAddress() *v1.Address { - if m != nil { - return m.Address - } - return nil -} - -type WalletIdRequest struct { -} - -func (m *WalletIdRequest) Reset() { *m = WalletIdRequest{} } -func (m *WalletIdRequest) String() string { return proto.CompactTextString(m) } -func (*WalletIdRequest) ProtoMessage() {} -func (*WalletIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{10} -} -func (m *WalletIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletIdRequest.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 *WalletIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletIdRequest.Merge(m, src) -} -func (m *WalletIdRequest) XXX_Size() int { - return m.Size() -} -func (m *WalletIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WalletIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletIdRequest proto.InternalMessageInfo - -type WalletIdResponse struct { - WalletId *v1.WalletId `protobuf:"bytes,1,opt,name=wallet_id,json=walletId,proto3" json:"wallet_id,omitempty"` -} - -func (m *WalletIdResponse) Reset() { *m = WalletIdResponse{} } -func (m *WalletIdResponse) String() string { return proto.CompactTextString(m) } -func (*WalletIdResponse) ProtoMessage() {} -func (*WalletIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{11} -} -func (m *WalletIdResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WalletIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WalletIdResponse.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 *WalletIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WalletIdResponse.Merge(m, src) -} -func (m *WalletIdResponse) XXX_Size() int { - return m.Size() -} -func (m *WalletIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WalletIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WalletIdResponse proto.InternalMessageInfo - -func (m *WalletIdResponse) GetWalletId() *v1.WalletId { - if m != nil { - return m.WalletId - } - return nil -} - -type IndexByAddressRequest struct { - Address *v1.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *IndexByAddressRequest) Reset() { *m = IndexByAddressRequest{} } -func (m *IndexByAddressRequest) String() string { return proto.CompactTextString(m) } -func (*IndexByAddressRequest) ProtoMessage() {} -func (*IndexByAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{12} -} -func (m *IndexByAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IndexByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IndexByAddressRequest.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 *IndexByAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexByAddressRequest.Merge(m, src) -} -func (m *IndexByAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *IndexByAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IndexByAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexByAddressRequest proto.InternalMessageInfo - -func (m *IndexByAddressRequest) GetAddress() *v1.Address { - if m != nil { - return m.Address - } - return nil -} - -type IndexByAddressResponse struct { - // Will be absent if given an address not viewable by this viewing service - AddressIndex *v1.AddressIndex `protobuf:"bytes,1,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` -} - -func (m *IndexByAddressResponse) Reset() { *m = IndexByAddressResponse{} } -func (m *IndexByAddressResponse) String() string { return proto.CompactTextString(m) } -func (*IndexByAddressResponse) ProtoMessage() {} -func (*IndexByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{13} -} -func (m *IndexByAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IndexByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IndexByAddressResponse.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 *IndexByAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexByAddressResponse.Merge(m, src) -} -func (m *IndexByAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *IndexByAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IndexByAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexByAddressResponse proto.InternalMessageInfo - -func (m *IndexByAddressResponse) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -type EphemeralAddressRequest struct { - AddressIndex *v1.AddressIndex `protobuf:"bytes,1,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` -} - -func (m *EphemeralAddressRequest) Reset() { *m = EphemeralAddressRequest{} } -func (m *EphemeralAddressRequest) String() string { return proto.CompactTextString(m) } -func (*EphemeralAddressRequest) ProtoMessage() {} -func (*EphemeralAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{14} -} -func (m *EphemeralAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EphemeralAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EphemeralAddressRequest.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 *EphemeralAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EphemeralAddressRequest.Merge(m, src) -} -func (m *EphemeralAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *EphemeralAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EphemeralAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EphemeralAddressRequest proto.InternalMessageInfo - -func (m *EphemeralAddressRequest) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -type EphemeralAddressResponse struct { - Address *v1.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *EphemeralAddressResponse) Reset() { *m = EphemeralAddressResponse{} } -func (m *EphemeralAddressResponse) String() string { return proto.CompactTextString(m) } -func (*EphemeralAddressResponse) ProtoMessage() {} -func (*EphemeralAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{15} -} -func (m *EphemeralAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EphemeralAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EphemeralAddressResponse.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 *EphemeralAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EphemeralAddressResponse.Merge(m, src) -} -func (m *EphemeralAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *EphemeralAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EphemeralAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_EphemeralAddressResponse proto.InternalMessageInfo - -func (m *EphemeralAddressResponse) GetAddress() *v1.Address { - if m != nil { - return m.Address - } - return nil -} - -type BalancesRequest struct { - // If present, filter balances to only include the account specified by the `AddressIndex`. - AccountFilter *v1.AddressIndex `protobuf:"bytes,1,opt,name=account_filter,json=accountFilter,proto3" json:"account_filter,omitempty"` - // If present, filter balances to only include the specified asset ID. - AssetIdFilter *v18.AssetId `protobuf:"bytes,2,opt,name=asset_id_filter,json=assetIdFilter,proto3" json:"asset_id_filter,omitempty"` -} - -func (m *BalancesRequest) Reset() { *m = BalancesRequest{} } -func (m *BalancesRequest) String() string { return proto.CompactTextString(m) } -func (*BalancesRequest) ProtoMessage() {} -func (*BalancesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{16} -} -func (m *BalancesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BalancesRequest.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 *BalancesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BalancesRequest.Merge(m, src) -} -func (m *BalancesRequest) XXX_Size() int { - return m.Size() -} -func (m *BalancesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BalancesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BalancesRequest proto.InternalMessageInfo - -func (m *BalancesRequest) GetAccountFilter() *v1.AddressIndex { - if m != nil { - return m.AccountFilter - } - return nil -} - -func (m *BalancesRequest) GetAssetIdFilter() *v18.AssetId { - if m != nil { - return m.AssetIdFilter - } - return nil -} - -type BalancesResponse struct { - // Deprecated: use `account_address` instead. - Account *v1.AddressIndex `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // Deprecated: Do not use. - // Deprecated: use `balance_view` instead. - Balance *v18.Value `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` // Deprecated: Do not use. - // The default address for the account. - // - // Note that the returned balance is for all funds sent to the account, - // not just funds sent to its default address. - AccountAddress *v1.AddressView `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - // The account's balance, with metadata. - BalanceView *v18.ValueView `protobuf:"bytes,4,opt,name=balance_view,json=balanceView,proto3" json:"balance_view,omitempty"` -} - -func (m *BalancesResponse) Reset() { *m = BalancesResponse{} } -func (m *BalancesResponse) String() string { return proto.CompactTextString(m) } -func (*BalancesResponse) ProtoMessage() {} -func (*BalancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{17} -} -func (m *BalancesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BalancesResponse.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 *BalancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BalancesResponse.Merge(m, src) -} -func (m *BalancesResponse) XXX_Size() int { - return m.Size() -} -func (m *BalancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BalancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BalancesResponse proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *BalancesResponse) GetAccount() *v1.AddressIndex { - if m != nil { - return m.Account - } - return nil -} - -// Deprecated: Do not use. -func (m *BalancesResponse) GetBalance() *v18.Value { - if m != nil { - return m.Balance - } - return nil -} - -func (m *BalancesResponse) GetAccountAddress() *v1.AddressView { - if m != nil { - return m.AccountAddress - } - return nil -} - -func (m *BalancesResponse) GetBalanceView() *v18.ValueView { - if m != nil { - return m.BalanceView - } - return nil -} - -// Requests sync status of the view service. -type StatusRequest struct { -} - -func (m *StatusRequest) Reset() { *m = StatusRequest{} } -func (m *StatusRequest) String() string { return proto.CompactTextString(m) } -func (*StatusRequest) ProtoMessage() {} -func (*StatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{18} -} -func (m *StatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusRequest.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 *StatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusRequest.Merge(m, src) -} -func (m *StatusRequest) XXX_Size() int { - return m.Size() -} -func (m *StatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusRequest proto.InternalMessageInfo - -// Returns the status of the view service and whether it is synchronized with the chain state. -type StatusResponse struct { - // The height the view service has synchronized to so far when doing a full linear sync - FullSyncHeight uint64 `protobuf:"varint,1,opt,name=full_sync_height,json=fullSyncHeight,proto3" json:"full_sync_height,omitempty"` - // The height the view service has synchronized to so far when doing a partial sync - PartialSyncHeight uint64 `protobuf:"varint,2,opt,name=partial_sync_height,json=partialSyncHeight,proto3" json:"partial_sync_height,omitempty"` - // Whether the view service is catching up with the chain state - CatchingUp bool `protobuf:"varint,3,opt,name=catching_up,json=catchingUp,proto3" json:"catching_up,omitempty"` -} - -func (m *StatusResponse) Reset() { *m = StatusResponse{} } -func (m *StatusResponse) String() string { return proto.CompactTextString(m) } -func (*StatusResponse) ProtoMessage() {} -func (*StatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{19} -} -func (m *StatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusResponse.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 *StatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusResponse.Merge(m, src) -} -func (m *StatusResponse) XXX_Size() int { - return m.Size() -} -func (m *StatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusResponse proto.InternalMessageInfo - -func (m *StatusResponse) GetFullSyncHeight() uint64 { - if m != nil { - return m.FullSyncHeight - } - return 0 -} - -func (m *StatusResponse) GetPartialSyncHeight() uint64 { - if m != nil { - return m.PartialSyncHeight - } - return 0 -} - -func (m *StatusResponse) GetCatchingUp() bool { - if m != nil { - return m.CatchingUp - } - return false -} - -// Requests streaming updates on the sync height until the view service is synchronized. -type StatusStreamRequest struct { -} - -func (m *StatusStreamRequest) Reset() { *m = StatusStreamRequest{} } -func (m *StatusStreamRequest) String() string { return proto.CompactTextString(m) } -func (*StatusStreamRequest) ProtoMessage() {} -func (*StatusStreamRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{20} -} -func (m *StatusStreamRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusStreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusStreamRequest.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 *StatusStreamRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusStreamRequest.Merge(m, src) -} -func (m *StatusStreamRequest) XXX_Size() int { - return m.Size() -} -func (m *StatusStreamRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StatusStreamRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusStreamRequest proto.InternalMessageInfo - -// A streaming sync status update -type StatusStreamResponse struct { - // The latest known block height - LatestKnownBlockHeight uint64 `protobuf:"varint,1,opt,name=latest_known_block_height,json=latestKnownBlockHeight,proto3" json:"latest_known_block_height,omitempty"` - // The height the view service has synchronized to so far when doing a full linear sync - FullSyncHeight uint64 `protobuf:"varint,2,opt,name=full_sync_height,json=fullSyncHeight,proto3" json:"full_sync_height,omitempty"` - // The height the view service has synchronized to so far when doing a partial sync - PartialSyncHeight uint64 `protobuf:"varint,3,opt,name=partial_sync_height,json=partialSyncHeight,proto3" json:"partial_sync_height,omitempty"` -} - -func (m *StatusStreamResponse) Reset() { *m = StatusStreamResponse{} } -func (m *StatusStreamResponse) String() string { return proto.CompactTextString(m) } -func (*StatusStreamResponse) ProtoMessage() {} -func (*StatusStreamResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{21} -} -func (m *StatusStreamResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StatusStreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StatusStreamResponse.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 *StatusStreamResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusStreamResponse.Merge(m, src) -} -func (m *StatusStreamResponse) XXX_Size() int { - return m.Size() -} -func (m *StatusStreamResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StatusStreamResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusStreamResponse proto.InternalMessageInfo - -func (m *StatusStreamResponse) GetLatestKnownBlockHeight() uint64 { - if m != nil { - return m.LatestKnownBlockHeight - } - return 0 -} - -func (m *StatusStreamResponse) GetFullSyncHeight() uint64 { - if m != nil { - return m.FullSyncHeight - } - return 0 -} - -func (m *StatusStreamResponse) GetPartialSyncHeight() uint64 { - if m != nil { - return m.PartialSyncHeight - } - return 0 -} - -// A query for notes known by the view service. -// -// This message uses the fact that all proto fields are optional -// to allow various filtering on the returned notes. -type NotesRequest struct { - // If set, return spent notes as well as unspent notes. - IncludeSpent bool `protobuf:"varint,2,opt,name=include_spent,json=includeSpent,proto3" json:"include_spent,omitempty"` - // If set, only return notes with the specified asset id. - AssetId *v18.AssetId `protobuf:"bytes,3,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` - // If set, only return notes with the specified address incore.component.dex.v1. - AddressIndex *v1.AddressIndex `protobuf:"bytes,4,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` - // If set, stop returning notes once the total exceeds this amount. - // - // Ignored if `asset_id` is unset or if `include_spent` is set. - AmountToSpend *v110.Amount `protobuf:"bytes,6,opt,name=amount_to_spend,json=amountToSpend,proto3" json:"amount_to_spend,omitempty"` -} - -func (m *NotesRequest) Reset() { *m = NotesRequest{} } -func (m *NotesRequest) String() string { return proto.CompactTextString(m) } -func (*NotesRequest) ProtoMessage() {} -func (*NotesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{22} -} -func (m *NotesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NotesRequest.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 *NotesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotesRequest.Merge(m, src) -} -func (m *NotesRequest) XXX_Size() int { - return m.Size() -} -func (m *NotesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NotesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NotesRequest proto.InternalMessageInfo - -func (m *NotesRequest) GetIncludeSpent() bool { - if m != nil { - return m.IncludeSpent - } - return false -} - -func (m *NotesRequest) GetAssetId() *v18.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -func (m *NotesRequest) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -func (m *NotesRequest) GetAmountToSpend() *v110.Amount { - if m != nil { - return m.AmountToSpend - } - return nil -} - -// A query for notes to be used for voting on a proposal. -type NotesForVotingRequest struct { - // The starting height of the proposal. - VotableAtHeight uint64 `protobuf:"varint,1,opt,name=votable_at_height,json=votableAtHeight,proto3" json:"votable_at_height,omitempty"` - // If set, only return notes with the specified asset id. - AddressIndex *v1.AddressIndex `protobuf:"bytes,3,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` -} - -func (m *NotesForVotingRequest) Reset() { *m = NotesForVotingRequest{} } -func (m *NotesForVotingRequest) String() string { return proto.CompactTextString(m) } -func (*NotesForVotingRequest) ProtoMessage() {} -func (*NotesForVotingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{23} -} -func (m *NotesForVotingRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NotesForVotingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NotesForVotingRequest.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 *NotesForVotingRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotesForVotingRequest.Merge(m, src) -} -func (m *NotesForVotingRequest) XXX_Size() int { - return m.Size() -} -func (m *NotesForVotingRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NotesForVotingRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NotesForVotingRequest proto.InternalMessageInfo - -func (m *NotesForVotingRequest) GetVotableAtHeight() uint64 { - if m != nil { - return m.VotableAtHeight - } - return 0 -} - -func (m *NotesForVotingRequest) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -type WitnessRequest struct { - // The transaction plan to witness - TransactionPlan *v13.TransactionPlan `protobuf:"bytes,3,opt,name=transaction_plan,json=transactionPlan,proto3" json:"transaction_plan,omitempty"` -} - -func (m *WitnessRequest) Reset() { *m = WitnessRequest{} } -func (m *WitnessRequest) String() string { return proto.CompactTextString(m) } -func (*WitnessRequest) ProtoMessage() {} -func (*WitnessRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{24} -} -func (m *WitnessRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WitnessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WitnessRequest.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 *WitnessRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessRequest.Merge(m, src) -} -func (m *WitnessRequest) XXX_Size() int { - return m.Size() -} -func (m *WitnessRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessRequest proto.InternalMessageInfo - -func (m *WitnessRequest) GetTransactionPlan() *v13.TransactionPlan { - if m != nil { - return m.TransactionPlan - } - return nil -} - -type WitnessResponse struct { - WitnessData *v13.WitnessData `protobuf:"bytes,1,opt,name=witness_data,json=witnessData,proto3" json:"witness_data,omitempty"` -} - -func (m *WitnessResponse) Reset() { *m = WitnessResponse{} } -func (m *WitnessResponse) String() string { return proto.CompactTextString(m) } -func (*WitnessResponse) ProtoMessage() {} -func (*WitnessResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{25} -} -func (m *WitnessResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WitnessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WitnessResponse.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 *WitnessResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessResponse.Merge(m, src) -} -func (m *WitnessResponse) XXX_Size() int { - return m.Size() -} -func (m *WitnessResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessResponse proto.InternalMessageInfo - -func (m *WitnessResponse) GetWitnessData() *v13.WitnessData { - if m != nil { - return m.WitnessData - } - return nil -} - -type WitnessAndBuildRequest struct { - TransactionPlan *v13.TransactionPlan `protobuf:"bytes,1,opt,name=transaction_plan,json=transactionPlan,proto3" json:"transaction_plan,omitempty"` - AuthorizationData *v13.AuthorizationData `protobuf:"bytes,2,opt,name=authorization_data,json=authorizationData,proto3" json:"authorization_data,omitempty"` -} - -func (m *WitnessAndBuildRequest) Reset() { *m = WitnessAndBuildRequest{} } -func (m *WitnessAndBuildRequest) String() string { return proto.CompactTextString(m) } -func (*WitnessAndBuildRequest) ProtoMessage() {} -func (*WitnessAndBuildRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{26} -} -func (m *WitnessAndBuildRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WitnessAndBuildRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WitnessAndBuildRequest.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 *WitnessAndBuildRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessAndBuildRequest.Merge(m, src) -} -func (m *WitnessAndBuildRequest) XXX_Size() int { - return m.Size() -} -func (m *WitnessAndBuildRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessAndBuildRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessAndBuildRequest proto.InternalMessageInfo - -func (m *WitnessAndBuildRequest) GetTransactionPlan() *v13.TransactionPlan { - if m != nil { - return m.TransactionPlan - } - return nil -} - -func (m *WitnessAndBuildRequest) GetAuthorizationData() *v13.AuthorizationData { - if m != nil { - return m.AuthorizationData - } - return nil -} - -type WitnessAndBuildResponse struct { - // Types that are valid to be assigned to Status: - // *WitnessAndBuildResponse_BuildProgress_ - // *WitnessAndBuildResponse_Complete_ - Status isWitnessAndBuildResponse_Status `protobuf_oneof:"status"` -} - -func (m *WitnessAndBuildResponse) Reset() { *m = WitnessAndBuildResponse{} } -func (m *WitnessAndBuildResponse) String() string { return proto.CompactTextString(m) } -func (*WitnessAndBuildResponse) ProtoMessage() {} -func (*WitnessAndBuildResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{27} -} -func (m *WitnessAndBuildResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WitnessAndBuildResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WitnessAndBuildResponse.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 *WitnessAndBuildResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessAndBuildResponse.Merge(m, src) -} -func (m *WitnessAndBuildResponse) XXX_Size() int { - return m.Size() -} -func (m *WitnessAndBuildResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessAndBuildResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessAndBuildResponse proto.InternalMessageInfo - -type isWitnessAndBuildResponse_Status interface { - isWitnessAndBuildResponse_Status() - MarshalTo([]byte) (int, error) - Size() int -} - -type WitnessAndBuildResponse_BuildProgress_ struct { - BuildProgress *WitnessAndBuildResponse_BuildProgress `protobuf:"bytes,1,opt,name=build_progress,json=buildProgress,proto3,oneof" json:"build_progress,omitempty"` -} -type WitnessAndBuildResponse_Complete_ struct { - Complete *WitnessAndBuildResponse_Complete `protobuf:"bytes,2,opt,name=complete,proto3,oneof" json:"complete,omitempty"` -} - -func (*WitnessAndBuildResponse_BuildProgress_) isWitnessAndBuildResponse_Status() {} -func (*WitnessAndBuildResponse_Complete_) isWitnessAndBuildResponse_Status() {} - -func (m *WitnessAndBuildResponse) GetStatus() isWitnessAndBuildResponse_Status { - if m != nil { - return m.Status - } - return nil -} - -func (m *WitnessAndBuildResponse) GetBuildProgress() *WitnessAndBuildResponse_BuildProgress { - if x, ok := m.GetStatus().(*WitnessAndBuildResponse_BuildProgress_); ok { - return x.BuildProgress - } - return nil -} - -func (m *WitnessAndBuildResponse) GetComplete() *WitnessAndBuildResponse_Complete { - if x, ok := m.GetStatus().(*WitnessAndBuildResponse_Complete_); ok { - return x.Complete - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*WitnessAndBuildResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*WitnessAndBuildResponse_BuildProgress_)(nil), - (*WitnessAndBuildResponse_Complete_)(nil), - } -} - -// Signals that building is in progress. -type WitnessAndBuildResponse_BuildProgress struct { - // An approximate progress of the build, from 0 to 1. - Progress float32 `protobuf:"fixed32,1,opt,name=progress,proto3" json:"progress,omitempty"` -} - -func (m *WitnessAndBuildResponse_BuildProgress) Reset() { *m = WitnessAndBuildResponse_BuildProgress{} } -func (m *WitnessAndBuildResponse_BuildProgress) String() string { return proto.CompactTextString(m) } -func (*WitnessAndBuildResponse_BuildProgress) ProtoMessage() {} -func (*WitnessAndBuildResponse_BuildProgress) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{27, 0} -} -func (m *WitnessAndBuildResponse_BuildProgress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WitnessAndBuildResponse_BuildProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WitnessAndBuildResponse_BuildProgress.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 *WitnessAndBuildResponse_BuildProgress) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessAndBuildResponse_BuildProgress.Merge(m, src) -} -func (m *WitnessAndBuildResponse_BuildProgress) XXX_Size() int { - return m.Size() -} -func (m *WitnessAndBuildResponse_BuildProgress) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessAndBuildResponse_BuildProgress.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessAndBuildResponse_BuildProgress proto.InternalMessageInfo - -func (m *WitnessAndBuildResponse_BuildProgress) GetProgress() float32 { - if m != nil { - return m.Progress - } - return 0 -} - -// Signals that the transaction is complete. -type WitnessAndBuildResponse_Complete struct { - // The finished transaction. - Transaction *v13.Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` -} - -func (m *WitnessAndBuildResponse_Complete) Reset() { *m = WitnessAndBuildResponse_Complete{} } -func (m *WitnessAndBuildResponse_Complete) String() string { return proto.CompactTextString(m) } -func (*WitnessAndBuildResponse_Complete) ProtoMessage() {} -func (*WitnessAndBuildResponse_Complete) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{27, 1} -} -func (m *WitnessAndBuildResponse_Complete) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WitnessAndBuildResponse_Complete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WitnessAndBuildResponse_Complete.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 *WitnessAndBuildResponse_Complete) XXX_Merge(src proto.Message) { - xxx_messageInfo_WitnessAndBuildResponse_Complete.Merge(m, src) -} -func (m *WitnessAndBuildResponse_Complete) XXX_Size() int { - return m.Size() -} -func (m *WitnessAndBuildResponse_Complete) XXX_DiscardUnknown() { - xxx_messageInfo_WitnessAndBuildResponse_Complete.DiscardUnknown(m) -} - -var xxx_messageInfo_WitnessAndBuildResponse_Complete proto.InternalMessageInfo - -func (m *WitnessAndBuildResponse_Complete) GetTransaction() *v13.Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -// Requests all assets known to the view service. -type AssetsRequest struct { - // If set to false (default), returns all assets, regardless of whether the rest of the fields of - // the request indicate a filter. - Filtered bool `protobuf:"varint,1,opt,name=filtered,proto3" json:"filtered,omitempty"` - // Include these specific denominations in the response. - IncludeSpecificDenominations []*v18.Denom `protobuf:"bytes,2,rep,name=include_specific_denominations,json=includeSpecificDenominations,proto3" json:"include_specific_denominations,omitempty"` - // Include all delegation tokens, to any validator, in the response. - IncludeDelegationTokens bool `protobuf:"varint,3,opt,name=include_delegation_tokens,json=includeDelegationTokens,proto3" json:"include_delegation_tokens,omitempty"` - // Include all unbonding tokens, from any validator, in the response. - IncludeUnbondingTokens bool `protobuf:"varint,4,opt,name=include_unbonding_tokens,json=includeUnbondingTokens,proto3" json:"include_unbonding_tokens,omitempty"` - // Include all LP NFTs in the response. - IncludeLpNfts bool `protobuf:"varint,5,opt,name=include_lp_nfts,json=includeLpNfts,proto3" json:"include_lp_nfts,omitempty"` - // Include all proposal NFTs in the response. - IncludeProposalNfts bool `protobuf:"varint,6,opt,name=include_proposal_nfts,json=includeProposalNfts,proto3" json:"include_proposal_nfts,omitempty"` - // Include all voting receipt tokens in the response. - IncludeVotingReceiptTokens bool `protobuf:"varint,7,opt,name=include_voting_receipt_tokens,json=includeVotingReceiptTokens,proto3" json:"include_voting_receipt_tokens,omitempty"` -} - -func (m *AssetsRequest) Reset() { *m = AssetsRequest{} } -func (m *AssetsRequest) String() string { return proto.CompactTextString(m) } -func (*AssetsRequest) ProtoMessage() {} -func (*AssetsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{28} -} -func (m *AssetsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetsRequest.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 *AssetsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetsRequest.Merge(m, src) -} -func (m *AssetsRequest) XXX_Size() int { - return m.Size() -} -func (m *AssetsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AssetsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetsRequest proto.InternalMessageInfo - -func (m *AssetsRequest) GetFiltered() bool { - if m != nil { - return m.Filtered - } - return false -} - -func (m *AssetsRequest) GetIncludeSpecificDenominations() []*v18.Denom { - if m != nil { - return m.IncludeSpecificDenominations - } - return nil -} - -func (m *AssetsRequest) GetIncludeDelegationTokens() bool { - if m != nil { - return m.IncludeDelegationTokens - } - return false -} - -func (m *AssetsRequest) GetIncludeUnbondingTokens() bool { - if m != nil { - return m.IncludeUnbondingTokens - } - return false -} - -func (m *AssetsRequest) GetIncludeLpNfts() bool { - if m != nil { - return m.IncludeLpNfts - } - return false -} - -func (m *AssetsRequest) GetIncludeProposalNfts() bool { - if m != nil { - return m.IncludeProposalNfts - } - return false -} - -func (m *AssetsRequest) GetIncludeVotingReceiptTokens() bool { - if m != nil { - return m.IncludeVotingReceiptTokens - } - return false -} - -// Requests all assets known to the view service. -type AssetsResponse struct { - DenomMetadata *v18.Metadata `protobuf:"bytes,2,opt,name=denom_metadata,json=denomMetadata,proto3" json:"denom_metadata,omitempty"` -} - -func (m *AssetsResponse) Reset() { *m = AssetsResponse{} } -func (m *AssetsResponse) String() string { return proto.CompactTextString(m) } -func (*AssetsResponse) ProtoMessage() {} -func (*AssetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{29} -} -func (m *AssetsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetsResponse.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 *AssetsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetsResponse.Merge(m, src) -} -func (m *AssetsResponse) XXX_Size() int { - return m.Size() -} -func (m *AssetsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AssetsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetsResponse proto.InternalMessageInfo - -func (m *AssetsResponse) GetDenomMetadata() *v18.Metadata { - if m != nil { - return m.DenomMetadata - } - return nil -} - -// Requests the current app parameters from the view service. -type AppParametersRequest struct { -} - -func (m *AppParametersRequest) Reset() { *m = AppParametersRequest{} } -func (m *AppParametersRequest) String() string { return proto.CompactTextString(m) } -func (*AppParametersRequest) ProtoMessage() {} -func (*AppParametersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{30} -} -func (m *AppParametersRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppParametersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AppParametersRequest.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 *AppParametersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppParametersRequest.Merge(m, src) -} -func (m *AppParametersRequest) XXX_Size() int { - return m.Size() -} -func (m *AppParametersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AppParametersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AppParametersRequest proto.InternalMessageInfo - -type AppParametersResponse struct { - Parameters *v112.AppParameters `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"` -} - -func (m *AppParametersResponse) Reset() { *m = AppParametersResponse{} } -func (m *AppParametersResponse) String() string { return proto.CompactTextString(m) } -func (*AppParametersResponse) ProtoMessage() {} -func (*AppParametersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{31} -} -func (m *AppParametersResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppParametersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AppParametersResponse.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 *AppParametersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppParametersResponse.Merge(m, src) -} -func (m *AppParametersResponse) XXX_Size() int { - return m.Size() -} -func (m *AppParametersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AppParametersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AppParametersResponse proto.InternalMessageInfo - -func (m *AppParametersResponse) GetParameters() *v112.AppParameters { - if m != nil { - return m.Parameters - } - return nil -} - -// Requests the current gas prices from the view service. -type GasPricesRequest struct { -} - -func (m *GasPricesRequest) Reset() { *m = GasPricesRequest{} } -func (m *GasPricesRequest) String() string { return proto.CompactTextString(m) } -func (*GasPricesRequest) ProtoMessage() {} -func (*GasPricesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{32} -} -func (m *GasPricesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GasPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GasPricesRequest.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 *GasPricesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GasPricesRequest.Merge(m, src) -} -func (m *GasPricesRequest) XXX_Size() int { - return m.Size() -} -func (m *GasPricesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GasPricesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GasPricesRequest proto.InternalMessageInfo - -type GasPricesResponse struct { - // The current gas prices, in the preferred (native) token. - GasPrices *v16.GasPrices `protobuf:"bytes,1,opt,name=gas_prices,json=gasPrices,proto3" json:"gas_prices,omitempty"` - // Other gas prices for other accepted tokens. - AltGasPrices []*v16.GasPrices `protobuf:"bytes,2,rep,name=alt_gas_prices,json=altGasPrices,proto3" json:"alt_gas_prices,omitempty"` -} - -func (m *GasPricesResponse) Reset() { *m = GasPricesResponse{} } -func (m *GasPricesResponse) String() string { return proto.CompactTextString(m) } -func (*GasPricesResponse) ProtoMessage() {} -func (*GasPricesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{33} -} -func (m *GasPricesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GasPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GasPricesResponse.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 *GasPricesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GasPricesResponse.Merge(m, src) -} -func (m *GasPricesResponse) XXX_Size() int { - return m.Size() -} -func (m *GasPricesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GasPricesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GasPricesResponse proto.InternalMessageInfo - -func (m *GasPricesResponse) GetGasPrices() *v16.GasPrices { - if m != nil { - return m.GasPrices - } - return nil -} - -func (m *GasPricesResponse) GetAltGasPrices() []*v16.GasPrices { - if m != nil { - return m.AltGasPrices - } - return nil -} - -// Requests the current FMD parameters from the view service. -type FMDParametersRequest struct { -} - -func (m *FMDParametersRequest) Reset() { *m = FMDParametersRequest{} } -func (m *FMDParametersRequest) String() string { return proto.CompactTextString(m) } -func (*FMDParametersRequest) ProtoMessage() {} -func (*FMDParametersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{34} -} -func (m *FMDParametersRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FMDParametersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FMDParametersRequest.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 *FMDParametersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FMDParametersRequest.Merge(m, src) -} -func (m *FMDParametersRequest) XXX_Size() int { - return m.Size() -} -func (m *FMDParametersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FMDParametersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FMDParametersRequest proto.InternalMessageInfo - -type FMDParametersResponse struct { - Parameters *v113.FmdParameters `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"` -} - -func (m *FMDParametersResponse) Reset() { *m = FMDParametersResponse{} } -func (m *FMDParametersResponse) String() string { return proto.CompactTextString(m) } -func (*FMDParametersResponse) ProtoMessage() {} -func (*FMDParametersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{35} -} -func (m *FMDParametersResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FMDParametersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FMDParametersResponse.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 *FMDParametersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FMDParametersResponse.Merge(m, src) -} -func (m *FMDParametersResponse) XXX_Size() int { - return m.Size() -} -func (m *FMDParametersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FMDParametersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FMDParametersResponse proto.InternalMessageInfo - -func (m *FMDParametersResponse) GetParameters() *v113.FmdParameters { - if m != nil { - return m.Parameters - } - return nil -} - -type NoteByCommitmentRequest struct { - NoteCommitment *v19.StateCommitment `protobuf:"bytes,2,opt,name=note_commitment,json=noteCommitment,proto3" json:"note_commitment,omitempty"` - // If set to true, waits to return until the requested note is detected. - AwaitDetection bool `protobuf:"varint,3,opt,name=await_detection,json=awaitDetection,proto3" json:"await_detection,omitempty"` -} - -func (m *NoteByCommitmentRequest) Reset() { *m = NoteByCommitmentRequest{} } -func (m *NoteByCommitmentRequest) String() string { return proto.CompactTextString(m) } -func (*NoteByCommitmentRequest) ProtoMessage() {} -func (*NoteByCommitmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{36} -} -func (m *NoteByCommitmentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoteByCommitmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoteByCommitmentRequest.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 *NoteByCommitmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoteByCommitmentRequest.Merge(m, src) -} -func (m *NoteByCommitmentRequest) XXX_Size() int { - return m.Size() -} -func (m *NoteByCommitmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NoteByCommitmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NoteByCommitmentRequest proto.InternalMessageInfo - -func (m *NoteByCommitmentRequest) GetNoteCommitment() *v19.StateCommitment { - if m != nil { - return m.NoteCommitment - } - return nil -} - -func (m *NoteByCommitmentRequest) GetAwaitDetection() bool { - if m != nil { - return m.AwaitDetection - } - return false -} - -type NoteByCommitmentResponse struct { - SpendableNote *SpendableNoteRecord `protobuf:"bytes,1,opt,name=spendable_note,json=spendableNote,proto3" json:"spendable_note,omitempty"` -} - -func (m *NoteByCommitmentResponse) Reset() { *m = NoteByCommitmentResponse{} } -func (m *NoteByCommitmentResponse) String() string { return proto.CompactTextString(m) } -func (*NoteByCommitmentResponse) ProtoMessage() {} -func (*NoteByCommitmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{37} -} -func (m *NoteByCommitmentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoteByCommitmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoteByCommitmentResponse.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 *NoteByCommitmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoteByCommitmentResponse.Merge(m, src) -} -func (m *NoteByCommitmentResponse) XXX_Size() int { - return m.Size() -} -func (m *NoteByCommitmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NoteByCommitmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NoteByCommitmentResponse proto.InternalMessageInfo - -func (m *NoteByCommitmentResponse) GetSpendableNote() *SpendableNoteRecord { - if m != nil { - return m.SpendableNote - } - return nil -} - -type SwapByCommitmentRequest struct { - SwapCommitment *v19.StateCommitment `protobuf:"bytes,2,opt,name=swap_commitment,json=swapCommitment,proto3" json:"swap_commitment,omitempty"` - // If set to true, waits to return until the requested swap is detected. - AwaitDetection bool `protobuf:"varint,3,opt,name=await_detection,json=awaitDetection,proto3" json:"await_detection,omitempty"` -} - -func (m *SwapByCommitmentRequest) Reset() { *m = SwapByCommitmentRequest{} } -func (m *SwapByCommitmentRequest) String() string { return proto.CompactTextString(m) } -func (*SwapByCommitmentRequest) ProtoMessage() {} -func (*SwapByCommitmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{38} -} -func (m *SwapByCommitmentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapByCommitmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapByCommitmentRequest.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 *SwapByCommitmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapByCommitmentRequest.Merge(m, src) -} -func (m *SwapByCommitmentRequest) XXX_Size() int { - return m.Size() -} -func (m *SwapByCommitmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SwapByCommitmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapByCommitmentRequest proto.InternalMessageInfo - -func (m *SwapByCommitmentRequest) GetSwapCommitment() *v19.StateCommitment { - if m != nil { - return m.SwapCommitment - } - return nil -} - -func (m *SwapByCommitmentRequest) GetAwaitDetection() bool { - if m != nil { - return m.AwaitDetection - } - return false -} - -type SwapByCommitmentResponse struct { - Swap *SwapRecord `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap,omitempty"` -} - -func (m *SwapByCommitmentResponse) Reset() { *m = SwapByCommitmentResponse{} } -func (m *SwapByCommitmentResponse) String() string { return proto.CompactTextString(m) } -func (*SwapByCommitmentResponse) ProtoMessage() {} -func (*SwapByCommitmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{39} -} -func (m *SwapByCommitmentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapByCommitmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapByCommitmentResponse.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 *SwapByCommitmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapByCommitmentResponse.Merge(m, src) -} -func (m *SwapByCommitmentResponse) XXX_Size() int { - return m.Size() -} -func (m *SwapByCommitmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SwapByCommitmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapByCommitmentResponse proto.InternalMessageInfo - -func (m *SwapByCommitmentResponse) GetSwap() *SwapRecord { - if m != nil { - return m.Swap - } - return nil -} - -type UnclaimedSwapsRequest struct { -} - -func (m *UnclaimedSwapsRequest) Reset() { *m = UnclaimedSwapsRequest{} } -func (m *UnclaimedSwapsRequest) String() string { return proto.CompactTextString(m) } -func (*UnclaimedSwapsRequest) ProtoMessage() {} -func (*UnclaimedSwapsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{40} -} -func (m *UnclaimedSwapsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnclaimedSwapsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnclaimedSwapsRequest.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 *UnclaimedSwapsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnclaimedSwapsRequest.Merge(m, src) -} -func (m *UnclaimedSwapsRequest) XXX_Size() int { - return m.Size() -} -func (m *UnclaimedSwapsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnclaimedSwapsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnclaimedSwapsRequest proto.InternalMessageInfo - -type UnclaimedSwapsResponse struct { - Swap *SwapRecord `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap,omitempty"` -} - -func (m *UnclaimedSwapsResponse) Reset() { *m = UnclaimedSwapsResponse{} } -func (m *UnclaimedSwapsResponse) String() string { return proto.CompactTextString(m) } -func (*UnclaimedSwapsResponse) ProtoMessage() {} -func (*UnclaimedSwapsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{41} -} -func (m *UnclaimedSwapsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnclaimedSwapsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnclaimedSwapsResponse.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 *UnclaimedSwapsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnclaimedSwapsResponse.Merge(m, src) -} -func (m *UnclaimedSwapsResponse) XXX_Size() int { - return m.Size() -} -func (m *UnclaimedSwapsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnclaimedSwapsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnclaimedSwapsResponse proto.InternalMessageInfo - -func (m *UnclaimedSwapsResponse) GetSwap() *SwapRecord { - if m != nil { - return m.Swap - } - return nil -} - -type NullifierStatusRequest struct { - Nullifier *v17.Nullifier `protobuf:"bytes,2,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - AwaitDetection bool `protobuf:"varint,3,opt,name=await_detection,json=awaitDetection,proto3" json:"await_detection,omitempty"` -} - -func (m *NullifierStatusRequest) Reset() { *m = NullifierStatusRequest{} } -func (m *NullifierStatusRequest) String() string { return proto.CompactTextString(m) } -func (*NullifierStatusRequest) ProtoMessage() {} -func (*NullifierStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{42} -} -func (m *NullifierStatusRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NullifierStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NullifierStatusRequest.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 *NullifierStatusRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NullifierStatusRequest.Merge(m, src) -} -func (m *NullifierStatusRequest) XXX_Size() int { - return m.Size() -} -func (m *NullifierStatusRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NullifierStatusRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NullifierStatusRequest proto.InternalMessageInfo - -func (m *NullifierStatusRequest) GetNullifier() *v17.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *NullifierStatusRequest) GetAwaitDetection() bool { - if m != nil { - return m.AwaitDetection - } - return false -} - -type NullifierStatusResponse struct { - Spent bool `protobuf:"varint,1,opt,name=spent,proto3" json:"spent,omitempty"` -} - -func (m *NullifierStatusResponse) Reset() { *m = NullifierStatusResponse{} } -func (m *NullifierStatusResponse) String() string { return proto.CompactTextString(m) } -func (*NullifierStatusResponse) ProtoMessage() {} -func (*NullifierStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{43} -} -func (m *NullifierStatusResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NullifierStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NullifierStatusResponse.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 *NullifierStatusResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NullifierStatusResponse.Merge(m, src) -} -func (m *NullifierStatusResponse) XXX_Size() int { - return m.Size() -} -func (m *NullifierStatusResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NullifierStatusResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NullifierStatusResponse proto.InternalMessageInfo - -func (m *NullifierStatusResponse) GetSpent() bool { - if m != nil { - return m.Spent - } - return false -} - -type TransactionInfoByHashRequest struct { - // The transaction hash to query for. - Id *v14.TransactionId `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *TransactionInfoByHashRequest) Reset() { *m = TransactionInfoByHashRequest{} } -func (m *TransactionInfoByHashRequest) String() string { return proto.CompactTextString(m) } -func (*TransactionInfoByHashRequest) ProtoMessage() {} -func (*TransactionInfoByHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{44} -} -func (m *TransactionInfoByHashRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionInfoByHashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionInfoByHashRequest.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 *TransactionInfoByHashRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionInfoByHashRequest.Merge(m, src) -} -func (m *TransactionInfoByHashRequest) XXX_Size() int { - return m.Size() -} -func (m *TransactionInfoByHashRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionInfoByHashRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionInfoByHashRequest proto.InternalMessageInfo - -func (m *TransactionInfoByHashRequest) GetId() *v14.TransactionId { - if m != nil { - return m.Id - } - return nil -} - -type TransactionInfoRequest struct { - // If present, return only transactions after this height. - StartHeight uint64 `protobuf:"varint,1,opt,name=start_height,json=startHeight,proto3" json:"start_height,omitempty"` - // If present, return only transactions before this height. - EndHeight uint64 `protobuf:"varint,2,opt,name=end_height,json=endHeight,proto3" json:"end_height,omitempty"` -} - -func (m *TransactionInfoRequest) Reset() { *m = TransactionInfoRequest{} } -func (m *TransactionInfoRequest) String() string { return proto.CompactTextString(m) } -func (*TransactionInfoRequest) ProtoMessage() {} -func (*TransactionInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{45} -} -func (m *TransactionInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionInfoRequest.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 *TransactionInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionInfoRequest.Merge(m, src) -} -func (m *TransactionInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *TransactionInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionInfoRequest proto.InternalMessageInfo - -func (m *TransactionInfoRequest) GetStartHeight() uint64 { - if m != nil { - return m.StartHeight - } - return 0 -} - -func (m *TransactionInfoRequest) GetEndHeight() uint64 { - if m != nil { - return m.EndHeight - } - return 0 -} - -type TransactionInfo struct { - // The height the transaction was included in a block, if known. - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // The hash of the transaction. - Id *v14.TransactionId `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - // The transaction data itself. - Transaction *v13.Transaction `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` - // The transaction perspective, as seen by this view server. - Perspective *v13.TransactionPerspective `protobuf:"bytes,4,opt,name=perspective,proto3" json:"perspective,omitempty"` - // A precomputed transaction view of `transaction` from `perspective`, included for convenience of clients that don't have support for viewing transactions on their own. - View *v13.TransactionView `protobuf:"bytes,5,opt,name=view,proto3" json:"view,omitempty"` -} - -func (m *TransactionInfo) Reset() { *m = TransactionInfo{} } -func (m *TransactionInfo) String() string { return proto.CompactTextString(m) } -func (*TransactionInfo) ProtoMessage() {} -func (*TransactionInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{46} -} -func (m *TransactionInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionInfo.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 *TransactionInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionInfo.Merge(m, src) -} -func (m *TransactionInfo) XXX_Size() int { - return m.Size() -} -func (m *TransactionInfo) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionInfo proto.InternalMessageInfo - -func (m *TransactionInfo) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *TransactionInfo) GetId() *v14.TransactionId { - if m != nil { - return m.Id - } - return nil -} - -func (m *TransactionInfo) GetTransaction() *v13.Transaction { - if m != nil { - return m.Transaction - } - return nil -} - -func (m *TransactionInfo) GetPerspective() *v13.TransactionPerspective { - if m != nil { - return m.Perspective - } - return nil -} - -func (m *TransactionInfo) GetView() *v13.TransactionView { - if m != nil { - return m.View - } - return nil -} - -type TransactionInfoResponse struct { - TxInfo *TransactionInfo `protobuf:"bytes,1,opt,name=tx_info,json=txInfo,proto3" json:"tx_info,omitempty"` -} - -func (m *TransactionInfoResponse) Reset() { *m = TransactionInfoResponse{} } -func (m *TransactionInfoResponse) String() string { return proto.CompactTextString(m) } -func (*TransactionInfoResponse) ProtoMessage() {} -func (*TransactionInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{47} -} -func (m *TransactionInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionInfoResponse.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 *TransactionInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionInfoResponse.Merge(m, src) -} -func (m *TransactionInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *TransactionInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionInfoResponse proto.InternalMessageInfo - -func (m *TransactionInfoResponse) GetTxInfo() *TransactionInfo { - if m != nil { - return m.TxInfo - } - return nil -} - -type TransactionInfoByHashResponse struct { - TxInfo *TransactionInfo `protobuf:"bytes,1,opt,name=tx_info,json=txInfo,proto3" json:"tx_info,omitempty"` -} - -func (m *TransactionInfoByHashResponse) Reset() { *m = TransactionInfoByHashResponse{} } -func (m *TransactionInfoByHashResponse) String() string { return proto.CompactTextString(m) } -func (*TransactionInfoByHashResponse) ProtoMessage() {} -func (*TransactionInfoByHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{48} -} -func (m *TransactionInfoByHashResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransactionInfoByHashResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransactionInfoByHashResponse.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 *TransactionInfoByHashResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionInfoByHashResponse.Merge(m, src) -} -func (m *TransactionInfoByHashResponse) XXX_Size() int { - return m.Size() -} -func (m *TransactionInfoByHashResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionInfoByHashResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TransactionInfoByHashResponse proto.InternalMessageInfo - -func (m *TransactionInfoByHashResponse) GetTxInfo() *TransactionInfo { - if m != nil { - return m.TxInfo - } - return nil -} - -type NotesResponse struct { - NoteRecord *SpendableNoteRecord `protobuf:"bytes,1,opt,name=note_record,json=noteRecord,proto3" json:"note_record,omitempty"` -} - -func (m *NotesResponse) Reset() { *m = NotesResponse{} } -func (m *NotesResponse) String() string { return proto.CompactTextString(m) } -func (*NotesResponse) ProtoMessage() {} -func (*NotesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{49} -} -func (m *NotesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NotesResponse.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 *NotesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotesResponse.Merge(m, src) -} -func (m *NotesResponse) XXX_Size() int { - return m.Size() -} -func (m *NotesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NotesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NotesResponse proto.InternalMessageInfo - -func (m *NotesResponse) GetNoteRecord() *SpendableNoteRecord { - if m != nil { - return m.NoteRecord - } - return nil -} - -type NotesForVotingResponse struct { - NoteRecord *SpendableNoteRecord `protobuf:"bytes,1,opt,name=note_record,json=noteRecord,proto3" json:"note_record,omitempty"` - IdentityKey *v1.IdentityKey `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` -} - -func (m *NotesForVotingResponse) Reset() { *m = NotesForVotingResponse{} } -func (m *NotesForVotingResponse) String() string { return proto.CompactTextString(m) } -func (*NotesForVotingResponse) ProtoMessage() {} -func (*NotesForVotingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{50} -} -func (m *NotesForVotingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NotesForVotingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NotesForVotingResponse.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 *NotesForVotingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotesForVotingResponse.Merge(m, src) -} -func (m *NotesForVotingResponse) XXX_Size() int { - return m.Size() -} -func (m *NotesForVotingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NotesForVotingResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NotesForVotingResponse proto.InternalMessageInfo - -func (m *NotesForVotingResponse) GetNoteRecord() *SpendableNoteRecord { - if m != nil { - return m.NoteRecord - } - return nil -} - -func (m *NotesForVotingResponse) GetIdentityKey() *v1.IdentityKey { - if m != nil { - return m.IdentityKey - } - return nil -} - -// A note plaintext with associated metadata about its status. -type SpendableNoteRecord struct { - // The note commitment, identifying the note. - NoteCommitment *v19.StateCommitment `protobuf:"bytes,1,opt,name=note_commitment,json=noteCommitment,proto3" json:"note_commitment,omitempty"` - // The note plaintext itself. - Note *v113.Note `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` - // A precomputed decryption of the note's address incore.component.dex.v1. - AddressIndex *v1.AddressIndex `protobuf:"bytes,3,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` - // The note's nullifier. - Nullifier *v17.Nullifier `protobuf:"bytes,4,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - // The height at which the note was created. - HeightCreated uint64 `protobuf:"varint,5,opt,name=height_created,json=heightCreated,proto3" json:"height_created,omitempty"` - // Records whether the note was spent (and if so, at what height). - HeightSpent uint64 `protobuf:"varint,6,opt,name=height_spent,json=heightSpent,proto3" json:"height_spent,omitempty"` - // The note position. - Position uint64 `protobuf:"varint,7,opt,name=position,proto3" json:"position,omitempty"` - // The source of the note - Source *v17.CommitmentSource `protobuf:"bytes,8,opt,name=source,proto3" json:"source,omitempty"` - // The sender's return address, if known. - ReturnAddress *v1.AddressView `protobuf:"bytes,9,opt,name=return_address,json=returnAddress,proto3" json:"return_address,omitempty"` -} - -func (m *SpendableNoteRecord) Reset() { *m = SpendableNoteRecord{} } -func (m *SpendableNoteRecord) String() string { return proto.CompactTextString(m) } -func (*SpendableNoteRecord) ProtoMessage() {} -func (*SpendableNoteRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{51} -} -func (m *SpendableNoteRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SpendableNoteRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SpendableNoteRecord.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 *SpendableNoteRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpendableNoteRecord.Merge(m, src) -} -func (m *SpendableNoteRecord) XXX_Size() int { - return m.Size() -} -func (m *SpendableNoteRecord) XXX_DiscardUnknown() { - xxx_messageInfo_SpendableNoteRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_SpendableNoteRecord proto.InternalMessageInfo - -func (m *SpendableNoteRecord) GetNoteCommitment() *v19.StateCommitment { - if m != nil { - return m.NoteCommitment - } - return nil -} - -func (m *SpendableNoteRecord) GetNote() *v113.Note { - if m != nil { - return m.Note - } - return nil -} - -func (m *SpendableNoteRecord) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -func (m *SpendableNoteRecord) GetNullifier() *v17.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *SpendableNoteRecord) GetHeightCreated() uint64 { - if m != nil { - return m.HeightCreated - } - return 0 -} - -func (m *SpendableNoteRecord) GetHeightSpent() uint64 { - if m != nil { - return m.HeightSpent - } - return 0 -} - -func (m *SpendableNoteRecord) GetPosition() uint64 { - if m != nil { - return m.Position - } - return 0 -} - -func (m *SpendableNoteRecord) GetSource() *v17.CommitmentSource { - if m != nil { - return m.Source - } - return nil -} - -func (m *SpendableNoteRecord) GetReturnAddress() *v1.AddressView { - if m != nil { - return m.ReturnAddress - } - return nil -} - -type SwapRecord struct { - SwapCommitment *v19.StateCommitment `protobuf:"bytes,1,opt,name=swap_commitment,json=swapCommitment,proto3" json:"swap_commitment,omitempty"` - Swap *v12.SwapPlaintext `protobuf:"bytes,2,opt,name=swap,proto3" json:"swap,omitempty"` - Position uint64 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` - Nullifier *v17.Nullifier `protobuf:"bytes,4,opt,name=nullifier,proto3" json:"nullifier,omitempty"` - OutputData *v12.BatchSwapOutputData `protobuf:"bytes,5,opt,name=output_data,json=outputData,proto3" json:"output_data,omitempty"` - HeightClaimed uint64 `protobuf:"varint,6,opt,name=height_claimed,json=heightClaimed,proto3" json:"height_claimed,omitempty"` - Source *v17.CommitmentSource `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"` -} - -func (m *SwapRecord) Reset() { *m = SwapRecord{} } -func (m *SwapRecord) String() string { return proto.CompactTextString(m) } -func (*SwapRecord) ProtoMessage() {} -func (*SwapRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{52} -} -func (m *SwapRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapRecord.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 *SwapRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapRecord.Merge(m, src) -} -func (m *SwapRecord) XXX_Size() int { - return m.Size() -} -func (m *SwapRecord) XXX_DiscardUnknown() { - xxx_messageInfo_SwapRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapRecord proto.InternalMessageInfo - -func (m *SwapRecord) GetSwapCommitment() *v19.StateCommitment { - if m != nil { - return m.SwapCommitment - } - return nil -} - -func (m *SwapRecord) GetSwap() *v12.SwapPlaintext { - if m != nil { - return m.Swap - } - return nil -} - -func (m *SwapRecord) GetPosition() uint64 { - if m != nil { - return m.Position - } - return 0 -} - -func (m *SwapRecord) GetNullifier() *v17.Nullifier { - if m != nil { - return m.Nullifier - } - return nil -} - -func (m *SwapRecord) GetOutputData() *v12.BatchSwapOutputData { - if m != nil { - return m.OutputData - } - return nil -} - -func (m *SwapRecord) GetHeightClaimed() uint64 { - if m != nil { - return m.HeightClaimed - } - return 0 -} - -func (m *SwapRecord) GetSource() *v17.CommitmentSource { - if m != nil { - return m.Source - } - return nil -} - -type OwnedPositionIdsRequest struct { - // If present, return only positions with this position state. - PositionState *v12.PositionState `protobuf:"bytes,1,opt,name=position_state,json=positionState,proto3" json:"position_state,omitempty"` - // If present, return only positions for this trading pair. - TradingPair *v12.TradingPair `protobuf:"bytes,2,opt,name=trading_pair,json=tradingPair,proto3" json:"trading_pair,omitempty"` -} - -func (m *OwnedPositionIdsRequest) Reset() { *m = OwnedPositionIdsRequest{} } -func (m *OwnedPositionIdsRequest) String() string { return proto.CompactTextString(m) } -func (*OwnedPositionIdsRequest) ProtoMessage() {} -func (*OwnedPositionIdsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{53} -} -func (m *OwnedPositionIdsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OwnedPositionIdsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OwnedPositionIdsRequest.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 *OwnedPositionIdsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OwnedPositionIdsRequest.Merge(m, src) -} -func (m *OwnedPositionIdsRequest) XXX_Size() int { - return m.Size() -} -func (m *OwnedPositionIdsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_OwnedPositionIdsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_OwnedPositionIdsRequest proto.InternalMessageInfo - -func (m *OwnedPositionIdsRequest) GetPositionState() *v12.PositionState { - if m != nil { - return m.PositionState - } - return nil -} - -func (m *OwnedPositionIdsRequest) GetTradingPair() *v12.TradingPair { - if m != nil { - return m.TradingPair - } - return nil -} - -type OwnedPositionIdsResponse struct { - PositionId *v12.PositionId `protobuf:"bytes,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"` -} - -func (m *OwnedPositionIdsResponse) Reset() { *m = OwnedPositionIdsResponse{} } -func (m *OwnedPositionIdsResponse) String() string { return proto.CompactTextString(m) } -func (*OwnedPositionIdsResponse) ProtoMessage() {} -func (*OwnedPositionIdsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{54} -} -func (m *OwnedPositionIdsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OwnedPositionIdsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OwnedPositionIdsResponse.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 *OwnedPositionIdsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_OwnedPositionIdsResponse.Merge(m, src) -} -func (m *OwnedPositionIdsResponse) XXX_Size() int { - return m.Size() -} -func (m *OwnedPositionIdsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_OwnedPositionIdsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_OwnedPositionIdsResponse proto.InternalMessageInfo - -func (m *OwnedPositionIdsResponse) GetPositionId() *v12.PositionId { - if m != nil { - return m.PositionId - } - return nil -} - -// Requests information on an asset by asset id -type AssetMetadataByIdRequest struct { - // The asset id to request information on. - AssetId *v18.AssetId `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` -} - -func (m *AssetMetadataByIdRequest) Reset() { *m = AssetMetadataByIdRequest{} } -func (m *AssetMetadataByIdRequest) String() string { return proto.CompactTextString(m) } -func (*AssetMetadataByIdRequest) ProtoMessage() {} -func (*AssetMetadataByIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{55} -} -func (m *AssetMetadataByIdRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetMetadataByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetMetadataByIdRequest.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 *AssetMetadataByIdRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetMetadataByIdRequest.Merge(m, src) -} -func (m *AssetMetadataByIdRequest) XXX_Size() int { - return m.Size() -} -func (m *AssetMetadataByIdRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AssetMetadataByIdRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetMetadataByIdRequest proto.InternalMessageInfo - -func (m *AssetMetadataByIdRequest) GetAssetId() *v18.AssetId { - if m != nil { - return m.AssetId - } - return nil -} - -type AssetMetadataByIdResponse struct { - // If present, information on the requested asset. - // - // If the requested asset was unknown, this field will not be present. - DenomMetadata *v18.Metadata `protobuf:"bytes,1,opt,name=denom_metadata,json=denomMetadata,proto3" json:"denom_metadata,omitempty"` -} - -func (m *AssetMetadataByIdResponse) Reset() { *m = AssetMetadataByIdResponse{} } -func (m *AssetMetadataByIdResponse) String() string { return proto.CompactTextString(m) } -func (*AssetMetadataByIdResponse) ProtoMessage() {} -func (*AssetMetadataByIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{56} -} -func (m *AssetMetadataByIdResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AssetMetadataByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetMetadataByIdResponse.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 *AssetMetadataByIdResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetMetadataByIdResponse.Merge(m, src) -} -func (m *AssetMetadataByIdResponse) XXX_Size() int { - return m.Size() -} -func (m *AssetMetadataByIdResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AssetMetadataByIdResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetMetadataByIdResponse proto.InternalMessageInfo - -func (m *AssetMetadataByIdResponse) GetDenomMetadata() *v18.Metadata { - if m != nil { - return m.DenomMetadata - } - return nil -} - -// Requests `ValueView`s of delegation tokens for the given address index. The -// returned `ValueView`s will include the `ValidatorInfo` for the delegated -// validator in their `extended_metadata` fields. -type DelegationsByAddressIndexRequest struct { - // The address index to fetch delegation balances for. - AddressIndex *v1.AddressIndex `protobuf:"bytes,1,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` - Filter DelegationsByAddressIndexRequest_Filter `protobuf:"varint,2,opt,name=filter,proto3,enum=penumbra.view.v1.DelegationsByAddressIndexRequest_Filter" json:"filter,omitempty"` -} - -func (m *DelegationsByAddressIndexRequest) Reset() { *m = DelegationsByAddressIndexRequest{} } -func (m *DelegationsByAddressIndexRequest) String() string { return proto.CompactTextString(m) } -func (*DelegationsByAddressIndexRequest) ProtoMessage() {} -func (*DelegationsByAddressIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{57} -} -func (m *DelegationsByAddressIndexRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegationsByAddressIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegationsByAddressIndexRequest.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 *DelegationsByAddressIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegationsByAddressIndexRequest.Merge(m, src) -} -func (m *DelegationsByAddressIndexRequest) XXX_Size() int { - return m.Size() -} -func (m *DelegationsByAddressIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DelegationsByAddressIndexRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegationsByAddressIndexRequest proto.InternalMessageInfo - -func (m *DelegationsByAddressIndexRequest) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -func (m *DelegationsByAddressIndexRequest) GetFilter() DelegationsByAddressIndexRequest_Filter { - if m != nil { - return m.Filter - } - return DelegationsByAddressIndexRequest_FILTER_UNSPECIFIED -} - -// Contains a `ValueView` of delegation tokens for the requested address index. -// The `ValueView` includes the `ValidatorInfo` for the delegated validator in -// cits `extended_metadata` field. -type DelegationsByAddressIndexResponse struct { - ValueView *v18.ValueView `protobuf:"bytes,1,opt,name=value_view,json=valueView,proto3" json:"value_view,omitempty"` -} - -func (m *DelegationsByAddressIndexResponse) Reset() { *m = DelegationsByAddressIndexResponse{} } -func (m *DelegationsByAddressIndexResponse) String() string { return proto.CompactTextString(m) } -func (*DelegationsByAddressIndexResponse) ProtoMessage() {} -func (*DelegationsByAddressIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{58} -} -func (m *DelegationsByAddressIndexResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegationsByAddressIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegationsByAddressIndexResponse.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 *DelegationsByAddressIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegationsByAddressIndexResponse.Merge(m, src) -} -func (m *DelegationsByAddressIndexResponse) XXX_Size() int { - return m.Size() -} -func (m *DelegationsByAddressIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DelegationsByAddressIndexResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegationsByAddressIndexResponse proto.InternalMessageInfo - -func (m *DelegationsByAddressIndexResponse) GetValueView() *v18.ValueView { - if m != nil { - return m.ValueView - } - return nil -} - -// Requests unbonding tokens for a given address index, with optional filtering -// for whether the tokens are currently claimable. -type UnbondingTokensByAddressIndexRequest struct { - Filter UnbondingTokensByAddressIndexRequest_Filter `protobuf:"varint,1,opt,name=filter,proto3,enum=penumbra.view.v1.UnbondingTokensByAddressIndexRequest_Filter" json:"filter,omitempty"` - // The address index to fetch unbonding tokens for. - AddressIndex *v1.AddressIndex `protobuf:"bytes,2,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` -} - -func (m *UnbondingTokensByAddressIndexRequest) Reset() { *m = UnbondingTokensByAddressIndexRequest{} } -func (m *UnbondingTokensByAddressIndexRequest) String() string { return proto.CompactTextString(m) } -func (*UnbondingTokensByAddressIndexRequest) ProtoMessage() {} -func (*UnbondingTokensByAddressIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{59} -} -func (m *UnbondingTokensByAddressIndexRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnbondingTokensByAddressIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnbondingTokensByAddressIndexRequest.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 *UnbondingTokensByAddressIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbondingTokensByAddressIndexRequest.Merge(m, src) -} -func (m *UnbondingTokensByAddressIndexRequest) XXX_Size() int { - return m.Size() -} -func (m *UnbondingTokensByAddressIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnbondingTokensByAddressIndexRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbondingTokensByAddressIndexRequest proto.InternalMessageInfo - -func (m *UnbondingTokensByAddressIndexRequest) GetFilter() UnbondingTokensByAddressIndexRequest_Filter { - if m != nil { - return m.Filter - } - return UnbondingTokensByAddressIndexRequest_FILTER_UNSPECIFIED -} - -func (m *UnbondingTokensByAddressIndexRequest) GetAddressIndex() *v1.AddressIndex { - if m != nil { - return m.AddressIndex - } - return nil -} - -// Returns unbonding tokens for the given address index, optionally filtered by -// whether the tokens are currently claimable. -type UnbondingTokensByAddressIndexResponse struct { - // A `ValueView` representing the amount of the given unbonding token. - ValueView *v18.ValueView `protobuf:"bytes,1,opt,name=value_view,json=valueView,proto3" json:"value_view,omitempty"` - // Whether the unbonding token is currently claimable. This will only be - // `true` if the `unbonding_delay` (from `StakeParameters`) has passed or the - // validator has unbonded. - Claimable bool `protobuf:"varint,2,opt,name=claimable,proto3" json:"claimable,omitempty"` -} - -func (m *UnbondingTokensByAddressIndexResponse) Reset() { *m = UnbondingTokensByAddressIndexResponse{} } -func (m *UnbondingTokensByAddressIndexResponse) String() string { return proto.CompactTextString(m) } -func (*UnbondingTokensByAddressIndexResponse) ProtoMessage() {} -func (*UnbondingTokensByAddressIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dba93d04e42ddfc3, []int{60} -} -func (m *UnbondingTokensByAddressIndexResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnbondingTokensByAddressIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnbondingTokensByAddressIndexResponse.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 *UnbondingTokensByAddressIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbondingTokensByAddressIndexResponse.Merge(m, src) -} -func (m *UnbondingTokensByAddressIndexResponse) XXX_Size() int { - return m.Size() -} -func (m *UnbondingTokensByAddressIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnbondingTokensByAddressIndexResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbondingTokensByAddressIndexResponse proto.InternalMessageInfo - -func (m *UnbondingTokensByAddressIndexResponse) GetValueView() *v18.ValueView { - if m != nil { - return m.ValueView - } - return nil -} - -func (m *UnbondingTokensByAddressIndexResponse) GetClaimable() bool { - if m != nil { - return m.Claimable - } - return false -} - -func init() { - proto.RegisterEnum("penumbra.view.v1.DelegationsByAddressIndexRequest_Filter", DelegationsByAddressIndexRequest_Filter_name, DelegationsByAddressIndexRequest_Filter_value) - proto.RegisterEnum("penumbra.view.v1.UnbondingTokensByAddressIndexRequest_Filter", UnbondingTokensByAddressIndexRequest_Filter_name, UnbondingTokensByAddressIndexRequest_Filter_value) - proto.RegisterType((*AuctionsRequest)(nil), "penumbra.view.v1.AuctionsRequest") - proto.RegisterType((*AuctionsResponse)(nil), "penumbra.view.v1.AuctionsResponse") - proto.RegisterType((*AuthorizeAndBuildRequest)(nil), "penumbra.view.v1.AuthorizeAndBuildRequest") - proto.RegisterType((*AuthorizeAndBuildResponse)(nil), "penumbra.view.v1.AuthorizeAndBuildResponse") - proto.RegisterType((*AuthorizeAndBuildResponse_BuildProgress)(nil), "penumbra.view.v1.AuthorizeAndBuildResponse.BuildProgress") - proto.RegisterType((*AuthorizeAndBuildResponse_Complete)(nil), "penumbra.view.v1.AuthorizeAndBuildResponse.Complete") - proto.RegisterType((*BroadcastTransactionRequest)(nil), "penumbra.view.v1.BroadcastTransactionRequest") - proto.RegisterType((*BroadcastTransactionResponse)(nil), "penumbra.view.v1.BroadcastTransactionResponse") - proto.RegisterType((*BroadcastTransactionResponse_BroadcastSuccess)(nil), "penumbra.view.v1.BroadcastTransactionResponse.BroadcastSuccess") - proto.RegisterType((*BroadcastTransactionResponse_Confirmed)(nil), "penumbra.view.v1.BroadcastTransactionResponse.Confirmed") - proto.RegisterType((*TransactionPlannerRequest)(nil), "penumbra.view.v1.TransactionPlannerRequest") - proto.RegisterType((*TransactionPlannerRequest_Output)(nil), "penumbra.view.v1.TransactionPlannerRequest.Output") - proto.RegisterType((*TransactionPlannerRequest_Spend)(nil), "penumbra.view.v1.TransactionPlannerRequest.Spend") - proto.RegisterType((*TransactionPlannerRequest_Swap)(nil), "penumbra.view.v1.TransactionPlannerRequest.Swap") - proto.RegisterType((*TransactionPlannerRequest_SwapClaim)(nil), "penumbra.view.v1.TransactionPlannerRequest.SwapClaim") - proto.RegisterType((*TransactionPlannerRequest_Delegate)(nil), "penumbra.view.v1.TransactionPlannerRequest.Delegate") - proto.RegisterType((*TransactionPlannerRequest_Undelegate)(nil), "penumbra.view.v1.TransactionPlannerRequest.Undelegate") - proto.RegisterType((*TransactionPlannerRequest_UndelegateClaim)(nil), "penumbra.view.v1.TransactionPlannerRequest.UndelegateClaim") - proto.RegisterType((*TransactionPlannerRequest_PositionOpen)(nil), "penumbra.view.v1.TransactionPlannerRequest.PositionOpen") - proto.RegisterType((*TransactionPlannerRequest_PositionClose)(nil), "penumbra.view.v1.TransactionPlannerRequest.PositionClose") - proto.RegisterType((*TransactionPlannerRequest_PositionWithdraw)(nil), "penumbra.view.v1.TransactionPlannerRequest.PositionWithdraw") - proto.RegisterType((*TransactionPlannerRequest_ActionDutchAuctionSchedule)(nil), "penumbra.view.v1.TransactionPlannerRequest.ActionDutchAuctionSchedule") - proto.RegisterType((*TransactionPlannerRequest_ActionDutchAuctionEnd)(nil), "penumbra.view.v1.TransactionPlannerRequest.ActionDutchAuctionEnd") - proto.RegisterType((*TransactionPlannerRequest_ActionDutchAuctionWithdraw)(nil), "penumbra.view.v1.TransactionPlannerRequest.ActionDutchAuctionWithdraw") - proto.RegisterType((*TransactionPlannerResponse)(nil), "penumbra.view.v1.TransactionPlannerResponse") - proto.RegisterType((*AddressByIndexRequest)(nil), "penumbra.view.v1.AddressByIndexRequest") - proto.RegisterType((*AddressByIndexResponse)(nil), "penumbra.view.v1.AddressByIndexResponse") - proto.RegisterType((*WalletIdRequest)(nil), "penumbra.view.v1.WalletIdRequest") - proto.RegisterType((*WalletIdResponse)(nil), "penumbra.view.v1.WalletIdResponse") - proto.RegisterType((*IndexByAddressRequest)(nil), "penumbra.view.v1.IndexByAddressRequest") - proto.RegisterType((*IndexByAddressResponse)(nil), "penumbra.view.v1.IndexByAddressResponse") - proto.RegisterType((*EphemeralAddressRequest)(nil), "penumbra.view.v1.EphemeralAddressRequest") - proto.RegisterType((*EphemeralAddressResponse)(nil), "penumbra.view.v1.EphemeralAddressResponse") - proto.RegisterType((*BalancesRequest)(nil), "penumbra.view.v1.BalancesRequest") - proto.RegisterType((*BalancesResponse)(nil), "penumbra.view.v1.BalancesResponse") - proto.RegisterType((*StatusRequest)(nil), "penumbra.view.v1.StatusRequest") - proto.RegisterType((*StatusResponse)(nil), "penumbra.view.v1.StatusResponse") - proto.RegisterType((*StatusStreamRequest)(nil), "penumbra.view.v1.StatusStreamRequest") - proto.RegisterType((*StatusStreamResponse)(nil), "penumbra.view.v1.StatusStreamResponse") - proto.RegisterType((*NotesRequest)(nil), "penumbra.view.v1.NotesRequest") - proto.RegisterType((*NotesForVotingRequest)(nil), "penumbra.view.v1.NotesForVotingRequest") - proto.RegisterType((*WitnessRequest)(nil), "penumbra.view.v1.WitnessRequest") - proto.RegisterType((*WitnessResponse)(nil), "penumbra.view.v1.WitnessResponse") - proto.RegisterType((*WitnessAndBuildRequest)(nil), "penumbra.view.v1.WitnessAndBuildRequest") - proto.RegisterType((*WitnessAndBuildResponse)(nil), "penumbra.view.v1.WitnessAndBuildResponse") - proto.RegisterType((*WitnessAndBuildResponse_BuildProgress)(nil), "penumbra.view.v1.WitnessAndBuildResponse.BuildProgress") - proto.RegisterType((*WitnessAndBuildResponse_Complete)(nil), "penumbra.view.v1.WitnessAndBuildResponse.Complete") - proto.RegisterType((*AssetsRequest)(nil), "penumbra.view.v1.AssetsRequest") - proto.RegisterType((*AssetsResponse)(nil), "penumbra.view.v1.AssetsResponse") - proto.RegisterType((*AppParametersRequest)(nil), "penumbra.view.v1.AppParametersRequest") - proto.RegisterType((*AppParametersResponse)(nil), "penumbra.view.v1.AppParametersResponse") - proto.RegisterType((*GasPricesRequest)(nil), "penumbra.view.v1.GasPricesRequest") - proto.RegisterType((*GasPricesResponse)(nil), "penumbra.view.v1.GasPricesResponse") - proto.RegisterType((*FMDParametersRequest)(nil), "penumbra.view.v1.FMDParametersRequest") - proto.RegisterType((*FMDParametersResponse)(nil), "penumbra.view.v1.FMDParametersResponse") - proto.RegisterType((*NoteByCommitmentRequest)(nil), "penumbra.view.v1.NoteByCommitmentRequest") - proto.RegisterType((*NoteByCommitmentResponse)(nil), "penumbra.view.v1.NoteByCommitmentResponse") - proto.RegisterType((*SwapByCommitmentRequest)(nil), "penumbra.view.v1.SwapByCommitmentRequest") - proto.RegisterType((*SwapByCommitmentResponse)(nil), "penumbra.view.v1.SwapByCommitmentResponse") - proto.RegisterType((*UnclaimedSwapsRequest)(nil), "penumbra.view.v1.UnclaimedSwapsRequest") - proto.RegisterType((*UnclaimedSwapsResponse)(nil), "penumbra.view.v1.UnclaimedSwapsResponse") - proto.RegisterType((*NullifierStatusRequest)(nil), "penumbra.view.v1.NullifierStatusRequest") - proto.RegisterType((*NullifierStatusResponse)(nil), "penumbra.view.v1.NullifierStatusResponse") - proto.RegisterType((*TransactionInfoByHashRequest)(nil), "penumbra.view.v1.TransactionInfoByHashRequest") - proto.RegisterType((*TransactionInfoRequest)(nil), "penumbra.view.v1.TransactionInfoRequest") - proto.RegisterType((*TransactionInfo)(nil), "penumbra.view.v1.TransactionInfo") - proto.RegisterType((*TransactionInfoResponse)(nil), "penumbra.view.v1.TransactionInfoResponse") - proto.RegisterType((*TransactionInfoByHashResponse)(nil), "penumbra.view.v1.TransactionInfoByHashResponse") - proto.RegisterType((*NotesResponse)(nil), "penumbra.view.v1.NotesResponse") - proto.RegisterType((*NotesForVotingResponse)(nil), "penumbra.view.v1.NotesForVotingResponse") - proto.RegisterType((*SpendableNoteRecord)(nil), "penumbra.view.v1.SpendableNoteRecord") - proto.RegisterType((*SwapRecord)(nil), "penumbra.view.v1.SwapRecord") - proto.RegisterType((*OwnedPositionIdsRequest)(nil), "penumbra.view.v1.OwnedPositionIdsRequest") - proto.RegisterType((*OwnedPositionIdsResponse)(nil), "penumbra.view.v1.OwnedPositionIdsResponse") - proto.RegisterType((*AssetMetadataByIdRequest)(nil), "penumbra.view.v1.AssetMetadataByIdRequest") - proto.RegisterType((*AssetMetadataByIdResponse)(nil), "penumbra.view.v1.AssetMetadataByIdResponse") - proto.RegisterType((*DelegationsByAddressIndexRequest)(nil), "penumbra.view.v1.DelegationsByAddressIndexRequest") - proto.RegisterType((*DelegationsByAddressIndexResponse)(nil), "penumbra.view.v1.DelegationsByAddressIndexResponse") - proto.RegisterType((*UnbondingTokensByAddressIndexRequest)(nil), "penumbra.view.v1.UnbondingTokensByAddressIndexRequest") - proto.RegisterType((*UnbondingTokensByAddressIndexResponse)(nil), "penumbra.view.v1.UnbondingTokensByAddressIndexResponse") -} - -func init() { proto.RegisterFile("penumbra/view/v1/view.proto", fileDescriptor_dba93d04e42ddfc3) } - -var fileDescriptor_dba93d04e42ddfc3 = []byte{ - // 4394 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x3c, 0x4d, 0x6c, 0xdc, 0x56, - 0x7a, 0xe6, 0x48, 0x96, 0x46, 0x9f, 0x34, 0x9a, 0xd1, 0x8b, 0x25, 0x8f, 0x27, 0x8e, 0xec, 0x30, - 0x9b, 0x44, 0xce, 0xcf, 0xe8, 0x27, 0xd9, 0xc4, 0xb1, 0x1d, 0x6c, 0x67, 0xf4, 0x63, 0xc9, 0x96, - 0x65, 0x85, 0x92, 0xe5, 0x6c, 0xd6, 0x29, 0xfb, 0x86, 0x7c, 0x92, 0x58, 0x73, 0x48, 0x9a, 0x7c, - 0x33, 0xb2, 0xda, 0x3d, 0xb7, 0xe8, 0x2e, 0x0a, 0x14, 0xdd, 0x5e, 0xdb, 0x02, 0x05, 0xb6, 0x05, - 0x5a, 0x20, 0xf7, 0x9e, 0x7a, 0xdd, 0x2d, 0x50, 0x60, 0xd1, 0xd3, 0x5e, 0x0a, 0x14, 0xc9, 0xa1, - 0x40, 0xd1, 0x6b, 0x4f, 0x3d, 0xb4, 0xe0, 0xfb, 0xe1, 0x70, 0x38, 0xa4, 0x66, 0x46, 0xd6, 0x2e, - 0xd0, 0x93, 0xc8, 0xef, 0x7d, 0x7f, 0xef, 0x7b, 0x8f, 0xef, 0xfb, 0x7b, 0x23, 0x78, 0xdd, 0x23, - 0x4e, 0xab, 0xd9, 0xf0, 0xf1, 0x62, 0xdb, 0x22, 0x27, 0x8b, 0xed, 0x65, 0xf6, 0xb7, 0xea, 0xf9, - 0x2e, 0x75, 0x51, 0x49, 0x0e, 0x56, 0x19, 0xb0, 0xbd, 0x5c, 0xb9, 0x76, 0xe4, 0xba, 0x47, 0x36, - 0x59, 0x64, 0xe3, 0x8d, 0xd6, 0xe1, 0x22, 0x76, 0x4e, 0x39, 0x72, 0x65, 0x3e, 0xe2, 0x64, 0xb8, - 0x3e, 0x59, 0xc4, 0x9e, 0x17, 0x72, 0xc3, 0x9e, 0x27, 0xc6, 0xd5, 0xc4, 0x78, 0x10, 0x10, 0xca, - 0x30, 0xc2, 0x07, 0x81, 0xb3, 0xd4, 0x8d, 0x63, 0xb8, 0x4d, 0xcf, 0x75, 0x88, 0x43, 0x17, 0x71, - 0xcb, 0xa0, 0x96, 0xeb, 0x30, 0x7c, 0xfe, 0x28, 0x28, 0x16, 0xb2, 0x28, 0x4c, 0xf2, 0x32, 0xc4, - 0x36, 0xc9, 0xcb, 0x7e, 0x98, 0x87, 0x84, 0x84, 0x98, 0x87, 0x84, 0xf4, 0xc3, 0xb4, 0x1a, 0x46, - 0x88, 0x69, 0x35, 0x8c, 0x7e, 0x98, 0x81, 0xc1, 0xe6, 0x16, 0x18, 0x72, 0x66, 0xf7, 0x32, 0x31, - 0x8f, 0x2d, 0x62, 0x9b, 0xc4, 0xd4, 0x3d, 0xd7, 0xb5, 0x19, 0x4d, 0x1c, 0x20, 0xa8, 0x3f, 0xc8, - 0xa4, 0xa6, 0xf8, 0x39, 0xd3, 0x9e, 0x3d, 0x08, 0xec, 0x9b, 0xdd, 0xd8, 0xcf, 0xc9, 0x69, 0x10, - 0xa2, 0x84, 0x7f, 0xd3, 0xd7, 0xca, 0x69, 0x35, 0x43, 0x04, 0xa7, 0xd5, 0x14, 0xe3, 0xd5, 0xee, - 0x71, 0xea, 0x63, 0x27, 0xc0, 0xd1, 0x0a, 0xc4, 0x5e, 0x05, 0xfe, 0xf7, 0x12, 0xf8, 0x2f, 0x8f, - 0x71, 0x70, 0xcc, 0x50, 0xd9, 0x53, 0xaf, 0x5e, 0xfe, 0xa9, 0x47, 0xdd, 0x45, 0xca, 0xad, 0x44, - 0xa5, 0x95, 0xd4, 0x9f, 0xe5, 0xa0, 0x58, 0xe3, 0xeb, 0x1b, 0x68, 0xe4, 0x45, 0x8b, 0x04, 0x14, - 0x3d, 0x80, 0x69, 0x6c, 0x18, 0x6e, 0xcb, 0xa1, 0xfa, 0xa1, 0x65, 0x53, 0xe2, 0x97, 0x95, 0x9b, - 0xca, 0xc2, 0xe4, 0xca, 0x5b, 0x91, 0x92, 0xd5, 0x50, 0x68, 0x95, 0x4d, 0xaf, 0xbd, 0x5c, 0xad, - 0x99, 0xa6, 0x4f, 0x82, 0x60, 0xcb, 0x31, 0xc9, 0x4b, 0xad, 0x20, 0x48, 0x37, 0x18, 0x25, 0xba, - 0x05, 0x25, 0xcb, 0x31, 0xec, 0x96, 0x49, 0x74, 0xcb, 0x09, 0x67, 0xd0, 0x26, 0xe5, 0xdc, 0x4d, - 0x65, 0x21, 0xaf, 0x15, 0x05, 0x7c, 0x4b, 0x80, 0xd1, 0x07, 0x80, 0x5e, 0xb4, 0x88, 0x7f, 0xaa, - 0xdb, 0x98, 0x92, 0x80, 0xea, 0x01, 0xc5, 0x94, 0x94, 0x47, 0x18, 0x72, 0x89, 0x8d, 0x6c, 0xb3, - 0x81, 0xbd, 0x10, 0x8e, 0x7e, 0x04, 0x48, 0xec, 0x4b, 0xdd, 0x32, 0x03, 0xa9, 0xe8, 0xe8, 0xcd, - 0x91, 0x85, 0xc9, 0x95, 0x0f, 0x13, 0x8a, 0x46, 0xab, 0x57, 0x95, 0x5b, 0x39, 0xd4, 0x9a, 0x3f, - 0x6e, 0x99, 0x5a, 0x09, 0xcb, 0xc7, 0x80, 0x6b, 0xad, 0x7e, 0x93, 0x83, 0x52, 0xc7, 0x2a, 0x81, - 0xe7, 0x3a, 0x01, 0x41, 0x9f, 0x43, 0xce, 0x32, 0x85, 0x29, 0x86, 0x94, 0x90, 0xb3, 0x4c, 0x54, - 0x85, 0x71, 0x31, 0xc6, 0x0c, 0x30, 0xb9, 0x72, 0xa5, 0xca, 0x3f, 0xed, 0xaa, 0xfc, 0xb4, 0xab, - 0x35, 0xe7, 0x54, 0x93, 0x48, 0x68, 0x03, 0x26, 0x3c, 0x37, 0xb0, 0x98, 0x0e, 0xe5, 0x11, 0x36, - 0xaf, 0x85, 0x4c, 0xa9, 0xe1, 0x47, 0xd7, 0x5e, 0xae, 0xee, 0x0a, 0x02, 0xad, 0x43, 0x8a, 0x36, - 0x60, 0xd2, 0x71, 0x29, 0xd1, 0x7d, 0x62, 0xb8, 0xbe, 0x59, 0x1e, 0x65, 0xb2, 0xdf, 0xae, 0x26, - 0x0f, 0x9a, 0xea, 0x9e, 0x47, 0x1c, 0x13, 0x37, 0x6c, 0xb2, 0xe3, 0x52, 0xa2, 0x31, 0x64, 0x0d, - 0x9c, 0xe8, 0x19, 0xbd, 0x0e, 0x13, 0xb6, 0x6b, 0x60, 0x5b, 0x0f, 0xc8, 0x8b, 0xf2, 0xe5, 0x9b, - 0xca, 0xc2, 0xa8, 0x96, 0x67, 0x80, 0x3d, 0xf2, 0x42, 0xa5, 0x50, 0xae, 0xb5, 0xe8, 0xb1, 0xeb, - 0x5b, 0x7f, 0x40, 0x6a, 0x8e, 0x59, 0x6f, 0x59, 0xb6, 0x29, 0xb7, 0xd3, 0x97, 0x50, 0x8a, 0xed, - 0x5f, 0xdd, 0xb3, 0xb1, 0x93, 0x61, 0xc5, 0xf8, 0x36, 0x6f, 0x2f, 0x57, 0xf7, 0x3b, 0xaf, 0xbb, - 0x36, 0x76, 0xb4, 0x22, 0xed, 0x06, 0xa8, 0xdf, 0xe5, 0xe0, 0x5a, 0x8a, 0x58, 0xb1, 0x5e, 0x0d, - 0x98, 0x6e, 0x84, 0x00, 0xdd, 0xf3, 0xdd, 0xa3, 0x70, 0x83, 0x0a, 0xa9, 0x9f, 0xf5, 0xce, 0x3d, - 0x93, 0x49, 0x95, 0xbd, 0xed, 0x0a, 0x06, 0x9b, 0x97, 0xb4, 0x42, 0x23, 0x0e, 0x40, 0x1a, 0xe4, - 0xc3, 0x45, 0xb0, 0x09, 0x25, 0x62, 0x55, 0x3f, 0x1e, 0x86, 0xfb, 0xaa, 0xa0, 0xdd, 0xbc, 0xa4, - 0x45, 0x7c, 0x2a, 0xef, 0x43, 0xa1, 0x4b, 0x2a, 0xaa, 0x40, 0xbe, 0x6b, 0x0a, 0x39, 0x2d, 0x7a, - 0xaf, 0x3c, 0x85, 0xbc, 0x64, 0x82, 0x1e, 0xc2, 0x64, 0xcc, 0x42, 0x62, 0xb6, 0xb7, 0x06, 0xb6, - 0xb1, 0x16, 0xa7, 0xae, 0xe7, 0x61, 0x2c, 0xfc, 0x00, 0x5b, 0x81, 0xfa, 0x33, 0x05, 0x5e, 0xaf, - 0xfb, 0x2e, 0x36, 0x0d, 0x1c, 0xd0, 0x38, 0xbe, 0x58, 0xdf, 0x8b, 0x14, 0x8b, 0xde, 0x85, 0x22, - 0x3e, 0xc1, 0x16, 0xd5, 0x4d, 0x42, 0x49, 0xe7, 0x6b, 0xc9, 0x6b, 0xd3, 0x0c, 0xbc, 0x26, 0xa1, - 0xea, 0x37, 0x23, 0x70, 0x3d, 0x5d, 0x2b, 0xb1, 0xfc, 0x0e, 0xcc, 0x34, 0xe4, 0xb8, 0x1e, 0xb4, - 0x0c, 0xa3, 0xb3, 0x03, 0x7e, 0xd0, 0xbb, 0x46, 0x67, 0xb1, 0xea, 0x0c, 0xee, 0x71, 0x36, 0x9b, - 0x97, 0xb4, 0x52, 0x23, 0x01, 0x43, 0x5f, 0xc2, 0x84, 0xe1, 0x3a, 0x87, 0x96, 0xdf, 0x24, 0xa6, - 0xd8, 0x0b, 0xb7, 0x87, 0x94, 0xb3, 0x2a, 0xe9, 0x37, 0x2f, 0x69, 0x1d, 0x66, 0x95, 0x07, 0x50, - 0x4a, 0x6a, 0x80, 0x3e, 0x89, 0x1d, 0x46, 0xef, 0x24, 0x6d, 0xcd, 0x5d, 0x40, 0xb7, 0x99, 0xf9, - 0x29, 0x54, 0x71, 0x60, 0x22, 0x92, 0x72, 0x5e, 0x26, 0xe1, 0xa1, 0x1e, 0x2d, 0x8f, 0x7e, 0x4c, - 0xac, 0xa3, 0x63, 0xca, 0x66, 0x3c, 0xaa, 0x15, 0x23, 0xf8, 0x26, 0x03, 0xc7, 0xb6, 0xd1, 0x7f, - 0xcc, 0xc3, 0xb5, 0xc4, 0x17, 0xed, 0x10, 0x5f, 0x6e, 0xa2, 0xb7, 0xa0, 0x40, 0x5e, 0x7a, 0x96, - 0x7f, 0x2a, 0xf9, 0x29, 0x8c, 0xdf, 0x14, 0x07, 0x72, 0x66, 0xe8, 0x07, 0x30, 0xda, 0x24, 0x4d, - 0x97, 0xf9, 0x84, 0xc9, 0x95, 0xf7, 0xcf, 0xde, 0x62, 0x8f, 0x48, 0xd3, 0xdd, 0xb5, 0xb1, 0xe5, - 0x50, 0xf2, 0x92, 0x6a, 0x8c, 0x10, 0xdd, 0x85, 0xb1, 0xc0, 0x6d, 0xf9, 0x06, 0x11, 0xc7, 0xe0, - 0x40, 0x1e, 0x4d, 0x90, 0xa0, 0x6d, 0x18, 0x77, 0x5b, 0xd4, 0x6b, 0xd1, 0xa0, 0x7c, 0x85, 0x1d, - 0xc7, 0x2b, 0xbd, 0xcb, 0x9b, 0x39, 0xc1, 0xea, 0x63, 0x46, 0xaa, 0x49, 0x16, 0x68, 0x0b, 0xc6, - 0x82, 0xf0, 0xc4, 0x0d, 0xca, 0xb3, 0x8c, 0xd9, 0xf2, 0x30, 0xcc, 0xd8, 0x59, 0xad, 0x09, 0x06, - 0x68, 0x03, 0x2e, 0x07, 0x27, 0xd8, 0x0b, 0xca, 0xf3, 0x8c, 0xd3, 0xd2, 0x50, 0x9c, 0x4e, 0xb0, - 0xa7, 0x71, 0x72, 0x74, 0x00, 0x93, 0xe1, 0x83, 0x6e, 0xd8, 0xd8, 0x6a, 0x06, 0xe5, 0x1b, 0x8c, - 0xdb, 0xf7, 0x87, 0xe5, 0xb6, 0x1a, 0x52, 0x6b, 0x10, 0xc8, 0x47, 0xc6, 0xd7, 0x24, 0x36, 0x39, - 0xc2, 0xdc, 0x97, 0x2d, 0x30, 0xbe, 0x1f, 0x0f, 0xc3, 0x77, 0x8d, 0x93, 0x13, 0x2d, 0xce, 0x08, - 0x3d, 0x83, 0x42, 0xcb, 0x89, 0x73, 0x5e, 0x61, 0x9c, 0x3f, 0x19, 0x86, 0xf3, 0x13, 0xc9, 0x80, - 0x68, 0xdd, 0xcc, 0x90, 0x0d, 0xaf, 0xc5, 0x01, 0xd2, 0x2a, 0x1f, 0x31, 0x19, 0x77, 0xcf, 0x27, - 0x83, 0xdb, 0x06, 0xc5, 0xf9, 0x0a, 0x1b, 0xed, 0xc3, 0x8c, 0xd5, 0x30, 0x74, 0x9f, 0xd8, 0xf8, - 0x54, 0xe7, 0x5c, 0x82, 0xf2, 0xbd, 0x3e, 0x5e, 0x3f, 0x0c, 0x8b, 0xdb, 0xcb, 0xd5, 0xad, 0x86, - 0xa1, 0x85, 0x74, 0x5a, 0xd1, 0x12, 0x4f, 0x35, 0x43, 0x5a, 0x68, 0xc6, 0x32, 0x82, 0x95, 0x25, - 0xfd, 0xc4, 0xa2, 0xc7, 0xa6, 0x8f, 0x4f, 0xb0, 0x1d, 0x94, 0x3f, 0x67, 0x5c, 0x17, 0xfb, 0x72, - 0x0d, 0x09, 0x9f, 0x46, 0x74, 0x5a, 0xc9, 0xea, 0x06, 0x04, 0x48, 0x87, 0x69, 0x19, 0x66, 0xe8, - 0xae, 0x47, 0x9c, 0xa0, 0xbc, 0xc1, 0x58, 0xdf, 0x1e, 0xc6, 0x38, 0x32, 0x64, 0x79, 0xec, 0x11, - 0x47, 0x2b, 0x78, 0xb1, 0xb7, 0x00, 0x35, 0xa0, 0x18, 0x09, 0x30, 0x6c, 0x37, 0x20, 0x41, 0xf9, - 0x3e, 0x93, 0xf0, 0xd9, 0x79, 0x24, 0xac, 0x86, 0x1c, 0xb4, 0x48, 0x65, 0xf6, 0x1a, 0xa0, 0xe7, - 0x80, 0x22, 0x19, 0xd2, 0x4a, 0x41, 0x79, 0x93, 0x89, 0xb9, 0x77, 0x1e, 0x31, 0xd2, 0x42, 0xda, - 0x8c, 0x97, 0x80, 0x04, 0xe8, 0xa7, 0x0a, 0xcc, 0x9b, 0x2d, 0x6a, 0x1c, 0xeb, 0x32, 0x76, 0x0d, - 0x8c, 0x63, 0x62, 0xb6, 0x6c, 0x12, 0xad, 0xf9, 0x16, 0x93, 0xbc, 0x31, 0x8c, 0x64, 0xbe, 0xda, - 0x6b, 0x21, 0x5f, 0x11, 0x72, 0xee, 0x09, 0xae, 0xda, 0xeb, 0x66, 0x0a, 0x54, 0xee, 0x8e, 0x1f, - 0xc3, 0xb5, 0x6e, 0x65, 0x88, 0x63, 0x46, 0x7a, 0x3c, 0x60, 0x7a, 0xd4, 0x5e, 0x4d, 0x8f, 0x75, - 0xc7, 0xd4, 0xe6, 0xcc, 0x6e, 0x80, 0x94, 0xde, 0x6b, 0x0b, 0x69, 0xfe, 0x48, 0x87, 0x87, 0x17, - 0x61, 0x8b, 0x68, 0x3d, 0xba, 0x6c, 0x21, 0xa1, 0x52, 0x9b, 0x35, 0xc8, 0xe3, 0x16, 0x75, 0xf5, - 0x43, 0x42, 0xca, 0x26, 0xf3, 0x0d, 0xef, 0x66, 0x7e, 0x20, 0x61, 0xde, 0xda, 0x5e, 0xae, 0x6e, - 0x10, 0xb2, 0x6f, 0x11, 0x7f, 0xf3, 0x52, 0x18, 0xb3, 0x53, 0x77, 0x83, 0x10, 0xb4, 0x06, 0xd0, - 0xc4, 0x4e, 0x0b, 0xdb, 0x8c, 0x0f, 0x49, 0xf5, 0x31, 0x69, 0x7c, 0x42, 0x7f, 0xcf, 0x09, 0x43, - 0x2e, 0xdf, 0x83, 0x49, 0xe2, 0xb9, 0xc6, 0xb1, 0x6e, 0x85, 0xfe, 0xa7, 0xfc, 0x0b, 0xe6, 0x0a, - 0xeb, 0xb9, 0xb2, 0xa2, 0x01, 0x83, 0x33, 0xb7, 0x84, 0xee, 0xc1, 0x65, 0xf6, 0x56, 0xfe, 0xa5, - 0x92, 0x0c, 0xe9, 0x13, 0x72, 0xc2, 0x9c, 0xb8, 0xbd, 0x5c, 0x5d, 0x0f, 0xb1, 0x35, 0x4e, 0x54, - 0x39, 0x81, 0x31, 0xee, 0x91, 0xd0, 0x47, 0x70, 0xb9, 0x8d, 0xed, 0x16, 0x11, 0x71, 0xc0, 0x1b, - 0x09, 0x36, 0xbc, 0x58, 0xd0, 0x5e, 0xae, 0x1e, 0x84, 0x48, 0x1a, 0xc7, 0x45, 0xb7, 0x61, 0x1c, - 0x73, 0x1f, 0x29, 0x42, 0x9d, 0xf9, 0xb3, 0x3d, 0xa9, 0x26, 0xd1, 0x2b, 0x6d, 0xb8, 0xcc, 0xbc, - 0xd7, 0x6f, 0x5b, 0xee, 0xff, 0x28, 0x30, 0x1a, 0xba, 0xa7, 0xf3, 0xc9, 0xad, 0xc3, 0x14, 0xc5, - 0xfe, 0x11, 0xa1, 0x3a, 0x1b, 0x17, 0xc2, 0x6f, 0x64, 0xd1, 0xd6, 0xc2, 0x87, 0x2d, 0x53, 0x9b, - 0xe4, 0x44, 0xec, 0x15, 0x7d, 0x1f, 0x46, 0xc2, 0x5d, 0x31, 0x32, 0xf0, 0xae, 0xd0, 0x42, 0x7c, - 0xb4, 0x0a, 0x05, 0xe6, 0x7a, 0x74, 0x39, 0xf1, 0xd1, 0x81, 0x26, 0x3e, 0xc5, 0x88, 0xc4, 0x5b, - 0xe5, 0x6b, 0x98, 0x88, 0x7c, 0x33, 0xda, 0x85, 0x22, 0xf7, 0xf3, 0x6e, 0xb3, 0x69, 0xd1, 0x26, - 0x71, 0xa8, 0xb0, 0x45, 0x7c, 0xcb, 0xb3, 0x7a, 0x41, 0x95, 0xf2, 0xad, 0xc3, 0x52, 0xee, 0xd5, - 0x08, 0x5d, 0x9b, 0x66, 0xde, 0x3d, 0x7a, 0xaf, 0xfc, 0x89, 0x02, 0x79, 0xe9, 0xa3, 0xd1, 0xc7, - 0x30, 0x86, 0x9b, 0x6e, 0x2b, 0xe2, 0x7a, 0x3d, 0xa1, 0xa9, 0xd3, 0x6a, 0x32, 0x45, 0x19, 0x8e, - 0x26, 0x70, 0xd1, 0x7d, 0x98, 0xf0, 0x31, 0x25, 0xba, 0x89, 0x29, 0x16, 0x36, 0x7a, 0x2f, 0x7b, - 0x47, 0xb3, 0xda, 0x4b, 0x7b, 0xb9, 0xaa, 0x61, 0x4a, 0xd6, 0x30, 0xc5, 0x5a, 0xde, 0x17, 0x4f, - 0x95, 0x9f, 0x28, 0x00, 0x1d, 0x8f, 0x7b, 0xbe, 0xe5, 0xee, 0x52, 0x26, 0xf7, 0x0a, 0xca, 0xfc, - 0x3a, 0x07, 0xc5, 0x84, 0xfb, 0x47, 0x5f, 0x00, 0x6a, 0x63, 0xdb, 0x32, 0x31, 0x75, 0x7d, 0xdd, - 0x32, 0x89, 0x43, 0x2d, 0x7a, 0x2a, 0xd4, 0x53, 0x33, 0x56, 0x75, 0x4b, 0xa0, 0x3d, 0x24, 0xa7, - 0xda, 0x4c, 0x44, 0x2d, 0xa1, 0xa8, 0x0a, 0x33, 0x01, 0xc5, 0x3e, 0xd5, 0xe3, 0xe7, 0x46, 0x2e, - 0x3a, 0x36, 0x8a, 0x6c, 0x70, 0xbd, 0x73, 0x76, 0xac, 0xc2, 0xb8, 0x47, 0x1c, 0x6c, 0xd3, 0x53, - 0x61, 0xea, 0x5b, 0xfd, 0x67, 0xb7, 0xcb, 0x09, 0x34, 0x49, 0x89, 0xee, 0x43, 0xa9, 0xe5, 0x34, - 0x5c, 0xc7, 0xb4, 0x9c, 0x23, 0x5d, 0xac, 0xf8, 0xe8, 0x00, 0x2b, 0x5e, 0x8c, 0xa8, 0x38, 0x00, - 0x7d, 0x0c, 0x73, 0x1d, 0x46, 0x7c, 0x1e, 0x22, 0x09, 0xe0, 0x65, 0x86, 0x2b, 0xd1, 0xe8, 0x5e, - 0x38, 0xc8, 0x93, 0x81, 0xca, 0x3e, 0x4c, 0xc5, 0x63, 0x87, 0xf0, 0x04, 0x97, 0x0e, 0x57, 0x18, - 0x73, 0xf0, 0x72, 0x49, 0x44, 0x59, 0x79, 0x06, 0x85, 0xae, 0x78, 0x21, 0xcc, 0x6e, 0xa3, 0xf8, - 0x20, 0x4a, 0x96, 0xde, 0x1b, 0x94, 0xf3, 0x96, 0xa9, 0x81, 0x17, 0x3d, 0x57, 0xfe, 0x5b, 0x81, - 0x52, 0x32, 0x4e, 0xb8, 0x50, 0x09, 0xa1, 0x15, 0x7c, 0x12, 0x10, 0xbf, 0x4d, 0xe4, 0x09, 0xd9, - 0xd7, 0x0a, 0x9a, 0xc0, 0xd7, 0x22, 0x4a, 0xb4, 0x03, 0x53, 0xd4, 0xc7, 0x6c, 0x3d, 0x3c, 0x6c, - 0xf9, 0x19, 0x09, 0x57, 0x0f, 0xa7, 0x7d, 0x4e, 0xb3, 0x8b, 0x2d, 0x9f, 0x65, 0xf5, 0xf2, 0xa5, - 0xf2, 0x87, 0x50, 0xc9, 0x0e, 0x52, 0xd0, 0xd7, 0x61, 0x7e, 0x10, 0x18, 0xbe, 0xe5, 0xc5, 0x16, - 0xef, 0xee, 0x20, 0x15, 0xb6, 0x38, 0xbb, 0xb5, 0x0e, 0x0b, 0x2d, 0xce, 0xaf, 0x42, 0x60, 0x36, - 0x35, 0x32, 0x41, 0xdb, 0x00, 0x9d, 0x12, 0xe2, 0xf9, 0x0a, 0x7b, 0x13, 0x51, 0xe9, 0xb0, 0xf2, - 0xe3, 0xb4, 0x39, 0x46, 0x8b, 0x7c, 0xa1, 0xb2, 0x50, 0x09, 0x46, 0x02, 0xf2, 0x42, 0xe4, 0xdc, - 0xe1, 0x63, 0x1d, 0x20, 0x7f, 0x48, 0x88, 0xde, 0x74, 0x4d, 0xa2, 0xea, 0x50, 0x49, 0x0b, 0x90, - 0x44, 0x5d, 0xa4, 0x06, 0xa3, 0xe7, 0x2f, 0xc1, 0x31, 0x52, 0x15, 0xc3, 0xac, 0x70, 0x2c, 0xf5, - 0x53, 0x9e, 0x23, 0x8b, 0x2c, 0x7e, 0x13, 0x0a, 0xc2, 0x4b, 0x89, 0x33, 0x68, 0x88, 0xc2, 0xf1, - 0x14, 0x8e, 0xbd, 0xa9, 0x1a, 0xcc, 0x25, 0x45, 0x08, 0xfd, 0x63, 0x21, 0x80, 0x32, 0x54, 0x08, - 0xa0, 0xce, 0x40, 0xf1, 0x29, 0xb6, 0x6d, 0xe6, 0x99, 0xb9, 0xc2, 0xea, 0x2e, 0x94, 0x3a, 0x20, - 0x21, 0xe0, 0x1e, 0x4c, 0x9c, 0x30, 0x58, 0x67, 0xa5, 0x6e, 0x64, 0x88, 0x88, 0x68, 0xf3, 0x27, - 0xe2, 0x49, 0xfd, 0x02, 0x66, 0x99, 0xbe, 0xf5, 0x53, 0x29, 0x5f, 0xd8, 0xe6, 0xfc, 0x7a, 0x37, - 0x60, 0x2e, 0xc9, 0x52, 0xa8, 0x7a, 0x71, 0xf6, 0x36, 0xe0, 0xea, 0xba, 0x77, 0x4c, 0x9a, 0xc4, - 0xc7, 0x76, 0x42, 0xf1, 0x8b, 0x13, 0xb2, 0x0f, 0xe5, 0x5e, 0x21, 0xaf, 0xbc, 0xac, 0x7f, 0xab, - 0x40, 0xb1, 0x8e, 0x6d, 0xec, 0x18, 0xe4, 0x37, 0xd2, 0xc2, 0xb8, 0x0f, 0x45, 0x16, 0x25, 0xe8, - 0x96, 0x29, 0x99, 0x0d, 0x18, 0xfe, 0x15, 0x30, 0x7f, 0x10, 0x5d, 0x85, 0x9f, 0xe7, 0xa0, 0xd4, - 0x51, 0x34, 0xfa, 0x1c, 0xc7, 0x85, 0xb8, 0x21, 0x54, 0x64, 0x5e, 0x5d, 0xd2, 0xa1, 0xbb, 0x30, - 0xde, 0xe0, 0x6c, 0x85, 0x62, 0x67, 0x07, 0x39, 0x9c, 0x58, 0x50, 0xa0, 0x87, 0x50, 0x94, 0x96, - 0x92, 0xf6, 0x1f, 0x39, 0x33, 0x14, 0x11, 0x7a, 0x1c, 0x58, 0xe4, 0x44, 0x93, 0x46, 0x16, 0x30, - 0xb4, 0x06, 0x53, 0x82, 0xaf, 0x1e, 0xa6, 0x6a, 0x22, 0x1c, 0x78, 0xf3, 0x4c, 0x75, 0x18, 0xa3, - 0x49, 0x41, 0x16, 0xbe, 0xa8, 0x45, 0x28, 0xec, 0xb1, 0x9a, 0xa1, 0xfc, 0x4a, 0x7f, 0xaa, 0xc0, - 0xb4, 0x84, 0x08, 0xb3, 0x2d, 0x40, 0xe9, 0xb0, 0x65, 0xdb, 0x7a, 0x70, 0xea, 0x18, 0xdd, 0x25, - 0xc3, 0xe9, 0x10, 0xbe, 0x77, 0xea, 0x18, 0xa2, 0x68, 0x58, 0x85, 0xd7, 0x3c, 0xec, 0x53, 0x0b, - 0x77, 0x23, 0xf3, 0xb3, 0x73, 0x46, 0x0c, 0xc5, 0xf0, 0x6f, 0xc0, 0xa4, 0x81, 0xa9, 0x71, 0x1c, - 0x3a, 0xbf, 0x96, 0x27, 0xfa, 0x4f, 0x20, 0x41, 0x4f, 0x3c, 0x75, 0x16, 0x5e, 0xe3, 0xca, 0xec, - 0x51, 0x9f, 0xe0, 0xa6, 0x54, 0xf2, 0x1f, 0x14, 0xb8, 0xd2, 0x0d, 0x17, 0xaa, 0x7e, 0x06, 0xd7, - 0x44, 0x47, 0xeb, 0xb9, 0xe3, 0x9e, 0x38, 0x7a, 0xc3, 0x76, 0x8d, 0xe7, 0xdd, 0x3a, 0xcf, 0x71, - 0x84, 0x87, 0xe1, 0x78, 0x3d, 0x1c, 0x16, 0xba, 0xa4, 0xcd, 0x32, 0x37, 0xcc, 0x2c, 0x47, 0x32, - 0x66, 0xa9, 0xfe, 0xaf, 0x02, 0x53, 0x3b, 0x2e, 0xed, 0x7c, 0x31, 0x6f, 0x41, 0x41, 0x36, 0xea, - 0x02, 0x2f, 0x4c, 0x09, 0x78, 0xd9, 0x7d, 0x4a, 0x00, 0xc3, 0x9c, 0x8d, 0xa2, 0x3b, 0x90, 0x97, - 0x9f, 0x82, 0xd8, 0x25, 0x7d, 0xbf, 0x81, 0x71, 0xf1, 0x0d, 0xf4, 0x1e, 0x23, 0xa3, 0xe7, 0x3c, - 0x46, 0xd0, 0x1a, 0x14, 0x79, 0xb8, 0xa9, 0x53, 0x97, 0x29, 0x6b, 0x96, 0xc7, 0x06, 0x88, 0x3b, - 0x0b, 0x9c, 0x68, 0xdf, 0x65, 0xf9, 0xa7, 0xfa, 0xa7, 0x0a, 0xcc, 0x32, 0x0b, 0x6c, 0xb8, 0xfe, - 0x81, 0x4b, 0x2d, 0xe7, 0x48, 0x9a, 0xe2, 0x3d, 0x98, 0x69, 0xbb, 0x14, 0x37, 0x6c, 0xa2, 0x63, - 0xda, 0xbd, 0x50, 0x45, 0x31, 0x50, 0x13, 0x51, 0x68, 0xef, 0xac, 0x46, 0xce, 0x7b, 0x38, 0xfe, - 0x3e, 0x4c, 0x3f, 0xb5, 0xa8, 0x13, 0x3b, 0x78, 0xd3, 0x1a, 0x67, 0x23, 0x17, 0xd2, 0x38, 0xd3, - 0xa1, 0x18, 0xc9, 0x12, 0xbb, 0x74, 0x1b, 0xa6, 0x4e, 0x38, 0x88, 0x67, 0x3d, 0x03, 0xb5, 0x71, - 0x04, 0x13, 0x96, 0xf4, 0x4c, 0x9e, 0x74, 0x5e, 0xd4, 0x7f, 0x55, 0x60, 0x4e, 0x0c, 0xfe, 0xd6, - 0xda, 0x81, 0xe8, 0x77, 0x01, 0x61, 0xd1, 0x6a, 0xe3, 0x25, 0xdb, 0x58, 0xfa, 0xb6, 0x78, 0x36, - 0xef, 0x5a, 0x9c, 0x8e, 0x4d, 0x67, 0x06, 0x27, 0x41, 0xea, 0xbf, 0xe5, 0xe0, 0x6a, 0xcf, 0xa4, - 0x84, 0xf9, 0x7e, 0x2f, 0xa3, 0xd9, 0xf8, 0x69, 0x6f, 0xf1, 0x2a, 0x83, 0x45, 0xbf, 0x56, 0xe3, - 0x6e, 0x4f, 0xab, 0x71, 0x65, 0x70, 0xde, 0xff, 0x2f, 0x1a, 0x8d, 0x3f, 0x1f, 0x81, 0x02, 0x3b, - 0x36, 0xa2, 0x2f, 0xa0, 0x02, 0x79, 0xee, 0x71, 0x09, 0x8f, 0xc4, 0xf2, 0x5a, 0xf4, 0x8e, 0x0c, - 0x98, 0x8f, 0x1d, 0x58, 0x86, 0x75, 0x68, 0x19, 0xba, 0x49, 0x1c, 0xb7, 0x69, 0x39, 0xa2, 0x1d, - 0x90, 0x63, 0xe5, 0xc3, 0x4c, 0x67, 0xb8, 0x16, 0x22, 0x6b, 0xd7, 0x3b, 0x07, 0x1c, 0xe3, 0xb1, - 0x16, 0x67, 0x81, 0xee, 0xc0, 0x35, 0x29, 0x24, 0xd6, 0x0a, 0xa0, 0xee, 0x73, 0xe2, 0x04, 0xc2, - 0x35, 0x5c, 0x15, 0x08, 0x6b, 0xd1, 0xf8, 0x3e, 0x1b, 0x46, 0xb7, 0xa1, 0x2c, 0x69, 0x3b, 0xe9, - 0xad, 0x20, 0x1d, 0x65, 0xa4, 0x73, 0x62, 0xfc, 0x89, 0x1c, 0x16, 0x94, 0xef, 0x80, 0xbc, 0x1c, - 0xa1, 0xdb, 0x9e, 0xee, 0x1c, 0xd2, 0x80, 0x65, 0xc2, 0x79, 0x4d, 0x1e, 0xd1, 0xdb, 0xde, 0xce, - 0x21, 0x0d, 0xd0, 0x0a, 0xcc, 0x4a, 0x3c, 0xcf, 0x77, 0x3d, 0x37, 0xc0, 0x36, 0xc7, 0x1e, 0x63, - 0xd8, 0xaf, 0x89, 0xc1, 0x5d, 0x31, 0xc6, 0x68, 0x6a, 0xf0, 0x86, 0xa4, 0x69, 0xb3, 0x53, 0x4f, - 0xf7, 0x89, 0x41, 0x2c, 0x8f, 0x4a, 0xd5, 0xc6, 0x19, 0x6d, 0x45, 0x20, 0xc9, 0x93, 0x91, 0xa1, - 0x70, 0xf5, 0xd4, 0x1f, 0xc2, 0xb4, 0x5c, 0x26, 0xb1, 0xfb, 0xef, 0xc3, 0x34, 0x33, 0xbd, 0xde, - 0x24, 0x14, 0xc7, 0xbe, 0xba, 0x9b, 0x59, 0xb6, 0x7f, 0x24, 0xf0, 0xb4, 0x02, 0xa3, 0x93, 0xaf, - 0xea, 0x1c, 0x5c, 0xa9, 0x79, 0xde, 0x2e, 0xf6, 0x71, 0x93, 0x50, 0xe2, 0x47, 0x11, 0xc0, 0x33, - 0x98, 0x4d, 0xc0, 0x85, 0xe4, 0x55, 0x00, 0x2f, 0x82, 0x66, 0x44, 0x50, 0xd8, 0xf3, 0xd8, 0x37, - 0xde, 0xc5, 0x20, 0x46, 0xa6, 0x22, 0x28, 0xdd, 0xc7, 0xc1, 0xae, 0x6f, 0x75, 0x22, 0x48, 0xf5, - 0x1b, 0x05, 0x66, 0x62, 0xc0, 0x28, 0xe0, 0x86, 0x23, 0x1c, 0xe8, 0x1e, 0x83, 0x66, 0x6c, 0xfc, - 0x9e, 0x52, 0x5e, 0x87, 0xcd, 0xc4, 0x91, 0x7c, 0x44, 0x8f, 0x61, 0x1a, 0xdb, 0x54, 0x8f, 0x71, - 0xe3, 0xdb, 0x75, 0x08, 0x6e, 0x53, 0xd8, 0xa6, 0xd1, 0x5b, 0x68, 0xba, 0x8d, 0x47, 0x6b, 0xbd, - 0xa6, 0xf3, 0x60, 0x36, 0x01, 0x17, 0x73, 0x79, 0x9a, 0x62, 0xba, 0x4f, 0xb3, 0xeb, 0x40, 0x5d, - 0x97, 0xa4, 0xda, 0xcb, 0xd5, 0x8d, 0xa6, 0x99, 0x61, 0xce, 0xbf, 0x50, 0xe0, 0x6a, 0xe8, 0x59, - 0xeb, 0xa7, 0xb1, 0x92, 0xa1, 0xf8, 0xa2, 0x77, 0xa1, 0xc8, 0x6e, 0xa3, 0xc4, 0x6a, 0x8f, 0xb9, - 0x21, 0x6b, 0x8f, 0x21, 0x7d, 0xe7, 0x3d, 0xed, 0xc6, 0xc0, 0x48, 0xea, 0x8d, 0x81, 0x63, 0x28, - 0xf7, 0x6a, 0x15, 0x79, 0xbf, 0xe9, 0x40, 0xde, 0x7f, 0xd1, 0x43, 0x01, 0x65, 0x65, 0x98, 0x7b, - 0x32, 0x85, 0x20, 0x0e, 0x64, 0x06, 0xd8, 0x3b, 0xc1, 0x5e, 0x86, 0x01, 0x92, 0xc5, 0xd7, 0xdc, - 0x2b, 0x15, 0x5f, 0x07, 0x37, 0xc0, 0x36, 0x94, 0x7b, 0xb5, 0x12, 0x06, 0x58, 0x82, 0xd1, 0x90, - 0x6d, 0x6f, 0xc9, 0x36, 0x9a, 0xf6, 0x09, 0xf6, 0xc4, 0x6c, 0x19, 0xa6, 0x7a, 0x15, 0x66, 0x9f, - 0x38, 0xac, 0xc8, 0x4c, 0xcc, 0x70, 0x30, 0xda, 0x70, 0x0f, 0x60, 0x2e, 0x39, 0x70, 0x6e, 0x21, - 0x3f, 0x51, 0x60, 0x6e, 0xa7, 0x65, 0xdb, 0xd6, 0xa1, 0x45, 0xfc, 0xae, 0xa4, 0x00, 0xdd, 0x87, - 0x09, 0x47, 0x8e, 0x08, 0x13, 0xde, 0xea, 0xd7, 0x02, 0x89, 0x58, 0x69, 0x1d, 0xda, 0xc1, 0xed, - 0xb7, 0x08, 0x57, 0x7b, 0x74, 0x11, 0x33, 0xbb, 0x02, 0x97, 0x79, 0xd4, 0xcc, 0xbd, 0x14, 0x7f, - 0x51, 0x0f, 0xe0, 0x7a, 0xfc, 0xf2, 0x84, 0x73, 0xe8, 0xd6, 0x4f, 0x37, 0x71, 0x70, 0x2c, 0xa7, - 0xc0, 0xef, 0x5f, 0xe4, 0x86, 0xbd, 0x7f, 0xa1, 0x7e, 0x05, 0x73, 0x09, 0xbe, 0x92, 0xe3, 0x9b, - 0x30, 0xd5, 0x55, 0x40, 0xe5, 0x51, 0xeb, 0x64, 0xd0, 0xa9, 0x9b, 0xa2, 0x37, 0x00, 0x88, 0x63, - 0x76, 0x67, 0x13, 0x13, 0xc4, 0x31, 0x45, 0x62, 0xf0, 0xcb, 0x1c, 0x14, 0x13, 0xcc, 0xd1, 0x1c, - 0x8c, 0x75, 0xf1, 0x13, 0x6f, 0xe7, 0xd5, 0x3f, 0x19, 0x3f, 0x8c, 0xbc, 0xd2, 0x8d, 0xa1, 0x03, - 0x98, 0xf4, 0x88, 0x1f, 0x86, 0x00, 0xec, 0x72, 0xe1, 0x68, 0xf2, 0x16, 0x56, 0xbf, 0x50, 0xb2, - 0x43, 0xab, 0xc5, 0x19, 0xa1, 0x1a, 0x8c, 0xb2, 0x1c, 0xf6, 0xf2, 0x90, 0xb1, 0x29, 0xcb, 0x67, - 0x19, 0xa9, 0xfa, 0x04, 0xae, 0xf6, 0xac, 0x93, 0xd8, 0x30, 0x77, 0x60, 0x9c, 0xbe, 0xd4, 0x2d, - 0xe7, 0xd0, 0x15, 0x5f, 0xc3, 0x9b, 0x67, 0x76, 0x39, 0x19, 0xed, 0x18, 0x7d, 0x19, 0xfe, 0x55, - 0x7f, 0x04, 0x6f, 0x64, 0x6c, 0xab, 0x0b, 0x60, 0xfe, 0x14, 0x0a, 0x22, 0x2f, 0x14, 0xcc, 0x12, - 0xf7, 0x07, 0x95, 0x73, 0xde, 0x1f, 0x54, 0xff, 0x2e, 0xfc, 0x94, 0x13, 0xf9, 0xd6, 0xc5, 0x8a, - 0x40, 0xeb, 0x30, 0x25, 0xfb, 0x29, 0xfa, 0x73, 0x72, 0x2a, 0x76, 0xe6, 0x20, 0x3d, 0x95, 0x49, - 0xab, 0xf3, 0xa2, 0xfe, 0xe3, 0x28, 0xbc, 0x96, 0x22, 0x2a, 0xcd, 0x77, 0x29, 0xaf, 0xe6, 0xbb, - 0xea, 0x30, 0xca, 0x9c, 0x0d, 0x57, 0xb4, 0x3a, 0xb8, 0xf3, 0x65, 0x5a, 0x31, 0xda, 0x8b, 0xcb, - 0x40, 0xbb, 0x4f, 0xd4, 0xd1, 0x57, 0x38, 0x51, 0xdf, 0x86, 0x69, 0x7e, 0x42, 0xe8, 0x86, 0x4f, - 0x30, 0x25, 0xa6, 0x68, 0xe4, 0x14, 0x38, 0x74, 0x95, 0x03, 0xc3, 0xc3, 0x4a, 0xa0, 0xf1, 0xb3, - 0x73, 0x8c, 0x1f, 0x56, 0x1c, 0xc6, 0x0b, 0x0e, 0x95, 0x58, 0x53, 0x67, 0x9c, 0xdf, 0x39, 0x95, - 0xef, 0x68, 0x33, 0xba, 0xcc, 0x95, 0x67, 0xba, 0x2e, 0xf5, 0xd3, 0xb5, 0x63, 0xf8, 0x3d, 0x46, - 0x17, 0xdd, 0xec, 0xda, 0x82, 0x69, 0x9f, 0xd0, 0x96, 0xef, 0x44, 0x25, 0xb0, 0x89, 0x81, 0x4b, - 0x60, 0x05, 0x4e, 0x29, 0x40, 0xea, 0xbf, 0x8c, 0x00, 0x74, 0xbc, 0xd8, 0xc5, 0xb7, 0x5a, 0xc3, - 0x63, 0x89, 0xf9, 0xd0, 0x5c, 0x9f, 0x16, 0x82, 0x68, 0xc9, 0x84, 0xba, 0xc4, 0x6e, 0xc1, 0x85, - 0xa4, 0x5d, 0x46, 0x1d, 0x49, 0x18, 0xf5, 0xc2, 0xf6, 0xc0, 0x3e, 0x4c, 0xf2, 0xab, 0x6e, 0x3c, - 0x0b, 0xe7, 0xa7, 0xe8, 0x47, 0xfd, 0xd4, 0xad, 0x63, 0x6a, 0x1c, 0x87, 0x3a, 0xf3, 0xcb, 0x09, - 0x2c, 0x13, 0x07, 0x37, 0x7a, 0x8e, 0xef, 0x2c, 0x1e, 0x60, 0x88, 0x4d, 0x23, 0x77, 0x16, 0x07, - 0xc6, 0xb6, 0xc6, 0xf8, 0xab, 0x6d, 0x0d, 0xf5, 0x9f, 0x14, 0xb8, 0xfa, 0xf8, 0xc4, 0x21, 0x66, - 0xa7, 0xdf, 0x16, 0x45, 0x20, 0xfb, 0xb1, 0xfb, 0x4f, 0xfc, 0xb2, 0xba, 0x32, 0xd8, 0xa2, 0x48, - 0x5e, 0x6c, 0xad, 0x3b, 0x97, 0x9e, 0xf8, 0xc5, 0xf6, 0x64, 0xef, 0x2d, 0xf7, 0x6a, 0xbd, 0x37, - 0xf5, 0x08, 0xca, 0xbd, 0x13, 0x10, 0x07, 0xef, 0x45, 0xb6, 0x1e, 0xd5, 0x03, 0x28, 0xb3, 0xb4, - 0x50, 0x26, 0x73, 0xf5, 0xd3, 0xa8, 0xcf, 0xd2, 0x55, 0x38, 0xcc, 0x0d, 0x57, 0x38, 0x54, 0x4d, - 0xb8, 0x96, 0xc2, 0x37, 0x33, 0xf3, 0x54, 0xce, 0x97, 0x79, 0xfe, 0x55, 0x0e, 0x6e, 0x76, 0x52, - 0xf8, 0x20, 0xea, 0xb5, 0xfc, 0x66, 0xfa, 0x5b, 0xe8, 0x0b, 0x18, 0x8b, 0xf5, 0x12, 0xa6, 0xd3, - 0x6e, 0xb4, 0xf5, 0xd3, 0xa6, 0xca, 0xdb, 0x0a, 0x9a, 0x60, 0xa4, 0x7e, 0x0d, 0x63, 0xa2, 0x63, - 0x31, 0x07, 0x68, 0x63, 0x6b, 0x7b, 0x7f, 0x5d, 0xd3, 0x9f, 0xec, 0xec, 0xed, 0xae, 0xaf, 0x6e, - 0x6d, 0x6c, 0xad, 0xaf, 0x95, 0x2e, 0xa1, 0xf7, 0xe1, 0x5d, 0x01, 0xaf, 0x6d, 0x6f, 0xeb, 0xb5, - 0xd5, 0xfd, 0xad, 0x83, 0x75, 0xfd, 0xe9, 0xd6, 0xfe, 0xa6, 0xbe, 0xf3, 0x78, 0xe7, 0xab, 0x75, - 0xed, 0xb1, 0x5e, 0xaf, 0x6d, 0xd7, 0x76, 0x56, 0xd7, 0xf7, 0x4a, 0x0a, 0x9a, 0x06, 0xe8, 0x20, - 0x97, 0x72, 0x2a, 0x81, 0x37, 0xcf, 0xd0, 0x48, 0x2c, 0xc7, 0xef, 0x00, 0xb0, 0x1b, 0x14, 0xbc, - 0xfc, 0xaf, 0x0c, 0x5a, 0xfe, 0x9f, 0x68, 0xcb, 0x47, 0xf5, 0x2f, 0x73, 0xf0, 0xbd, 0x44, 0x3d, - 0x24, 0x7d, 0x2d, 0x9e, 0x44, 0x16, 0x54, 0x98, 0x05, 0x3f, 0xef, 0xb5, 0xe0, 0x20, 0x7c, 0x12, - 0x56, 0xec, 0x5d, 0xe2, 0xdc, 0xf9, 0xbb, 0x5d, 0xfd, 0xd6, 0xe3, 0x0a, 0x94, 0x04, 0x7c, 0x75, - 0xbb, 0xb6, 0xf5, 0xa8, 0x56, 0xdf, 0x5e, 0x2f, 0x29, 0xe8, 0x3a, 0x94, 0x05, 0x74, 0xe7, 0xf1, - 0xbe, 0xfe, 0xc3, 0xf5, 0xfd, 0xd8, 0x68, 0x4e, 0xfd, 0x63, 0x05, 0xde, 0xee, 0x33, 0xaf, 0x8b, - 0x5a, 0x0b, 0x74, 0x1d, 0x26, 0xd8, 0x31, 0x1b, 0xc6, 0x41, 0xa2, 0x1f, 0xd0, 0x01, 0xac, 0xfc, - 0xf5, 0x55, 0x98, 0x0c, 0xd1, 0xf6, 0x88, 0xdf, 0xb6, 0x58, 0x27, 0x69, 0x8c, 0x67, 0x45, 0xe8, - 0x46, 0x4a, 0xe8, 0x16, 0xcf, 0xdd, 0x2a, 0x37, 0xb3, 0x11, 0x84, 0xf2, 0x3a, 0x4c, 0xc5, 0x9b, - 0x29, 0xe8, 0xed, 0x2c, 0x8a, 0xae, 0x26, 0x4c, 0xe5, 0x9d, 0x7e, 0x68, 0x9c, 0xfd, 0x92, 0x82, - 0x1e, 0xc0, 0x65, 0x16, 0x8d, 0xa2, 0xf9, 0x5e, 0x92, 0x78, 0x63, 0xa4, 0x72, 0x23, 0x73, 0x3c, - 0xe2, 0x45, 0x60, 0xba, 0x3b, 0xb2, 0x45, 0xef, 0x66, 0x10, 0x25, 0x7b, 0x0d, 0x95, 0x85, 0xfe, - 0x88, 0x91, 0x98, 0x47, 0x30, 0xc6, 0xeb, 0x6e, 0x69, 0x06, 0xee, 0x2a, 0x9c, 0xa6, 0x19, 0xb8, - 0xbb, 0x64, 0xb7, 0xa4, 0x20, 0x1b, 0x66, 0x7a, 0xce, 0x55, 0xf4, 0x5e, 0x06, 0x61, 0xca, 0xa1, - 0x5e, 0x79, 0x7f, 0x20, 0xdc, 0xa8, 0x40, 0x5e, 0xe8, 0x2a, 0xc0, 0xa1, 0x94, 0xa5, 0x4a, 0x2b, - 0xfd, 0x55, 0xde, 0xed, 0x8b, 0x27, 0x24, 0xec, 0xc3, 0x44, 0x54, 0x0d, 0x43, 0x6a, 0x2f, 0x55, - 0xb2, 0xc4, 0x57, 0x79, 0xeb, 0x4c, 0x9c, 0x8e, 0xde, 0x5d, 0xe5, 0xb3, 0x34, 0xbd, 0xd3, 0xea, - 0x6e, 0x69, 0x7a, 0xa7, 0xd7, 0xe1, 0x0c, 0x98, 0xee, 0xbe, 0xea, 0x90, 0xb6, 0x7b, 0x52, 0xef, - 0x5b, 0xa4, 0xed, 0x9e, 0x8c, 0x5b, 0x13, 0x5f, 0x40, 0x5e, 0x5e, 0x56, 0x40, 0x29, 0xd9, 0x60, - 0xe2, 0x5e, 0x44, 0x45, 0x3d, 0x0b, 0xa5, 0xa3, 0x77, 0xf7, 0xb5, 0x84, 0x34, 0xbd, 0x53, 0xef, - 0x42, 0xa4, 0xe9, 0x9d, 0x71, 0xc3, 0xc1, 0x82, 0x52, 0xf2, 0xca, 0x00, 0xba, 0xd5, 0x4b, 0x9d, - 0x71, 0x77, 0xa1, 0xf2, 0xde, 0x20, 0xa8, 0x42, 0xd4, 0x1e, 0xe4, 0x65, 0x77, 0x3e, 0xcd, 0x44, - 0x89, 0x2b, 0x06, 0x69, 0x26, 0x4a, 0x36, 0xf7, 0x97, 0x94, 0x50, 0xff, 0x64, 0xd1, 0x31, 0x4d, - 0xff, 0x8c, 0x72, 0x69, 0x9a, 0xfe, 0x99, 0x35, 0x4c, 0x0b, 0x4a, 0xc9, 0xf2, 0x5e, 0x9a, 0xa8, - 0x8c, 0xc2, 0x64, 0x9a, 0xa8, 0xcc, 0x6a, 0x21, 0x81, 0xe9, 0xee, 0x12, 0x5f, 0xda, 0xd2, 0xa7, - 0x56, 0x07, 0xd3, 0x96, 0x3e, 0xbd, 0x5a, 0xb8, 0xa4, 0xa0, 0x43, 0x28, 0x26, 0x0a, 0x6e, 0x28, - 0xed, 0xbc, 0x4c, 0xad, 0x0f, 0x56, 0x6e, 0x0d, 0x80, 0x29, 0xa6, 0xf3, 0x12, 0x66, 0x53, 0x0b, - 0x2a, 0xa8, 0xda, 0xb7, 0x6e, 0xd2, 0x55, 0xd0, 0xab, 0x2c, 0x0e, 0x8c, 0x2f, 0x24, 0x1f, 0xf7, - 0x16, 0xdb, 0x16, 0xfa, 0xd7, 0x6a, 0xb2, 0x67, 0x98, 0x51, 0x6e, 0x5a, 0x52, 0xd0, 0x73, 0x28, - 0x25, 0xd3, 0x80, 0xb4, 0xdd, 0x91, 0x91, 0xeb, 0xa4, 0xed, 0x8e, 0xac, 0xac, 0x62, 0x49, 0x41, - 0x2e, 0xa0, 0xde, 0x1b, 0x68, 0xe8, 0xfd, 0x21, 0x2e, 0xf2, 0x57, 0x3e, 0x18, 0x0c, 0x59, 0xd8, - 0x71, 0x07, 0xc6, 0x45, 0xeb, 0x13, 0xdd, 0xcc, 0xec, 0x8a, 0x4a, 0xd6, 0x6f, 0x9e, 0x81, 0xd1, - 0x59, 0x97, 0x44, 0x2b, 0x35, 0x6d, 0x5d, 0xd2, 0x3b, 0xdc, 0x69, 0xeb, 0x92, 0xd1, 0x97, 0x5d, - 0x52, 0x90, 0x03, 0x33, 0x3d, 0xbf, 0x0f, 0x4d, 0xf5, 0xc2, 0x19, 0x3f, 0xaf, 0x4d, 0xf5, 0xc2, - 0x59, 0x3f, 0x38, 0x5d, 0x52, 0xd0, 0x09, 0x5c, 0x49, 0xfb, 0x0d, 0x22, 0xfa, 0x70, 0xd0, 0xdf, - 0x2a, 0x72, 0xa9, 0xd5, 0xe1, 0x7e, 0xda, 0xb8, 0xa4, 0xa0, 0x3f, 0x52, 0xe0, 0x5a, 0x66, 0x02, - 0x81, 0x56, 0x86, 0xcf, 0x7f, 0x2a, 0x1f, 0x0d, 0x45, 0x13, 0x29, 0xf2, 0xe7, 0x0a, 0xbc, 0x71, - 0x66, 0x04, 0x8d, 0x3e, 0x39, 0x5f, 0x2a, 0x51, 0xf9, 0x74, 0x68, 0xba, 0x48, 0xa9, 0x3d, 0xc8, - 0xcb, 0x1f, 0x9c, 0xa7, 0x39, 0x9f, 0xc4, 0x4f, 0xf4, 0xd3, 0x9c, 0x4f, 0xf2, 0xf7, 0xea, 0x4b, - 0x4a, 0xfd, 0xbf, 0x94, 0x5f, 0x7c, 0x3b, 0xaf, 0xfc, 0xea, 0xdb, 0x79, 0xe5, 0xdf, 0xbf, 0x9d, - 0x57, 0xfe, 0xec, 0xbb, 0xf9, 0x4b, 0xbf, 0xfa, 0x6e, 0xfe, 0xd2, 0xaf, 0xbf, 0x9b, 0xbf, 0x04, - 0x57, 0x0c, 0xb7, 0xd9, 0xc3, 0xa3, 0x3e, 0x11, 0xc6, 0xf3, 0xbb, 0xbe, 0x4b, 0xdd, 0x5d, 0xe5, - 0xab, 0xc7, 0x47, 0x16, 0x3d, 0x6e, 0x35, 0xc2, 0xfc, 0x7f, 0x31, 0xa0, 0x3e, 0x76, 0x8e, 0x88, - 0xed, 0xb6, 0xc9, 0x87, 0x6d, 0xe2, 0xd0, 0x96, 0x4f, 0x82, 0x45, 0xcb, 0xa1, 0xc4, 0x37, 0x8e, - 0x59, 0x71, 0x29, 0xa0, 0x8b, 0xed, 0xdb, 0x8b, 0xec, 0x65, 0x31, 0xf9, 0x0f, 0x2e, 0xee, 0x86, - 0x7f, 0xdb, 0xcb, 0x7f, 0x93, 0x1b, 0xd9, 0x3d, 0xf8, 0xf2, 0xef, 0x73, 0xa5, 0x5d, 0x29, 0x36, - 0x94, 0x56, 0x3d, 0x58, 0xfe, 0xe7, 0x0e, 0xe8, 0x59, 0x08, 0x7a, 0x76, 0xb0, 0xfc, 0x6d, 0xee, - 0x7a, 0x12, 0xf4, 0xec, 0xfe, 0x6e, 0x5d, 0x46, 0x96, 0xff, 0x99, 0x43, 0x72, 0xf8, 0xce, 0x9d, - 0x70, 0xfc, 0xce, 0x9d, 0x83, 0xe5, 0xc6, 0x18, 0xfb, 0x21, 0xfd, 0x47, 0xff, 0x17, 0x00, 0x00, - 0xff, 0xff, 0xf3, 0xd8, 0xd9, 0xad, 0x62, 0x43, 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 - -// ViewServiceClient is the client API for ViewService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ViewServiceClient interface { - // Get current status of chain sync - Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) - // Stream sync status updates until the view service has caught up with the chain. - // Returns a stream of `StatusStreamResponse`s. - StatusStream(ctx context.Context, in *StatusStreamRequest, opts ...grpc.CallOption) (ViewService_StatusStreamClient, error) - // Queries for notes that have been accepted by the chain. - // Returns a stream of `NotesResponse`s. - Notes(ctx context.Context, in *NotesRequest, opts ...grpc.CallOption) (ViewService_NotesClient, error) - // Returns a stream of `NotesForVotingResponse`s. - NotesForVoting(ctx context.Context, in *NotesForVotingRequest, opts ...grpc.CallOption) (ViewService_NotesForVotingClient, error) - // Queries for metadata about known assets. - // Returns a stream of `AssetsResponse`s. - Assets(ctx context.Context, in *AssetsRequest, opts ...grpc.CallOption) (ViewService_AssetsClient, error) - // Query for metadata about a specific asset, by asset ID. - // - // This is the same as the method on the shielded pool's `QueryService`, but exposing it - // here allows a view server to provide more specific or opinionated asset metadata -- like - // using an asset registry to provide tickers, symbols, etc. - AssetMetadataById(ctx context.Context, in *AssetMetadataByIdRequest, opts ...grpc.CallOption) (*AssetMetadataByIdResponse, error) - // Query for the current app parameters. - AppParameters(ctx context.Context, in *AppParametersRequest, opts ...grpc.CallOption) (*AppParametersResponse, error) - // Query for the current gas prices. - GasPrices(ctx context.Context, in *GasPricesRequest, opts ...grpc.CallOption) (*GasPricesResponse, error) - // Query for the current FMD parameters. - FMDParameters(ctx context.Context, in *FMDParametersRequest, opts ...grpc.CallOption) (*FMDParametersResponse, error) - // Query for an address given an address index - AddressByIndex(ctx context.Context, in *AddressByIndexRequest, opts ...grpc.CallOption) (*AddressByIndexResponse, error) - // Query for wallet id - WalletId(ctx context.Context, in *WalletIdRequest, opts ...grpc.CallOption) (*WalletIdResponse, error) - // Query for an address given an address index - IndexByAddress(ctx context.Context, in *IndexByAddressRequest, opts ...grpc.CallOption) (*IndexByAddressResponse, error) - // Query for an ephemeral address - EphemeralAddress(ctx context.Context, in *EphemeralAddressRequest, opts ...grpc.CallOption) (*EphemeralAddressResponse, error) - // Query for balance of a given address. - // Returns a stream of `BalancesResponses`. - Balances(ctx context.Context, in *BalancesRequest, opts ...grpc.CallOption) (ViewService_BalancesClient, error) - // Query for a note by its note commitment, optionally waiting until the note is detected. - NoteByCommitment(ctx context.Context, in *NoteByCommitmentRequest, opts ...grpc.CallOption) (*NoteByCommitmentResponse, error) - // Query for a swap by its swap commitment, optionally waiting until the swap is detected. - SwapByCommitment(ctx context.Context, in *SwapByCommitmentRequest, opts ...grpc.CallOption) (*SwapByCommitmentResponse, error) - // Query for all unclaimed swaps. - UnclaimedSwaps(ctx context.Context, in *UnclaimedSwapsRequest, opts ...grpc.CallOption) (ViewService_UnclaimedSwapsClient, error) - // Query for whether a nullifier has been spent, optionally waiting until it is spent. - NullifierStatus(ctx context.Context, in *NullifierStatusRequest, opts ...grpc.CallOption) (*NullifierStatusResponse, error) - // Query for a given transaction by its hash. - TransactionInfoByHash(ctx context.Context, in *TransactionInfoByHashRequest, opts ...grpc.CallOption) (*TransactionInfoByHashResponse, error) - // Query for the full transactions in the given range of blocks. - // Returns a stream of `TransactionInfoResponse`s. - TransactionInfo(ctx context.Context, in *TransactionInfoRequest, opts ...grpc.CallOption) (ViewService_TransactionInfoClient, error) - // Query for owned position IDs for the given trading pair and in the given position state. - OwnedPositionIds(ctx context.Context, in *OwnedPositionIdsRequest, opts ...grpc.CallOption) (ViewService_OwnedPositionIdsClient, error) - // Translates a high-level intent ("send X funds to Y address") into a complete transaction plan. - TransactionPlanner(ctx context.Context, in *TransactionPlannerRequest, opts ...grpc.CallOption) (*TransactionPlannerResponse, error) - // Returns authentication data for the given transaction plan. - // - // This method takes a complete transaction plan, so that the client can get a - // consistent set of authentication paths to a common root for the entire - // transaction. (Otherwise, if a client made multiple requests, the wallet - // service could have advanced the state commitment tree between queries). - Witness(ctx context.Context, in *WitnessRequest, opts ...grpc.CallOption) (*WitnessResponse, error) - // Like `Witness`, but immediately uses the witness data to build (prove) the transaction. - // - // This method is useful for clients that can't easily do proving themselves, either because - // they're not written in Rust and can't easily import the proving code, or because they don't - // have access to proving keys, or some other reason. - // - // This method streams status updates to the caller before finally returning the transaction. - WitnessAndBuild(ctx context.Context, in *WitnessAndBuildRequest, opts ...grpc.CallOption) (ViewService_WitnessAndBuildClient, error) - // Authorize a transaction plan and build the transaction. - // - // This method is only supported on view servers that have access to a custody - // service. Otherwise, it will fail. - // - // Penumbra's transaction authorization mechanism is designed so transactions - // can be signed and built (proved) concurrently. This allows implementations - // to, e.g., start proving optimistically while presenting the user with an - // approval dialog. - // - // This method streams status updates to the caller before finally returning the transaction. - AuthorizeAndBuild(ctx context.Context, in *AuthorizeAndBuildRequest, opts ...grpc.CallOption) (ViewService_AuthorizeAndBuildClient, error) - // Broadcast a transaction to the network, optionally waiting for full confirmation. - // - // This method streams status updates to the caller before finally returning confirmation. - BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (ViewService_BroadcastTransactionClient, error) - // Get delegation tokens for a given address index. Each delegation token will - // be represented by a `ValueView` with the given address index's balance of - // that token. Each `ValueView`'s `extended_metadata` field will contain the - // `ValidatorInfo` of the delegated validator. - DelegationsByAddressIndex(ctx context.Context, in *DelegationsByAddressIndexRequest, opts ...grpc.CallOption) (ViewService_DelegationsByAddressIndexClient, error) - // Get unbonding tokens for the given address index, optionally filtered by - // whether the tokens are currently claimable. - UnbondingTokensByAddressIndex(ctx context.Context, in *UnbondingTokensByAddressIndexRequest, opts ...grpc.CallOption) (ViewService_UnbondingTokensByAddressIndexClient, error) - // Gets the auctions controlled by the user's wallet. - Auctions(ctx context.Context, in *AuctionsRequest, opts ...grpc.CallOption) (ViewService_AuctionsClient, error) -} - -type viewServiceClient struct { - cc grpc1.ClientConn -} - -func NewViewServiceClient(cc grpc1.ClientConn) ViewServiceClient { - return &viewServiceClient{cc} -} - -func (c *viewServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { - out := new(StatusResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/Status", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) StatusStream(ctx context.Context, in *StatusStreamRequest, opts ...grpc.CallOption) (ViewService_StatusStreamClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[0], "/penumbra.view.v1.ViewService/StatusStream", opts...) - if err != nil { - return nil, err - } - x := &viewServiceStatusStreamClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_StatusStreamClient interface { - Recv() (*StatusStreamResponse, error) - grpc.ClientStream -} - -type viewServiceStatusStreamClient struct { - grpc.ClientStream -} - -func (x *viewServiceStatusStreamClient) Recv() (*StatusStreamResponse, error) { - m := new(StatusStreamResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) Notes(ctx context.Context, in *NotesRequest, opts ...grpc.CallOption) (ViewService_NotesClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[1], "/penumbra.view.v1.ViewService/Notes", opts...) - if err != nil { - return nil, err - } - x := &viewServiceNotesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_NotesClient interface { - Recv() (*NotesResponse, error) - grpc.ClientStream -} - -type viewServiceNotesClient struct { - grpc.ClientStream -} - -func (x *viewServiceNotesClient) Recv() (*NotesResponse, error) { - m := new(NotesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) NotesForVoting(ctx context.Context, in *NotesForVotingRequest, opts ...grpc.CallOption) (ViewService_NotesForVotingClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[2], "/penumbra.view.v1.ViewService/NotesForVoting", opts...) - if err != nil { - return nil, err - } - x := &viewServiceNotesForVotingClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_NotesForVotingClient interface { - Recv() (*NotesForVotingResponse, error) - grpc.ClientStream -} - -type viewServiceNotesForVotingClient struct { - grpc.ClientStream -} - -func (x *viewServiceNotesForVotingClient) Recv() (*NotesForVotingResponse, error) { - m := new(NotesForVotingResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) Assets(ctx context.Context, in *AssetsRequest, opts ...grpc.CallOption) (ViewService_AssetsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[3], "/penumbra.view.v1.ViewService/Assets", opts...) - if err != nil { - return nil, err - } - x := &viewServiceAssetsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_AssetsClient interface { - Recv() (*AssetsResponse, error) - grpc.ClientStream -} - -type viewServiceAssetsClient struct { - grpc.ClientStream -} - -func (x *viewServiceAssetsClient) Recv() (*AssetsResponse, error) { - m := new(AssetsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) AssetMetadataById(ctx context.Context, in *AssetMetadataByIdRequest, opts ...grpc.CallOption) (*AssetMetadataByIdResponse, error) { - out := new(AssetMetadataByIdResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/AssetMetadataById", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) AppParameters(ctx context.Context, in *AppParametersRequest, opts ...grpc.CallOption) (*AppParametersResponse, error) { - out := new(AppParametersResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/AppParameters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) GasPrices(ctx context.Context, in *GasPricesRequest, opts ...grpc.CallOption) (*GasPricesResponse, error) { - out := new(GasPricesResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/GasPrices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) FMDParameters(ctx context.Context, in *FMDParametersRequest, opts ...grpc.CallOption) (*FMDParametersResponse, error) { - out := new(FMDParametersResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/FMDParameters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) AddressByIndex(ctx context.Context, in *AddressByIndexRequest, opts ...grpc.CallOption) (*AddressByIndexResponse, error) { - out := new(AddressByIndexResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/AddressByIndex", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) WalletId(ctx context.Context, in *WalletIdRequest, opts ...grpc.CallOption) (*WalletIdResponse, error) { - out := new(WalletIdResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/WalletId", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) IndexByAddress(ctx context.Context, in *IndexByAddressRequest, opts ...grpc.CallOption) (*IndexByAddressResponse, error) { - out := new(IndexByAddressResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/IndexByAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) EphemeralAddress(ctx context.Context, in *EphemeralAddressRequest, opts ...grpc.CallOption) (*EphemeralAddressResponse, error) { - out := new(EphemeralAddressResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/EphemeralAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) Balances(ctx context.Context, in *BalancesRequest, opts ...grpc.CallOption) (ViewService_BalancesClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[4], "/penumbra.view.v1.ViewService/Balances", opts...) - if err != nil { - return nil, err - } - x := &viewServiceBalancesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_BalancesClient interface { - Recv() (*BalancesResponse, error) - grpc.ClientStream -} - -type viewServiceBalancesClient struct { - grpc.ClientStream -} - -func (x *viewServiceBalancesClient) Recv() (*BalancesResponse, error) { - m := new(BalancesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) NoteByCommitment(ctx context.Context, in *NoteByCommitmentRequest, opts ...grpc.CallOption) (*NoteByCommitmentResponse, error) { - out := new(NoteByCommitmentResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/NoteByCommitment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) SwapByCommitment(ctx context.Context, in *SwapByCommitmentRequest, opts ...grpc.CallOption) (*SwapByCommitmentResponse, error) { - out := new(SwapByCommitmentResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/SwapByCommitment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) UnclaimedSwaps(ctx context.Context, in *UnclaimedSwapsRequest, opts ...grpc.CallOption) (ViewService_UnclaimedSwapsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[5], "/penumbra.view.v1.ViewService/UnclaimedSwaps", opts...) - if err != nil { - return nil, err - } - x := &viewServiceUnclaimedSwapsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_UnclaimedSwapsClient interface { - Recv() (*UnclaimedSwapsResponse, error) - grpc.ClientStream -} - -type viewServiceUnclaimedSwapsClient struct { - grpc.ClientStream -} - -func (x *viewServiceUnclaimedSwapsClient) Recv() (*UnclaimedSwapsResponse, error) { - m := new(UnclaimedSwapsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) NullifierStatus(ctx context.Context, in *NullifierStatusRequest, opts ...grpc.CallOption) (*NullifierStatusResponse, error) { - out := new(NullifierStatusResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/NullifierStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) TransactionInfoByHash(ctx context.Context, in *TransactionInfoByHashRequest, opts ...grpc.CallOption) (*TransactionInfoByHashResponse, error) { - out := new(TransactionInfoByHashResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/TransactionInfoByHash", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) TransactionInfo(ctx context.Context, in *TransactionInfoRequest, opts ...grpc.CallOption) (ViewService_TransactionInfoClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[6], "/penumbra.view.v1.ViewService/TransactionInfo", opts...) - if err != nil { - return nil, err - } - x := &viewServiceTransactionInfoClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_TransactionInfoClient interface { - Recv() (*TransactionInfoResponse, error) - grpc.ClientStream -} - -type viewServiceTransactionInfoClient struct { - grpc.ClientStream -} - -func (x *viewServiceTransactionInfoClient) Recv() (*TransactionInfoResponse, error) { - m := new(TransactionInfoResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) OwnedPositionIds(ctx context.Context, in *OwnedPositionIdsRequest, opts ...grpc.CallOption) (ViewService_OwnedPositionIdsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[7], "/penumbra.view.v1.ViewService/OwnedPositionIds", opts...) - if err != nil { - return nil, err - } - x := &viewServiceOwnedPositionIdsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_OwnedPositionIdsClient interface { - Recv() (*OwnedPositionIdsResponse, error) - grpc.ClientStream -} - -type viewServiceOwnedPositionIdsClient struct { - grpc.ClientStream -} - -func (x *viewServiceOwnedPositionIdsClient) Recv() (*OwnedPositionIdsResponse, error) { - m := new(OwnedPositionIdsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) TransactionPlanner(ctx context.Context, in *TransactionPlannerRequest, opts ...grpc.CallOption) (*TransactionPlannerResponse, error) { - out := new(TransactionPlannerResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/TransactionPlanner", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) Witness(ctx context.Context, in *WitnessRequest, opts ...grpc.CallOption) (*WitnessResponse, error) { - out := new(WitnessResponse) - err := c.cc.Invoke(ctx, "/penumbra.view.v1.ViewService/Witness", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *viewServiceClient) WitnessAndBuild(ctx context.Context, in *WitnessAndBuildRequest, opts ...grpc.CallOption) (ViewService_WitnessAndBuildClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[8], "/penumbra.view.v1.ViewService/WitnessAndBuild", opts...) - if err != nil { - return nil, err - } - x := &viewServiceWitnessAndBuildClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_WitnessAndBuildClient interface { - Recv() (*WitnessAndBuildResponse, error) - grpc.ClientStream -} - -type viewServiceWitnessAndBuildClient struct { - grpc.ClientStream -} - -func (x *viewServiceWitnessAndBuildClient) Recv() (*WitnessAndBuildResponse, error) { - m := new(WitnessAndBuildResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) AuthorizeAndBuild(ctx context.Context, in *AuthorizeAndBuildRequest, opts ...grpc.CallOption) (ViewService_AuthorizeAndBuildClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[9], "/penumbra.view.v1.ViewService/AuthorizeAndBuild", opts...) - if err != nil { - return nil, err - } - x := &viewServiceAuthorizeAndBuildClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_AuthorizeAndBuildClient interface { - Recv() (*AuthorizeAndBuildResponse, error) - grpc.ClientStream -} - -type viewServiceAuthorizeAndBuildClient struct { - grpc.ClientStream -} - -func (x *viewServiceAuthorizeAndBuildClient) Recv() (*AuthorizeAndBuildResponse, error) { - m := new(AuthorizeAndBuildResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (ViewService_BroadcastTransactionClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[10], "/penumbra.view.v1.ViewService/BroadcastTransaction", opts...) - if err != nil { - return nil, err - } - x := &viewServiceBroadcastTransactionClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_BroadcastTransactionClient interface { - Recv() (*BroadcastTransactionResponse, error) - grpc.ClientStream -} - -type viewServiceBroadcastTransactionClient struct { - grpc.ClientStream -} - -func (x *viewServiceBroadcastTransactionClient) Recv() (*BroadcastTransactionResponse, error) { - m := new(BroadcastTransactionResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) DelegationsByAddressIndex(ctx context.Context, in *DelegationsByAddressIndexRequest, opts ...grpc.CallOption) (ViewService_DelegationsByAddressIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[11], "/penumbra.view.v1.ViewService/DelegationsByAddressIndex", opts...) - if err != nil { - return nil, err - } - x := &viewServiceDelegationsByAddressIndexClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_DelegationsByAddressIndexClient interface { - Recv() (*DelegationsByAddressIndexResponse, error) - grpc.ClientStream -} - -type viewServiceDelegationsByAddressIndexClient struct { - grpc.ClientStream -} - -func (x *viewServiceDelegationsByAddressIndexClient) Recv() (*DelegationsByAddressIndexResponse, error) { - m := new(DelegationsByAddressIndexResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) UnbondingTokensByAddressIndex(ctx context.Context, in *UnbondingTokensByAddressIndexRequest, opts ...grpc.CallOption) (ViewService_UnbondingTokensByAddressIndexClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[12], "/penumbra.view.v1.ViewService/UnbondingTokensByAddressIndex", opts...) - if err != nil { - return nil, err - } - x := &viewServiceUnbondingTokensByAddressIndexClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_UnbondingTokensByAddressIndexClient interface { - Recv() (*UnbondingTokensByAddressIndexResponse, error) - grpc.ClientStream -} - -type viewServiceUnbondingTokensByAddressIndexClient struct { - grpc.ClientStream -} - -func (x *viewServiceUnbondingTokensByAddressIndexClient) Recv() (*UnbondingTokensByAddressIndexResponse, error) { - m := new(UnbondingTokensByAddressIndexResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *viewServiceClient) Auctions(ctx context.Context, in *AuctionsRequest, opts ...grpc.CallOption) (ViewService_AuctionsClient, error) { - stream, err := c.cc.NewStream(ctx, &_ViewService_serviceDesc.Streams[13], "/penumbra.view.v1.ViewService/Auctions", opts...) - if err != nil { - return nil, err - } - x := &viewServiceAuctionsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type ViewService_AuctionsClient interface { - Recv() (*AuctionsResponse, error) - grpc.ClientStream -} - -type viewServiceAuctionsClient struct { - grpc.ClientStream -} - -func (x *viewServiceAuctionsClient) Recv() (*AuctionsResponse, error) { - m := new(AuctionsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ViewServiceServer is the server API for ViewService service. -type ViewServiceServer interface { - // Get current status of chain sync - Status(context.Context, *StatusRequest) (*StatusResponse, error) - // Stream sync status updates until the view service has caught up with the chain. - // Returns a stream of `StatusStreamResponse`s. - StatusStream(*StatusStreamRequest, ViewService_StatusStreamServer) error - // Queries for notes that have been accepted by the chain. - // Returns a stream of `NotesResponse`s. - Notes(*NotesRequest, ViewService_NotesServer) error - // Returns a stream of `NotesForVotingResponse`s. - NotesForVoting(*NotesForVotingRequest, ViewService_NotesForVotingServer) error - // Queries for metadata about known assets. - // Returns a stream of `AssetsResponse`s. - Assets(*AssetsRequest, ViewService_AssetsServer) error - // Query for metadata about a specific asset, by asset ID. - // - // This is the same as the method on the shielded pool's `QueryService`, but exposing it - // here allows a view server to provide more specific or opinionated asset metadata -- like - // using an asset registry to provide tickers, symbols, etc. - AssetMetadataById(context.Context, *AssetMetadataByIdRequest) (*AssetMetadataByIdResponse, error) - // Query for the current app parameters. - AppParameters(context.Context, *AppParametersRequest) (*AppParametersResponse, error) - // Query for the current gas prices. - GasPrices(context.Context, *GasPricesRequest) (*GasPricesResponse, error) - // Query for the current FMD parameters. - FMDParameters(context.Context, *FMDParametersRequest) (*FMDParametersResponse, error) - // Query for an address given an address index - AddressByIndex(context.Context, *AddressByIndexRequest) (*AddressByIndexResponse, error) - // Query for wallet id - WalletId(context.Context, *WalletIdRequest) (*WalletIdResponse, error) - // Query for an address given an address index - IndexByAddress(context.Context, *IndexByAddressRequest) (*IndexByAddressResponse, error) - // Query for an ephemeral address - EphemeralAddress(context.Context, *EphemeralAddressRequest) (*EphemeralAddressResponse, error) - // Query for balance of a given address. - // Returns a stream of `BalancesResponses`. - Balances(*BalancesRequest, ViewService_BalancesServer) error - // Query for a note by its note commitment, optionally waiting until the note is detected. - NoteByCommitment(context.Context, *NoteByCommitmentRequest) (*NoteByCommitmentResponse, error) - // Query for a swap by its swap commitment, optionally waiting until the swap is detected. - SwapByCommitment(context.Context, *SwapByCommitmentRequest) (*SwapByCommitmentResponse, error) - // Query for all unclaimed swaps. - UnclaimedSwaps(*UnclaimedSwapsRequest, ViewService_UnclaimedSwapsServer) error - // Query for whether a nullifier has been spent, optionally waiting until it is spent. - NullifierStatus(context.Context, *NullifierStatusRequest) (*NullifierStatusResponse, error) - // Query for a given transaction by its hash. - TransactionInfoByHash(context.Context, *TransactionInfoByHashRequest) (*TransactionInfoByHashResponse, error) - // Query for the full transactions in the given range of blocks. - // Returns a stream of `TransactionInfoResponse`s. - TransactionInfo(*TransactionInfoRequest, ViewService_TransactionInfoServer) error - // Query for owned position IDs for the given trading pair and in the given position state. - OwnedPositionIds(*OwnedPositionIdsRequest, ViewService_OwnedPositionIdsServer) error - // Translates a high-level intent ("send X funds to Y address") into a complete transaction plan. - TransactionPlanner(context.Context, *TransactionPlannerRequest) (*TransactionPlannerResponse, error) - // Returns authentication data for the given transaction plan. - // - // This method takes a complete transaction plan, so that the client can get a - // consistent set of authentication paths to a common root for the entire - // transaction. (Otherwise, if a client made multiple requests, the wallet - // service could have advanced the state commitment tree between queries). - Witness(context.Context, *WitnessRequest) (*WitnessResponse, error) - // Like `Witness`, but immediately uses the witness data to build (prove) the transaction. - // - // This method is useful for clients that can't easily do proving themselves, either because - // they're not written in Rust and can't easily import the proving code, or because they don't - // have access to proving keys, or some other reason. - // - // This method streams status updates to the caller before finally returning the transaction. - WitnessAndBuild(*WitnessAndBuildRequest, ViewService_WitnessAndBuildServer) error - // Authorize a transaction plan and build the transaction. - // - // This method is only supported on view servers that have access to a custody - // service. Otherwise, it will fail. - // - // Penumbra's transaction authorization mechanism is designed so transactions - // can be signed and built (proved) concurrently. This allows implementations - // to, e.g., start proving optimistically while presenting the user with an - // approval dialog. - // - // This method streams status updates to the caller before finally returning the transaction. - AuthorizeAndBuild(*AuthorizeAndBuildRequest, ViewService_AuthorizeAndBuildServer) error - // Broadcast a transaction to the network, optionally waiting for full confirmation. - // - // This method streams status updates to the caller before finally returning confirmation. - BroadcastTransaction(*BroadcastTransactionRequest, ViewService_BroadcastTransactionServer) error - // Get delegation tokens for a given address index. Each delegation token will - // be represented by a `ValueView` with the given address index's balance of - // that token. Each `ValueView`'s `extended_metadata` field will contain the - // `ValidatorInfo` of the delegated validator. - DelegationsByAddressIndex(*DelegationsByAddressIndexRequest, ViewService_DelegationsByAddressIndexServer) error - // Get unbonding tokens for the given address index, optionally filtered by - // whether the tokens are currently claimable. - UnbondingTokensByAddressIndex(*UnbondingTokensByAddressIndexRequest, ViewService_UnbondingTokensByAddressIndexServer) error - // Gets the auctions controlled by the user's wallet. - Auctions(*AuctionsRequest, ViewService_AuctionsServer) error -} - -// UnimplementedViewServiceServer can be embedded to have forward compatible implementations. -type UnimplementedViewServiceServer struct { -} - -func (*UnimplementedViewServiceServer) Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") -} -func (*UnimplementedViewServiceServer) StatusStream(req *StatusStreamRequest, srv ViewService_StatusStreamServer) error { - return status.Errorf(codes.Unimplemented, "method StatusStream not implemented") -} -func (*UnimplementedViewServiceServer) Notes(req *NotesRequest, srv ViewService_NotesServer) error { - return status.Errorf(codes.Unimplemented, "method Notes not implemented") -} -func (*UnimplementedViewServiceServer) NotesForVoting(req *NotesForVotingRequest, srv ViewService_NotesForVotingServer) error { - return status.Errorf(codes.Unimplemented, "method NotesForVoting not implemented") -} -func (*UnimplementedViewServiceServer) Assets(req *AssetsRequest, srv ViewService_AssetsServer) error { - return status.Errorf(codes.Unimplemented, "method Assets not implemented") -} -func (*UnimplementedViewServiceServer) AssetMetadataById(ctx context.Context, req *AssetMetadataByIdRequest) (*AssetMetadataByIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AssetMetadataById not implemented") -} -func (*UnimplementedViewServiceServer) AppParameters(ctx context.Context, req *AppParametersRequest) (*AppParametersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppParameters not implemented") -} -func (*UnimplementedViewServiceServer) GasPrices(ctx context.Context, req *GasPricesRequest) (*GasPricesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GasPrices not implemented") -} -func (*UnimplementedViewServiceServer) FMDParameters(ctx context.Context, req *FMDParametersRequest) (*FMDParametersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FMDParameters not implemented") -} -func (*UnimplementedViewServiceServer) AddressByIndex(ctx context.Context, req *AddressByIndexRequest) (*AddressByIndexResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddressByIndex not implemented") -} -func (*UnimplementedViewServiceServer) WalletId(ctx context.Context, req *WalletIdRequest) (*WalletIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WalletId not implemented") -} -func (*UnimplementedViewServiceServer) IndexByAddress(ctx context.Context, req *IndexByAddressRequest) (*IndexByAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IndexByAddress not implemented") -} -func (*UnimplementedViewServiceServer) EphemeralAddress(ctx context.Context, req *EphemeralAddressRequest) (*EphemeralAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EphemeralAddress not implemented") -} -func (*UnimplementedViewServiceServer) Balances(req *BalancesRequest, srv ViewService_BalancesServer) error { - return status.Errorf(codes.Unimplemented, "method Balances not implemented") -} -func (*UnimplementedViewServiceServer) NoteByCommitment(ctx context.Context, req *NoteByCommitmentRequest) (*NoteByCommitmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NoteByCommitment not implemented") -} -func (*UnimplementedViewServiceServer) SwapByCommitment(ctx context.Context, req *SwapByCommitmentRequest) (*SwapByCommitmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SwapByCommitment not implemented") -} -func (*UnimplementedViewServiceServer) UnclaimedSwaps(req *UnclaimedSwapsRequest, srv ViewService_UnclaimedSwapsServer) error { - return status.Errorf(codes.Unimplemented, "method UnclaimedSwaps not implemented") -} -func (*UnimplementedViewServiceServer) NullifierStatus(ctx context.Context, req *NullifierStatusRequest) (*NullifierStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NullifierStatus not implemented") -} -func (*UnimplementedViewServiceServer) TransactionInfoByHash(ctx context.Context, req *TransactionInfoByHashRequest) (*TransactionInfoByHashResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransactionInfoByHash not implemented") -} -func (*UnimplementedViewServiceServer) TransactionInfo(req *TransactionInfoRequest, srv ViewService_TransactionInfoServer) error { - return status.Errorf(codes.Unimplemented, "method TransactionInfo not implemented") -} -func (*UnimplementedViewServiceServer) OwnedPositionIds(req *OwnedPositionIdsRequest, srv ViewService_OwnedPositionIdsServer) error { - return status.Errorf(codes.Unimplemented, "method OwnedPositionIds not implemented") -} -func (*UnimplementedViewServiceServer) TransactionPlanner(ctx context.Context, req *TransactionPlannerRequest) (*TransactionPlannerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransactionPlanner not implemented") -} -func (*UnimplementedViewServiceServer) Witness(ctx context.Context, req *WitnessRequest) (*WitnessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Witness not implemented") -} -func (*UnimplementedViewServiceServer) WitnessAndBuild(req *WitnessAndBuildRequest, srv ViewService_WitnessAndBuildServer) error { - return status.Errorf(codes.Unimplemented, "method WitnessAndBuild not implemented") -} -func (*UnimplementedViewServiceServer) AuthorizeAndBuild(req *AuthorizeAndBuildRequest, srv ViewService_AuthorizeAndBuildServer) error { - return status.Errorf(codes.Unimplemented, "method AuthorizeAndBuild not implemented") -} -func (*UnimplementedViewServiceServer) BroadcastTransaction(req *BroadcastTransactionRequest, srv ViewService_BroadcastTransactionServer) error { - return status.Errorf(codes.Unimplemented, "method BroadcastTransaction not implemented") -} -func (*UnimplementedViewServiceServer) DelegationsByAddressIndex(req *DelegationsByAddressIndexRequest, srv ViewService_DelegationsByAddressIndexServer) error { - return status.Errorf(codes.Unimplemented, "method DelegationsByAddressIndex not implemented") -} -func (*UnimplementedViewServiceServer) UnbondingTokensByAddressIndex(req *UnbondingTokensByAddressIndexRequest, srv ViewService_UnbondingTokensByAddressIndexServer) error { - return status.Errorf(codes.Unimplemented, "method UnbondingTokensByAddressIndex not implemented") -} -func (*UnimplementedViewServiceServer) Auctions(req *AuctionsRequest, srv ViewService_AuctionsServer) error { - return status.Errorf(codes.Unimplemented, "method Auctions not implemented") -} - -func RegisterViewServiceServer(s grpc1.Server, srv ViewServiceServer) { - s.RegisterService(&_ViewService_serviceDesc, srv) -} - -func _ViewService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).Status(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/Status", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).Status(ctx, req.(*StatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_StatusStream_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(StatusStreamRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).StatusStream(m, &viewServiceStatusStreamServer{stream}) -} - -type ViewService_StatusStreamServer interface { - Send(*StatusStreamResponse) error - grpc.ServerStream -} - -type viewServiceStatusStreamServer struct { - grpc.ServerStream -} - -func (x *viewServiceStatusStreamServer) Send(m *StatusStreamResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_Notes_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(NotesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).Notes(m, &viewServiceNotesServer{stream}) -} - -type ViewService_NotesServer interface { - Send(*NotesResponse) error - grpc.ServerStream -} - -type viewServiceNotesServer struct { - grpc.ServerStream -} - -func (x *viewServiceNotesServer) Send(m *NotesResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_NotesForVoting_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(NotesForVotingRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).NotesForVoting(m, &viewServiceNotesForVotingServer{stream}) -} - -type ViewService_NotesForVotingServer interface { - Send(*NotesForVotingResponse) error - grpc.ServerStream -} - -type viewServiceNotesForVotingServer struct { - grpc.ServerStream -} - -func (x *viewServiceNotesForVotingServer) Send(m *NotesForVotingResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_Assets_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(AssetsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).Assets(m, &viewServiceAssetsServer{stream}) -} - -type ViewService_AssetsServer interface { - Send(*AssetsResponse) error - grpc.ServerStream -} - -type viewServiceAssetsServer struct { - grpc.ServerStream -} - -func (x *viewServiceAssetsServer) Send(m *AssetsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_AssetMetadataById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AssetMetadataByIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).AssetMetadataById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/AssetMetadataById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).AssetMetadataById(ctx, req.(*AssetMetadataByIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_AppParameters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AppParametersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).AppParameters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/AppParameters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).AppParameters(ctx, req.(*AppParametersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_GasPrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GasPricesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).GasPrices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/GasPrices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).GasPrices(ctx, req.(*GasPricesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_FMDParameters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FMDParametersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).FMDParameters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/FMDParameters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).FMDParameters(ctx, req.(*FMDParametersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_AddressByIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressByIndexRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).AddressByIndex(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/AddressByIndex", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).AddressByIndex(ctx, req.(*AddressByIndexRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_WalletId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WalletIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).WalletId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/WalletId", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).WalletId(ctx, req.(*WalletIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_IndexByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IndexByAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).IndexByAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/IndexByAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).IndexByAddress(ctx, req.(*IndexByAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_EphemeralAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EphemeralAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).EphemeralAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/EphemeralAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).EphemeralAddress(ctx, req.(*EphemeralAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_Balances_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(BalancesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).Balances(m, &viewServiceBalancesServer{stream}) -} - -type ViewService_BalancesServer interface { - Send(*BalancesResponse) error - grpc.ServerStream -} - -type viewServiceBalancesServer struct { - grpc.ServerStream -} - -func (x *viewServiceBalancesServer) Send(m *BalancesResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_NoteByCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NoteByCommitmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).NoteByCommitment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/NoteByCommitment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).NoteByCommitment(ctx, req.(*NoteByCommitmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_SwapByCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SwapByCommitmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).SwapByCommitment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/SwapByCommitment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).SwapByCommitment(ctx, req.(*SwapByCommitmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_UnclaimedSwaps_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(UnclaimedSwapsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).UnclaimedSwaps(m, &viewServiceUnclaimedSwapsServer{stream}) -} - -type ViewService_UnclaimedSwapsServer interface { - Send(*UnclaimedSwapsResponse) error - grpc.ServerStream -} - -type viewServiceUnclaimedSwapsServer struct { - grpc.ServerStream -} - -func (x *viewServiceUnclaimedSwapsServer) Send(m *UnclaimedSwapsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_NullifierStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NullifierStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).NullifierStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/NullifierStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).NullifierStatus(ctx, req.(*NullifierStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_TransactionInfoByHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransactionInfoByHashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).TransactionInfoByHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/TransactionInfoByHash", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).TransactionInfoByHash(ctx, req.(*TransactionInfoByHashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_TransactionInfo_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(TransactionInfoRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).TransactionInfo(m, &viewServiceTransactionInfoServer{stream}) -} - -type ViewService_TransactionInfoServer interface { - Send(*TransactionInfoResponse) error - grpc.ServerStream -} - -type viewServiceTransactionInfoServer struct { - grpc.ServerStream -} - -func (x *viewServiceTransactionInfoServer) Send(m *TransactionInfoResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_OwnedPositionIds_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(OwnedPositionIdsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).OwnedPositionIds(m, &viewServiceOwnedPositionIdsServer{stream}) -} - -type ViewService_OwnedPositionIdsServer interface { - Send(*OwnedPositionIdsResponse) error - grpc.ServerStream -} - -type viewServiceOwnedPositionIdsServer struct { - grpc.ServerStream -} - -func (x *viewServiceOwnedPositionIdsServer) Send(m *OwnedPositionIdsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_TransactionPlanner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransactionPlannerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).TransactionPlanner(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/TransactionPlanner", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).TransactionPlanner(ctx, req.(*TransactionPlannerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_Witness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WitnessRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ViewServiceServer).Witness(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/penumbra.view.v1.ViewService/Witness", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ViewServiceServer).Witness(ctx, req.(*WitnessRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ViewService_WitnessAndBuild_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(WitnessAndBuildRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).WitnessAndBuild(m, &viewServiceWitnessAndBuildServer{stream}) -} - -type ViewService_WitnessAndBuildServer interface { - Send(*WitnessAndBuildResponse) error - grpc.ServerStream -} - -type viewServiceWitnessAndBuildServer struct { - grpc.ServerStream -} - -func (x *viewServiceWitnessAndBuildServer) Send(m *WitnessAndBuildResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_AuthorizeAndBuild_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(AuthorizeAndBuildRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).AuthorizeAndBuild(m, &viewServiceAuthorizeAndBuildServer{stream}) -} - -type ViewService_AuthorizeAndBuildServer interface { - Send(*AuthorizeAndBuildResponse) error - grpc.ServerStream -} - -type viewServiceAuthorizeAndBuildServer struct { - grpc.ServerStream -} - -func (x *viewServiceAuthorizeAndBuildServer) Send(m *AuthorizeAndBuildResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_BroadcastTransaction_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(BroadcastTransactionRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).BroadcastTransaction(m, &viewServiceBroadcastTransactionServer{stream}) -} - -type ViewService_BroadcastTransactionServer interface { - Send(*BroadcastTransactionResponse) error - grpc.ServerStream -} - -type viewServiceBroadcastTransactionServer struct { - grpc.ServerStream -} - -func (x *viewServiceBroadcastTransactionServer) Send(m *BroadcastTransactionResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_DelegationsByAddressIndex_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(DelegationsByAddressIndexRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).DelegationsByAddressIndex(m, &viewServiceDelegationsByAddressIndexServer{stream}) -} - -type ViewService_DelegationsByAddressIndexServer interface { - Send(*DelegationsByAddressIndexResponse) error - grpc.ServerStream -} - -type viewServiceDelegationsByAddressIndexServer struct { - grpc.ServerStream -} - -func (x *viewServiceDelegationsByAddressIndexServer) Send(m *DelegationsByAddressIndexResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_UnbondingTokensByAddressIndex_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(UnbondingTokensByAddressIndexRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).UnbondingTokensByAddressIndex(m, &viewServiceUnbondingTokensByAddressIndexServer{stream}) -} - -type ViewService_UnbondingTokensByAddressIndexServer interface { - Send(*UnbondingTokensByAddressIndexResponse) error - grpc.ServerStream -} - -type viewServiceUnbondingTokensByAddressIndexServer struct { - grpc.ServerStream -} - -func (x *viewServiceUnbondingTokensByAddressIndexServer) Send(m *UnbondingTokensByAddressIndexResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _ViewService_Auctions_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(AuctionsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ViewServiceServer).Auctions(m, &viewServiceAuctionsServer{stream}) -} - -type ViewService_AuctionsServer interface { - Send(*AuctionsResponse) error - grpc.ServerStream -} - -type viewServiceAuctionsServer struct { - grpc.ServerStream -} - -func (x *viewServiceAuctionsServer) Send(m *AuctionsResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _ViewService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "penumbra.view.v1.ViewService", - HandlerType: (*ViewServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Status", - Handler: _ViewService_Status_Handler, - }, - { - MethodName: "AssetMetadataById", - Handler: _ViewService_AssetMetadataById_Handler, - }, - { - MethodName: "AppParameters", - Handler: _ViewService_AppParameters_Handler, - }, - { - MethodName: "GasPrices", - Handler: _ViewService_GasPrices_Handler, - }, - { - MethodName: "FMDParameters", - Handler: _ViewService_FMDParameters_Handler, - }, - { - MethodName: "AddressByIndex", - Handler: _ViewService_AddressByIndex_Handler, - }, - { - MethodName: "WalletId", - Handler: _ViewService_WalletId_Handler, - }, - { - MethodName: "IndexByAddress", - Handler: _ViewService_IndexByAddress_Handler, - }, - { - MethodName: "EphemeralAddress", - Handler: _ViewService_EphemeralAddress_Handler, - }, - { - MethodName: "NoteByCommitment", - Handler: _ViewService_NoteByCommitment_Handler, - }, - { - MethodName: "SwapByCommitment", - Handler: _ViewService_SwapByCommitment_Handler, - }, - { - MethodName: "NullifierStatus", - Handler: _ViewService_NullifierStatus_Handler, - }, - { - MethodName: "TransactionInfoByHash", - Handler: _ViewService_TransactionInfoByHash_Handler, - }, - { - MethodName: "TransactionPlanner", - Handler: _ViewService_TransactionPlanner_Handler, - }, - { - MethodName: "Witness", - Handler: _ViewService_Witness_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StatusStream", - Handler: _ViewService_StatusStream_Handler, - ServerStreams: true, - }, - { - StreamName: "Notes", - Handler: _ViewService_Notes_Handler, - ServerStreams: true, - }, - { - StreamName: "NotesForVoting", - Handler: _ViewService_NotesForVoting_Handler, - ServerStreams: true, - }, - { - StreamName: "Assets", - Handler: _ViewService_Assets_Handler, - ServerStreams: true, - }, - { - StreamName: "Balances", - Handler: _ViewService_Balances_Handler, - ServerStreams: true, - }, - { - StreamName: "UnclaimedSwaps", - Handler: _ViewService_UnclaimedSwaps_Handler, - ServerStreams: true, - }, - { - StreamName: "TransactionInfo", - Handler: _ViewService_TransactionInfo_Handler, - ServerStreams: true, - }, - { - StreamName: "OwnedPositionIds", - Handler: _ViewService_OwnedPositionIds_Handler, - ServerStreams: true, - }, - { - StreamName: "WitnessAndBuild", - Handler: _ViewService_WitnessAndBuild_Handler, - ServerStreams: true, - }, - { - StreamName: "AuthorizeAndBuild", - Handler: _ViewService_AuthorizeAndBuild_Handler, - ServerStreams: true, - }, - { - StreamName: "BroadcastTransaction", - Handler: _ViewService_BroadcastTransaction_Handler, - ServerStreams: true, - }, - { - StreamName: "DelegationsByAddressIndex", - Handler: _ViewService_DelegationsByAddressIndex_Handler, - ServerStreams: true, - }, - { - StreamName: "UnbondingTokensByAddressIndex", - Handler: _ViewService_UnbondingTokensByAddressIndex_Handler, - ServerStreams: true, - }, - { - StreamName: "Auctions", - Handler: _ViewService_Auctions_Handler, - ServerStreams: true, - }, - }, - Metadata: "penumbra/view/v1/view.proto", -} - -func (m *AuctionsRequest) Marshal() (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 *AuctionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AuctionIdsFilter) > 0 { - for iNdEx := len(m.AuctionIdsFilter) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AuctionIdsFilter[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.QueryLatestState { - i-- - if m.QueryLatestState { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.IncludeInactive { - i-- - if m.IncludeInactive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.AccountFilter != nil { - { - size, err := m.AccountFilter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuctionsResponse) Marshal() (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 *AuctionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuctionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LocalSeq != 0 { - i = encodeVarintView(dAtA, i, uint64(m.LocalSeq)) - i-- - dAtA[i] = 0x28 - } - if m.NoteRecord != nil { - { - size, err := m.NoteRecord.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Positions) > 0 { - for iNdEx := len(m.Positions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Positions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Auction != nil { - { - size, err := m.Auction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeAndBuildRequest) Marshal() (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 *AuthorizeAndBuildRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeAndBuildRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TransactionPlan != nil { - { - size, err := m.TransactionPlan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeAndBuildResponse) Marshal() (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 *AuthorizeAndBuildResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeAndBuildResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != nil { - { - size := m.Status.Size() - i -= size - if _, err := m.Status.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeAndBuildResponse_BuildProgress_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeAndBuildResponse_BuildProgress_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BuildProgress != nil { - { - size, err := m.BuildProgress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *AuthorizeAndBuildResponse_Complete_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeAndBuildResponse_Complete_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Complete != nil { - { - size, err := m.Complete.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *AuthorizeAndBuildResponse_BuildProgress) Marshal() (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 *AuthorizeAndBuildResponse_BuildProgress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeAndBuildResponse_BuildProgress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Progress != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Progress)))) - i-- - dAtA[i] = 0xd - } - return len(dAtA) - i, nil -} - -func (m *AuthorizeAndBuildResponse_Complete) Marshal() (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 *AuthorizeAndBuildResponse_Complete) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizeAndBuildResponse_Complete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Transaction != nil { - { - size, err := m.Transaction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTransactionRequest) Marshal() (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 *BroadcastTransactionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTransactionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AwaitDetection { - i-- - if m.AwaitDetection { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Transaction != nil { - { - size, err := m.Transaction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTransactionResponse) Marshal() (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 *BroadcastTransactionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTransactionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != nil { - { - size := m.Status.Size() - i -= size - if _, err := m.Status.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTransactionResponse_BroadcastSuccess_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTransactionResponse_BroadcastSuccess_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BroadcastSuccess != nil { - { - size, err := m.BroadcastSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *BroadcastTransactionResponse_Confirmed_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTransactionResponse_Confirmed_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Confirmed != nil { - { - size, err := m.Confirmed.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) Marshal() (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 *BroadcastTransactionResponse_BroadcastSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTransactionResponse_BroadcastSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BroadcastTransactionResponse_Confirmed) Marshal() (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 *BroadcastTransactionResponse_Confirmed) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BroadcastTransactionResponse_Confirmed) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DetectionHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.DetectionHeight)) - i-- - dAtA[i] = 0x10 - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest) Marshal() (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 *TransactionPlannerRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Epoch != nil { - { - size, err := m.Epoch.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xc - i-- - dAtA[i] = 0xca - } - if m.EpochIndex != 0 { - i = encodeVarintView(dAtA, i, uint64(m.EpochIndex)) - i-- - dAtA[i] = 0xc - i-- - dAtA[i] = 0xc0 - } - if m.FeeMode != nil { - { - size := m.FeeMode.Size() - i -= size - if _, err := m.FeeMode.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.DutchAuctionWithdrawActions) > 0 { - for iNdEx := len(m.DutchAuctionWithdrawActions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DutchAuctionWithdrawActions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0xda - } - } - if len(m.DutchAuctionEndActions) > 0 { - for iNdEx := len(m.DutchAuctionEndActions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DutchAuctionEndActions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0xd2 - } - } - if len(m.DutchAuctionScheduleActions) > 0 { - for iNdEx := len(m.DutchAuctionScheduleActions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DutchAuctionScheduleActions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0xca - } - } - if len(m.PositionWithdraws) > 0 { - for iNdEx := len(m.PositionWithdraws) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PositionWithdraws[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0xc2 - } - } - if len(m.PositionCloses) > 0 { - for iNdEx := len(m.PositionCloses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PositionCloses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0xba - } - } - if len(m.PositionOpens) > 0 { - for iNdEx := len(m.PositionOpens) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PositionOpens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0xb2 - } - } - if len(m.Ics20Withdrawals) > 0 { - for iNdEx := len(m.Ics20Withdrawals) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ics20Withdrawals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xea - } - } - if len(m.IbcRelayActions) > 0 { - for iNdEx := len(m.IbcRelayActions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.IbcRelayActions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xe2 - } - } - if len(m.UndelegationClaims) > 0 { - for iNdEx := len(m.UndelegationClaims) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UndelegationClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x9a - } - } - if len(m.Undelegations) > 0 { - for iNdEx := len(m.Undelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Undelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0x92 - } - } - if len(m.Delegations) > 0 { - for iNdEx := len(m.Delegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Delegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SwapClaims) > 0 { - for iNdEx := len(m.SwapClaims) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SwapClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - } - if len(m.Swaps) > 0 { - for iNdEx := len(m.Swaps) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Swaps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - } - if len(m.Spends) > 0 { - for iNdEx := len(m.Spends) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Spends[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - } - if len(m.Outputs) > 0 { - for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Outputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if m.Source != nil { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Memo != nil { - { - size, err := m.Memo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ExpiryHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.ExpiryHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_AutoFee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_AutoFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.AutoFee != nil { - { - size, err := m.AutoFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xa2 - } - return len(dAtA) - i, nil -} -func (m *TransactionPlannerRequest_ManualFee) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_ManualFee) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ManualFee != nil { - { - size, err := m.ManualFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0xaa - } - return len(dAtA) - i, nil -} -func (m *TransactionPlannerRequest_Output) Marshal() (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 *TransactionPlannerRequest_Output) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_Output) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_Spend) Marshal() (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 *TransactionPlannerRequest_Spend) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_Spend) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_Swap) Marshal() (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 *TransactionPlannerRequest_Swap) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_Swap) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClaimAddress != nil { - { - size, err := m.ClaimAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.TargetAsset != nil { - { - size, err := m.TargetAsset.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_SwapClaim) Marshal() (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 *TransactionPlannerRequest_SwapClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_SwapClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SwapCommitment != nil { - { - size, err := m.SwapCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_Delegate) Marshal() (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 *TransactionPlannerRequest_Delegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_Delegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RateData != nil { - { - size, err := m.RateData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Amount != nil { - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_Undelegate) Marshal() (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 *TransactionPlannerRequest_Undelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_Undelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RateData != nil { - { - size, err := m.RateData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_UndelegateClaim) Marshal() (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 *TransactionPlannerRequest_UndelegateClaim) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_UndelegateClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnbondingStartHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.UnbondingStartHeight)) - i-- - dAtA[i] = 0x28 - } - if m.UnbondingAmount != nil { - { - size, err := m.UnbondingAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Penalty != nil { - { - size, err := m.Penalty.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.StartEpochIndex != 0 { - i = encodeVarintView(dAtA, i, uint64(m.StartEpochIndex)) - i-- - dAtA[i] = 0x10 - } - if m.ValidatorIdentity != nil { - { - size, err := m.ValidatorIdentity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_PositionOpen) Marshal() (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 *TransactionPlannerRequest_PositionOpen) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_PositionOpen) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Position != nil { - { - size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_PositionClose) Marshal() (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 *TransactionPlannerRequest_PositionClose) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_PositionClose) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_PositionWithdraw) Marshal() (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 *TransactionPlannerRequest_PositionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_PositionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Reserves != nil { - { - size, err := m.Reserves.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) Marshal() (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 *TransactionPlannerRequest_ActionDutchAuctionSchedule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) Marshal() (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 *TransactionPlannerRequest_ActionDutchAuctionEnd) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) Marshal() (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 *TransactionPlannerRequest_ActionDutchAuctionWithdraw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Seq != 0 { - i = encodeVarintView(dAtA, i, uint64(m.Seq)) - i-- - dAtA[i] = 0x10 - } - if m.AuctionId != nil { - { - size, err := m.AuctionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionPlannerResponse) Marshal() (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 *TransactionPlannerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionPlannerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Plan != nil { - { - size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressByIndexRequest) Marshal() (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 *AddressByIndexRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressByIndexRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddressByIndexResponse) Marshal() (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 *AddressByIndexResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressByIndexResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WalletIdRequest) Marshal() (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 *WalletIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *WalletIdResponse) Marshal() (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 *WalletIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WalletIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.WalletId != nil { - { - size, err := m.WalletId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IndexByAddressRequest) Marshal() (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 *IndexByAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IndexByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IndexByAddressResponse) Marshal() (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 *IndexByAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IndexByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EphemeralAddressRequest) Marshal() (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 *EphemeralAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EphemeralAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EphemeralAddressResponse) Marshal() (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 *EphemeralAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EphemeralAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Address != nil { - { - size, err := m.Address.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BalancesRequest) Marshal() (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 *BalancesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AssetIdFilter != nil { - { - size, err := m.AssetIdFilter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.AccountFilter != nil { - { - size, err := m.AccountFilter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BalancesResponse) Marshal() (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 *BalancesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BalanceView != nil { - { - size, err := m.BalanceView.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.AccountAddress != nil { - { - size, err := m.AccountAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Balance != nil { - { - size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatusRequest) Marshal() (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 *StatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *StatusResponse) Marshal() (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 *StatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CatchingUp { - i-- - if m.CatchingUp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.PartialSyncHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.PartialSyncHeight)) - i-- - dAtA[i] = 0x10 - } - if m.FullSyncHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.FullSyncHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StatusStreamRequest) Marshal() (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 *StatusStreamRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusStreamRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *StatusStreamResponse) Marshal() (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 *StatusStreamResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StatusStreamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PartialSyncHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.PartialSyncHeight)) - i-- - dAtA[i] = 0x18 - } - if m.FullSyncHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.FullSyncHeight)) - i-- - dAtA[i] = 0x10 - } - if m.LatestKnownBlockHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.LatestKnownBlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *NotesRequest) Marshal() (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 *NotesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AmountToSpend != nil { - { - size, err := m.AmountToSpend.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.IncludeSpent { - i-- - if m.IncludeSpent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - -func (m *NotesForVotingRequest) Marshal() (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 *NotesForVotingRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NotesForVotingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.VotableAtHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.VotableAtHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *WitnessRequest) Marshal() (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 *WitnessRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TransactionPlan != nil { - { - size, err := m.TransactionPlan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} - -func (m *WitnessResponse) Marshal() (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 *WitnessResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.WitnessData != nil { - { - size, err := m.WitnessData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WitnessAndBuildRequest) Marshal() (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 *WitnessAndBuildRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessAndBuildRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AuthorizationData != nil { - { - size, err := m.AuthorizationData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.TransactionPlan != nil { - { - size, err := m.TransactionPlan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WitnessAndBuildResponse) Marshal() (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 *WitnessAndBuildResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessAndBuildResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != nil { - { - size := m.Status.Size() - i -= size - if _, err := m.Status.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *WitnessAndBuildResponse_BuildProgress_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessAndBuildResponse_BuildProgress_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BuildProgress != nil { - { - size, err := m.BuildProgress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *WitnessAndBuildResponse_Complete_) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessAndBuildResponse_Complete_) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Complete != nil { - { - size, err := m.Complete.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *WitnessAndBuildResponse_BuildProgress) Marshal() (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 *WitnessAndBuildResponse_BuildProgress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessAndBuildResponse_BuildProgress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Progress != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Progress)))) - i-- - dAtA[i] = 0xd - } - return len(dAtA) - i, nil -} - -func (m *WitnessAndBuildResponse_Complete) Marshal() (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 *WitnessAndBuildResponse_Complete) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WitnessAndBuildResponse_Complete) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Transaction != nil { - { - size, err := m.Transaction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetsRequest) Marshal() (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 *AssetsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IncludeVotingReceiptTokens { - i-- - if m.IncludeVotingReceiptTokens { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.IncludeProposalNfts { - i-- - if m.IncludeProposalNfts { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.IncludeLpNfts { - i-- - if m.IncludeLpNfts { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.IncludeUnbondingTokens { - i-- - if m.IncludeUnbondingTokens { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.IncludeDelegationTokens { - i-- - if m.IncludeDelegationTokens { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.IncludeSpecificDenominations) > 0 { - for iNdEx := len(m.IncludeSpecificDenominations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.IncludeSpecificDenominations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Filtered { - i-- - if m.Filtered { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AssetsResponse) Marshal() (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 *AssetsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DenomMetadata != nil { - { - size, err := m.DenomMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *AppParametersRequest) Marshal() (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 *AppParametersRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppParametersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AppParametersResponse) Marshal() (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 *AppParametersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppParametersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Parameters != nil { - { - size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GasPricesRequest) Marshal() (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 *GasPricesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GasPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GasPricesResponse) Marshal() (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 *GasPricesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GasPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AltGasPrices) > 0 { - for iNdEx := len(m.AltGasPrices) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AltGasPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.GasPrices != nil { - { - size, err := m.GasPrices.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FMDParametersRequest) Marshal() (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 *FMDParametersRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FMDParametersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *FMDParametersResponse) Marshal() (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 *FMDParametersResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FMDParametersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Parameters != nil { - { - size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NoteByCommitmentRequest) Marshal() (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 *NoteByCommitmentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoteByCommitmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AwaitDetection { - i-- - if m.AwaitDetection { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.NoteCommitment != nil { - { - size, err := m.NoteCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *NoteByCommitmentResponse) Marshal() (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 *NoteByCommitmentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoteByCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SpendableNote != nil { - { - size, err := m.SpendableNote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapByCommitmentRequest) Marshal() (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 *SwapByCommitmentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapByCommitmentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AwaitDetection { - i-- - if m.AwaitDetection { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.SwapCommitment != nil { - { - size, err := m.SwapCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *SwapByCommitmentResponse) Marshal() (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 *SwapByCommitmentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapByCommitmentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnclaimedSwapsRequest) Marshal() (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 *UnclaimedSwapsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnclaimedSwapsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *UnclaimedSwapsResponse) Marshal() (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 *UnclaimedSwapsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnclaimedSwapsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NullifierStatusRequest) Marshal() (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 *NullifierStatusRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NullifierStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AwaitDetection { - i-- - if m.AwaitDetection { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *NullifierStatusResponse) Marshal() (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 *NullifierStatusResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NullifierStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Spent { - i-- - if m.Spent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TransactionInfoByHashRequest) Marshal() (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 *TransactionInfoByHashRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionInfoByHashRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *TransactionInfoRequest) Marshal() (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 *TransactionInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EndHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.EndHeight)) - i-- - dAtA[i] = 0x10 - } - if m.StartHeight != 0 { - i = encodeVarintView(dAtA, i, uint64(m.StartHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TransactionInfo) Marshal() (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 *TransactionInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.View != nil { - { - size, err := m.View.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Perspective != nil { - { - size, err := m.Perspective.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Transaction != nil { - { - size, err := m.Transaction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Id != nil { - { - size, err := m.Id.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Height != 0 { - i = encodeVarintView(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TransactionInfoResponse) Marshal() (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 *TransactionInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TxInfo != nil { - { - size, err := m.TxInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TransactionInfoByHashResponse) Marshal() (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 *TransactionInfoByHashResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransactionInfoByHashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TxInfo != nil { - { - size, err := m.TxInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NotesResponse) Marshal() (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 *NotesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NoteRecord != nil { - { - size, err := m.NoteRecord.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NotesForVotingResponse) Marshal() (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 *NotesForVotingResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NotesForVotingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IdentityKey != nil { - { - size, err := m.IdentityKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.NoteRecord != nil { - { - size, err := m.NoteRecord.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpendableNoteRecord) Marshal() (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 *SpendableNoteRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SpendableNoteRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ReturnAddress != nil { - { - size, err := m.ReturnAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.Source != nil { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Position != 0 { - i = encodeVarintView(dAtA, i, uint64(m.Position)) - i-- - dAtA[i] = 0x38 - } - if m.HeightSpent != 0 { - i = encodeVarintView(dAtA, i, uint64(m.HeightSpent)) - i-- - dAtA[i] = 0x30 - } - if m.HeightCreated != 0 { - i = encodeVarintView(dAtA, i, uint64(m.HeightCreated)) - i-- - dAtA[i] = 0x28 - } - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Note != nil { - { - size, err := m.Note.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.NoteCommitment != nil { - { - size, err := m.NoteCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapRecord) Marshal() (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 *SwapRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Source != nil { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.HeightClaimed != 0 { - i = encodeVarintView(dAtA, i, uint64(m.HeightClaimed)) - i-- - dAtA[i] = 0x30 - } - if m.OutputData != nil { - { - size, err := m.OutputData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Nullifier != nil { - { - size, err := m.Nullifier.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Position != 0 { - i = encodeVarintView(dAtA, i, uint64(m.Position)) - i-- - dAtA[i] = 0x18 - } - if m.Swap != nil { - { - size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.SwapCommitment != nil { - { - size, err := m.SwapCommitment.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *OwnedPositionIdsRequest) Marshal() (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 *OwnedPositionIdsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OwnedPositionIdsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TradingPair != nil { - { - size, err := m.TradingPair.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.PositionState != nil { - { - size, err := m.PositionState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *OwnedPositionIdsResponse) Marshal() (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 *OwnedPositionIdsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OwnedPositionIdsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PositionId != nil { - { - size, err := m.PositionId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AssetMetadataByIdRequest) Marshal() (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 *AssetMetadataByIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetMetadataByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AssetId != nil { - { - size, err := m.AssetId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *AssetMetadataByIdResponse) Marshal() (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 *AssetMetadataByIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetMetadataByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DenomMetadata != nil { - { - size, err := m.DenomMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegationsByAddressIndexRequest) Marshal() (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 *DelegationsByAddressIndexRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegationsByAddressIndexRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Filter != 0 { - i = encodeVarintView(dAtA, i, uint64(m.Filter)) - i-- - dAtA[i] = 0x10 - } - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegationsByAddressIndexResponse) Marshal() (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 *DelegationsByAddressIndexResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegationsByAddressIndexResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValueView != nil { - { - size, err := m.ValueView.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnbondingTokensByAddressIndexRequest) Marshal() (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 *UnbondingTokensByAddressIndexRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondingTokensByAddressIndexRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AddressIndex != nil { - { - size, err := m.AddressIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Filter != 0 { - i = encodeVarintView(dAtA, i, uint64(m.Filter)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *UnbondingTokensByAddressIndexResponse) Marshal() (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 *UnbondingTokensByAddressIndexResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondingTokensByAddressIndexResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Claimable { - i-- - if m.Claimable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.ValueView != nil { - { - size, err := m.ValueView.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintView(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintView(dAtA []byte, offset int, v uint64) int { - offset -= sovView(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AuctionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AccountFilter != nil { - l = m.AccountFilter.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.IncludeInactive { - n += 2 - } - if m.QueryLatestState { - n += 2 - } - if len(m.AuctionIdsFilter) > 0 { - for _, e := range m.AuctionIdsFilter { - l = e.Size() - n += 1 + l + sovView(uint64(l)) - } - } - return n -} - -func (m *AuctionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Auction != nil { - l = m.Auction.Size() - n += 1 + l + sovView(uint64(l)) - } - if len(m.Positions) > 0 { - for _, e := range m.Positions { - l = e.Size() - n += 1 + l + sovView(uint64(l)) - } - } - if m.NoteRecord != nil { - l = m.NoteRecord.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.LocalSeq != 0 { - n += 1 + sovView(uint64(m.LocalSeq)) - } - return n -} - -func (m *AuthorizeAndBuildRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TransactionPlan != nil { - l = m.TransactionPlan.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *AuthorizeAndBuildResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - n += m.Status.Size() - } - return n -} - -func (m *AuthorizeAndBuildResponse_BuildProgress_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BuildProgress != nil { - l = m.BuildProgress.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} -func (m *AuthorizeAndBuildResponse_Complete_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Complete != nil { - l = m.Complete.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} -func (m *AuthorizeAndBuildResponse_BuildProgress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Progress != 0 { - n += 5 - } - return n -} - -func (m *AuthorizeAndBuildResponse_Complete) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Transaction != nil { - l = m.Transaction.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *BroadcastTransactionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Transaction != nil { - l = m.Transaction.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AwaitDetection { - n += 2 - } - return n -} - -func (m *BroadcastTransactionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - n += m.Status.Size() - } - return n -} - -func (m *BroadcastTransactionResponse_BroadcastSuccess_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BroadcastSuccess != nil { - l = m.BroadcastSuccess.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} -func (m *BroadcastTransactionResponse_Confirmed_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Confirmed != nil { - l = m.Confirmed.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *BroadcastTransactionResponse_Confirmed) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.DetectionHeight != 0 { - n += 1 + sovView(uint64(m.DetectionHeight)) - } - return n -} - -func (m *TransactionPlannerRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExpiryHeight != 0 { - n += 1 + sovView(uint64(m.ExpiryHeight)) - } - if m.Memo != nil { - l = m.Memo.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovView(uint64(l)) - } - if len(m.Outputs) > 0 { - for _, e := range m.Outputs { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.Spends) > 0 { - for _, e := range m.Spends { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.Swaps) > 0 { - for _, e := range m.Swaps { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.SwapClaims) > 0 { - for _, e := range m.SwapClaims { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.Delegations) > 0 { - for _, e := range m.Delegations { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.Undelegations) > 0 { - for _, e := range m.Undelegations { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.UndelegationClaims) > 0 { - for _, e := range m.UndelegationClaims { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.IbcRelayActions) > 0 { - for _, e := range m.IbcRelayActions { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.Ics20Withdrawals) > 0 { - for _, e := range m.Ics20Withdrawals { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.PositionOpens) > 0 { - for _, e := range m.PositionOpens { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.PositionCloses) > 0 { - for _, e := range m.PositionCloses { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.PositionWithdraws) > 0 { - for _, e := range m.PositionWithdraws { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.DutchAuctionScheduleActions) > 0 { - for _, e := range m.DutchAuctionScheduleActions { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.DutchAuctionEndActions) > 0 { - for _, e := range m.DutchAuctionEndActions { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if len(m.DutchAuctionWithdrawActions) > 0 { - for _, e := range m.DutchAuctionWithdrawActions { - l = e.Size() - n += 2 + l + sovView(uint64(l)) - } - } - if m.FeeMode != nil { - n += m.FeeMode.Size() - } - if m.EpochIndex != 0 { - n += 2 + sovView(uint64(m.EpochIndex)) - } - if m.Epoch != nil { - l = m.Epoch.Size() - n += 2 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_AutoFee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AutoFee != nil { - l = m.AutoFee.Size() - n += 2 + l + sovView(uint64(l)) - } - return n -} -func (m *TransactionPlannerRequest_ManualFee) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ManualFee != nil { - l = m.ManualFee.Size() - n += 2 + l + sovView(uint64(l)) - } - return n -} -func (m *TransactionPlannerRequest_Output) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_Spend) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_Swap) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.TargetAsset != nil { - l = m.TargetAsset.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.ClaimAddress != nil { - l = m.ClaimAddress.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_SwapClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapCommitment != nil { - l = m.SwapCommitment.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_Delegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.RateData != nil { - l = m.RateData.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_Undelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.RateData != nil { - l = m.RateData.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_UndelegateClaim) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValidatorIdentity != nil { - l = m.ValidatorIdentity.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.StartEpochIndex != 0 { - n += 1 + sovView(uint64(m.StartEpochIndex)) - } - if m.Penalty != nil { - l = m.Penalty.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.UnbondingAmount != nil { - l = m.UnbondingAmount.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.UnbondingStartHeight != 0 { - n += 1 + sovView(uint64(m.UnbondingStartHeight)) - } - return n -} - -func (m *TransactionPlannerRequest_PositionOpen) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Position != nil { - l = m.Position.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_PositionClose) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_PositionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Reserves != nil { - l = m.Reserves.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AuctionId != nil { - l = m.AuctionId.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Seq != 0 { - n += 1 + sovView(uint64(m.Seq)) - } - return n -} - -func (m *TransactionPlannerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Plan != nil { - l = m.Plan.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *AddressByIndexRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *AddressByIndexResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *WalletIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *WalletIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.WalletId != nil { - l = m.WalletId.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *IndexByAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *IndexByAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *EphemeralAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *EphemeralAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Address != nil { - l = m.Address.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *BalancesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AccountFilter != nil { - l = m.AccountFilter.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AssetIdFilter != nil { - l = m.AssetIdFilter.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *BalancesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Balance != nil { - l = m.Balance.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AccountAddress != nil { - l = m.AccountAddress.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.BalanceView != nil { - l = m.BalanceView.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *StatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *StatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FullSyncHeight != 0 { - n += 1 + sovView(uint64(m.FullSyncHeight)) - } - if m.PartialSyncHeight != 0 { - n += 1 + sovView(uint64(m.PartialSyncHeight)) - } - if m.CatchingUp { - n += 2 - } - return n -} - -func (m *StatusStreamRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *StatusStreamResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LatestKnownBlockHeight != 0 { - n += 1 + sovView(uint64(m.LatestKnownBlockHeight)) - } - if m.FullSyncHeight != 0 { - n += 1 + sovView(uint64(m.FullSyncHeight)) - } - if m.PartialSyncHeight != 0 { - n += 1 + sovView(uint64(m.PartialSyncHeight)) - } - return n -} - -func (m *NotesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IncludeSpent { - n += 2 - } - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AmountToSpend != nil { - l = m.AmountToSpend.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *NotesForVotingRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VotableAtHeight != 0 { - n += 1 + sovView(uint64(m.VotableAtHeight)) - } - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *WitnessRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TransactionPlan != nil { - l = m.TransactionPlan.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *WitnessResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.WitnessData != nil { - l = m.WitnessData.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *WitnessAndBuildRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TransactionPlan != nil { - l = m.TransactionPlan.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AuthorizationData != nil { - l = m.AuthorizationData.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *WitnessAndBuildResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - n += m.Status.Size() - } - return n -} - -func (m *WitnessAndBuildResponse_BuildProgress_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BuildProgress != nil { - l = m.BuildProgress.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} -func (m *WitnessAndBuildResponse_Complete_) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Complete != nil { - l = m.Complete.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} -func (m *WitnessAndBuildResponse_BuildProgress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Progress != 0 { - n += 5 - } - return n -} - -func (m *WitnessAndBuildResponse_Complete) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Transaction != nil { - l = m.Transaction.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *AssetsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Filtered { - n += 2 - } - if len(m.IncludeSpecificDenominations) > 0 { - for _, e := range m.IncludeSpecificDenominations { - l = e.Size() - n += 1 + l + sovView(uint64(l)) - } - } - if m.IncludeDelegationTokens { - n += 2 - } - if m.IncludeUnbondingTokens { - n += 2 - } - if m.IncludeLpNfts { - n += 2 - } - if m.IncludeProposalNfts { - n += 2 - } - if m.IncludeVotingReceiptTokens { - n += 2 - } - return n -} - -func (m *AssetsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DenomMetadata != nil { - l = m.DenomMetadata.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *AppParametersRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AppParametersResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Parameters != nil { - l = m.Parameters.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *GasPricesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GasPricesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GasPrices != nil { - l = m.GasPrices.Size() - n += 1 + l + sovView(uint64(l)) - } - if len(m.AltGasPrices) > 0 { - for _, e := range m.AltGasPrices { - l = e.Size() - n += 1 + l + sovView(uint64(l)) - } - } - return n -} - -func (m *FMDParametersRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *FMDParametersResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Parameters != nil { - l = m.Parameters.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *NoteByCommitmentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoteCommitment != nil { - l = m.NoteCommitment.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AwaitDetection { - n += 2 - } - return n -} - -func (m *NoteByCommitmentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SpendableNote != nil { - l = m.SpendableNote.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *SwapByCommitmentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapCommitment != nil { - l = m.SwapCommitment.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AwaitDetection { - n += 2 - } - return n -} - -func (m *SwapByCommitmentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *UnclaimedSwapsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *UnclaimedSwapsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *NullifierStatusRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AwaitDetection { - n += 2 - } - return n -} - -func (m *NullifierStatusResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Spent { - n += 2 - } - return n -} - -func (m *TransactionInfoByHashRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartHeight != 0 { - n += 1 + sovView(uint64(m.StartHeight)) - } - if m.EndHeight != 0 { - n += 1 + sovView(uint64(m.EndHeight)) - } - return n -} - -func (m *TransactionInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovView(uint64(m.Height)) - } - if m.Id != nil { - l = m.Id.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Transaction != nil { - l = m.Transaction.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Perspective != nil { - l = m.Perspective.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.View != nil { - l = m.View.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TxInfo != nil { - l = m.TxInfo.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *TransactionInfoByHashResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TxInfo != nil { - l = m.TxInfo.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *NotesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoteRecord != nil { - l = m.NoteRecord.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *NotesForVotingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoteRecord != nil { - l = m.NoteRecord.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.IdentityKey != nil { - l = m.IdentityKey.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *SpendableNoteRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoteCommitment != nil { - l = m.NoteCommitment.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Note != nil { - l = m.Note.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.HeightCreated != 0 { - n += 1 + sovView(uint64(m.HeightCreated)) - } - if m.HeightSpent != 0 { - n += 1 + sovView(uint64(m.HeightSpent)) - } - if m.Position != 0 { - n += 1 + sovView(uint64(m.Position)) - } - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.ReturnAddress != nil { - l = m.ReturnAddress.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *SwapRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SwapCommitment != nil { - l = m.SwapCommitment.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Swap != nil { - l = m.Swap.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Position != 0 { - n += 1 + sovView(uint64(m.Position)) - } - if m.Nullifier != nil { - l = m.Nullifier.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.OutputData != nil { - l = m.OutputData.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.HeightClaimed != 0 { - n += 1 + sovView(uint64(m.HeightClaimed)) - } - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *OwnedPositionIdsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionState != nil { - l = m.PositionState.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.TradingPair != nil { - l = m.TradingPair.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *OwnedPositionIdsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PositionId != nil { - l = m.PositionId.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *AssetMetadataByIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AssetId != nil { - l = m.AssetId.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *AssetMetadataByIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DenomMetadata != nil { - l = m.DenomMetadata.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *DelegationsByAddressIndexRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Filter != 0 { - n += 1 + sovView(uint64(m.Filter)) - } - return n -} - -func (m *DelegationsByAddressIndexResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValueView != nil { - l = m.ValueView.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *UnbondingTokensByAddressIndexRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Filter != 0 { - n += 1 + sovView(uint64(m.Filter)) - } - if m.AddressIndex != nil { - l = m.AddressIndex.Size() - n += 1 + l + sovView(uint64(l)) - } - return n -} - -func (m *UnbondingTokensByAddressIndexResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ValueView != nil { - l = m.ValueView.Size() - n += 1 + l + sovView(uint64(l)) - } - if m.Claimable { - n += 2 - } - return n -} - -func sovView(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozView(x uint64) (n int) { - return sovView(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AuctionsRequest) 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 ErrIntOverflowView - } - 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: AuctionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AccountFilter == nil { - m.AccountFilter = &v1.AddressIndex{} - } - if err := m.AccountFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeInactive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeInactive = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryLatestState", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.QueryLatestState = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionIdsFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuctionIdsFilter = append(m.AuctionIdsFilter, &v11.AuctionId{}) - if err := m.AuctionIdsFilter[len(m.AuctionIdsFilter)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuctionsResponse) 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 ErrIntOverflowView - } - 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: AuctionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuctionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &v11.AuctionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Auction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Auction == nil { - m.Auction = &types.Any{} - } - if err := m.Auction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Positions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Positions = append(m.Positions, &v12.Position{}) - if err := m.Positions[len(m.Positions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteRecord == nil { - m.NoteRecord = &SpendableNoteRecord{} - } - if err := m.NoteRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalSeq", wireType) - } - m.LocalSeq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocalSeq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeAndBuildRequest) 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 ErrIntOverflowView - } - 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: AuthorizeAndBuildRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeAndBuildRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionPlan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionPlan == nil { - m.TransactionPlan = &v13.TransactionPlan{} - } - if err := m.TransactionPlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeAndBuildResponse) 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 ErrIntOverflowView - } - 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: AuthorizeAndBuildResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizeAndBuildResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildProgress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AuthorizeAndBuildResponse_BuildProgress{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &AuthorizeAndBuildResponse_BuildProgress_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Complete", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &AuthorizeAndBuildResponse_Complete{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &AuthorizeAndBuildResponse_Complete_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeAndBuildResponse_BuildProgress) 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 ErrIntOverflowView - } - 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: BuildProgress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildProgress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Progress = float32(math.Float32frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizeAndBuildResponse_Complete) 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 ErrIntOverflowView - } - 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: Complete: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Complete: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Transaction == nil { - m.Transaction = &v13.Transaction{} - } - if err := m.Transaction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTransactionRequest) 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 ErrIntOverflowView - } - 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: BroadcastTransactionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastTransactionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Transaction == nil { - m.Transaction = &v13.Transaction{} - } - if err := m.Transaction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AwaitDetection", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AwaitDetection = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTransactionResponse) 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 ErrIntOverflowView - } - 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: BroadcastTransactionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastTransactionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BroadcastSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BroadcastTransactionResponse_BroadcastSuccess{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &BroadcastTransactionResponse_BroadcastSuccess_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Confirmed", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &BroadcastTransactionResponse_Confirmed{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &BroadcastTransactionResponse_Confirmed_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTransactionResponse_BroadcastSuccess) 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 ErrIntOverflowView - } - 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: BroadcastSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BroadcastSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &v14.TransactionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BroadcastTransactionResponse_Confirmed) 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 ErrIntOverflowView - } - 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: Confirmed: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Confirmed: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &v14.TransactionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DetectionHeight", wireType) - } - m.DetectionHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DetectionHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest) 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 ErrIntOverflowView - } - 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: TransactionPlannerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionPlannerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) - } - m.ExpiryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiryHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Memo == nil { - m.Memo = &v13.MemoPlaintext{} - } - if err := m.Memo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &v1.AddressIndex{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Outputs = append(m.Outputs, &TransactionPlannerRequest_Output{}) - if err := m.Outputs[len(m.Outputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spends", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spends = append(m.Spends, &TransactionPlannerRequest_Spend{}) - if err := m.Spends[len(m.Spends)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swaps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Swaps = append(m.Swaps, &TransactionPlannerRequest_Swap{}) - if err := m.Swaps[len(m.Swaps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapClaims", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SwapClaims = append(m.SwapClaims, &TransactionPlannerRequest_SwapClaim{}) - if err := m.SwapClaims[len(m.SwapClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 40: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Delegations = append(m.Delegations, &TransactionPlannerRequest_Delegate{}) - if err := m.Delegations[len(m.Delegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 50: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Undelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Undelegations = append(m.Undelegations, &TransactionPlannerRequest_Undelegate{}) - if err := m.Undelegations[len(m.Undelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 51: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndelegationClaims", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UndelegationClaims = append(m.UndelegationClaims, &TransactionPlannerRequest_UndelegateClaim{}) - if err := m.UndelegationClaims[len(m.UndelegationClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 60: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcRelayActions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcRelayActions = append(m.IbcRelayActions, &v15.IbcRelay{}) - if err := m.IbcRelayActions[len(m.IbcRelayActions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 61: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ics20Withdrawals", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ics20Withdrawals = append(m.Ics20Withdrawals, &v15.Ics20Withdrawal{}) - if err := m.Ics20Withdrawals[len(m.Ics20Withdrawals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 70: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionOpens", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PositionOpens = append(m.PositionOpens, &TransactionPlannerRequest_PositionOpen{}) - if err := m.PositionOpens[len(m.PositionOpens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 71: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionCloses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PositionCloses = append(m.PositionCloses, &TransactionPlannerRequest_PositionClose{}) - if err := m.PositionCloses[len(m.PositionCloses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 72: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionWithdraws", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PositionWithdraws = append(m.PositionWithdraws, &TransactionPlannerRequest_PositionWithdraw{}) - if err := m.PositionWithdraws[len(m.PositionWithdraws)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 73: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DutchAuctionScheduleActions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DutchAuctionScheduleActions = append(m.DutchAuctionScheduleActions, &TransactionPlannerRequest_ActionDutchAuctionSchedule{}) - if err := m.DutchAuctionScheduleActions[len(m.DutchAuctionScheduleActions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 74: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DutchAuctionEndActions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DutchAuctionEndActions = append(m.DutchAuctionEndActions, &TransactionPlannerRequest_ActionDutchAuctionEnd{}) - if err := m.DutchAuctionEndActions[len(m.DutchAuctionEndActions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 75: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DutchAuctionWithdrawActions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DutchAuctionWithdrawActions = append(m.DutchAuctionWithdrawActions, &TransactionPlannerRequest_ActionDutchAuctionWithdraw{}) - if err := m.DutchAuctionWithdrawActions[len(m.DutchAuctionWithdrawActions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 100: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AutoFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.FeeTier{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FeeMode = &TransactionPlannerRequest_AutoFee{v} - iNdEx = postIndex - case 101: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ManualFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &v16.Fee{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.FeeMode = &TransactionPlannerRequest_ManualFee{v} - iNdEx = postIndex - case 200: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIndex", wireType) - } - m.EpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 201: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Epoch == nil { - m.Epoch = &v17.Epoch{} - } - if err := m.Epoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_Output) 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 ErrIntOverflowView - } - 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: Output: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v18.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v1.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_Spend) 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 ErrIntOverflowView - } - 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: Spend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Spend: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v18.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v1.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_Swap) 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 ErrIntOverflowView - } - 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: Swap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Swap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v18.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetAsset", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TargetAsset == nil { - m.TargetAsset = &v18.AssetId{} - } - if err := m.TargetAsset.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fee == nil { - m.Fee = &v16.Fee{} - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClaimAddress == nil { - m.ClaimAddress = &v1.Address{} - } - if err := m.ClaimAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_SwapClaim) 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 ErrIntOverflowView - } - 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: SwapClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapCommitment == nil { - m.SwapCommitment = &v19.StateCommitment{} - } - if err := m.SwapCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_Delegate) 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 ErrIntOverflowView - } - 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: Delegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Delegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Amount == nil { - m.Amount = &v110.Amount{} - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RateData == nil { - m.RateData = &v111.RateData{} - } - if err := m.RateData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_Undelegate) 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 ErrIntOverflowView - } - 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: Undelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Undelegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &v18.Value{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RateData == nil { - m.RateData = &v111.RateData{} - } - if err := m.RateData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_UndelegateClaim) 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 ErrIntOverflowView - } - 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: UndelegateClaim: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UndelegateClaim: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIdentity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidatorIdentity == nil { - m.ValidatorIdentity = &v1.IdentityKey{} - } - if err := m.ValidatorIdentity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartEpochIndex", wireType) - } - m.StartEpochIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartEpochIndex |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Penalty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Penalty == nil { - m.Penalty = &v111.Penalty{} - } - if err := m.Penalty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UnbondingAmount == nil { - m.UnbondingAmount = &v110.Amount{} - } - if err := m.UnbondingAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingStartHeight", wireType) - } - m.UnbondingStartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingStartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_PositionOpen) 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 ErrIntOverflowView - } - 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: PositionOpen: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionOpen: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Position == nil { - m.Position = &v12.Position{} - } - if err := m.Position.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_PositionClose) 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 ErrIntOverflowView - } - 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: PositionClose: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionClose: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &v12.PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_PositionWithdraw) 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 ErrIntOverflowView - } - 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: PositionWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &v12.PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reserves", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Reserves == nil { - m.Reserves = &v12.Reserves{} - } - if err := m.Reserves.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &v12.TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_ActionDutchAuctionSchedule) 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 ErrIntOverflowView - } - 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: ActionDutchAuctionSchedule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionSchedule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Description == nil { - m.Description = &v11.DutchAuctionDescription{} - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_ActionDutchAuctionEnd) 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 ErrIntOverflowView - } - 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: ActionDutchAuctionEnd: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionEnd: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &v11.AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerRequest_ActionDutchAuctionWithdraw) 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 ErrIntOverflowView - } - 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: ActionDutchAuctionWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDutchAuctionWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuctionId == nil { - m.AuctionId = &v11.AuctionId{} - } - if err := m.AuctionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) - } - m.Seq = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seq |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionPlannerResponse) 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 ErrIntOverflowView - } - 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: TransactionPlannerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionPlannerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Plan == nil { - m.Plan = &v13.TransactionPlan{} - } - if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddressByIndexRequest) 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 ErrIntOverflowView - } - 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: AddressByIndexRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddressByIndexRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddressByIndexResponse) 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 ErrIntOverflowView - } - 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: AddressByIndexResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddressByIndexResponse: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v1.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletIdRequest) 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 ErrIntOverflowView - } - 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: WalletIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WalletIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WalletIdResponse) 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 ErrIntOverflowView - } - 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: WalletIdResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WalletIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WalletId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.WalletId == nil { - m.WalletId = &v1.WalletId{} - } - if err := m.WalletId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IndexByAddressRequest) 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 ErrIntOverflowView - } - 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: IndexByAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IndexByAddressRequest: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v1.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IndexByAddressResponse) 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 ErrIntOverflowView - } - 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: IndexByAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IndexByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EphemeralAddressRequest) 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 ErrIntOverflowView - } - 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: EphemeralAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EphemeralAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EphemeralAddressResponse) 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 ErrIntOverflowView - } - 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: EphemeralAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EphemeralAddressResponse: 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 msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Address == nil { - m.Address = &v1.Address{} - } - if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BalancesRequest) 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 ErrIntOverflowView - } - 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: BalancesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AccountFilter == nil { - m.AccountFilter = &v1.AddressIndex{} - } - if err := m.AccountFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetIdFilter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetIdFilter == nil { - m.AssetIdFilter = &v18.AssetId{} - } - if err := m.AssetIdFilter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BalancesResponse) 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 ErrIntOverflowView - } - 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: BalancesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &v1.AddressIndex{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Balance == nil { - m.Balance = &v18.Value{} - } - if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AccountAddress == nil { - m.AccountAddress = &v1.AddressView{} - } - if err := m.AccountAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BalanceView", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BalanceView == nil { - m.BalanceView = &v18.ValueView{} - } - if err := m.BalanceView.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusRequest) 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 ErrIntOverflowView - } - 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: StatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusResponse) 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 ErrIntOverflowView - } - 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: StatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FullSyncHeight", wireType) - } - m.FullSyncHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FullSyncHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSyncHeight", wireType) - } - m.PartialSyncHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PartialSyncHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CatchingUp", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CatchingUp = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusStreamRequest) 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 ErrIntOverflowView - } - 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: StatusStreamRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusStreamRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusStreamResponse) 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 ErrIntOverflowView - } - 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: StatusStreamResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusStreamResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestKnownBlockHeight", wireType) - } - m.LatestKnownBlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LatestKnownBlockHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FullSyncHeight", wireType) - } - m.FullSyncHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FullSyncHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSyncHeight", wireType) - } - m.PartialSyncHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PartialSyncHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NotesRequest) 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 ErrIntOverflowView - } - 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: NotesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeSpent", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeSpent = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v18.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AmountToSpend", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AmountToSpend == nil { - m.AmountToSpend = &v110.Amount{} - } - if err := m.AmountToSpend.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NotesForVotingRequest) 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 ErrIntOverflowView - } - 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: NotesForVotingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotesForVotingRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotableAtHeight", wireType) - } - m.VotableAtHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotableAtHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WitnessRequest) 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 ErrIntOverflowView - } - 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: WitnessRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WitnessRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionPlan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionPlan == nil { - m.TransactionPlan = &v13.TransactionPlan{} - } - if err := m.TransactionPlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WitnessResponse) 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 ErrIntOverflowView - } - 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: WitnessResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WitnessResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WitnessData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.WitnessData == nil { - m.WitnessData = &v13.WitnessData{} - } - if err := m.WitnessData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WitnessAndBuildRequest) 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 ErrIntOverflowView - } - 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: WitnessAndBuildRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WitnessAndBuildRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionPlan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TransactionPlan == nil { - m.TransactionPlan = &v13.TransactionPlan{} - } - if err := m.TransactionPlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuthorizationData == nil { - m.AuthorizationData = &v13.AuthorizationData{} - } - if err := m.AuthorizationData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WitnessAndBuildResponse) 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 ErrIntOverflowView - } - 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: WitnessAndBuildResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WitnessAndBuildResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildProgress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WitnessAndBuildResponse_BuildProgress{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &WitnessAndBuildResponse_BuildProgress_{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Complete", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &WitnessAndBuildResponse_Complete{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Status = &WitnessAndBuildResponse_Complete_{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WitnessAndBuildResponse_BuildProgress) 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 ErrIntOverflowView - } - 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: BuildProgress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildProgress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Progress = float32(math.Float32frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WitnessAndBuildResponse_Complete) 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 ErrIntOverflowView - } - 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: Complete: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Complete: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Transaction == nil { - m.Transaction = &v13.Transaction{} - } - if err := m.Transaction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetsRequest) 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 ErrIntOverflowView - } - 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: AssetsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Filtered", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Filtered = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeSpecificDenominations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IncludeSpecificDenominations = append(m.IncludeSpecificDenominations, &v18.Denom{}) - if err := m.IncludeSpecificDenominations[len(m.IncludeSpecificDenominations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeDelegationTokens", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeDelegationTokens = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeUnbondingTokens", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeUnbondingTokens = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeLpNfts", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeLpNfts = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeProposalNfts", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeProposalNfts = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeVotingReceiptTokens", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeVotingReceiptTokens = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetsResponse) 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 ErrIntOverflowView - } - 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: AssetsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DenomMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DenomMetadata == nil { - m.DenomMetadata = &v18.Metadata{} - } - if err := m.DenomMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AppParametersRequest) 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 ErrIntOverflowView - } - 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: AppParametersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppParametersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AppParametersResponse) 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 ErrIntOverflowView - } - 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: AppParametersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppParametersResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Parameters == nil { - m.Parameters = &v112.AppParameters{} - } - if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GasPricesRequest) 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 ErrIntOverflowView - } - 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: GasPricesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GasPricesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GasPricesResponse) 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 ErrIntOverflowView - } - 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: GasPricesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GasPricesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GasPrices == nil { - m.GasPrices = &v16.GasPrices{} - } - if err := m.GasPrices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AltGasPrices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AltGasPrices = append(m.AltGasPrices, &v16.GasPrices{}) - if err := m.AltGasPrices[len(m.AltGasPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FMDParametersRequest) 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 ErrIntOverflowView - } - 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: FMDParametersRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FMDParametersRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FMDParametersResponse) 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 ErrIntOverflowView - } - 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: FMDParametersResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FMDParametersResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Parameters == nil { - m.Parameters = &v113.FmdParameters{} - } - if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoteByCommitmentRequest) 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 ErrIntOverflowView - } - 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: NoteByCommitmentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoteByCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteCommitment == nil { - m.NoteCommitment = &v19.StateCommitment{} - } - if err := m.NoteCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AwaitDetection", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AwaitDetection = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoteByCommitmentResponse) 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 ErrIntOverflowView - } - 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: NoteByCommitmentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoteByCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpendableNote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SpendableNote == nil { - m.SpendableNote = &SpendableNoteRecord{} - } - if err := m.SpendableNote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapByCommitmentRequest) 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 ErrIntOverflowView - } - 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: SwapByCommitmentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapByCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapCommitment == nil { - m.SwapCommitment = &v19.StateCommitment{} - } - if err := m.SwapCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AwaitDetection", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AwaitDetection = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapByCommitmentResponse) 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 ErrIntOverflowView - } - 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: SwapByCommitmentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapByCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Swap == nil { - m.Swap = &SwapRecord{} - } - if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnclaimedSwapsRequest) 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 ErrIntOverflowView - } - 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: UnclaimedSwapsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnclaimedSwapsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnclaimedSwapsResponse) 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 ErrIntOverflowView - } - 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: UnclaimedSwapsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnclaimedSwapsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Swap == nil { - m.Swap = &SwapRecord{} - } - if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NullifierStatusRequest) 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 ErrIntOverflowView - } - 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: NullifierStatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullifierStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v17.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AwaitDetection", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AwaitDetection = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NullifierStatusResponse) 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 ErrIntOverflowView - } - 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: NullifierStatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullifierStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Spent", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Spent = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionInfoByHashRequest) 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 ErrIntOverflowView - } - 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: TransactionInfoByHashRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionInfoByHashRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &v14.TransactionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionInfoRequest) 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 ErrIntOverflowView - } - 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: TransactionInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartHeight", wireType) - } - m.StartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) - } - m.EndHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EndHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionInfo) 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 ErrIntOverflowView - } - 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: TransactionInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Id == nil { - m.Id = &v14.TransactionId{} - } - if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transaction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Transaction == nil { - m.Transaction = &v13.Transaction{} - } - if err := m.Transaction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Perspective", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Perspective == nil { - m.Perspective = &v13.TransactionPerspective{} - } - if err := m.Perspective.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field View", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.View == nil { - m.View = &v13.TransactionView{} - } - if err := m.View.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionInfoResponse) 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 ErrIntOverflowView - } - 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: TransactionInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TxInfo == nil { - m.TxInfo = &TransactionInfo{} - } - if err := m.TxInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransactionInfoByHashResponse) 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 ErrIntOverflowView - } - 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: TransactionInfoByHashResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionInfoByHashResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TxInfo == nil { - m.TxInfo = &TransactionInfo{} - } - if err := m.TxInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NotesResponse) 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 ErrIntOverflowView - } - 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: NotesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteRecord == nil { - m.NoteRecord = &SpendableNoteRecord{} - } - if err := m.NoteRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NotesForVotingResponse) 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 ErrIntOverflowView - } - 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: NotesForVotingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotesForVotingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteRecord == nil { - m.NoteRecord = &SpendableNoteRecord{} - } - if err := m.NoteRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IdentityKey == nil { - m.IdentityKey = &v1.IdentityKey{} - } - if err := m.IdentityKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpendableNoteRecord) 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 ErrIntOverflowView - } - 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: SpendableNoteRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpendableNoteRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoteCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NoteCommitment == nil { - m.NoteCommitment = &v19.StateCommitment{} - } - if err := m.NoteCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Note == nil { - m.Note = &v113.Note{} - } - if err := m.Note.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v17.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightCreated", wireType) - } - m.HeightCreated = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeightCreated |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightSpent", wireType) - } - m.HeightSpent = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeightSpent |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - m.Position = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Position |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &v17.CommitmentSource{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReturnAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ReturnAddress == nil { - m.ReturnAddress = &v1.AddressView{} - } - if err := m.ReturnAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapRecord) 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 ErrIntOverflowView - } - 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: SwapRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapCommitment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SwapCommitment == nil { - m.SwapCommitment = &v19.StateCommitment{} - } - if err := m.SwapCommitment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Swap == nil { - m.Swap = &v12.SwapPlaintext{} - } - if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - m.Position = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Position |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nullifier == nil { - m.Nullifier = &v17.Nullifier{} - } - if err := m.Nullifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OutputData == nil { - m.OutputData = &v12.BatchSwapOutputData{} - } - if err := m.OutputData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightClaimed", wireType) - } - m.HeightClaimed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeightClaimed |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &v17.CommitmentSource{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OwnedPositionIdsRequest) 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 ErrIntOverflowView - } - 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: OwnedPositionIdsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OwnedPositionIdsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionState == nil { - m.PositionState = &v12.PositionState{} - } - if err := m.PositionState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradingPair", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TradingPair == nil { - m.TradingPair = &v12.TradingPair{} - } - if err := m.TradingPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OwnedPositionIdsResponse) 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 ErrIntOverflowView - } - 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: OwnedPositionIdsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OwnedPositionIdsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PositionId == nil { - m.PositionId = &v12.PositionId{} - } - if err := m.PositionId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetMetadataByIdRequest) 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 ErrIntOverflowView - } - 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: AssetMetadataByIdRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMetadataByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AssetId == nil { - m.AssetId = &v18.AssetId{} - } - if err := m.AssetId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AssetMetadataByIdResponse) 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 ErrIntOverflowView - } - 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: AssetMetadataByIdResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetMetadataByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DenomMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DenomMetadata == nil { - m.DenomMetadata = &v18.Metadata{} - } - if err := m.DenomMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegationsByAddressIndexRequest) 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 ErrIntOverflowView - } - 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: DelegationsByAddressIndexRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegationsByAddressIndexRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) - } - m.Filter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Filter |= DelegationsByAddressIndexRequest_Filter(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegationsByAddressIndexResponse) 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 ErrIntOverflowView - } - 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: DelegationsByAddressIndexResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegationsByAddressIndexResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueView", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValueView == nil { - m.ValueView = &v18.ValueView{} - } - if err := m.ValueView.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbondingTokensByAddressIndexRequest) 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 ErrIntOverflowView - } - 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: UnbondingTokensByAddressIndexRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbondingTokensByAddressIndexRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) - } - m.Filter = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Filter |= UnbondingTokensByAddressIndexRequest_Filter(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AddressIndex == nil { - m.AddressIndex = &v1.AddressIndex{} - } - if err := m.AddressIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnbondingTokensByAddressIndexResponse) 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 ErrIntOverflowView - } - 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: UnbondingTokensByAddressIndexResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnbondingTokensByAddressIndexResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueView", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthView - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthView - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValueView == nil { - m.ValueView = &v18.ValueView{} - } - if err := m.ValueView.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Claimable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowView - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Claimable = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipView(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthView - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipView(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowView - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowView - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowView - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthView - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupView - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthView - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthView = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowView = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupView = fmt.Errorf("proto: unexpected end of group") -) diff --git a/chain/penumbra/wallet.go b/chain/penumbra/wallet.go deleted file mode 100644 index 95c2ba01..00000000 --- a/chain/penumbra/wallet.go +++ /dev/null @@ -1,52 +0,0 @@ -package penumbra - -import ( - "github.com/cosmos/interchaintest/v10/ibc" -) - -var _ ibc.Wallet = &PenumbraWallet{} - -// PenumbraWallet represents a wallet for the Penumbra application. -type PenumbraWallet struct { - mnemonic string - address []byte - keyName string - chainCfg ibc.ChainConfig -} - -// NewWallet creates a new instance of PenumbraWallet with the provided parameters. -func NewWallet(keyname string, address []byte, mnemonic string, chainCfg ibc.ChainConfig) *PenumbraWallet { - return &PenumbraWallet{ - mnemonic: mnemonic, - address: address, - keyName: keyname, - chainCfg: chainCfg, - } -} - -// KeyName returns the key name associated with a PenumbraWallet instance. -func (w *PenumbraWallet) KeyName() string { - return w.keyName -} - -// FormattedAddress returns the formatted address associated with a PenumbraWallet instance. -func (w *PenumbraWallet) FormattedAddress() string { - return string(w.address) -} - -// Mnemonic returns the mnemonic associated with a PenumbraWallet instance. -func (w *PenumbraWallet) Mnemonic() string { - return w.mnemonic -} - -// Address returns the slice of bytes representing this PenumbraWallet instance's address. -func (w *PenumbraWallet) Address() []byte { - return w.address -} - -// FormattedAddressWithPrefix returns the formatted address string with a given prefix. -// The prefix is a string that will be appended to the beginning of the address. -// It takes the address stored in the PenumbraWallet instance and converts it to a string. -func (w *PenumbraWallet) FormattedAddressWithPrefix(prefix string) string { - return string(w.address) -} diff --git a/chain/thorchain/account_retriever.go b/chain/thorchain/account_retriever.go deleted file mode 100644 index ac587c3b..00000000 --- a/chain/thorchain/account_retriever.go +++ /dev/null @@ -1,88 +0,0 @@ -package thorchain - -import ( - "context" - "fmt" - "strconv" - - grpc "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -var ( - _ client.Account = sdk.AccountI(nil) - _ client.AccountRetriever = AccountRetriever{} -) - -// AccountRetriever defines the properties of a type that can be used to -// retrieve accounts. -type AccountRetriever struct { - chain *Thorchain -} - -// GetAccount queries for an account given an address and a block height. An -// error is returned if the query or decoding fails. -func (ar AccountRetriever) GetAccount(clientCtx client.Context, addr sdk.AccAddress) (client.Account, error) { - account, _, err := ar.GetAccountWithHeight(clientCtx, addr) - return account, err -} - -// GetAccountWithHeight queries for an account given an address. Returns the -// height of the query with the account. An error is returned if the query -// or decoding fails. -func (ar AccountRetriever) GetAccountWithHeight(clientCtx client.Context, addr sdk.AccAddress) (client.Account, int64, error) { - var header metadata.MD - - bech32Address, err := ar.chain.AccAddressToBech32(addr) - if err != nil { - return nil, 0, err - } - - queryClient := authtypes.NewQueryClient(clientCtx) - res, err := queryClient.Account(context.Background(), &authtypes.QueryAccountRequest{Address: bech32Address}, grpc.Header(&header)) - if err != nil { - return nil, 0, err - } - - blockHeight := header.Get(grpctypes.GRPCBlockHeightHeader) - if l := len(blockHeight); l != 1 { - return nil, 0, fmt.Errorf("unexpected '%s' header length; got %d, expected: %d", grpctypes.GRPCBlockHeightHeader, l, 1) - } - - nBlockHeight, err := strconv.Atoi(blockHeight[0]) - if err != nil { - return nil, 0, fmt.Errorf("failed to parse block height: %w", err) - } - - var acc sdk.AccountI - if err := clientCtx.InterfaceRegistry.UnpackAny(res.Account, &acc); err != nil { - return nil, 0, err - } - - return acc, int64(nBlockHeight), nil -} - -// EnsureExists returns an error if no account exists for the given address else nil. -func (ar AccountRetriever) EnsureExists(clientCtx client.Context, addr sdk.AccAddress) error { - if _, err := ar.GetAccount(clientCtx, addr); err != nil { - return err - } - - return nil -} - -// GetAccountNumberSequence returns sequence and account number for the given address. -// It returns an error if the account couldn't be retrieved from the state. -func (ar AccountRetriever) GetAccountNumberSequence(clientCtx client.Context, addr sdk.AccAddress) (uint64, uint64, error) { - acc, err := ar.GetAccount(clientCtx, addr) - if err != nil { - return 0, 0, err - } - - return acc.GetAccountNumber(), acc.GetSequence(), nil -} diff --git a/chain/thorchain/address.go b/chain/thorchain/address.go deleted file mode 100644 index 61fa9b17..00000000 --- a/chain/thorchain/address.go +++ /dev/null @@ -1,33 +0,0 @@ -package thorchain - -import ( - "errors" - "strings" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" -) - -// AccAddressFromBech32 creates an AccAddress from a Bech32 string. -// https://github.com/cosmos/cosmos-sdk/blob/v0.50.2/types/address.go#L193-L212 -func (c *Thorchain) AccAddressFromBech32(address string) (addr sdk.AccAddress, err error) { - if len(strings.TrimSpace(address)) == 0 { - return sdk.AccAddress{}, errors.New("empty address string is not allowed") - } - - bz, err := sdk.GetFromBech32(address, c.Config().Bech32Prefix) - if err != nil { - return nil, err - } - - err = sdk.VerifyAddressFormat(bz) - if err != nil { - return nil, err - } - - return sdk.AccAddress(bz), nil -} - -func (c *Thorchain) AccAddressToBech32(addr sdk.AccAddress) (string, error) { - return bech32.ConvertAndEncode(c.Config().Bech32Prefix, addr) -} diff --git a/chain/thorchain/api_query.go b/chain/thorchain/api_query.go deleted file mode 100644 index b9d7958e..00000000 --- a/chain/thorchain/api_query.go +++ /dev/null @@ -1,268 +0,0 @@ -package thorchain - -// Api queries for thorchain -// Copied from thorchain's simulation test, may be replaced in the future for queries via chain binary - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" -) - -// Generic query for routes not yet supported here. -func (c *Thorchain) APIQuery(ctx context.Context, path string, args ...string) (any, error) { - url := fmt.Sprintf("%s/%s", c.GetAPIAddress(), path) - var res any - err := get(ctx, url, &res) - return res, err -} - -func (c *Thorchain) APIGetNode(ctx context.Context, addr string) (OpenapiNode, error) { - url := fmt.Sprintf("%s/thorchain/node/%s", c.GetAPIAddress(), addr) - var node OpenapiNode - err := get(ctx, url, &node) - return node, err -} - -func (c *Thorchain) APIGetNodes(ctx context.Context) ([]OpenapiNode, error) { - url := fmt.Sprintf("%s/thorchain/nodes", c.GetAPIAddress()) - var nodes []OpenapiNode - err := get(ctx, url, &nodes) - return nodes, err -} - -func (c *Thorchain) APIGetBalances(ctx context.Context, addr string) (common.Coins, error) { - url := fmt.Sprintf("%s/cosmos/bank/v1beta1/balances/%s", c.GetAPIAddress(), addr) - var balances struct { - Balances []struct { - Denom string `json:"denom"` - Amount string `json:"amount"` - } `json:"balances"` - } - err := get(ctx, url, &balances) - if err != nil { - return nil, err - } - - // convert to common.Coins - coins := make(common.Coins, 0, len(balances.Balances)) - for _, balance := range balances.Balances { - var amount uint64 - amount, err = strconv.ParseUint(balance.Amount, 10, 64) - if err != nil { - return nil, err - } - var asset common.Asset - asset, err = common.NewAsset(strings.ToUpper(balance.Denom)) - if err != nil { - return nil, err - } - coins = append(coins, common.NewCoin(asset, sdkmath.NewUint(amount))) - } - - return coins, nil -} - -func (c *Thorchain) APIGetInboundAddress(ctx context.Context, chain string) (address string, router *string, err error) { - url := fmt.Sprintf("%s/thorchain/inbound_addresses", c.GetAPIAddress()) - var inboundAddresses []InboundAddress - err = get(ctx, url, &inboundAddresses) - if err != nil { - return "", nil, err - } - - // find address for chain - for _, inboundAddress := range inboundAddresses { - if *inboundAddress.Chain == chain { - if inboundAddress.Router != nil { - router = new(string) - *router = *inboundAddress.Router - } - return *inboundAddress.Address, router, nil - } - } - - return "", nil, fmt.Errorf("no inbound address found for chain %s", chain) -} - -func (c *Thorchain) APIGetRouterAddress(ctx context.Context, chain string) (string, error) { - url := fmt.Sprintf("%s/thorchain/inbound_addresses", c.GetAPIAddress()) - var inboundAddresses []InboundAddress - err := get(ctx, url, &inboundAddresses) - if err != nil { - return "", err - } - - // find address for chain - for _, inboundAddress := range inboundAddresses { - if *inboundAddress.Chain == chain { - return *inboundAddress.Router, nil - } - } - - return "", fmt.Errorf("no inbound address found for chain %s", chain) -} - -func (c *Thorchain) APIGetLiquidityProviders(ctx context.Context, asset common.Asset) ([]LiquidityProvider, error) { - url := fmt.Sprintf("%s/thorchain/pool/%s/liquidity_providers", c.GetAPIAddress(), asset.String()) - var liquidityProviders []LiquidityProvider - err := get(ctx, url, &liquidityProviders) - return liquidityProviders, err -} - -func (c *Thorchain) APIGetSavers(ctx context.Context, asset common.Asset) ([]Saver, error) { - url := fmt.Sprintf("%s/thorchain/pool/%s/savers", c.GetAPIAddress(), asset.GetLayer1Asset().String()) - var savers []Saver - err := get(ctx, url, &savers) - return savers, err -} - -func (c *Thorchain) APIGetPools(ctx context.Context) ([]Pool, error) { - url := fmt.Sprintf("%s/thorchain/pools", c.GetAPIAddress()) - var pools []Pool - err := get(ctx, url, &pools) - return pools, err -} - -func (c *Thorchain) APIGetPool(ctx context.Context, asset common.Asset) (Pool, error) { - url := fmt.Sprintf("%s/thorchain/pool/%s", c.GetAPIAddress(), asset.String()) - var pool Pool - err := get(ctx, url, &pool) - return pool, err -} - -func (c *Thorchain) APIGetSwapQuote(ctx context.Context, from, to common.Asset, amount sdkmath.Uint) (QuoteSwapResponse, error) { - baseURL := fmt.Sprintf("%s/thorchain/quote/swap", c.GetAPIAddress()) - parsedURL, err := url.Parse(baseURL) - if err != nil { - return QuoteSwapResponse{}, err - } - params := url.Values{} - params.Add("from_asset", from.String()) - params.Add("to_asset", to.String()) - params.Add("amount", amount.String()) - parsedURL.RawQuery = params.Encode() - url := parsedURL.String() - - var quote QuoteSwapResponse - err = get(ctx, url, "e) - return quote, err -} - -func (c *Thorchain) APIGetSaverDepositQuote(ctx context.Context, asset common.Asset, amount sdkmath.Uint) (QuoteSaverDepositResponse, error) { - baseURL := fmt.Sprintf("%s/thorchain/quote/saver/deposit", c.GetAPIAddress()) - parsedURL, err := url.Parse(baseURL) - if err != nil { - return QuoteSaverDepositResponse{}, err - } - params := url.Values{} - params.Add("asset", asset.String()) - params.Add("amount", amount.String()) - parsedURL.RawQuery = params.Encode() - url := parsedURL.String() - - var quote QuoteSaverDepositResponse - err = get(ctx, url, "e) - return quote, err -} - -func (c *Thorchain) APIGetTxStages(ctx context.Context, txid string) (TxStagesResponse, error) { - url := fmt.Sprintf("%s/thorchain/tx/stages/%s", c.GetAPIAddress(), txid) - var stages TxStagesResponse - err := get(ctx, url, &stages) - return stages, err -} - -func (c *Thorchain) APIGetTxDetails(ctx context.Context, txid string) (TxDetailsResponse, error) { - url := fmt.Sprintf("%s/thorchain/tx/details/%s", c.GetAPIAddress(), txid) - var details TxDetailsResponse - err := get(ctx, url, &details) - return details, err -} - -func (c *Thorchain) APIGetMimirs(ctx context.Context) (map[string]int64, error) { - url := fmt.Sprintf("%s/thorchain/mimir", c.GetAPIAddress()) - var mimirs map[string]int64 - err := get(ctx, url, &mimirs) - return mimirs, err -} - -//////////////////////////////////////////////////////////////////////////////////////// -// Internal -//////////////////////////////////////////////////////////////////////////////////////// - -func get(ctx context.Context, url string, target interface{}) error { - req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) - if err != nil { - return err - } - - resp, err := http.DefaultClient.Do(req) - if err != nil { - return err - } - defer resp.Body.Close() - - // extract error if the request failed - type ErrorResponse struct { - Error string `json:"error"` - } - buf, err := io.ReadAll(resp.Body) - if err != nil { - return err - } - errResp := ErrorResponse{} - err = json.Unmarshal(buf, &errResp) - if err == nil && errResp.Error != "" { - return errors.New(errResp.Error) - } - - // decode response - return json.Unmarshal(buf, target) -} - -// ConvertAssetAmount converts the given coin to the target asset and returns the amount. -func (c *Thorchain) ConvertAssetAmount(ctx context.Context, coin Coin, asset string) (sdkmath.Uint, error) { - pools, err := c.APIGetPools(ctx) - if err != nil { - return sdkmath.ZeroUint(), err - } - - // find pools for the conversion rate - var sourcePool, targetPool Pool - for _, pool := range pools { - if pool.Asset == coin.Asset { - sourcePool = pool - } - if pool.Asset == asset { - targetPool = pool - } - } - - // ensure we found both pools - if sourcePool.Asset == "" { - return sdkmath.ZeroUint(), fmt.Errorf("source asset not found") - } - if targetPool.Asset == "" { - return sdkmath.ZeroUint(), fmt.Errorf("target asset not found") - } - - // convert the amount - converted := sdkmath.NewUintFromString(coin.Amount). - Mul(sdkmath.NewUintFromString(sourcePool.BalanceRune)). - Quo(sdkmath.NewUintFromString(sourcePool.BalanceAsset)). - Mul(sdkmath.NewUintFromString(targetPool.BalanceAsset)). - Quo(sdkmath.NewUintFromString(targetPool.BalanceRune)) - - return converted, nil -} diff --git a/chain/thorchain/broadcaster.go b/chain/thorchain/broadcaster.go deleted file mode 100644 index f0f4a9dc..00000000 --- a/chain/thorchain/broadcaster.go +++ /dev/null @@ -1,254 +0,0 @@ -package thorchain - -import ( - "bytes" - "context" - "fmt" - "path" - "testing" - "time" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/testutil" -) - -type ClientContextOpt func(clientContext client.Context) client.Context - -type FactoryOpt func(factory tx.Factory) tx.Factory - -type User interface { - KeyName() string - FormattedAddress() string -} - -type Broadcaster struct { - // buf stores the output sdk.TxResponse when broadcast.Tx is invoked. - buf *bytes.Buffer - // keyrings is a mapping of keyrings which point to a temporary test directory. The contents - // of this directory are copied from the node container for the specific user. - keyrings map[User]keyring.Keyring - - // chain is a reference to the CosmosChain instance which will be the target of the messages. - chain *Thorchain - // t is the testing.T for the current test. - t *testing.T - - // factoryOptions is a slice of broadcast.FactoryOpt which enables arbitrary configuration of the tx.Factory. - factoryOptions []FactoryOpt - // clientContextOptions is a slice of broadcast.ClientContextOpt which enables arbitrary configuration of the client.Context. - clientContextOptions []ClientContextOpt -} - -// NewBroadcaster returns a instance of Broadcaster which can be used with broadcast.Tx to -// broadcast messages sdk messages. -func NewBroadcaster(t *testing.T, chain *Thorchain) *Broadcaster { - t.Helper() - - return &Broadcaster{ - t: t, - chain: chain, - buf: &bytes.Buffer{}, - keyrings: map[User]keyring.Keyring{}, - } -} - -// ConfigureFactoryOptions ensure the given configuration functions are run when calling GetFactory -// after all default options have been applied. -func (b *Broadcaster) ConfigureFactoryOptions(opts ...FactoryOpt) { - b.factoryOptions = append(b.factoryOptions, opts...) -} - -// ConfigureClientContextOptions ensure the given configuration functions are run when calling GetClientContext -// after all default options have been applied. -func (b *Broadcaster) ConfigureClientContextOptions(opts ...ClientContextOpt) { - b.clientContextOptions = append(b.clientContextOptions, opts...) -} - -// GetFactory returns an instance of tx.Factory that is configured with this Broadcaster's CosmosChain -// and the provided user. ConfigureFactoryOptions can be used to specify arbitrary options to configure the returned -// factory. -func (b *Broadcaster) GetFactory(ctx context.Context, user User) (tx.Factory, error) { - clientContext, err := b.GetClientContext(ctx, user) - if err != nil { - return tx.Factory{}, err - } - - sdkAdd, err := b.chain.AccAddressFromBech32(user.FormattedAddress()) - if err != nil { - return tx.Factory{}, err - } - - account, err := clientContext.AccountRetriever.GetAccount(clientContext, sdkAdd) - if err != nil { - return tx.Factory{}, err - } - - f := b.defaultTxFactory(clientContext, account) - for _, opt := range b.factoryOptions { - f = opt(f) - } - return f, nil -} - -// GetClientContext returns a client context that is configured with this Broadcaster's CosmosChain and -// the provided user. ConfigureClientContextOptions can be used to configure arbitrary options to configure the returned -// client.Context. -func (b *Broadcaster) GetClientContext(ctx context.Context, user User) (client.Context, error) { - chain := b.chain - cn := chain.getFullNode() - - _, ok := b.keyrings[user] - if !ok { - localDir := b.t.TempDir() - containerKeyringDir := path.Join(cn.HomeDir(), "keyring-test") - kr, err := dockerutil.NewLocalKeyringFromDockerContainer(ctx, cn.DockerClient, localDir, containerKeyringDir, cn.containerLifecycle.ContainerID()) - if err != nil { - return client.Context{}, err - } - b.keyrings[user] = kr - } - - sdkAdd, err := b.chain.AccAddressFromBech32(user.FormattedAddress()) - if err != nil { - return client.Context{}, err - } - - clientContext := b.defaultClientContext(user, sdkAdd) - for _, opt := range b.clientContextOptions { - clientContext = opt(clientContext) - } - return clientContext, nil -} - -// GetTxResponseBytes returns the sdk.TxResponse bytes which returned from broadcast.Tx. -func (b *Broadcaster) GetTxResponseBytes(ctx context.Context, user User) ([]byte, error) { - if b.buf == nil || b.buf.Len() == 0 { - return nil, fmt.Errorf("empty buffer, transaction has not been executed yet") - } - return b.buf.Bytes(), nil -} - -// UnmarshalTxResponseBytes accepts the sdk.TxResponse bytes and unmarshalls them into an -// instance of sdk.TxResponse. -func (b *Broadcaster) UnmarshalTxResponseBytes(ctx context.Context, bytes []byte) (sdk.TxResponse, error) { - resp := sdk.TxResponse{} - if err := b.chain.cfg.EncodingConfig.Codec.UnmarshalJSON(bytes, &resp); err != nil { - return sdk.TxResponse{}, err - } - - // persist nested errors such as ValidateBasic checks. - code := resp.Code - rawLog := resp.RawLog - - if code != 0 { - return resp, fmt.Errorf("error in transaction (code: %d): raw_log: %s", code, rawLog) - } - - return resp, nil -} - -// defaultClientContext returns a default client context configured with the user as the sender. -func (b *Broadcaster) defaultClientContext(fromUser User, sdkAdd sdk.AccAddress) client.Context { - // initialize a clean buffer each time - b.buf.Reset() - kr := b.keyrings[fromUser] - cn := b.chain.getFullNode() - return cn.CliContext(). - WithOutput(b.buf). - WithFrom(fromUser.FormattedAddress()). - WithFromAddress(sdkAdd). - WithFromName(fromUser.KeyName()). - WithSkipConfirmation(true). - WithAccountRetriever(AccountRetriever{chain: b.chain}). - WithKeyring(kr). - WithBroadcastMode(flags.BroadcastSync). - WithCodec(b.chain.cfg.EncodingConfig.Codec) - - // NOTE: the returned context used to have .WithHomeDir(cn.Home), - // but that field no longer exists and the test against Broadcaster still passes without it. -} - -// defaultTxFactory creates a new Factory with default configuration. -func (b *Broadcaster) defaultTxFactory(clientCtx client.Context, account client.Account) tx.Factory { - chainConfig := b.chain.Config() - return tx.Factory{}. - WithAccountNumber(account.GetAccountNumber()). - WithSequence(account.GetSequence()). - WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). - WithGasAdjustment(chainConfig.GasAdjustment). - WithGas(flags.DefaultGasLimit). - WithGasPrices(chainConfig.GasPrices). - WithMemo("interchaintest"). - WithTxConfig(clientCtx.TxConfig). - WithAccountRetriever(clientCtx.AccountRetriever). - WithKeybase(clientCtx.Keyring). - WithChainID(clientCtx.ChainID). - WithSimulateAndExecute(false) -} - -// BroadcastTx uses the provided Broadcaster to broadcast all the provided messages which will be signed -// by the User provided. The sdk.TxResponse and an error are returned. -func BroadcastTx(ctx context.Context, broadcaster *Broadcaster, broadcastingUser User, msgs ...sdk.Msg) (sdk.TxResponse, error) { - f, err := broadcaster.GetFactory(ctx, broadcastingUser) - if err != nil { - return sdk.TxResponse{}, err - } - - cc, err := broadcaster.GetClientContext(ctx, broadcastingUser) - if err != nil { - return sdk.TxResponse{}, err - } - - if err := tx.BroadcastTx(cc, f, msgs...); err != nil { - return sdk.TxResponse{}, err - } - - txBytes, err := broadcaster.GetTxResponseBytes(ctx, broadcastingUser) - if err != nil { - return sdk.TxResponse{}, err - } - - err = testutil.WaitForCondition(time.Second*30, time.Second*5, func() (bool, error) { - var err error - txBytes, err = broadcaster.GetTxResponseBytes(ctx, broadcastingUser) - if err != nil { - return false, nil - } - return true, nil - }) - if err != nil { - return sdk.TxResponse{}, err - } - - respWithTxHash, err := broadcaster.UnmarshalTxResponseBytes(ctx, txBytes) - if err != nil { - return sdk.TxResponse{}, err - } - - return getFullyPopulatedResponse(cc, respWithTxHash.TxHash) -} - -// getFullyPopulatedResponse returns a fully populated sdk.TxResponse. -// the QueryTx function is periodically called until a tx with the given hash -// has been included in a block. -func getFullyPopulatedResponse(cc client.Context, txHash string) (sdk.TxResponse, error) { - var resp sdk.TxResponse - err := testutil.WaitForCondition(time.Second*60, time.Second*5, func() (bool, error) { - fullyPopulatedTxResp, err := authtx.QueryTx(cc, txHash) - if err != nil { - return false, nil - } - - resp = *fullyPopulatedTxResp - return true, nil - }) - return resp, err -} diff --git a/chain/thorchain/codec.go b/chain/thorchain/codec.go deleted file mode 100644 index 1cc99656..00000000 --- a/chain/thorchain/codec.go +++ /dev/null @@ -1,51 +0,0 @@ -package thorchain - -import ( - "cosmossdk.io/x/upgrade" - - transfer "github.com/cosmos/ibc-go/v10/modules/apps/transfer" - ibccore "github.com/cosmos/ibc-go/v10/modules/core" - ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/cosmos/cosmos-sdk/x/auth" - authTx "github.com/cosmos/cosmos-sdk/x/auth/tx" - "github.com/cosmos/cosmos-sdk/x/bank" - "github.com/cosmos/cosmos-sdk/x/consensus" - distr "github.com/cosmos/cosmos-sdk/x/distribution" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/cosmos-sdk/x/mint" - "github.com/cosmos/cosmos-sdk/x/params" - "github.com/cosmos/cosmos-sdk/x/staking" -) - -func DefaultEncoding() testutil.TestEncodingConfig { - return testutil.MakeTestEncodingConfig( - auth.AppModuleBasic{}, - genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), - bank.AppModuleBasic{}, - staking.AppModuleBasic{}, - mint.AppModuleBasic{}, - distr.AppModuleBasic{}, - params.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - consensus.AppModuleBasic{}, - transfer.AppModuleBasic{}, - ibccore.AppModuleBasic{}, - ibctm.AppModuleBasic{}, - ) -} - -func decodeTX(interfaceRegistry codectypes.InterfaceRegistry, txbz []byte) (sdk.Tx, error) { - cdc := codec.NewProtoCodec(interfaceRegistry) - return authTx.DefaultTxDecoder(cdc)(txbz) -} - -func encodeTxToJSON(interfaceRegistry codectypes.InterfaceRegistry, tx sdk.Tx) ([]byte, error) { - cdc := codec.NewProtoCodec(interfaceRegistry) - return authTx.DefaultJSONTxEncoder(cdc)(tx) -} diff --git a/chain/thorchain/common/asset.go b/chain/thorchain/common/asset.go deleted file mode 100644 index d281a869..00000000 --- a/chain/thorchain/common/asset.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: thorchain/v1/common/common.proto - -package common - -import ( - "fmt" - "strings" - - _ "github.com/gogo/protobuf/gogoproto" -) - -var ( - // EmptyAsset empty asset, not valid - EmptyAsset = Asset{Chain: EmptyChain, Symbol: "", Ticker: "", Synth: false} - // LUNAAsset LUNA - LUNAAsset = Asset{Chain: TERRAChain, Symbol: "LUNA", Ticker: "LUNA", Synth: false} - // ATOMAsset ATOM - ATOMAsset = Asset{Chain: GAIAChain, Symbol: "ATOM", Ticker: "ATOM", Synth: false} - // BNBAsset BNB - BNBAsset = Asset{Chain: BNBChain, Symbol: "BNB", Ticker: "BNB", Synth: false} - // BNBBEP20Asset BNB - BNBBEP20Asset = Asset{Chain: BSCChain, Symbol: "BNB", Ticker: "BNB", Synth: false} - // BTCAsset BTC - BTCAsset = Asset{Chain: BTCChain, Symbol: "BTC", Ticker: "BTC", Synth: false} - // LTCAsset BTC - LTCAsset = Asset{Chain: LTCChain, Symbol: "LTC", Ticker: "LTC", Synth: false} - // BCHAsset BCH - BCHAsset = Asset{Chain: BCHChain, Symbol: "BCH", Ticker: "BCH", Synth: false} - // DOGEAsset DOGE - DOGEAsset = Asset{Chain: DOGEChain, Symbol: "DOGE", Ticker: "DOGE", Synth: false} - // ETHAsset ETH - ETHAsset = Asset{Chain: ETHChain, Symbol: "ETH", Ticker: "ETH", Synth: false} - // AVAXAsset AVAX - AVAXAsset = Asset{Chain: AVAXChain, Symbol: "AVAX", Ticker: "AVAX", Synth: false} - // Rune67CAsset RUNE on Binance test net - Rune67CAsset = Asset{Chain: BNBChain, Symbol: "RUNE-67C", Ticker: "RUNE", Synth: false} // mocknet asset on binance ganges - // RuneB1AAsset RUNE on Binance main net - RuneB1AAsset = Asset{Chain: BNBChain, Symbol: "RUNE-B1A", Ticker: "RUNE", Synth: false} // mainnet - // RuneNative RUNE on thorchain - RuneNative = Asset{Chain: THORChain, Symbol: "RUNE", Ticker: "RUNE", Synth: false} - RuneERC20Asset = Asset{Chain: ETHChain, Symbol: "RUNE-0x3155ba85d5f96b2d030a4966af206230e46849cb", Ticker: "RUNE", Synth: false} - RuneERC20MocknetAsset = Asset{Chain: ETHChain, Symbol: "RUNE-0xd601c6A3a36721320573885A8d8420746dA3d7A0", Ticker: "RUNE", Synth: false} - TOR = Asset{Chain: THORChain, Symbol: "TOR", Ticker: "TOR", Synth: false} - THORBTC = Asset{Chain: THORChain, Symbol: "BTC", Ticker: "BTC", Synth: false} -) - -type Asset struct { - Chain Chain `json:"chain,omitempty"` - Symbol string `json:"symbol,omitempty"` - Ticker string `json:"ticker,omitempty"` - Synth bool `json:"synth,omitempty"` - Trade bool `json:"trade,omitempty"` -} - -// NewAsset parse the given input into Asset object -func NewAsset(input string) (Asset, error) { - var err error - var asset Asset - var sym string - var parts []string - switch { - case strings.Count(input, "~") > 0: - parts = strings.SplitN(input, "~", 2) - asset.Trade = true - case strings.Count(input, "/") > 0: - parts = strings.SplitN(input, "/", 2) - asset.Synth = true - default: - parts = strings.SplitN(input, ".", 2) - } - if len(parts) == 1 { - asset.Chain = "THOR" - sym = parts[0] - } else { - asset.Chain, err = NewChain(parts[0]) - if err != nil { - return EmptyAsset, err - } - sym = parts[1] - } - - asset.Symbol = strings.ToUpper(sym) - parts = strings.SplitN(sym, "-", 2) - asset.Ticker = strings.ToUpper(parts[0]) - - return asset, nil -} - -// Get synthetic asset of asset -func (a Asset) GetSyntheticAsset() Asset { - if a.IsSyntheticAsset() { - return a - } - return Asset{ - Chain: a.Chain, - Symbol: a.Symbol, - Ticker: a.Ticker, - Synth: true, - } -} - -// Get trade asset of asset -func (a Asset) GetTradeAsset() Asset { - if a.IsTradeAsset() { - return a - } - return Asset{ - Chain: a.Chain, - Symbol: a.Symbol, - Ticker: a.Ticker, - Trade: true, - } -} - -// Get derived asset of asset -func (a Asset) GetDerivedAsset() Asset { - return Asset{ - Chain: THORChain, - Symbol: a.Symbol, - Ticker: a.Ticker, - Synth: false, - } -} - -// Check if asset is a pegged asset -func (a Asset) IsSyntheticAsset() bool { - return a.Synth -} - -func (a Asset) IsTradeAsset() bool { - return a.Trade -} - -// Get layer1 asset version -func (a Asset) GetLayer1Asset() Asset { - if !a.IsSyntheticAsset() && !a.IsTradeAsset() { - return a - } - return Asset{ - Chain: a.Chain, - Symbol: a.Symbol, - Ticker: a.Ticker, - Synth: false, - Trade: false, - } -} - -// String implement fmt.Stringer , return the string representation of Asset -func (a Asset) String() string { - div := "." - if a.Synth { - div = "/" - } - if a.Trade { - div = "~" - } - return fmt.Sprintf("%s%s%s", a.Chain, div, a.Symbol) -} - -// Replace pool name "." with a "-" for Mimir key checking. -func (a Asset) MimirString() string { - return a.Chain.String() + "-" + a.Symbol -} diff --git a/chain/thorchain/common/chain.go b/chain/thorchain/common/chain.go deleted file mode 100644 index ed0c7917..00000000 --- a/chain/thorchain/common/chain.go +++ /dev/null @@ -1,89 +0,0 @@ -package common - -import ( - "errors" - "strings" -) - -const ( - EmptyChain = Chain("") - BNBChain = Chain("BNB") - BSCChain = Chain("BSC") - ETHChain = Chain("ETH") - BTCChain = Chain("BTC") - LTCChain = Chain("LTC") - BCHChain = Chain("BCH") - DOGEChain = Chain("DOGE") - THORChain = Chain("THOR") - TERRAChain = Chain("TERRA") - GAIAChain = Chain("GAIA") - AVAXChain = Chain("AVAX") -) - -type Chain string - -// Chains represent a slice of Chain. -type Chains []Chain - -// Valid validates chain format, should consist only of uppercase letters. -func (c Chain) Valid() error { - if len(c) < 3 { - return errors.New("chain id len is less than 3") - } - if len(c) > 10 { - return errors.New("chain id len is more than 10") - } - for _, ch := range string(c) { - if ch < 'A' || ch > 'Z' { - return errors.New("chain id can consist only of uppercase letters") - } - } - return nil -} - -// NewChain create a new Chain and default the siging_algo to Secp256k1. -func NewChain(chainID string) (Chain, error) { - chain := Chain(strings.ToUpper(chainID)) - if err := chain.Valid(); err != nil { - return chain, err - } - return chain, nil -} - -// String implement fmt.Stringer. -func (c Chain) String() string { - // convert it to upper case again just in case someone created a ticker via Chain("rune") - return strings.ToUpper(string(c)) -} - -// GetGasAsset chain's base asset. -func (c Chain) GetGasAsset() Asset { - switch c { - case THORChain: - return RuneNative - case BNBChain: - return BNBAsset - case BSCChain: - return BNBBEP20Asset - case BTCChain: - return BTCAsset - case LTCChain: - return LTCAsset - case BCHChain: - return BCHAsset - case DOGEChain: - return DOGEAsset - case ETHChain: - return ETHAsset - case TERRAChain: - return LUNAAsset - case AVAXChain: - return AVAXAsset - case GAIAChain: - return ATOMAsset - case EmptyChain: - return EmptyAsset - default: - return EmptyAsset - } -} diff --git a/chain/thorchain/common/coin.go b/chain/thorchain/common/coin.go deleted file mode 100644 index 493de8c2..00000000 --- a/chain/thorchain/common/coin.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: thorchain/v1/common/common.proto - -package common - -import ( - cosmossdk_io_math "cosmossdk.io/math" - _ "github.com/gogo/protobuf/gogoproto" -) - -type Coin struct { - Asset Asset `json:"asset"` - Amount cosmossdk_io_math.Uint `json:"amount"` - Decimals int64 `json:"decimals,omitempty"` -} - -type Coins []Coin - -// NewCoin return a new instance of Coin -func NewCoin(asset Asset, amount cosmossdk_io_math.Uint) Coin { - return Coin{ - Asset: asset, - Amount: amount, - } -} diff --git a/chain/thorchain/config.go b/chain/thorchain/config.go deleted file mode 100644 index 3c36fb1f..00000000 --- a/chain/thorchain/config.go +++ /dev/null @@ -1,23 +0,0 @@ -package thorchain - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func SetSDKConfig(bech32Prefix string) *sdk.Config { - var ( - bech32MainPrefix = bech32Prefix - bech32PrefixAccAddr = bech32MainPrefix - bech32PrefixAccPub = bech32MainPrefix + sdk.PrefixPublic - bech32PrefixValAddr = bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator - bech32PrefixValPub = bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic - bech32PrefixConsAddr = bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus - bech32PrefixConsPub = bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic - ) - - cfg := sdk.GetConfig() - cfg.SetBech32PrefixForAccount(bech32PrefixAccAddr, bech32PrefixAccPub) - cfg.SetBech32PrefixForValidator(bech32PrefixValAddr, bech32PrefixValPub) - cfg.SetBech32PrefixForConsensusNode(bech32PrefixConsAddr, bech32PrefixConsPub) - return cfg -} diff --git a/chain/thorchain/doc.go b/chain/thorchain/doc.go deleted file mode 100644 index 361c9bdd..00000000 --- a/chain/thorchain/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package thorchain provides an implementation of ibc.Chain for Thorchain. -package thorchain diff --git a/chain/thorchain/genesis.go b/chain/thorchain/genesis.go deleted file mode 100644 index 0b5ba03b..00000000 --- a/chain/thorchain/genesis.go +++ /dev/null @@ -1,56 +0,0 @@ -package thorchain - -import ( - "encoding/json" - "fmt" - "strconv" - "strings" - - "github.com/icza/dyno" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -type GenesisKV struct { - Key string `json:"key"` - Value interface{} `json:"value"` -} - -func NewGenesisKV(key string, value interface{}) GenesisKV { - return GenesisKV{ - Key: key, - Value: value, - } -} - -func ModifyGenesis(genesisKV []GenesisKV) func(ibc.ChainConfig, []byte) ([]byte, error) { - return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) { - g := make(map[string]interface{}) - if err := json.Unmarshal(genbz, &g); err != nil { - return nil, fmt.Errorf("failed to unmarshal genesis file: %w", err) - } - - for idx, values := range genesisKV { - splitPath := strings.Split(values.Key, ".") - - path := make([]interface{}, len(splitPath)) - for i, component := range splitPath { - if v, err := strconv.Atoi(component); err == nil { - path[i] = v - } else { - path[i] = component - } - } - - if err := dyno.Set(g, values.Value, path...); err != nil { - return nil, fmt.Errorf("failed to set key '%s' as '%+v' (index:%d) in genesis json: %w", values.Key, values.Value, idx, err) - } - } - - out, err := json.Marshal(g) - if err != nil { - return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err) - } - return out, nil - } -} diff --git a/chain/thorchain/module_bank.go b/chain/thorchain/module_bank.go deleted file mode 100644 index 11b3681e..00000000 --- a/chain/thorchain/module_bank.go +++ /dev/null @@ -1,127 +0,0 @@ -package thorchain - -import ( - "context" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -// Deprecated: use BankSend instead. -func (tn *ChainNode) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - return tn.BankSend(ctx, keyName, amount) -} - -// GetBalance fetches the current balance for a specific account address and denom. -// Implements Chain interface. -func (c *Thorchain) GetBalance(ctx context.Context, address string, denom string) (sdkmath.Int, error) { - return c.BankQueryBalance(ctx, address, denom) -} - -// BankGetBalance is an alias for GetBalance. -func (c *Thorchain) BankQueryBalance(ctx context.Context, address string, denom string) (sdkmath.Int, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).Balance(ctx, &banktypes.QueryBalanceRequest{Address: address, Denom: denom}) - if err != nil { - return sdkmath.ZeroInt(), err - } - return res.Balance.Amount, nil -} - -// AllBalances fetches an account address's balance for all denoms it holds. -func (c *Thorchain) BankQueryAllBalances(ctx context.Context, address string) (types.Coins, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).AllBalances(ctx, &banktypes.QueryAllBalancesRequest{Address: address}) - if err != nil { - return nil, err - } - return res.GetBalances(), nil -} - -// BankDenomMetadata fetches the metadata of a specific coin denomination. -func (c *Thorchain) BankQueryDenomMetadata(ctx context.Context, denom string) (*banktypes.Metadata, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).DenomMetadata(ctx, &banktypes.QueryDenomMetadataRequest{Denom: denom}) - if err != nil { - return nil, err - } - return &res.Metadata, nil -} - -func (c *Thorchain) BankQueryDenomMetadataByQueryString(ctx context.Context, denom string) (*banktypes.Metadata, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).DenomMetadataByQueryString(ctx, &banktypes.QueryDenomMetadataByQueryStringRequest{Denom: denom}) - if err != nil { - return nil, err - } - return &res.Metadata, nil -} - -func (c *Thorchain) BankQueryDenomOwners(ctx context.Context, denom string) ([]*banktypes.DenomOwner, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).DenomOwners(ctx, &banktypes.QueryDenomOwnersRequest{Denom: denom}) - if err != nil { - return nil, err - } - return res.DenomOwners, nil -} - -func (c *Thorchain) BankQueryDenomsMetadata(ctx context.Context) ([]banktypes.Metadata, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).DenomsMetadata(ctx, &banktypes.QueryDenomsMetadataRequest{}) - if err != nil { - return nil, err - } - return res.Metadatas, nil -} - -func (c *Thorchain) BankQueryParams(ctx context.Context) (*banktypes.Params, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).Params(ctx, &banktypes.QueryParamsRequest{}) - if err != nil { - return nil, err - } - return &res.Params, nil -} - -func (c *Thorchain) BankQuerySendEnabled(ctx context.Context, denoms []string) ([]*banktypes.SendEnabled, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).SendEnabled(ctx, &banktypes.QuerySendEnabledRequest{ - Denoms: denoms, - }) - if err != nil { - return nil, err - } - return res.SendEnabled, nil -} - -func (c *Thorchain) BankQuerySpendableBalance(ctx context.Context, address, denom string) (*types.Coin, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).SpendableBalanceByDenom(ctx, &banktypes.QuerySpendableBalanceByDenomRequest{ - Address: address, - Denom: denom, - }) - if err != nil { - return nil, err - } - return res.Balance, nil -} - -func (c *Thorchain) BankQuerySpendableBalances(ctx context.Context, address string) (*types.Coins, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).SpendableBalances(ctx, &banktypes.QuerySpendableBalancesRequest{Address: address}) - if err != nil { - return nil, err - } - return &res.Balances, nil -} - -func (c *Thorchain) BankQueryTotalSupply(ctx context.Context) (*types.Coins, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).TotalSupply(ctx, &banktypes.QueryTotalSupplyRequest{}) - if err != nil { - return nil, err - } - return &res.Supply, nil -} - -func (c *Thorchain) BankQueryTotalSupplyOf(ctx context.Context, address string) (*types.Coin, error) { - res, err := banktypes.NewQueryClient(c.GetNode().GrpcConn).SupplyOf(ctx, &banktypes.QuerySupplyOfRequest{Denom: address}) - if err != nil { - return nil, err - } - return &res.Amount, nil -} diff --git a/chain/thorchain/module_thorchain.go b/chain/thorchain/module_thorchain.go deleted file mode 100644 index b3ea5c5f..00000000 --- a/chain/thorchain/module_thorchain.go +++ /dev/null @@ -1,77 +0,0 @@ -package thorchain - -import ( - "context" - "fmt" - - "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -// BankSend sends tokens from one account to another. -func (tn *ChainNode) BankSend(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - _, err := tn.ExecTx(ctx, - keyName, "thorchain", "send", - amount.Address, fmt.Sprintf("%s%s", amount.Amount.String(), amount.Denom), - ) - return err -} - -// BankSendWithNote sends tokens from one account to another with a note/memo. -func (tn *ChainNode) BankSendWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error) { - return tn.ExecTx(ctx, - keyName, "thorchain", "send", - amount.Address, fmt.Sprintf("%s%s", amount.Amount.String(), amount.Denom), - "--note", note, - ) -} - -func (c *Thorchain) Deposit(ctx context.Context, keyName string, amount math.Int, denom string, memo string) error { - _, err := c.getFullNode().ExecTx(ctx, - keyName, "thorchain", "deposit", - amount.String(), denom, memo, - ) - return err -} - -func (c *Thorchain) SetMimir(ctx context.Context, keyName string, key string, value string) error { - _, err := c.getFullNode().ExecTx(ctx, - keyName, "thorchain", "mimir", key, value, - ) - return err -} - -func (tn *ChainNode) Bond(ctx context.Context, amount math.Int) error { - _, err := tn.ExecTx(ctx, - valKey, "thorchain", "deposit", - amount.String(), tn.Chain.Config().Denom, - fmt.Sprintf("bond:%s", tn.NodeAccount.NodeAddress), - ) - return err -} - -// Sets validator node keys, must be called by validator. -func (tn *ChainNode) SetNodeKeys(ctx context.Context) error { - _, err := tn.ExecTx(ctx, - valKey, "thorchain", "set-node-keys", - tn.NodeAccount.PubKeySet.Secp256k1, tn.NodeAccount.PubKeySet.Ed25519, tn.NodeAccount.ValidatorConsPubKey, - ) - return err -} - -// Sets validator ip address, must be called by validator. -func (tn *ChainNode) SetIPAddress(ctx context.Context) error { - _, err := tn.ExecTx(ctx, - valKey, "thorchain", "set-ip-address", tn.NodeAccount.IPAddress, - ) - return err -} - -// Sets validator's binary version. -func (tn *ChainNode) SetVersion(ctx context.Context) error { - _, err := tn.ExecTx(ctx, - valKey, "thorchain", "set-version", - ) - return err -} diff --git a/chain/thorchain/poll.go b/chain/thorchain/poll.go deleted file mode 100644 index d646d525..00000000 --- a/chain/thorchain/poll.go +++ /dev/null @@ -1,66 +0,0 @@ -package thorchain - -import ( - "context" - "errors" - "fmt" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -// PollForMessage searches every transaction for a message. Must pass a coded registry capable of decoding the cosmos transaction. -// fn is optional. Return true from the fn to stop polling and return the found message. If fn is nil, returns the first message to match type T. -func PollForMessage[T any](ctx context.Context, chain *Thorchain, registry codectypes.InterfaceRegistry, startHeight, maxHeight int64, fn func(found T) bool) (T, error) { - var zero T - if fn == nil { - fn = func(T) bool { return true } - } - doPoll := func(ctx context.Context, height int64) (T, error) { - h := height - block, err := chain.getFullNode().Client.Block(ctx, &h) - if err != nil { - return zero, err - } - for _, tx := range block.Block.Txs { - sdkTx, err := decodeTX(registry, tx) - if err != nil { - return zero, err - } - for _, msg := range sdkTx.GetMsgs() { - if found, ok := msg.(T); ok { - if fn(found) { - return found, nil - } - } - } - } - return zero, errors.New("not found") - } - - bp := testutil.BlockPoller[T]{CurrentHeight: chain.Height, PollFunc: doPoll} - return bp.DoPoll(ctx, startHeight, maxHeight) -} - -// PollForBalance polls until the balance matches. -func PollForBalance(ctx context.Context, chain *Thorchain, deltaBlocks int64, balance ibc.WalletAmount) error { - h, err := chain.Height(ctx) - if err != nil { - return fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (any, error) { - bal, err := chain.GetBalance(ctx, balance.Address, balance.Denom) - if err != nil { - return nil, err - } - if !balance.Amount.Equal(bal) { - return nil, fmt.Errorf("balance (%s) does not match expected: (%s)", bal.String(), balance.Amount.String()) - } - return nil, nil - } - bp := testutil.BlockPoller[any]{CurrentHeight: chain.Height, PollFunc: doPoll} - _, err = bp.DoPoll(ctx, h, h+deltaBlocks) - return err -} diff --git a/chain/thorchain/query.go b/chain/thorchain/query.go deleted file mode 100644 index 6b8a2933..00000000 --- a/chain/thorchain/query.go +++ /dev/null @@ -1,37 +0,0 @@ -package thorchain - -import ( - "context" - "fmt" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - tmtypes "github.com/cometbft/cometbft/rpc/core/types" -) - -type blockClient interface { - Block(ctx context.Context, height *int64) (*tmtypes.ResultBlock, error) -} - -// RangeBlockMessages iterates through all a block's transactions and each transaction's messages yielding to f. -// Return true from f to stop iteration. -func RangeBlockMessages(ctx context.Context, interfaceRegistry codectypes.InterfaceRegistry, client blockClient, height int64, done func(sdk.Msg) bool) error { - h := height - block, err := client.Block(ctx, &h) - if err != nil { - return fmt.Errorf("tendermint rpc get block: %w", err) - } - for _, txbz := range block.Block.Txs { - tx, err := decodeTX(interfaceRegistry, txbz) - if err != nil { - return fmt.Errorf("decode tendermint tx: %w", err) - } - for _, m := range tx.GetMsgs() { - if ok := done(m); ok { - return nil - } - } - } - return nil -} diff --git a/chain/thorchain/sidecar.go b/chain/thorchain/sidecar.go deleted file mode 100644 index 4502af29..00000000 --- a/chain/thorchain/sidecar.go +++ /dev/null @@ -1,202 +0,0 @@ -package thorchain - -import ( - "context" - "fmt" - "os" - - dockerclient "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - "go.uber.org/zap" - - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" -) - -type SidecarProcesses []*SidecarProcess - -// SidecarProcess represents a companion process that may be required on a per chain or per validator basis. -type SidecarProcess struct { - log *zap.Logger - - Index int - Chain ibc.Chain - - // If true this process is scoped to a specific validator, otherwise it is scoped at the chain level. - validatorProcess bool - - // If true this process should be started before the chain or validator, otherwise it should be explicitly started after. - preStart bool - - ProcessName string - TestName string - - // Env - Peers string // PEER - - VolumeName string - DockerClient *dockerclient.Client - NetworkID string - Image ibc.DockerImage - ports nat.PortMap - startCmd []string - env []string - homeDir string - - containerLifecycle *dockerutil.ContainerLifecycle -} - -// NewSidecar instantiates a new SidecarProcess. -func NewSidecar( - log *zap.Logger, - validatorProcess bool, - preStart bool, - chain ibc.Chain, - dockerClient *dockerclient.Client, - networkID, processName, testName string, - image ibc.DockerImage, - homeDir string, - index int, - ports []string, - startCmd []string, - env []string, -) *SidecarProcess { - processPorts := nat.PortMap{} - - for _, port := range ports { - processPorts[nat.Port(port)] = []nat.PortBinding{} - } - - if homeDir == "" { - homeDir = "/home/sidecar" - } - - // Give each sidecard their own env copy for runtime changes - envCopy := make([]string, len(env)) - copy(envCopy, env) - - s := &SidecarProcess{ - log: log, - Index: index, - Chain: chain, - preStart: preStart, - validatorProcess: validatorProcess, - ProcessName: processName, - TestName: testName, - DockerClient: dockerClient, - NetworkID: networkID, - Image: image, - homeDir: homeDir, - ports: processPorts, - startCmd: startCmd, - env: envCopy, - } - s.containerLifecycle = dockerutil.NewContainerLifecycle(log, dockerClient, s.Name()) - - return s -} - -// Name returns a string identifier based on if this process is configured to run on a chain level or -// on a per validator level. -func (s *SidecarProcess) Name() string { - if s.validatorProcess { - return fmt.Sprintf("%s-%s-val-%d-%s", s.Chain.Config().ChainID, s.ProcessName, s.Index, dockerutil.SanitizeContainerName(s.TestName)) - } - - return fmt.Sprintf("%s-%s-%d-%s", s.Chain.Config().ChainID, s.ProcessName, s.Index, dockerutil.SanitizeContainerName(s.TestName)) -} - -func (s *SidecarProcess) logger() *zap.Logger { - return s.log.With( - zap.String("process_name", s.ProcessName), - zap.String("test", s.TestName), - ) -} - -func (s *SidecarProcess) CreateContainer(ctx context.Context, nodeVolume []string) error { - volumes := s.Bind() - // TODO: add config item for this - if nodeVolume != nil { - volumes = append(volumes, nodeVolume...) - } - return s.containerLifecycle.CreateContainer(ctx, s.TestName, s.NetworkID, s.Image, s.ports, "", volumes, nil, s.HostName(), s.startCmd, s.env, []string{}) -} - -func (s *SidecarProcess) StartContainer(ctx context.Context) error { - return s.containerLifecycle.StartContainer(ctx) -} - -func (s *SidecarProcess) PauseContainer(ctx context.Context) error { - return s.containerLifecycle.PauseContainer(ctx) -} - -func (s *SidecarProcess) UnpauseContainer(ctx context.Context) error { - return s.containerLifecycle.UnpauseContainer(ctx) -} - -func (s *SidecarProcess) StopContainer(ctx context.Context) error { - return s.containerLifecycle.StopContainer(ctx) -} - -func (s *SidecarProcess) RemoveContainer(ctx context.Context) error { - return s.containerLifecycle.RemoveContainer(ctx) -} - -// Bind returns the home folder bind point for running the process. -func (s *SidecarProcess) Bind() []string { - return []string{fmt.Sprintf("%s:%s", s.VolumeName, s.HomeDir())} -} - -// HomeDir returns the path name where any configuration files will be written to the Docker filesystem. -func (s *SidecarProcess) HomeDir() string { - return s.homeDir -} - -func (s *SidecarProcess) HostName() string { - return dockerutil.CondenseHostName(s.Name()) -} - -func (s *SidecarProcess) GetHostPorts(ctx context.Context, portIDs ...string) ([]string, error) { - return s.containerLifecycle.GetHostPorts(ctx, portIDs...) -} - -// WriteFile accepts file contents in a byte slice and writes the contents to -// the docker filesystem. relPath describes the location of the file in the -// docker volume relative to the home directory. -func (s *SidecarProcess) WriteFile(ctx context.Context, content []byte, relPath string) error { - fw := dockerutil.NewFileWriter(s.logger(), s.DockerClient, s.TestName) - return fw.WriteFile(ctx, s.VolumeName, relPath, content) -} - -// CopyFile adds a file from the host filesystem to the docker filesystem -// relPath describes the location of the file in the docker volume relative to -// the home directory. -func (s *SidecarProcess) CopyFile(ctx context.Context, srcPath, dstPath string) error { - content, err := os.ReadFile(srcPath) - if err != nil { - return err - } - return s.WriteFile(ctx, content, dstPath) -} - -// ReadFile reads the contents of a single file at the specified path in the docker filesystem. -// relPath describes the location of the file in the docker volume relative to the home directory. -func (s *SidecarProcess) ReadFile(ctx context.Context, relPath string) ([]byte, error) { - fr := dockerutil.NewFileRetriever(s.logger(), s.DockerClient, s.TestName) - gen, err := fr.SingleFileContent(ctx, s.VolumeName, relPath) - if err != nil { - return nil, fmt.Errorf("failed to read file at %s: %w", relPath, err) - } - return gen, nil -} - -// Exec enables the execution of arbitrary CLI cmds against the process. -func (s *SidecarProcess) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) { - job := dockerutil.NewImage(s.logger(), s.DockerClient, s.NetworkID, s.TestName, s.Image.Repository, s.Image.Version) - opts := dockerutil.ContainerOptions{ - Env: env, - Binds: s.Bind(), - } - res := job.Run(ctx, cmd, opts) - return res.Stdout, res.Stderr, res.Err -} diff --git a/chain/thorchain/thorchain.go b/chain/thorchain/thorchain.go deleted file mode 100644 index 83a28fa8..00000000 --- a/chain/thorchain/thorchain.go +++ /dev/null @@ -1,1403 +0,0 @@ -package thorchain - -import ( - "bytes" - "context" - "encoding/hex" - "encoding/json" - "fmt" - "io" - "math" - "os" - "sort" - "strconv" - "strings" - "sync" - - dockerimage "github.com/docker/docker/api/types/image" - volumetypes "github.com/docker/docker/api/types/volume" - "github.com/docker/docker/client" - "go.uber.org/zap" - "golang.org/x/sync/errgroup" - - sdkmath "cosmossdk.io/math" - - clienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" // nolint:staticcheck - chanTypes "github.com/cosmos/ibc-go/v10/modules/core/04-channel/types" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/interchaintest/v10/blockdb" - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -type Thorchain struct { - testName string - cfg ibc.ChainConfig - NumValidators int - numFullNodes int - Validators ChainNodes - FullNodes ChainNodes - - // preStartNodes is able to mutate the node containers before - // they are all started - preStartNodes func(*Thorchain) - - // Additional processes that need to be run on a per-chain basis. - Sidecars SidecarProcesses - - cdc *codec.ProtoCodec - log *zap.Logger - keyring keyring.Keyring - findTxMu sync.Mutex -} - -func NewThorchainHeighlinerChainConfig( - name string, - binary string, - bech32Prefix string, - denom string, - gasPrices string, - gasAdjustment float64, - trustingPeriod string, - noHostMount bool, -) ibc.ChainConfig { - return ibc.ChainConfig{ - Type: "thorchain", - Name: name, - Bech32Prefix: bech32Prefix, - Denom: denom, - GasPrices: gasPrices, - GasAdjustment: gasAdjustment, - TrustingPeriod: trustingPeriod, - NoHostMount: noHostMount, - Images: []ibc.DockerImage{ - { - Repository: "ghcr.io/strangelove-ventures/heighliner/thorchain", - UIDGID: dockerutil.GetHeighlinerUserString(), - }, - }, - Bin: binary, - } -} - -func NewThorchain(testName string, chainConfig ibc.ChainConfig, numValidators int, numFullNodes int, log *zap.Logger) *Thorchain { - // if numValidators != 1 { - // panic(fmt.Sprintf("Thorchain must start with 1 validators for vault and router contract setup")) - // } - if chainConfig.EncodingConfig == nil { - cfg := DefaultEncoding() - chainConfig.EncodingConfig = &cfg - } - - if chainConfig.UsesCometMock() { - if numValidators != 1 { - panic(fmt.Sprintf("CometMock only supports 1 validator. Set `NumValidators` to 1 in %s's ChainSpec", chainConfig.Name)) - } - if numFullNodes != 0 { - panic(fmt.Sprintf("CometMock only supports 1 validator. Set `NumFullNodes` to 0 in %s's ChainSpec", chainConfig.Name)) - } - } - - registry := codectypes.NewInterfaceRegistry() - cryptocodec.RegisterInterfaces(registry) - cdc := codec.NewProtoCodec(registry) - kr := keyring.NewInMemory(cdc) - - return &Thorchain{ - testName: testName, - cfg: chainConfig, - NumValidators: numValidators, - numFullNodes: numFullNodes, - log: log, - cdc: cdc, - keyring: kr, - } -} - -// WithPreStartNodes sets the preStartNodes function. -func (c *Thorchain) WithPreStartNodes(preStartNodes func(*Thorchain)) { - c.preStartNodes = preStartNodes -} - -// GetCodec returns the codec for the chain. -func (c *Thorchain) GetCodec() *codec.ProtoCodec { - return c.cdc -} - -// Nodes returns all nodes, including validators and fullnodes. -func (c *Thorchain) Nodes() ChainNodes { - return append(c.Validators, c.FullNodes...) -} - -// AddValidators adds new validators to the network, peering with the existing nodes. -func (c *Thorchain) AddValidators(ctx context.Context, configFileOverrides map[string]any, inc int) error { - // Get peer string for existing nodes - peers := c.Nodes().PeerString(ctx) - - // Get genesis.json - genbz, err := c.Validators[0].GenesisFileContent(ctx) - if err != nil { - return err - } - - prevCount := c.NumValidators - c.NumValidators += inc - if err := c.initializeChainNodes(ctx, c.testName, c.getFullNode().DockerClient, c.getFullNode().NetworkID); err != nil { - return err - } - - // Create full node, validator keys, and start up - var eg errgroup.Group - for i := prevCount; i < c.NumValidators; i++ { - eg.Go(func() error { - val := c.Validators[i] - if err := val.InitFullNodeFiles(ctx); err != nil { - return err - } - if err := val.SetPeers(ctx, peers); err != nil { - return err - } - if err := val.OverwriteGenesisFile(ctx, genbz); err != nil { - return err - } - for configFile, modifiedConfig := range configFileOverrides { - modifiedToml, ok := modifiedConfig.(testutil.Toml) - if !ok { - return fmt.Errorf("provided toml override for file %s is of type (%T). Expected (DecodedToml)", configFile, modifiedConfig) - } - if err := testutil.ModifyTomlConfigFile( - ctx, - val.logger(), - val.DockerClient, - val.TestName, - val.VolumeName, - configFile, - modifiedToml, - ); err != nil { - return err - } - } - if err := val.CreateKey(ctx, valKey); err != nil { - return fmt.Errorf("failed to create key: %w", err) - } - if err := val.GetNodeAccount(ctx); err != nil { - return fmt.Errorf("failed to get node account info: %w", err) - } - if err := val.CreateNodeContainer(ctx); err != nil { - return err - } - return val.StartContainer(ctx) - }) - } - - if err := eg.Wait(); err != nil { - return err - } - - // Fund validator address and register for next churn - decimalPow := int64(math.Pow10(int(*c.cfg.CoinDecimals))) - for i := prevCount; i < c.NumValidators; i++ { - // Fund validator from faucet - if err := c.SendFunds(ctx, "faucet", ibc.WalletAmount{ - Address: c.Validators[i].NodeAccount.NodeAddress, - Amount: sdkmath.NewInt(100).MulRaw(decimalPow), // 100e8 rune - Denom: c.cfg.Denom, - }); err != nil { - return fmt.Errorf("failed to fund val %d, %w", i, err) - } - - eg.Go(func() error { - val := c.Validators[i] - // thornode tx thorchain deposit 1e8 RUNE "bond:$NODE_ADDRESS" - // Bond 2 rune since the next 3 txs will deduct .02 rune/tx and we need > 1 rune bonded - if err := val.Bond(ctx, sdkmath.NewInt(2).MulRaw(decimalPow)); err != nil { - return fmt.Errorf("failed to set val %d node keys, %w", i, err) - } - // thornode tx thorchain set-node-keys "$NODE_PUB_KEY" "$NODE_PUB_KEY_ED25519" "$VALIDATOR" - if err := val.SetNodeKeys(ctx); err != nil { - return fmt.Errorf("failed to set val %d node keys, %w", i, err) - } - // thornode tx thorchain set-ip-address "192.168.0.10" - if err := val.SetIPAddress(ctx); err != nil { - return fmt.Errorf("failed to set val %d ip address, %w", i, err) - } - // thornode tx thorchain set-version - if err := val.SetVersion(ctx); err != nil { - return fmt.Errorf("failed to set val %d version, %w", i, err) - } - return nil - }) - } - - if err := eg.Wait(); err != nil { - return err - } - - // start sidecar/bifrost - return c.StartAllValSidecars(ctx) -} - -// AddDuplicateValidator spins up a duplicate validator node to test double signing. -func (c *Thorchain) AddDuplicateValidator(ctx context.Context, configFileOverrides map[string]any, originalVal *ChainNode) (*ChainNode, error) { - // Get peer string for existing nodes - peers := c.Nodes().PeerString(ctx) - - // Get genesis.json - genbz, err := c.Validators[0].GenesisFileContent(ctx) - if err != nil { - return nil, err - } - - c.NumValidators += 1 - if err := c.initializeChainNodes(ctx, c.testName, c.getFullNode().DockerClient, c.getFullNode().NetworkID); err != nil { - return nil, err - } - - // Create full node, validator keys, and start up - val := c.Validators[c.NumValidators-1] - if err := val.InitFullNodeFiles(ctx); err != nil { - return nil, err - } - if err := val.SetPeers(ctx, peers); err != nil { - return nil, err - } - if err := val.OverwriteGenesisFile(ctx, genbz); err != nil { - return nil, err - } - for configFile, modifiedConfig := range configFileOverrides { - modifiedToml, ok := modifiedConfig.(testutil.Toml) - if !ok { - return nil, fmt.Errorf("provided toml override for file %s is of type (%T). Expected (DecodedToml)", configFile, modifiedConfig) - } - if err := testutil.ModifyTomlConfigFile( - ctx, - val.logger(), - val.DockerClient, - val.TestName, - val.VolumeName, - configFile, - modifiedToml, - ); err != nil { - return nil, err - } - } - privValFile, err := originalVal.PrivValFileContent(ctx) - if err != nil { - return nil, fmt.Errorf("failed to get priv_validator_key.json, %w", err) - } - if err := val.OverwritePrivValFile(ctx, privValFile); err != nil { - return nil, fmt.Errorf("failed to overwrite priv_validator_key.json, %w", err) - } - if err := val.RecoverKey(ctx, valKey, originalVal.ValidatorMnemonic); err != nil { - return nil, fmt.Errorf("failed to create key: %w", err) - } - val.ValidatorMnemonic = originalVal.ValidatorMnemonic - if err := val.GetNodeAccount(ctx); err != nil { - return nil, fmt.Errorf("failed to get node account info: %w", err) - } - if err := val.CreateNodeContainer(ctx); err != nil { - return nil, err - } - return val, val.StartContainer(ctx) -} - -// AddFullNodes adds new fullnodes to the network, peering with the existing nodes. -func (c *Thorchain) AddFullNodes(ctx context.Context, configFileOverrides map[string]any, inc int) error { - // Get peer string for existing nodes - peers := c.Nodes().PeerString(ctx) - - // Get genesis.json - genbz, err := c.Validators[0].GenesisFileContent(ctx) - if err != nil { - return err - } - - prevCount := c.numFullNodes - c.numFullNodes += inc - if err := c.initializeChainNodes(ctx, c.testName, c.getFullNode().DockerClient, c.getFullNode().NetworkID); err != nil { - return err - } - - var eg errgroup.Group - for i := prevCount; i < c.numFullNodes; i++ { - eg.Go(func() error { - fn := c.FullNodes[i] - if err := fn.InitFullNodeFiles(ctx); err != nil { - return err - } - if err := fn.SetPeers(ctx, peers); err != nil { - return err - } - if err := fn.OverwriteGenesisFile(ctx, genbz); err != nil { - return err - } - for configFile, modifiedConfig := range configFileOverrides { - modifiedToml, ok := modifiedConfig.(testutil.Toml) - if !ok { - return fmt.Errorf("provided toml override for file %s is of type (%T). Expected (DecodedToml)", configFile, modifiedConfig) - } - if err := testutil.ModifyTomlConfigFile( - ctx, - fn.logger(), - fn.DockerClient, - fn.TestName, - fn.VolumeName, - configFile, - modifiedToml, - ); err != nil { - return err - } - } - if err := fn.CreateNodeContainer(ctx); err != nil { - return err - } - return fn.StartContainer(ctx) - }) - } - return eg.Wait() -} - -// Implements Chain interface. -func (c *Thorchain) Config() ibc.ChainConfig { - return c.cfg -} - -// Implements Chain interface. -func (c *Thorchain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error { - if err := c.initializeSidecars(ctx, testName, cli, networkID); err != nil { - return err - } - return c.initializeChainNodes(ctx, testName, cli, networkID) -} - -func (c *Thorchain) getFullNode() *ChainNode { - return c.GetNode() -} - -func (c *Thorchain) GetNode() *ChainNode { - return c.Validators[0] -} - -// Exec implements ibc.Chain. -func (c *Thorchain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error) { - return c.getFullNode().Exec(ctx, cmd, env) -} - -// Implements Chain interface. -func (c *Thorchain) GetRPCAddress() string { - if c.Config().UsesCometMock() { - return fmt.Sprintf("http://%s:22331", c.getFullNode().HostnameCometMock()) - } - - return fmt.Sprintf("http://%s:26657", c.getFullNode().HostName()) -} - -// Implements Chain interface. -func (c *Thorchain) GetAPIAddress() string { - return fmt.Sprintf("http://%s:1317", "127.0.0.1") - // return fmt.Sprintf("http://%s:1317", c.getFullNode().HostName()) -} - -// Implements Chain interface. -func (c *Thorchain) GetGRPCAddress() string { - return fmt.Sprintf("%s:9090", c.getFullNode().HostName()) -} - -// GetHostRPCAddress returns the address of the RPC server accessible by the host. -// This will not return a valid address until the chain has been started. -func (c *Thorchain) GetHostRPCAddress() string { - return "http://" + c.getFullNode().hostRPCPort -} - -// GetHostAPIAddress returns the address of the REST API server accessible by the host. -// This will not return a valid address until the chain has been started. -func (c *Thorchain) GetHostAPIAddress() string { - return "http://" + c.getFullNode().hostAPIPort -} - -// GetHostGRPCAddress returns the address of the gRPC server accessible by the host. -// This will not return a valid address until the chain has been started. -func (c *Thorchain) GetHostGRPCAddress() string { - return c.getFullNode().hostGRPCPort -} - -// GetHostP2PAddress returns the address of the P2P server accessible by the host. -// This will not return a valid address until the chain has been started. -func (c *Thorchain) GetHostPeerAddress() string { - return c.getFullNode().hostP2PPort -} - -// HomeDir implements ibc.Chain. -func (c *Thorchain) HomeDir() string { - return c.getFullNode().HomeDir() -} - -// Implements Chain interface. -func (c *Thorchain) CreateKey(ctx context.Context, keyName string) error { - return c.getFullNode().CreateKey(ctx, keyName) -} - -// Implements Chain interface. -func (c *Thorchain) RecoverKey(ctx context.Context, keyName, mnemonic string) error { - return c.getFullNode().RecoverKey(ctx, keyName, mnemonic) -} - -// Implements Chain interface. -func (c *Thorchain) GetAddress(ctx context.Context, keyName string) ([]byte, error) { - b32Addr, err := c.getFullNode().AccountKeyBech32(ctx, keyName) - if err != nil { - return nil, err - } - - return types.GetFromBech32(b32Addr, c.Config().Bech32Prefix) -} - -// BuildWallet will return a Cosmos wallet -// If mnemonic != "", it will restore using that mnemonic -// If mnemonic == "", it will create a new key. -func (c *Thorchain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error) { - if mnemonic != "" { - c.log.Info("BuildWallet recovering key", zap.String("key_name", keyName)) - if err := c.RecoverKey(ctx, keyName, mnemonic); err != nil { - return nil, fmt.Errorf("failed to recover key with name %q on chain %s: %w", keyName, c.cfg.Name, err) - } - } else { - c.log.Info("BuildWallet creating key", zap.String("key_name", keyName)) - if err := c.CreateKey(ctx, keyName); err != nil { - return nil, fmt.Errorf("failed to create key with name %q on chain %s: %w", keyName, c.cfg.Name, err) - } - } - - addrBytes, err := c.GetAddress(ctx, keyName) - if err != nil { - return nil, fmt.Errorf("failed to get account address for key %q on chain %s: %w", keyName, c.cfg.Name, err) - } - - c.log.Info("BuildWallet got address", zap.String("key_name", keyName), zap.String("address", hex.EncodeToString(addrBytes)), zap.String("bech32addr", types.MustBech32ifyAddressBytes(c.cfg.Bech32Prefix, addrBytes))) - - return NewWallet(keyName, addrBytes, mnemonic, c.cfg), nil -} - -// BuildRelayerWallet will return a Cosmos wallet populated with the mnemonic so that the wallet can -// be restored in the relayer node using the mnemonic. After it is built, that address is included in -// genesis with some funds. -func (c *Thorchain) BuildRelayerWallet(ctx context.Context, keyName string) (ibc.Wallet, error) { - coinType, err := strconv.ParseUint(c.cfg.CoinType, 10, 32) - if err != nil { - return nil, fmt.Errorf("invalid coin type: %w", err) - } - - info, mnemonic, err := c.keyring.NewMnemonic( - keyName, - keyring.English, - hd.CreateHDPath(uint32(coinType), 0, 0).String(), - "", // Empty passphrase. - hd.Secp256k1, - ) - if err != nil { - return nil, fmt.Errorf("failed to create mnemonic: %w", err) - } - - addrBytes, err := info.GetAddress() - if err != nil { - return nil, fmt.Errorf("failed to get address: %w", err) - } - - return NewWallet(keyName, addrBytes, mnemonic, c.cfg), nil -} - -// Implements Chain interface. -func (c *Thorchain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - return c.getFullNode().BankSend(ctx, keyName, amount) -} - -// Implements Chain interface. -func (c *Thorchain) SendFundsWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error) { - return c.getFullNode().BankSendWithNote(ctx, keyName, amount, note) -} - -// Implements Chain interface. -func (c *Thorchain) SendIBCTransfer( - ctx context.Context, - channelID string, - keyName string, - amount ibc.WalletAmount, - options ibc.TransferOptions, -) (tx ibc.Tx, _ error) { - panic("SendIBCTransfer unimplemented") - // txHash, err := c.getFullNode().SendIBCTransfer(ctx, channelID, keyName, amount, options) - // if err != nil { - // return tx, fmt.Errorf("send ibc transfer: %w", err) - // } - // txResp, err := c.GetTransaction(txHash) - // if err != nil { - // return tx, fmt.Errorf("failed to get transaction %s: %w", txHash, err) - // } - // if txResp.Code != 0 { - // return tx, fmt.Errorf("error in transaction (code: %d): %s", txResp.Code, txResp.RawLog) - // } - // tx.Height = txResp.Height - // tx.TxHash = txHash - // // In cosmos, user is charged for entire gas requested, not the actual gas used. - // tx.GasSpent = txResp.GasWanted - - // const evType = "send_packet" - // events := txResp.Events - - // var ( - // seq, _ = tendermint.AttributeValue(events, evType, "packet_sequence") - // srcPort, _ = tendermint.AttributeValue(events, evType, "packet_src_port") - // srcChan, _ = tendermint.AttributeValue(events, evType, "packet_src_channel") - // dstPort, _ = tendermint.AttributeValue(events, evType, "packet_dst_port") - // dstChan, _ = tendermint.AttributeValue(events, evType, "packet_dst_channel") - // timeoutHeight, _ = tendermint.AttributeValue(events, evType, "packet_timeout_height") - // timeoutTs, _ = tendermint.AttributeValue(events, evType, "packet_timeout_timestamp") - // dataHex, _ = tendermint.AttributeValue(events, evType, "packet_data_hex") - // ) - // tx.Packet.SourcePort = srcPort - // tx.Packet.SourceChannel = srcChan - // tx.Packet.DestPort = dstPort - // tx.Packet.DestChannel = dstChan - // tx.Packet.TimeoutHeight = timeoutHeight - - // data, err := hex.DecodeString(dataHex) - // if err != nil { - // return tx, fmt.Errorf("malformed data hex %s: %w", dataHex, err) - // } - // tx.Packet.Data = data - - // seqNum, err := strconv.ParseUint(seq, 10, 64) - // if err != nil { - // return tx, fmt.Errorf("invalid packet sequence from events %s: %w", seq, err) - // } - // tx.Packet.Sequence = seqNum - - // timeoutNano, err := strconv.ParseUint(timeoutTs, 10, 64) - // if err != nil { - // return tx, fmt.Errorf("invalid packet timestamp timeout %s: %w", timeoutTs, err) - // } - // tx.Packet.TimeoutTimestamp = ibc.Nanoseconds(timeoutNano) - - // return tx, nil -} - -// QueryParam returns the param state of a given key. -func (c *Thorchain) QueryParam(ctx context.Context, subspace, key string) (*ParamChange, error) { - return c.getFullNode().QueryParam(ctx, subspace, key) -} - -// QueryBankMetadata returns the metadata of a given token denomination. -func (c *Thorchain) QueryBankMetadata(ctx context.Context, denom string) (*BankMetaData, error) { - return c.getFullNode().QueryBankMetadata(ctx, denom) -} - -// ExportState exports the chain state at specific height. -// Implements Chain interface. -func (c *Thorchain) ExportState(ctx context.Context, height int64) (string, error) { - return c.getFullNode().ExportState(ctx, height) -} - -func (c *Thorchain) GetTransaction(txhash string) (*types.TxResponse, error) { - fn := c.getFullNode() - return fn.GetTransaction(fn.CliContext(), txhash) -} - -func (c *Thorchain) GetGasFeesInNativeDenom(gasPaid int64) int64 { - gasPrice, _ := strconv.ParseFloat(strings.Replace(c.cfg.GasPrices, c.cfg.Denom, "", 1), 64) - fees := float64(gasPaid) * gasPrice - return int64(math.Ceil(fees)) -} - -func (c *Thorchain) pullImages(ctx context.Context, cli *client.Client) { - for _, image := range c.Config().Images { - if image.Version == "local" { - continue - } - rc, err := cli.ImagePull( - ctx, - image.Repository+":"+image.Version, - dockerimage.PullOptions{}, - ) - if err != nil { - c.log.Error("Failed to pull image", - zap.Error(err), - zap.String("repository", image.Repository), - zap.String("tag", image.Version), - ) - } else { - _, _ = io.Copy(io.Discard, rc) - _ = rc.Close() - } - } -} - -// NewChainNode constructs a new cosmos chain node with a docker volume. -func (c *Thorchain) NewChainNode( - ctx context.Context, - testName string, - cli *client.Client, - networkID string, - image ibc.DockerImage, - validator bool, - index int, -) (*ChainNode, error) { - // Construct the ChainNode first so we can access its name. - // The ChainNode's VolumeName cannot be set until after we create the volume. - tn := NewChainNode(c.log, validator, c, cli, networkID, testName, image, index) - - tn.logger().Info("Creating volume") - - v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - - dockerutil.NodeOwnerLabel: tn.Name(), - }, - }) - if err != nil { - return nil, fmt.Errorf("creating volume for chain node: %w", err) - } - - tn.logger().Info("Setting volume owner", zap.String("volume", v.Name)) - - tn.VolumeName = v.Name - - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: c.log, - - Client: cli, - - VolumeName: v.Name, - ImageRef: image.Ref(), - TestName: testName, - UidGid: image.UIDGID, - }); err != nil { - return nil, fmt.Errorf("set volume owner: %w", err) - } - - tn.logger().Info("Created docker volume and set owner", zap.String("volume", v.Name)) - - for _, cfg := range c.cfg.SidecarConfigs { - if !cfg.ValidatorProcess { - continue - } - - tn.logger().Info("Creating sidecar process", zap.String("process", cfg.ProcessName)) - - err = tn.NewSidecarProcess(ctx, cfg.PreStart, cfg.ProcessName, cli, networkID, cfg.Image, cfg.HomeDir, cfg.Ports, cfg.StartCmd, cfg.Env) - if err != nil { - return nil, err - } - } - - tn.logger().Info("Done initializing chain node") - - return tn, nil -} - -// NewSidecarProcess constructs a new sidecar process with a docker volume. -func (c *Thorchain) NewSidecarProcess( - ctx context.Context, - preStart bool, - processName string, - testName string, - cli *client.Client, - networkID string, - image ibc.DockerImage, - homeDir string, - index int, - ports []string, - startCmd []string, - env []string, -) error { - // Construct the SidecarProcess first so we can access its name. - // The SidecarProcess's VolumeName cannot be set until after we create the volume. - s := NewSidecar(c.log, false, preStart, c, cli, networkID, processName, testName, image, homeDir, index, ports, startCmd, env) - - v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - dockerutil.NodeOwnerLabel: s.Name(), - }, - }) - if err != nil { - return fmt.Errorf("creating volume for sidecar process: %w", err) - } - s.VolumeName = v.Name - - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: c.log, - - Client: cli, - - VolumeName: v.Name, - ImageRef: image.Ref(), - TestName: testName, - UidGid: image.UIDGID, - }); err != nil { - return fmt.Errorf("set volume owner: %w", err) - } - - c.Sidecars = append(c.Sidecars, s) - - return nil -} - -// creates the test node objects required for bootstrapping tests. -func (c *Thorchain) initializeChainNodes( - ctx context.Context, - testName string, - cli *client.Client, - networkID string, -) error { - chainCfg := c.Config() - c.pullImages(ctx, cli) - image := chainCfg.Images[0] - - newVals := make(ChainNodes, c.NumValidators) - copy(newVals, c.Validators) - newFullNodes := make(ChainNodes, c.numFullNodes) - copy(newFullNodes, c.FullNodes) - - eg, egCtx := errgroup.WithContext(ctx) - for i := len(c.Validators); i < c.NumValidators; i++ { - eg.Go(func() error { - val, err := c.NewChainNode(egCtx, testName, cli, networkID, image, true, i) - if err != nil { - return err - } - newVals[i] = val - return nil - }) - } - for i := len(c.FullNodes); i < c.numFullNodes; i++ { - eg.Go(func() error { - fn, err := c.NewChainNode(egCtx, testName, cli, networkID, image, false, i) - if err != nil { - return err - } - newFullNodes[i] = fn - return nil - }) - } - if err := eg.Wait(); err != nil { - return err - } - - c.findTxMu.Lock() - defer c.findTxMu.Unlock() - - c.Validators = newVals - c.FullNodes = newFullNodes - - c.log.Info("Initialized chain nodes", zap.Int("validators", len(newVals)), zap.Int("fullnodes", len(newFullNodes))) - - return nil -} - -// initializeSidecars creates the sidecar processes that exist at the chain level. -func (c *Thorchain) initializeSidecars( - ctx context.Context, - testName string, - cli *client.Client, - networkID string, -) error { - eg, egCtx := errgroup.WithContext(ctx) - for i, cfg := range c.cfg.SidecarConfigs { - if cfg.ValidatorProcess { - continue - } - - eg.Go(func() error { - err := c.NewSidecarProcess(egCtx, cfg.PreStart, cfg.ProcessName, testName, cli, networkID, cfg.Image, cfg.HomeDir, i, cfg.Ports, cfg.StartCmd, cfg.Env) - if err != nil { - return err - } - return nil - }) - } - if err := eg.Wait(); err != nil { - return err - } - return nil -} - -type GenesisValidatorPubKey struct { - Type string `json:"type"` - Value string `json:"value"` -} - -type GenesisFile struct { - AppState struct { - Thorchain struct { - NodeAccounts []NodeAccount `json:"node_accounts"` - } `json:"thorchain"` - } `json:"app_state"` -} - -type ValidatorWithIntPower struct { - Address string - Power int64 - PubKey string -} - -func (c *Thorchain) prepNodes(ctx context.Context, genesisAmounts [][]types.Coin, genesisSelfDelegation []types.Coin) error { - chainCfg := c.Config() - configFileOverrides := chainCfg.ConfigFileOverrides - - eg, egCtx := errgroup.WithContext(ctx) - // Initialize config and sign gentx for each validator. - for i, v := range c.Validators { - v.Validator = true - eg.Go(func() error { - if err := v.InitFullNodeFiles(egCtx); err != nil { - return err - } - for configFile, modifiedConfig := range configFileOverrides { - modifiedToml, ok := modifiedConfig.(testutil.Toml) - if !ok { - return fmt.Errorf("provided toml override for file %s is of type (%T). Expected (DecodedToml)", configFile, modifiedConfig) - } - if err := testutil.ModifyTomlConfigFile( - egCtx, - v.logger(), - v.DockerClient, - v.TestName, - v.VolumeName, - configFile, - modifiedToml, - ); err != nil { - return fmt.Errorf("failed to modify toml config file: %w", err) - } - } - - if v.Index == 0 { - v.ValidatorMnemonic = strings.Repeat("dog ", 23) + "fossil" - v.logger().Debug("Recover validator key") - - if err := v.RecoverKey(ctx, valKey, v.ValidatorMnemonic); err != nil { - return err - } - } else { - v.logger().Debug("Create validator key") - if err := v.CreateKey(ctx, valKey); err != nil { - return fmt.Errorf("failed to create key: %w", err) - } - } - - if !c.cfg.SkipGenTx && c.cfg.Genesis == nil { - v.logger().Info("Initializing gentx") - if err := v.InitValidatorGenTx(egCtx, &chainCfg, genesisAmounts[i], genesisSelfDelegation[i]); err != nil { - return fmt.Errorf("failed to init validator gentx for validator %d: %w", i, err) - } - } - - v.logger().Info("Getting node account info") - - if err := v.GetNodeAccount(egCtx); err != nil { - return fmt.Errorf("failed to get node account info: %w", err) - } - - v.logger().Info("Adding node account info") - if err := v.AddNodeAccount(egCtx, *v.NodeAccount); err != nil { - return fmt.Errorf("failed to add node account: %w", err) - } - - return nil - }) - } - - // Initialize config for each full node. - for _, n := range c.FullNodes { - n.Validator = false - eg.Go(func() error { - if err := n.InitFullNodeFiles(egCtx); err != nil { - return err - } - for configFile, modifiedConfig := range configFileOverrides { - modifiedToml, ok := modifiedConfig.(testutil.Toml) - if !ok { - return fmt.Errorf("provided toml override for file %s is of type (%T). Expected (testutil.Toml)", configFile, modifiedConfig) - } - if err := testutil.ModifyTomlConfigFile( - egCtx, - n.logger(), - n.DockerClient, - n.TestName, - n.VolumeName, - configFile, - modifiedToml, - ); err != nil { - return err - } - } - return nil - }) - } - - // wait for this to finish - return eg.Wait() -} - -// Bootstraps the chain and starts it from genesis. -func (c *Thorchain) Start(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error { - c.log.Info("Starting", zap.String("chain", c.Config().Name)) - chainCfg := c.Config() - - var genBz []byte - - genesisAmounts := make([][]types.Coin, len(c.Validators)) - genesisSelfDelegation := make([]types.Coin, len(c.Validators)) - - var activeVals []NodeAccount - var genBzReplace func(find, replace []byte) - - if chainCfg.Genesis == nil { - decimalPow := int64(math.Pow10(int(*chainCfg.CoinDecimals))) - - for i := range c.Validators { - genesisAmounts[i] = []types.Coin{{Amount: sdkmath.NewInt(1).MulRaw(decimalPow), Denom: chainCfg.Denom}} - genesisSelfDelegation[i] = types.Coin{Amount: sdkmath.NewInt(1).MulRaw(decimalPow), Denom: chainCfg.Denom} - if chainCfg.ModifyGenesisAmounts != nil { - amount, selfDelegation := chainCfg.ModifyGenesisAmounts(i) - genesisAmounts[i] = []types.Coin{amount} - genesisSelfDelegation[i] = selfDelegation - } - } - } else { - genBz = chainCfg.Genesis.Contents - var genesisFile GenesisFile - if err := json.Unmarshal(genBz, &genesisFile); err != nil { - return fmt.Errorf("failed to unmarshal genesis file: %w", err) - } - - genesisValidators := genesisFile.AppState.Thorchain.NodeAccounts - totalBond := uint64(0) - - validatorsWithPower := make([]NodeAccount, 0) - - for _, genesisValidator := range genesisValidators { - if genesisValidator.Status != "Active" { - continue - } - bond, err := strconv.ParseUint(genesisValidator.Bond, 10, 64) - if err != nil { - return err - } - totalBond += bond - genesisValidator.BondUInt = bond - validatorsWithPower = append(validatorsWithPower, genesisValidator) - } - - sort.Slice(validatorsWithPower, func(i, j int) bool { - return validatorsWithPower[i].BondUInt > validatorsWithPower[j].BondUInt - }) - - var mu sync.Mutex - genBzReplace = func(find, replace []byte) { - mu.Lock() - defer mu.Unlock() - genBz = bytes.ReplaceAll(genBz, find, replace) - } - - twoThirdsConsensus := uint64(math.Ceil(float64(totalBond) * 2 / 3)) - totalConsensus := uint64(0) - - for _, validator := range validatorsWithPower { - activeVals = append(activeVals, validator) - - totalConsensus += validator.BondUInt - - if !chainCfg.Genesis.AllValidators && totalConsensus > twoThirdsConsensus { - break - } - } - - if chainCfg.Genesis.MaxVals == 0 { - chainCfg.Genesis.MaxVals = 10 - } - - if len(activeVals) > chainCfg.Genesis.MaxVals { - c.log.Warn("Not enough validators to meet 2/3 bond threshold, increase GenesisConfig.MaxVals to reach consensus", zap.Int("required", len(activeVals)), zap.Int("max", chainCfg.Genesis.MaxVals)) - // return fmt.Errorf("too many validators required to meet bond threshold: %d, max allowed: %d: increase this limit to proceed", len(activeVals), chainCfg.Genesis.MaxVals) - c.NumValidators = chainCfg.Genesis.MaxVals - } else { - c.NumValidators = len(activeVals) - } - - c.log.Info("Will launch validators", zap.Int("count", c.NumValidators)) - } - - fn := c.getFullNode() - - if err := c.initializeChainNodes(ctx, testName, fn.DockerClient, fn.NetworkID); err != nil { - return err - } - - if err := c.prepNodes(ctx, genesisAmounts, genesisSelfDelegation); err != nil { - return fmt.Errorf("failed to prep nodes: %w", err) - } - - if c.preStartNodes != nil { - c.preStartNodes(c) - } - - if c.cfg.PreGenesis != nil { - err := c.cfg.PreGenesis(c) - if err != nil { - return err - } - } - - var err error - - if chainCfg.Genesis == nil { - // for the validators we need to collect the gentxs and the accounts - // to the first node's genesis file - validator0 := c.Validators[0] - for i := 1; i < len(c.Validators); i++ { - validatorN := c.Validators[i] - - bech32, err := validatorN.AccountKeyBech32(ctx, valKey) - if err != nil { - return err - } - - if err := validator0.AddGenesisAccount(ctx, bech32, genesisAmounts[0]); err != nil { - return err - } - - if !c.cfg.SkipGenTx { - if err := validator0.AddNodeAccount(ctx, *validatorN.NodeAccount); err != nil { - return fmt.Errorf("failed to add node account to val0: %w", err) - } - } - } - - for _, wallet := range additionalGenesisWallets { - if err := validator0.AddGenesisAccount(ctx, wallet.Address, []types.Coin{{Denom: wallet.Denom, Amount: wallet.Amount}}); err != nil { - return err - } - } - - if err := validator0.AddBondModule(ctx); err != nil { - return err - } - - genBz, err = validator0.GenesisFileContent(ctx) - if err != nil { - return err - } - - genBz = bytes.ReplaceAll(genBz, []byte(`"stake"`), []byte(fmt.Sprintf(`"%s"`, chainCfg.Denom))) - } else { - var eg errgroup.Group - for i, validator := range activeVals { - if i >= chainCfg.Genesis.MaxVals { - break - } - v := c.Validators[i] - c.log.Info( - "Will emulate validator", - zap.String("bond_address", validator.BondAddress), - zap.String("node_address", validator.NodeAddress), - ) - eg.Go(func() error { - na := v.NodeAccount - - // modify genesis file overwriting validators info with the one generated for this test node - genBzReplace([]byte(validator.ValidatorConsPubKey), []byte(na.ValidatorConsPubKey)) - genBzReplace([]byte(validator.NodeAddress), []byte(na.NodeAddress)) - genBzReplace([]byte(validator.BondAddress), []byte(na.BondAddress)) - genBzReplace([]byte(validator.PubKeySet.Secp256k1), []byte(na.PubKeySet.Secp256k1)) - genBzReplace([]byte(validator.PubKeySet.Ed25519), []byte(na.PubKeySet.Ed25519)) - - return nil - }) - } - - if err := eg.Wait(); err != nil { - return err - } - } - - if c.cfg.ModifyGenesis != nil { - genBz, err = c.cfg.ModifyGenesis(chainCfg, genBz) - if err != nil { - return err - } - } - - // Provide EXPORT_GENESIS_FILE_PATH and EXPORT_GENESIS_CHAIN to help debug genesis file - exportGenesis := os.Getenv("EXPORT_GENESIS_FILE_PATH") - exportGenesisChain := os.Getenv("EXPORT_GENESIS_CHAIN") - if exportGenesis != "" && exportGenesisChain == c.cfg.Name { - c.log.Debug("Exporting genesis file", - zap.String("chain", exportGenesisChain), - zap.String("path", exportGenesis), - ) - _ = os.WriteFile(exportGenesis, genBz, 0o600) - } - - chainNodes := c.Nodes() - - for _, cn := range chainNodes { - if err := cn.OverwriteGenesisFile(ctx, genBz); err != nil { - return err - } - } - - if err := chainNodes.LogGenesisHashes(ctx); err != nil { - return err - } - - // Start any sidecar processes that should be running before the chain starts - eg, egCtx := errgroup.WithContext(ctx) - for _, s := range c.Sidecars { - err = s.containerLifecycle.Running(ctx) - if s.preStart && err != nil { - eg.Go(func() error { - if err := s.CreateContainer(egCtx, nil); err != nil { - return err - } - - if err := s.StartContainer(egCtx); err != nil { - return err - } - - return nil - }) - } - } - if err := eg.Wait(); err != nil { - return err - } - - eg, egCtx = errgroup.WithContext(ctx) - for _, n := range chainNodes { - eg.Go(func() error { - return n.CreateNodeContainer(egCtx) - }) - } - if err := eg.Wait(); err != nil { - return err - } - - peers := chainNodes.PeerString(ctx) - - eg, egCtx = errgroup.WithContext(ctx) - for _, n := range chainNodes { - c.log.Info("Starting container", zap.String("container", n.Name())) - eg.Go(func() error { - if err := n.SetPeers(egCtx, peers); err != nil { - return err - } - return n.StartContainer(egCtx) - }) - } - if err := eg.Wait(); err != nil { - return err - } - - // Wait for blocks before considering the chains "started" - return testutil.WaitForBlocks(ctx, 2, c.getFullNode()) -} - -// Height implements ibc.Chain. -func (c *Thorchain) Height(ctx context.Context) (int64, error) { - return c.getFullNode().Height(ctx) -} - -// Acknowledgements implements ibc.Chain, returning all acknowledgments in block at height. -func (c *Thorchain) Acknowledgements(ctx context.Context, height int64) ([]ibc.PacketAcknowledgement, error) { - var acks []*chanTypes.MsgAcknowledgement - err := RangeBlockMessages(ctx, c.cfg.EncodingConfig.InterfaceRegistry, c.getFullNode().Client, height, func(msg types.Msg) bool { - found, ok := msg.(*chanTypes.MsgAcknowledgement) - if ok { - acks = append(acks, found) - } - return false - }) - if err != nil { - return nil, fmt.Errorf("find acknowledgements at height %d: %w", height, err) - } - ibcAcks := make([]ibc.PacketAcknowledgement, len(acks)) - for i, ack := range acks { - ibcAcks[i] = ibc.PacketAcknowledgement{ - Acknowledgement: ack.Acknowledgement, - Packet: ibc.Packet{ - Sequence: ack.Packet.Sequence, - SourcePort: ack.Packet.SourcePort, - SourceChannel: ack.Packet.SourceChannel, - DestPort: ack.Packet.DestinationPort, - DestChannel: ack.Packet.DestinationChannel, - Data: ack.Packet.Data, - TimeoutHeight: ack.Packet.TimeoutHeight.String(), - TimeoutTimestamp: ibc.Nanoseconds(ack.Packet.TimeoutTimestamp), - }, - } - } - return ibcAcks, nil -} - -// Timeouts implements ibc.Chain, returning all timeouts in block at height. -func (c *Thorchain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketTimeout, error) { - var timeouts []*chanTypes.MsgTimeout - err := RangeBlockMessages(ctx, c.cfg.EncodingConfig.InterfaceRegistry, c.getFullNode().Client, height, func(msg types.Msg) bool { - found, ok := msg.(*chanTypes.MsgTimeout) - if ok { - timeouts = append(timeouts, found) - } - return false - }) - if err != nil { - return nil, fmt.Errorf("find timeouts at height %d: %w", height, err) - } - ibcTimeouts := make([]ibc.PacketTimeout, len(timeouts)) - for i, ack := range timeouts { - ibcTimeouts[i] = ibc.PacketTimeout{ - Packet: ibc.Packet{ - Sequence: ack.Packet.Sequence, - SourcePort: ack.Packet.SourcePort, - SourceChannel: ack.Packet.SourceChannel, - DestPort: ack.Packet.DestinationPort, - DestChannel: ack.Packet.DestinationChannel, - Data: ack.Packet.Data, - TimeoutHeight: ack.Packet.TimeoutHeight.String(), - TimeoutTimestamp: ibc.Nanoseconds(ack.Packet.TimeoutTimestamp), - }, - } - } - return ibcTimeouts, nil -} - -// FindTxs implements blockdb.BlockSaver. -func (c *Thorchain) FindTxs(ctx context.Context, height int64) ([]blockdb.Tx, error) { - fn := c.getFullNode() - c.findTxMu.Lock() - defer c.findTxMu.Unlock() - return fn.FindTxs(ctx, height) -} - -// StopAllNodes stops and removes all long running containers (validators and full nodes). -func (c *Thorchain) StopAllNodes(ctx context.Context) error { - var eg errgroup.Group - for _, n := range c.Nodes() { - eg.Go(func() error { - if err := n.StopContainer(ctx); err != nil { - return err - } - return n.RemoveContainer(ctx) - }) - } - return eg.Wait() -} - -// StopAllSidecars stops and removes all long-running containers for sidecar processes. -func (c *Thorchain) StopAllSidecars(ctx context.Context) error { - var eg errgroup.Group - for _, s := range c.Sidecars { - eg.Go(func() error { - if err := s.StopContainer(ctx); err != nil { - return err - } - return s.RemoveContainer(ctx) - }) - } - return eg.Wait() -} - -// StartAllNodes creates and starts new containers for each node. -// Should only be used if the chain has previously been started with .Start. -func (c *Thorchain) StartAllNodes(ctx context.Context) error { - // prevent client calls during this time - c.findTxMu.Lock() - defer c.findTxMu.Unlock() - var eg errgroup.Group - for _, n := range c.Nodes() { - eg.Go(func() error { - if err := n.CreateNodeContainer(ctx); err != nil { - return err - } - return n.StartContainer(ctx) - }) - } - return eg.Wait() -} - -// StartAllSidecars creates and starts new containers for each sidecar process. -// Should only be used if the chain has previously been started with .Start. -func (c *Thorchain) StartAllSidecars(ctx context.Context) error { - // prevent client calls during this time - c.findTxMu.Lock() - defer c.findTxMu.Unlock() - var eg errgroup.Group - for _, s := range c.Sidecars { - err := s.containerLifecycle.Running(ctx) - if err == nil { - continue - } - - eg.Go(func() error { - if err := s.CreateContainer(ctx, nil); err != nil { - return err - } - return s.StartContainer(ctx) - }) - } - return eg.Wait() -} - -// StartAllValSidecars creates and starts new containers for each validator sidecar process. -// Should only be used if the chain has previously been started with .Start. -func (c *Thorchain) StartAllValSidecars(ctx context.Context) error { - // prevent client calls during this time - c.findTxMu.Lock() - defer c.findTxMu.Unlock() - var eg errgroup.Group - - for _, v := range c.Validators { - for _, s := range v.Sidecars { - err := s.containerLifecycle.Running(ctx) - if err == nil { - continue - } - - eg.Go(func() error { - env := s.env - env = append(env, fmt.Sprintf("NODES=%d", c.NumValidators)) - env = append(env, fmt.Sprintf("SIGNER_SEED_PHRASE=\"%s\"", v.ValidatorMnemonic)) - env = append(env, fmt.Sprintf("CHAIN_API=%s:1317", v.HostName())) - env = append(env, fmt.Sprintf("CHAIN_RPC=%s:26657", v.HostName())) - env = append(env, fmt.Sprintf("PEER=%s", c.Validators.SidecarBifrostPeers())) - s.env = env - if err := s.CreateContainer(ctx, v.Bind()); err != nil { - return err - } - return s.StartContainer(ctx) - }) - } - } - - return eg.Wait() -} - -// GetTimeoutHeight returns a timeout height of 1000 blocks above the current block height. -// This function should be used when the timeout is never expected to be reached. -func (c *Thorchain) GetTimeoutHeight(ctx context.Context) (clienttypes.Height, error) { - height, err := c.Height(ctx) - if err != nil { - c.log.Error("Failed to get chain height", zap.Error(err)) - return clienttypes.Height{}, fmt.Errorf("failed to get chain height: %w", err) - } - - return clienttypes.NewHeight(clienttypes.ParseChainID(c.Config().ChainID), uint64(height)+1000), nil -} diff --git a/chain/thorchain/thornode.go b/chain/thorchain/thornode.go deleted file mode 100644 index be8a1266..00000000 --- a/chain/thorchain/thornode.go +++ /dev/null @@ -1,1731 +0,0 @@ -package thorchain - -import ( - "bytes" - "context" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "hash/fnv" - "math/rand" - "os" - "path" - "strconv" - "strings" - "sync" - "time" - - "github.com/avast/retry-go/v4" - volumetypes "github.com/docker/docker/api/types/volume" - dockerclient "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - "github.com/icza/dyno" - "go.uber.org/zap" - "golang.org/x/mod/semver" - "golang.org/x/sync/errgroup" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - sdk "github.com/cosmos/cosmos-sdk/types" - authTx "github.com/cosmos/cosmos-sdk/x/auth/tx" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - tmjson "github.com/cometbft/cometbft/libs/json" - "github.com/cometbft/cometbft/p2p" - rpcclient "github.com/cometbft/cometbft/rpc/client" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - coretypes "github.com/cometbft/cometbft/rpc/core/types" - libclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" - - "github.com/cosmos/interchaintest/v10/blockdb" - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -type ChainNode struct { - VolumeName string - Index int - Chain ibc.Chain - Validator bool - NetworkID string - DockerClient *dockerclient.Client - Client rpcclient.Client - GrpcConn *grpc.ClientConn - TestName string - Image ibc.DockerImage - preStartNode func(*ChainNode) - - // Env - ValidatorMnemonic string // SIGNER_SEED_PHRASE - NodeAccount *NodeAccount - KeyringCreated bool - - // Additional processes that need to be run on a per-validator basis. - Sidecars SidecarProcesses - - lock sync.Mutex - log *zap.Logger - - containerLifecycle *dockerutil.ContainerLifecycle - - // Ports set during StartContainer. - hostRPCPort string - hostAPIPort string - hostGRPCPort string - hostP2PPort string - cometHostname string -} - -func NewChainNode(log *zap.Logger, validator bool, chain *Thorchain, dockerClient *dockerclient.Client, networkID string, testName string, image ibc.DockerImage, index int) *ChainNode { - tn := &ChainNode{ - log: log.With(zap.Bool("validator", validator), zap.Int("i", index)), - - Validator: validator, - - Chain: chain, - DockerClient: dockerClient, - NetworkID: networkID, - TestName: testName, - Image: image, - Index: index, - } - - tn.containerLifecycle = dockerutil.NewContainerLifecycle(log, dockerClient, tn.Name()) - - return tn -} - -// WithPreStartNode sets the preStartNode function for the ChainNode. -func (tn *ChainNode) WithPreStartNode(preStartNode func(*ChainNode)) *ChainNode { - tn.preStartNode = preStartNode - return tn -} - -// ChainNodes is a collection of ChainNode. -type ChainNodes []*ChainNode - -const ( - valKey = "thorchain" - blockTime = 2 // seconds - p2pPort = "26656/tcp" - rpcPort = "26657/tcp" - grpcPort = "9090/tcp" - apiPort = "1317/tcp" - privValPort = "1234/tcp" - - cometMockRawPort = "22331" -) - -var sentryPorts = nat.PortMap{ - nat.Port(p2pPort): {}, - nat.Port(rpcPort): {}, - nat.Port(grpcPort): {}, - nat.Port(apiPort): {}, - nat.Port(privValPort): {}, -} - -// NewClient creates and assigns a new Tendermint RPC client to the ChainNode. -func (tn *ChainNode) NewClient(addr string) error { - httpClient, err := libclient.DefaultHTTPClient(addr) - if err != nil { - return err - } - - httpClient.Timeout = 10 * time.Second - rpcClient, err := rpchttp.NewWithClient(addr, "/websocket", httpClient) - if err != nil { - return err - } - - tn.Client = rpcClient - - grpcConn, err := grpc.NewClient( - tn.hostGRPCPort, grpc.WithTransportCredentials(insecure.NewCredentials()), - ) - if err != nil { - return fmt.Errorf("grpc dial: %w", err) - } - tn.GrpcConn = grpcConn - - return nil -} - -func (tn *ChainNode) NewSidecarProcess( - ctx context.Context, - preStart bool, - processName string, - cli *dockerclient.Client, - networkID string, - image ibc.DockerImage, - homeDir string, - ports []string, - startCmd []string, - env []string, -) error { - s := NewSidecar(tn.log, true, preStart, tn.Chain, cli, networkID, processName, tn.TestName, image, homeDir, tn.Index, ports, startCmd, env) - - v, err := cli.VolumeCreate(ctx, volumetypes.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: tn.TestName, - dockerutil.NodeOwnerLabel: s.Name(), - }, - }) - if err != nil { - return fmt.Errorf("creating volume for sidecar process: %w", err) - } - s.VolumeName = v.Name - - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: tn.log, - - Client: cli, - - VolumeName: v.Name, - ImageRef: image.Ref(), - TestName: tn.TestName, - UidGid: image.UIDGID, - }); err != nil { - return fmt.Errorf("set volume owner: %w", err) - } - - tn.Sidecars = append(tn.Sidecars, s) - - return nil -} - -// CliContext creates a new Cosmos SDK client context. -func (tn *ChainNode) CliContext() client.Context { - cfg := tn.Chain.Config() - return client.Context{ - Client: tn.Client, - GRPCClient: tn.GrpcConn, - ChainID: cfg.ChainID, - InterfaceRegistry: cfg.EncodingConfig.InterfaceRegistry, - Input: os.Stdin, - Output: os.Stdout, - OutputFormat: "json", - LegacyAmino: cfg.EncodingConfig.Amino, - TxConfig: cfg.EncodingConfig.TxConfig, - } -} - -// Name of the test node container. -func (tn *ChainNode) Name() string { - return fmt.Sprintf("%s-%s-%d-%s", tn.Chain.Config().ChainID, tn.NodeType(), tn.Index, dockerutil.SanitizeContainerName(tn.TestName)) -} - -func (tn *ChainNode) NodeType() string { - nodeType := "fn" - if tn.Validator { - nodeType = "val" - } - return nodeType -} - -func (tn *ChainNode) ContainerID() string { - return tn.containerLifecycle.ContainerID() -} - -// hostname of the test node container. -func (tn *ChainNode) HostName() string { - return dockerutil.CondenseHostName(tn.Name()) -} - -// hostname of the comet mock container. -func (tn *ChainNode) HostnameCometMock() string { - return tn.cometHostname -} - -func (tn *ChainNode) GenesisFileContent(ctx context.Context) ([]byte, error) { - gen, err := tn.ReadFile(ctx, "config/genesis.json") - if err != nil { - return nil, fmt.Errorf("getting genesis.json content: %w", err) - } - - return gen, nil -} - -func (tn *ChainNode) OverwriteGenesisFile(ctx context.Context, content []byte) error { - err := tn.WriteFile(ctx, content, "config/genesis.json") - if err != nil { - return fmt.Errorf("overwriting genesis.json: %w", err) - } - - return nil -} - -func (tn *ChainNode) PrivValFileContent(ctx context.Context) ([]byte, error) { - gen, err := tn.ReadFile(ctx, "config/priv_validator_key.json") - if err != nil { - return nil, fmt.Errorf("getting priv_validator_key.json content: %w", err) - } - - return gen, nil -} - -func (tn *ChainNode) OverwritePrivValFile(ctx context.Context, content []byte) error { - fw := dockerutil.NewFileWriter(tn.logger(), tn.DockerClient, tn.TestName) - if err := fw.WriteFile(ctx, tn.VolumeName, "config/priv_validator_key.json", content); err != nil { - return fmt.Errorf("overwriting priv_validator_key.json: %w", err) - } - - return nil -} - -type PrivValidatorKey struct { - Type string `json:"type"` - Value string `json:"value"` -} - -type PrivValidatorKeyFile struct { - Address string `json:"address"` - PubKey PrivValidatorKey `json:"pub_key"` - PrivKey PrivValidatorKey `json:"priv_key"` -} - -// Bind returns the home folder bind point for running the node. -func (tn *ChainNode) Bind() []string { - return []string{fmt.Sprintf("%s:%s", tn.VolumeName, tn.HomeDir())} -} - -func (tn *ChainNode) HomeDir() string { - return "/home/heighliner/.thornode" -} - -// SetTestConfig modifies the config to reasonable values for use within interchaintest. -func (tn *ChainNode) SetTestConfig(ctx context.Context) error { - c := make(testutil.Toml) - - // Set Log Level to info - c["log_level"] = "info" - - p2p := make(testutil.Toml) - - // Allow p2p strangeness - p2p["allow_duplicate_ip"] = true - p2p["addr_book_strict"] = false - - c["p2p"] = p2p - - consensus := make(testutil.Toml) - - blockT := (time.Duration(blockTime) * time.Second).String() - consensus["timeout_commit"] = blockT - consensus["timeout_propose"] = blockT - - c["consensus"] = consensus - - rpc := make(testutil.Toml) - - // Enable public RPC - rpc["laddr"] = "tcp://0.0.0.0:26657" - if tn.Chain.Config().UsesCometMock() { - rpc["laddr"] = fmt.Sprintf("tcp://%s:%s", tn.HostnameCometMock(), cometMockRawPort) - } - - rpc["allowed_origins"] = []string{"*"} - - c["rpc"] = rpc - - if err := testutil.ModifyTomlConfigFile( - ctx, - tn.logger(), - tn.DockerClient, - tn.TestName, - tn.VolumeName, - "config/config.toml", - c, - ); err != nil { - return err - } - - a := make(testutil.Toml) - a["minimum-gas-prices"] = tn.Chain.Config().GasPrices - - grpc := make(testutil.Toml) - - // Enable public GRPC - grpc["address"] = "0.0.0.0:9090" - - a["grpc"] = grpc - - api := make(testutil.Toml) - - // Enable public REST API - api["enable"] = true - api["swagger"] = true - api["address"] = "tcp://0.0.0.0:1317" - api["enabled-unsafe-cors"] = true - - a["api"] = api - - return testutil.ModifyTomlConfigFile( - ctx, - tn.logger(), - tn.DockerClient, - tn.TestName, - tn.VolumeName, - "config/app.toml", - a, - ) -} - -// SetPeers modifies the config persistent_peers for a node. -func (tn *ChainNode) SetPeers(ctx context.Context, peers string) error { - c := make(testutil.Toml) - p2p := make(testutil.Toml) - - // Set peers - p2p["persistent_peers"] = peers - c["p2p"] = p2p - - return testutil.ModifyTomlConfigFile( - ctx, - tn.logger(), - tn.DockerClient, - tn.TestName, - tn.VolumeName, - "config/config.toml", - c, - ) -} - -func (tn *ChainNode) Height(ctx context.Context) (int64, error) { - time.Sleep(time.Millisecond * 200) // TODO: slow down WaitForBlocks instead of here - res, err := tn.Client.Status(ctx) - if err != nil { - return 0, fmt.Errorf("tendermint rpc client status: %w", err) - } - height := res.SyncInfo.LatestBlockHeight - return height, nil -} - -// FindTxs implements blockdb.BlockSaver. -func (tn *ChainNode) FindTxs(ctx context.Context, height int64) ([]blockdb.Tx, error) { - h := height - var eg errgroup.Group - var blockRes *coretypes.ResultBlockResults - var block *coretypes.ResultBlock - eg.Go(func() (err error) { - blockRes, err = tn.Client.BlockResults(ctx, &h) - return err - }) - eg.Go(func() (err error) { - block, err = tn.Client.Block(ctx, &h) - return err - }) - if err := eg.Wait(); err != nil { - return nil, err - } - interfaceRegistry := tn.Chain.Config().EncodingConfig.InterfaceRegistry - txs := make([]blockdb.Tx, 0, len(block.Block.Txs)+2) - for i, tx := range block.Block.Txs { - var newTx blockdb.Tx - newTx.Data = []byte(fmt.Sprintf(`{"data":"%s"}`, hex.EncodeToString(tx))) - - sdkTx, err := decodeTX(interfaceRegistry, tx) - if err != nil { - tn.logger().Info("Failed to decode tx", zap.Int64("height", height), zap.Error(err)) - continue - } - b, err := encodeTxToJSON(interfaceRegistry, sdkTx) - if err != nil { - tn.logger().Info("Failed to marshal tx to json", zap.Int64("height", height), zap.Error(err)) - continue - } - newTx.Data = b - - rTx := blockRes.TxsResults[i] - - newTx.Events = make([]blockdb.Event, len(rTx.Events)) - for j, e := range rTx.Events { - attrs := make([]blockdb.EventAttribute, len(e.Attributes)) - for k, attr := range e.Attributes { - attrs[k] = blockdb.EventAttribute{ - Key: attr.Key, - Value: attr.Value, - } - } - newTx.Events[j] = blockdb.Event{ - Type: e.Type, - Attributes: attrs, - } - } - txs = append(txs, newTx) - } - if len(blockRes.FinalizeBlockEvents) > 0 { - finalizeBlockTx := blockdb.Tx{ - Data: []byte(`{"data":"finalize_block","note":"this is a transaction artificially created for debugging purposes"}`), - } - finalizeBlockTx.Events = make([]blockdb.Event, len(blockRes.FinalizeBlockEvents)) - for i, e := range blockRes.FinalizeBlockEvents { - attrs := make([]blockdb.EventAttribute, len(e.Attributes)) - for j, attr := range e.Attributes { - attrs[j] = blockdb.EventAttribute{ - Key: attr.Key, - Value: attr.Value, - } - } - finalizeBlockTx.Events[i] = blockdb.Event{ - Type: e.Type, - Attributes: attrs, - } - } - txs = append(txs, finalizeBlockTx) - } - return txs, nil -} - -// TxCommand is a helper to retrieve a full command for broadcasting a tx -// with the chain node binary. -func (tn *ChainNode) TxCommand(keyName string, command ...string) []string { - command = append([]string{"tx"}, command...) - gasPriceFound, gasAdjustmentFound, feesFound := false, false, false - for i := 0; i < len(command); i++ { - if command[i] == "--gas-prices" { - gasPriceFound = true - } - if command[i] == "--gas-adjustment" { - gasAdjustmentFound = true - } - if command[i] == "--fees" { - feesFound = true - } - } - if !gasPriceFound && !feesFound { - command = append(command, "--gas-prices", tn.Chain.Config().GasPrices) - } - if !gasAdjustmentFound { - command = append(command, "--gas-adjustment", strconv.FormatFloat(tn.Chain.Config().GasAdjustment, 'f', -1, 64)) - } - return tn.NodeCommand(append(command, - "--from", keyName, - "--output", "json", - "-y", - "--chain-id", tn.Chain.Config().ChainID, - )...) -} - -// ExecTx executes a transaction, waits for 2 blocks if successful, then returns the tx hash. -func (tn *ChainNode) ExecTx(ctx context.Context, keyName string, command ...string) (string, error) { - tn.lock.Lock() - defer tn.lock.Unlock() - - keyringCommand := []string{ - "sh", - "-c", - fmt.Sprintf(`echo %s | %s --keyring-backend %s`, "password", strings.Join(tn.TxCommand(keyName, command...), " "), keyring.BackendFile), // TODO: get password from env - } - - stdout, _, err := tn.Exec(ctx, keyringCommand, tn.Chain.Config().Env) - if err != nil { - return "", err - } - output := CosmosTx{} - err = json.Unmarshal(stdout, &output) - if err != nil { - return "", err - } - if output.Code != 0 { - return output.TxHash, fmt.Errorf("transaction failed with code %d: %s", output.Code, output.RawLog) - } - if err := testutil.WaitForBlocks(ctx, 2, tn); err != nil { - return "", err - } - // The transaction can at first appear to succeed, but then fail when it's actually included in a block. - stdout, _, err = tn.ExecQuery(ctx, "tx", output.TxHash) - if err != nil { - return "", err - } - output = CosmosTx{} - err = json.Unmarshal(stdout, &output) - if err != nil { - return "", err - } - if output.Code != 0 { - return output.TxHash, fmt.Errorf("transaction failed with code %d: %s", output.Code, output.RawLog) - } - return output.TxHash, nil -} - -// TxHashToResponse returns the sdk transaction response struct for a given transaction hash. -func (tn *ChainNode) TxHashToResponse(ctx context.Context, txHash string) (*sdk.TxResponse, error) { - stdout, stderr, err := tn.ExecQuery(ctx, "tx", txHash) - if err != nil { - tn.log.Info("TxHashToResponse returned an error", - zap.String("tx_hash", txHash), - zap.Error(err), - zap.String("stderr", string(stderr)), - ) - } - - i := &sdk.TxResponse{} - - // ignore the error since some types do not unmarshal (ex: height of int64 vs string) - _ = json.Unmarshal(stdout, &i) - return i, nil -} - -// NodeCommand is a helper to retrieve a full command for a chain node binary. -// when interactions with the RPC endpoint are necessary. -// For example, if chain node binary is `gaiad`, and desired command is `gaiad keys show key1`, -// pass ("keys", "show", "key1") for command to return the full command. -// Will include additional flags for node URL, home directory, and chain ID. -func (tn *ChainNode) NodeCommand(command ...string) []string { - command = tn.BinCommand(command...) - - endpoint := fmt.Sprintf("tcp://%s:26657", tn.HostName()) - - if tn.Chain.Config().UsesCometMock() { - endpoint = fmt.Sprintf("tcp://%s:%s", tn.HostnameCometMock(), cometMockRawPort) - } - - return append(command, - "--node", endpoint, - ) -} - -// BinCommand is a helper to retrieve a full command for a chain node binary. -// For example, if chain node binary is `gaiad`, and desired command is `gaiad keys show key1`, -// pass ("keys", "show", "key1") for command to return the full command. -// Will include additional flags for home directory and chain ID. -func (tn *ChainNode) BinCommand(command ...string) []string { - command = append([]string{tn.Chain.Config().Bin}, command...) - return append(command, - "--home", tn.HomeDir(), - ) -} - -// ExecBin is a helper to execute a command for a chain node binary. -// For example, if chain node binary is `gaiad`, and desired command is `gaiad keys show key1`, -// pass ("keys", "show", "key1") for command to execute the command against the node. -// Will include additional flags for home directory and chain ID. -func (tn *ChainNode) ExecBin(ctx context.Context, backendfile bool, command ...string) ([]byte, []byte, error) { - if !backendfile { - return tn.Exec(ctx, tn.BinCommand(command...), tn.Chain.Config().Env) - } - - keyringCommand := []string{ - "sh", - "-c", - //nolint: dupword - fmt.Sprintf(`cat <") { - // Ex: "github.com/aaa/bbb@v1.2.1 => github.com/ccc/bbb@v1.2.0" - split := strings.Split(dep, " => ") - main, replacement := split[0], split[1] - - parent, parentVersion := getRepoAndVersion(main) - r, rV := getRepoAndVersion(replacement) - - bd = BuildDependency{ - Parent: parent, - Version: parentVersion, - IsReplacement: true, - Replacement: r, - ReplacementVersion: rV, - } - } else { - // Ex: "github.com/aaa/bbb@v0.0.0-20191008050251-8e49817e8af4" - parent, version := getRepoAndVersion(dep) - - bd = BuildDependency{ - Parent: parent, - Version: version, - IsReplacement: false, - Replacement: "", - ReplacementVersion: "", - } - } - - buildDeps = append(buildDeps, bd) - } - - return &BinaryBuildInformation{ - BuildDeps: buildDeps, - Name: deps.Name, - ServerName: deps.ServerName, - Version: deps.Version, - Commit: deps.Commit, - BuildTags: deps.BuildTags, - Go: deps.Go, - CosmosSdkVersion: deps.CosmosSdkVersion, - } -} - -// QueryParam returns the state and details of a subspace param. -func (tn *ChainNode) QueryParam(ctx context.Context, subspace, key string) (*ParamChange, error) { - stdout, _, err := tn.ExecQuery(ctx, "params", "subspace", subspace, key) - if err != nil { - return nil, err - } - var param ParamChange - err = json.Unmarshal(stdout, ¶m) - if err != nil { - return nil, err - } - return ¶m, nil -} - -// QueryBankMetadata returns the bank metadata of a token denomination. -func (tn *ChainNode) QueryBankMetadata(ctx context.Context, denom string) (*BankMetaData, error) { - stdout, _, err := tn.ExecQuery(ctx, "bank", "denom-metadata", "--denom", denom) - if err != nil { - return nil, err - } - var meta BankMetaData - err = json.Unmarshal(stdout, &meta) - if err != nil { - return nil, err - } - return &meta, nil -} - -func (tn *ChainNode) ExportState(ctx context.Context, height int64) (string, error) { - tn.lock.Lock() - defer tn.lock.Unlock() - - var ( - doc = "state_export.json" - docPath = path.Join(tn.HomeDir(), doc) - isNewerThanSdk47 = tn.IsAboveSDK47(ctx) - command = []string{"export", "--height", fmt.Sprint(height), "--home", tn.HomeDir()} - ) - - if isNewerThanSdk47 { - command = append(command, "--output-document", docPath) - } - - stdout, stderr, err := tn.ExecBin(ctx, false, command...) - if err != nil { - return "", err - } - - if isNewerThanSdk47 { - content, err := tn.ReadFile(ctx, doc) - if err != nil { - return "", err - } - return string(content), nil - } - - // output comes to stderr on older versions - return string(stdout) + string(stderr), nil -} - -func (tn *ChainNode) UnsafeResetAll(ctx context.Context) error { - tn.lock.Lock() - defer tn.lock.Unlock() - - command := []string{tn.Chain.Config().Bin} - if tn.IsAboveSDK47(ctx) { - command = append(command, "comet") - } - - command = append(command, "unsafe-reset-all", "--home", tn.HomeDir()) - - _, _, err := tn.Exec(ctx, command, tn.Chain.Config().Env) - return err -} - -func (tn *ChainNode) CreateNodeContainer(ctx context.Context) error { - chainCfg := tn.Chain.Config() - - var cmd []string - if chainCfg.NoHostMount { - startCmd := fmt.Sprintf("cp -r %s %s_nomnt && %s start --home %s_nomnt", tn.HomeDir(), tn.HomeDir(), chainCfg.Bin, tn.HomeDir()) - if len(chainCfg.AdditionalStartArgs) > 0 { - startCmd = fmt.Sprintf("%s %s", startCmd, chainCfg.AdditionalStartArgs) - } - cmd = []string{"sh", "-c", startCmd} - } else { - cmd = []string{chainCfg.Bin, "start", "--home", tn.HomeDir()} - if len(chainCfg.AdditionalStartArgs) > 0 { - cmd = append(cmd, chainCfg.AdditionalStartArgs...) - } - } - - if chainCfg.UsesCometMock() { - abciAppAddr := fmt.Sprintf("tcp://%s:26658", tn.HostName()) - connectionMode := "grpc" - - cmd = append(cmd, "--with-tendermint=false", fmt.Sprintf("--transport=%s", connectionMode), fmt.Sprintf("--address=%s", abciAppAddr)) - - blockTime := chainCfg.CometMock.BlockTimeMs - if blockTime <= 0 { - blockTime = 100 - } - blockTimeFlag := fmt.Sprintf("--block-time=%d", blockTime) - - defaultListenAddr := fmt.Sprintf("tcp://0.0.0.0:%s", cometMockRawPort) - genesisFile := path.Join(tn.HomeDir(), "config", "genesis.json") - - containerName := fmt.Sprintf("cometmock-%s-%d", tn.Name(), rand.Intn(50_000)) - tn.Sidecars = append(tn.Sidecars, &SidecarProcess{ - ProcessName: containerName, - validatorProcess: true, - Image: chainCfg.CometMock.Image, - preStart: true, - startCmd: []string{"cometmock", blockTimeFlag, abciAppAddr, genesisFile, defaultListenAddr, tn.HomeDir(), connectionMode}, - ports: nat.PortMap{ - nat.Port(cometMockRawPort): {}, - }, - Chain: tn.Chain, - TestName: tn.TestName, - VolumeName: tn.VolumeName, - DockerClient: tn.DockerClient, - NetworkID: tn.NetworkID, - Index: tn.Index, - homeDir: tn.HomeDir(), - log: tn.log, - env: chainCfg.Env, - containerLifecycle: dockerutil.NewContainerLifecycle(tn.log, tn.DockerClient, containerName), - }) - } - - usingPorts := nat.PortMap{} - for k, v := range sentryPorts { - usingPorts[k] = v - } - for _, port := range chainCfg.ExposeAdditionalPorts { - usingPorts[nat.Port(port)] = []nat.PortBinding{} - } - - // to prevent port binding conflicts, host port overrides are only exposed on the first validator node. - if tn.Validator && tn.Index == 0 && chainCfg.HostPortOverride != nil { - var fields []zap.Field - - i := 0 - for intP, extP := range chainCfg.HostPortOverride { - port := nat.Port(fmt.Sprintf("%d/tcp", intP)) - - usingPorts[port] = []nat.PortBinding{ - { - HostPort: fmt.Sprintf("%d", extP), - }, - } - - fields = append(fields, zap.String(fmt.Sprintf("port_overrides_%d", i), fmt.Sprintf("%s:%d", port, extP))) - i++ - } - - tn.log.Info("Port overrides", fields...) - } - - env := chainCfg.Env - if tn.Validator { - env = append(env, fmt.Sprintf("NODES=%d", tn.Chain.(*Thorchain).NumValidators)) - env = append(env, fmt.Sprintf("SIGNER_SEED_PHRASE=%s", tn.ValidatorMnemonic)) - } - - return tn.containerLifecycle.CreateContainer(ctx, tn.TestName, tn.NetworkID, tn.Image, usingPorts, "", tn.Bind(), nil, tn.HostName(), cmd, env, []string{}) -} - -func (tn *ChainNode) StartContainer(ctx context.Context) error { - rpcOverrideAddr := "" - - for _, s := range tn.Sidecars { - err := s.containerLifecycle.Running(ctx) - - if s.preStart && err != nil { - if err := s.CreateContainer(ctx, tn.Bind()); err != nil { - return err - } - - if err := s.StartContainer(ctx); err != nil { - return err - } - - if s.Image.Repository == tn.Chain.Config().CometMock.Image.Repository { - hostPorts, err := s.containerLifecycle.GetHostPorts(ctx, cometMockRawPort+"/tcp") - if err != nil { - return err - } - - rpcOverrideAddr = hostPorts[0] - tn.cometHostname = s.HostName() - - tn.log.Info( - "Using comet mock as RPC override", - zap.String("RPC host port override", rpcOverrideAddr), - zap.String("comet mock hostname", tn.cometHostname), - ) - } - } - } - - if tn.preStartNode != nil { - tn.preStartNode(tn) - } - - if err := tn.containerLifecycle.StartContainer(ctx); err != nil { - return err - } - - // Set the host ports once since they will not change after the container has started. - hostPorts, err := tn.containerLifecycle.GetHostPorts(ctx, rpcPort, grpcPort, apiPort, p2pPort) - if err != nil { - return err - } - tn.hostRPCPort, tn.hostGRPCPort, tn.hostAPIPort, tn.hostP2PPort = hostPorts[0], hostPorts[1], hostPorts[2], hostPorts[3] - - // Override the default RPC behavior if Comet Mock is being used. - if tn.cometHostname != "" { - tn.hostRPCPort = rpcOverrideAddr - } - - err = tn.NewClient("tcp://" + tn.hostRPCPort) - if err != nil { - return err - } - - time.Sleep(5 * time.Second) - return retry.Do(func() error { - stat, err := tn.Client.Status(ctx) - if err != nil { - return err - } - // TODO: re-enable this check, having trouble with it for some reason - if stat != nil && stat.SyncInfo.CatchingUp { - return fmt.Errorf("still catching up: height(%d) catching-up(%t)", - stat.SyncInfo.LatestBlockHeight, stat.SyncInfo.CatchingUp) - } - return nil - }, retry.Context(ctx), retry.Attempts(40), retry.Delay(3*time.Second), retry.DelayType(retry.FixedDelay)) -} - -func (tn *ChainNode) PauseContainer(ctx context.Context) error { - for _, s := range tn.Sidecars { - if err := s.PauseContainer(ctx); err != nil { - return err - } - } - return tn.containerLifecycle.PauseContainer(ctx) -} - -func (tn *ChainNode) UnpauseContainer(ctx context.Context) error { - for _, s := range tn.Sidecars { - if err := s.UnpauseContainer(ctx); err != nil { - return err - } - } - return tn.containerLifecycle.UnpauseContainer(ctx) -} - -func (tn *ChainNode) StopContainer(ctx context.Context) error { - for _, s := range tn.Sidecars { - if err := s.StopContainer(ctx); err != nil { - return err - } - } - return tn.containerLifecycle.StopContainer(ctx) -} - -func (tn *ChainNode) RemoveContainer(ctx context.Context) error { - for _, s := range tn.Sidecars { - if err := s.RemoveContainer(ctx); err != nil { - return err - } - } - return tn.containerLifecycle.RemoveContainer(ctx) -} - -// InitValidatorFiles creates the node files and signs a genesis transaction. -func (tn *ChainNode) InitValidatorGenTx( - ctx context.Context, - chainType *ibc.ChainConfig, - genesisAmounts []sdk.Coin, - genesisSelfDelegation sdk.Coin, -) error { - // if err := tn.CreateKey(ctx, valKey); err != nil { - // return err - //} - // Thorchain will only start with 1 validator - // it must use this mnemonic since the router contracts are created using it (before this chain starts) - // Otherwise, there is nothing special amoun this mnemonic other than it is what Thornode's sim testing uses. - // TODO: can we deploy router contracts after thorchain start? - - bech32NodeAddr, err := tn.AccountKeyBech32(ctx, valKey) - if err != nil { - return err - } - if err := tn.AddGenesisAccount(ctx, bech32NodeAddr, genesisAmounts); err != nil { - return err - } - return nil - // return tn.Gentx(ctx, valKey, genesisSelfDelegation) -} - -func (tn *ChainNode) InitFullNodeFiles(ctx context.Context) error { - if err := tn.InitHomeFolder(ctx); err != nil { - return err - } - - return tn.SetTestConfig(ctx) -} - -// NodeID returns the persistent ID of a given node. -func (tn *ChainNode) NodeID(ctx context.Context) (string, error) { - // This used to call p2p.LoadNodeKey against the file on the host, - // but because we are transitioning to operating on Docker volumes, - // we only have to tmjson.Unmarshal the raw content. - j, err := tn.ReadFile(ctx, "config/node_key.json") - if err != nil { - return "", fmt.Errorf("getting node_key.json content: %w", err) - } - - var nk p2p.NodeKey - if err := tmjson.Unmarshal(j, &nk); err != nil { - return "", fmt.Errorf("unmarshaling node_key.json: %w", err) - } - - return string(nk.ID()), nil -} - -// KeyBech32 retrieves the named key's address in bech32 format from the node. -// bech is the bech32 prefix (acc|val|cons). If empty, defaults to the account key (same as "acc"). -func (tn *ChainNode) KeyBech32(ctx context.Context, name string, bech string) (string, error) { - command := []string{ - "keys", "show", "--address", name, - } - - if bech != "" { - command = append(command, "--bech", bech) - } - - stdout, stderr, err := tn.ExecBin(ctx, true, command...) - if err != nil { - return "", fmt.Errorf("failed to show key %q (stderr=%q): %w", name, stderr, err) - } - - return string(bytes.TrimSuffix(stdout, []byte("\n"))), nil -} - -// AccountKeyBech32 retrieves the named key's address in bech32 account format. -func (tn *ChainNode) AccountKeyBech32(ctx context.Context, name string) (string, error) { - return tn.KeyBech32(ctx, name, "") -} - -// PeerString returns the string for connecting the nodes passed in. -func (nodes ChainNodes) PeerString(ctx context.Context) string { - addrs := make([]string, len(nodes)) - for i, n := range nodes { - id, err := n.NodeID(ctx) - if err != nil { - // TODO: would this be better to panic? - // When would NodeId return an error? - break - } - hostName := n.HostName() - ps := fmt.Sprintf("%s@%s:26656", id, hostName) - nodes.logger().Info("Peering", - zap.String("host_name", hostName), - zap.String("peer", ps), - zap.String("container", n.Name()), - ) - addrs[i] = ps - } - return strings.Join(addrs, ",") -} - -func (nodes ChainNodes) SidecarBifrostPeers() string { - addrs := make([]string, len(nodes)) - for i, n := range nodes { - for _, s := range n.Sidecars { - if s.startCmd[0] == "bifrost" { - addrs[i] = s.HostName() - } - } - } - return strings.Join(addrs, ",") -} - -// LogGenesisHashes logs the genesis hashes for the various nodes. -func (nodes ChainNodes) LogGenesisHashes(ctx context.Context) error { - for _, n := range nodes { - gen, err := n.GenesisFileContent(ctx) - if err != nil { - return err - } - - n.logger().Info("Genesis", zap.String("hash", fmt.Sprintf("%X", sha256.Sum256(gen)))) - } - return nil -} - -func (nodes ChainNodes) logger() *zap.Logger { - if len(nodes) == 0 { - return zap.NewNop() - } - return nodes[0].logger() -} - -func (tn *ChainNode) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error) { - job := dockerutil.NewImage(tn.logger(), tn.DockerClient, tn.NetworkID, tn.TestName, tn.Image.Repository, tn.Image.Version) - opts := dockerutil.ContainerOptions{ - Env: env, - Binds: tn.Bind(), - } - res := job.Run(ctx, cmd, opts) - return res.Stdout, res.Stderr, res.Err -} - -func (tn *ChainNode) logger() *zap.Logger { - return tn.log.With( - zap.String("chain_id", tn.Chain.Config().ChainID), - zap.String("test", tn.TestName), - ) -} - -// QueryICA will query for an interchain account controlled by the specified address on the counterparty chain. -func (tn *ChainNode) QueryICA(ctx context.Context, connectionID, address string) (string, error) { - stdout, _, err := tn.ExecQuery(ctx, - "interchain-accounts", "controller", "interchain-account", address, connectionID, - ) - if err != nil { - return "", err - } - - // at this point stdout should look like this: - // address: cosmos1p76n3mnanllea4d3av0v0e42tjj03cae06xq8fwn9at587rqp23qvxsv0j - // we split the string at the : and then just grab the address before returning. - parts := strings.SplitN(string(stdout), ":", 2) - if len(parts) < 2 { - return "", fmt.Errorf("malformed stdout from command: %s", stdout) - } - return strings.TrimSpace(parts[1]), nil -} - -// GetHostAddress returns the host-accessible url for a port in the container. -// This is useful for finding the url & random host port for ports exposed via ChainConfig.ExposeAdditionalPorts. -func (tn *ChainNode) GetHostAddress(ctx context.Context, portID string) (string, error) { - ports, err := tn.containerLifecycle.GetHostPorts(ctx, portID) - if err != nil { - return "", err - } - if len(ports) == 0 || ports[0] == "" { - return "", fmt.Errorf("no port with id '%s' found", portID) - } - return "http://" + ports[0], nil -} diff --git a/chain/thorchain/types.go b/chain/thorchain/types.go deleted file mode 100644 index 92e7dc7f..00000000 --- a/chain/thorchain/types.go +++ /dev/null @@ -1,507 +0,0 @@ -package thorchain - -type VersionOutput struct { - Version string `json:"version"` -} - -type NodeAccountPubKeySet struct { - Secp256k1 string `json:"secp256k1"` - Ed25519 string `json:"ed25519"` -} - -type NodeAccount struct { - NodeAddress string `json:"node_address"` - Version string `json:"version"` - IPAddress string `json:"ip_address"` - Status string `json:"status"` - Bond string `json:"bond"` - BondUInt uint64 `json:"-"` - ActiveBlockHeight string `json:"active_block_height"` - BondAddress string `json:"bond_address"` - SignerMembership []string `json:"signer_membership"` - ValidatorConsPubKey string `json:"validator_cons_pub_key"` - PubKeySet NodeAccountPubKeySet `json:"pub_key_set"` -} - -type OpenapiNode struct { - NodeAddress string `json:"node_address"` - Status string `json:"status"` - PubKeySet NodeAccountPubKeySet `json:"pub_key_set"` - // the consensus pub key for the node - ValidatorConsPubKey string `json:"validator_cons_pub_key"` - // the P2PID (:6040/p2pid endpoint) of the node - PeerID string `json:"peer_id"` - // the block height at which the node became active - ActiveBlockHeight int64 `json:"active_block_height"` - // the block height of the current provided information for the node - StatusSince int64 `json:"status_since"` - NodeOperatorAddress string `json:"node_operator_address"` - // current node bond - TotalBond string `json:"total_bond"` - BondProviders NodeBondProviders `json:"bond_providers"` - // the set of vault public keys of which the node is a member - SignerMembership []string `json:"signer_membership"` - RequestedToLeave bool `json:"requested_to_leave"` - // indicates whether the node has been forced to leave by the network, typically via ban - ForcedToLeave bool `json:"forced_to_leave"` - LeaveHeight int64 `json:"leave_height"` - IPAddress string `json:"ip_address"` - // the currently set version of the node - Version string `json:"version"` - // the accumulated slash points, reset at churn but excessive slash points may carry over - SlashPoints int64 `json:"slash_points"` - Jail NodeJail `json:"jail"` - CurrentAward string `json:"current_award"` - // the last observed heights for all chain by the node - ObserveChains []ChainHeight `json:"observe_chains"` - PreflightStatus NodePreflightStatus `json:"preflight_status"` -} - -type NodePreflightStatus struct { - // the next status of the node - Status string `json:"status"` - // the reason for the transition to the next status - Reason string `json:"reason"` - Code int64 `json:"code"` -} - -type NodeBondProviders struct { - // node operator fee in basis points - NodeOperatorFee string `json:"node_operator_fee"` - // all the bond providers for the node - Providers []NodeBondProvider `json:"providers"` -} - -type NodeBondProvider struct { - BondAddress *string `json:"bond_address,omitempty"` - Bond *string `json:"bond,omitempty"` -} - -type NodeJail struct { - ReleaseHeight *int64 `json:"release_height,omitempty"` - Reason *string `json:"reason,omitempty"` -} - -type ChainHeight struct { - Chain string `json:"chain"` - Height int64 `json:"height"` -} - -// ProtoMessage is implemented by generated protocol buffer messages. -// Pulled from github.com/cosmos/gogoproto/proto. -type ProtoMessage interface { - Reset() - String() string - ProtoMessage() -} - -type ParamChange struct { - Subspace string `json:"subspace"` - Key string `json:"key"` - Value any `json:"value"` -} - -type BuildDependency struct { - Parent string `json:"parent"` - Version string `json:"version"` - - IsReplacement bool `json:"is_replacement"` - Replacement string `json:"replacement"` - ReplacementVersion string `json:"replacement_version"` -} - -type BinaryBuildInformation struct { - Name string `json:"name"` - ServerName string `json:"server_name"` - Version string `json:"version"` - Commit string `json:"commit"` - BuildTags string `json:"build_tags"` - Go string `json:"go"` - BuildDeps []BuildDependency `json:"build_deps"` - CosmosSdkVersion string `json:"cosmos_sdk_version"` -} - -type BankMetaData struct { - Metadata struct { - Description string `json:"description"` - DenomUnits []struct { - Denom string `json:"denom"` - Exponent int `json:"exponent"` - Aliases []string `json:"aliases"` - } `json:"denom_units"` - Base string `json:"base"` - Display string `json:"display"` - Name string `json:"name"` - Symbol string `json:"symbol"` - URI string `json:"uri"` - URIHash string `json:"uri_hash"` - } `json:"metadata"` -} - -type QueryDenomAuthorityMetadataResponse struct { - AuthorityMetadata DenomAuthorityMetadata `protobuf:"bytes,1,opt,name=authority_metadata,json=authorityMetadata,proto3" json:"authority_metadata" yaml:"authority_metadata"` -} - -type DenomAuthorityMetadata struct { - // Can be empty for no admin, or a valid address - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty" yaml:"admin"` -} - -// thorchain openapi types - -// InboundAddress struct for InboundAddress. -type InboundAddress struct { - Chain *string `json:"chain,omitempty"` - PubKey *string `json:"pub_key,omitempty"` - Address *string `json:"address,omitempty"` - Router *string `json:"router,omitempty"` - // Returns true if trading is unavailable for this chain, either because trading is halted globally or specifically for this chain - Halted bool `json:"halted"` - // Returns true if trading is paused globally - GlobalTradingPaused *bool `json:"global_trading_paused,omitempty"` - // Returns true if trading is paused for this chain - ChainTradingPaused *bool `json:"chain_trading_paused,omitempty"` - // Returns true if LP actions are paused for this chain - ChainLpActionsPaused *bool `json:"chain_lp_actions_paused,omitempty"` - // The minimum fee rate used by vaults to send outbound TXs. The actual fee rate may be higher. For EVM chains this is returned in gwei (1e9). - GasRate *string `json:"gas_rate,omitempty"` - // Units of the gas_rate. - GasRateUnits *string `json:"gas_rate_units,omitempty"` - // Avg size of outbound TXs on each chain. For UTXO chains it may be larger than average, as it takes into account vault consolidation txs, which can have many vouts - OutboundTxSize *string `json:"outbound_tx_size,omitempty"` - // The total outbound fee charged to the user for outbound txs in the gas asset of the chain. - OutboundFee *string `json:"outbound_fee,omitempty"` - // Defines the minimum transaction size for the chain in base units (sats, wei, uatom). Transactions with asset amounts lower than the dust_threshold are ignored. - DustThreshold *string `json:"dust_threshold,omitempty"` -} - -// LiquidityProvider struct for LiquidityProvider. -type LiquidityProvider struct { - Asset string `json:"asset"` - RuneAddress *string `json:"rune_address,omitempty"` - AssetAddress *string `json:"asset_address,omitempty"` - LastAddHeight *int64 `json:"last_add_height,omitempty"` - LastWithdrawHeight *int64 `json:"last_withdraw_height,omitempty"` - Units string `json:"units"` - PendingRune string `json:"pending_rune"` - PendingAsset string `json:"pending_asset"` - PendingTxID *string `json:"pending_tx_id,omitempty"` - RuneDepositValue string `json:"rune_deposit_value"` - AssetDepositValue string `json:"asset_deposit_value"` - RuneRedeemValue *string `json:"rune_redeem_value,omitempty"` - AssetRedeemValue *string `json:"asset_redeem_value,omitempty"` - LuviDepositValue *string `json:"luvi_deposit_value,omitempty"` - LuviRedeemValue *string `json:"luvi_redeem_value,omitempty"` - LuviGrowthPct *string `json:"luvi_growth_pct,omitempty"` -} - -// Saver struct for Saver. -type Saver struct { - Asset string `json:"asset"` - AssetAddress string `json:"asset_address"` - LastAddHeight *int64 `json:"last_add_height,omitempty"` - LastWithdrawHeight *int64 `json:"last_withdraw_height,omitempty"` - Units string `json:"units"` - AssetDepositValue string `json:"asset_deposit_value"` - AssetRedeemValue string `json:"asset_redeem_value"` - GrowthPct string `json:"growth_pct"` -} - -// Pool struct for Pool. -type Pool struct { - Asset string `json:"asset"` - ShortCode *string `json:"short_code,omitempty"` - Status string `json:"status"` - Decimals *int64 `json:"decimals,omitempty"` - PendingInboundAsset string `json:"pending_inbound_asset"` - PendingInboundRune string `json:"pending_inbound_rune"` - BalanceAsset string `json:"balance_asset"` - BalanceRune string `json:"balance_rune"` - // the USD (TOR) price of the asset in 1e8 - AssetTorPrice string `json:"asset_tor_price"` - // the total pool units, this is the sum of LP and synth units - PoolUnits string `json:"pool_units"` - // the total pool liquidity provider units - LPUnits string `json:"LP_units"` - // the total synth units in the pool - SynthUnits string `json:"synth_units"` - // the total supply of synths for the asset - SynthSupply string `json:"synth_supply"` - // the balance of L1 asset deposited into the Savers Vault - SaversDepth string `json:"savers_depth"` - // the number of units owned by Savers - SaversUnits string `json:"savers_units"` - // the filled savers capacity in basis points, 4500/10000 = 45% - SaversFillBps string `json:"savers_fill_bps"` - // amount of remaining capacity in asset - SaversCapacityRemaining string `json:"savers_capacity_remaining"` - // whether additional synths cannot be minted - SynthMintPaused bool `json:"synth_mint_paused"` - // the amount of synth supply remaining before the current max supply is reached - SynthSupplyRemaining string `json:"synth_supply_remaining"` - // the amount of collateral collects for loans - LoanCollateral string `json:"loan_collateral"` - // the amount of remaining collateral collects for loans - LoanCollateralRemaining string `json:"loan_collateral_remaining"` - // the current loan collateralization ratio - LoanCr string `json:"loan_cr"` - // the depth of the derived virtual pool relative to L1 pool (in basis points) - DerivedDepthBps string `json:"derived_depth_bps"` -} - -// QuoteFees struct for QuoteFees. -type QuoteFees struct { - // the target asset used for all fees - Asset string `json:"asset"` - // affiliate fee in the target asset - Affiliate *string `json:"affiliate,omitempty"` - // outbound fee in the target asset - Outbound *string `json:"outbound,omitempty"` - // liquidity fees paid to pools in the target asset - Liquidity string `json:"liquidity"` - // total fees in the target asset - Total string `json:"total"` - // the swap slippage in basis points - SlippageBps int64 `json:"slippage_bps"` - // total basis points in fees relative to amount out - TotalBps int64 `json:"total_bps"` -} - -// QuoteSwapResponse struct for QuoteSwapResponse. -type QuoteSwapResponse struct { - // the inbound address for the transaction on the source chain - InboundAddress *string `json:"inbound_address,omitempty"` - // the approximate number of source chain blocks required before processing - InboundConfirmationBlocks *int64 `json:"inbound_confirmation_blocks,omitempty"` - // the approximate seconds for block confirmations required before processing - InboundConfirmationSeconds *int64 `json:"inbound_confirmation_seconds,omitempty"` - // the number of thorchain blocks the outbound will be delayed - OutboundDelayBlocks int64 `json:"outbound_delay_blocks"` - // the approximate seconds for the outbound delay before it will be sent - OutboundDelaySeconds int64 `json:"outbound_delay_seconds"` - Fees QuoteFees `json:"fees"` - // the EVM chain router contract address - Router *string `json:"router,omitempty"` - // expiration timestamp in unix seconds - Expiry int64 `json:"expiry"` - // static warning message - Warning string `json:"warning"` - // chain specific quote notes - Notes string `json:"notes"` - // Defines the minimum transaction size for the chain in base units (sats, wei, uatom). Transactions with asset amounts lower than the dust_threshold are ignored. - DustThreshold *string `json:"dust_threshold,omitempty"` - // The recommended minimum inbound amount for this transaction type & inbound asset. Sending less than this amount could result in failed refunds. - RecommendedMinAmountIn *string `json:"recommended_min_amount_in,omitempty"` - // the recommended gas rate to use for the inbound to ensure timely confirmation - RecommendedGasRate *string `json:"recommended_gas_rate,omitempty"` - // the units of the recommended gas rate - GasRateUnits *string `json:"gas_rate_units,omitempty"` - // generated memo for the swap - Memo *string `json:"memo,omitempty"` - // the amount of the target asset the user can expect to receive after fees - ExpectedAmountOut string `json:"expected_amount_out"` - // the maximum amount of trades a streaming swap can do for a trade - MaxStreamingQuantity *int64 `json:"max_streaming_quantity,omitempty"` - // the number of blocks the streaming swap will execute over - StreamingSwapBlocks *int64 `json:"streaming_swap_blocks,omitempty"` - // approx the number of seconds the streaming swap will execute over - StreamingSwapSeconds *int64 `json:"streaming_swap_seconds,omitempty"` - // total number of seconds a swap is expected to take (inbound conf + streaming swap + outbound delay) - TotalSwapSeconds *int64 `json:"total_swap_seconds,omitempty"` -} - -// QuoteSaverDepositResponse struct for QuoteSaverDepositResponse. -type QuoteSaverDepositResponse struct { - // the inbound address for the transaction on the source chain - InboundAddress string `json:"inbound_address"` - // the approximate number of source chain blocks required before processing - InboundConfirmationBlocks *int64 `json:"inbound_confirmation_blocks,omitempty"` - // the approximate seconds for block confirmations required before processing - InboundConfirmationSeconds *int64 `json:"inbound_confirmation_seconds,omitempty"` - // the number of thorchain blocks the outbound will be delayed - OutboundDelayBlocks *int64 `json:"outbound_delay_blocks,omitempty"` - // the approximate seconds for the outbound delay before it will be sent - OutboundDelaySeconds *int64 `json:"outbound_delay_seconds,omitempty"` - Fees QuoteFees `json:"fees"` - // the EVM chain router contract address - Router *string `json:"router,omitempty"` - // expiration timestamp in unix seconds - Expiry int64 `json:"expiry"` - // static warning message - Warning string `json:"warning"` - // chain specific quote notes - Notes string `json:"notes"` - // Defines the minimum transaction size for the chain in base units (sats, wei, uatom). Transactions with asset amounts lower than the dust_threshold are ignored. - DustThreshold *string `json:"dust_threshold,omitempty"` - // The recommended minimum inbound amount for this transaction type & inbound asset. Sending less than this amount could result in failed refunds. - RecommendedMinAmountIn *string `json:"recommended_min_amount_in,omitempty"` - // the recommended gas rate to use for the inbound to ensure timely confirmation - RecommendedGasRate string `json:"recommended_gas_rate"` - // the units of the recommended gas rate - GasRateUnits string `json:"gas_rate_units"` - // generated memo for the deposit - Memo string `json:"memo"` - // same as expected_amount_deposit, to be deprecated in favour of expected_amount_deposit - ExpectedAmountOut *string `json:"expected_amount_out,omitempty"` - // the amount of the target asset the user can expect to deposit after fees - ExpectedAmountDeposit string `json:"expected_amount_deposit"` -} - -// InboundObservedStage struct for InboundObservedStage. -type InboundObservedStage struct { - // returns true if any nodes have observed the transaction (to be deprecated in favour of counts) - Started *bool `json:"started,omitempty"` - // number of signers for pre-confirmation-counting observations - PreConfirmationCount *int64 `json:"pre_confirmation_count,omitempty"` - // number of signers for final observations, after any confirmation counting complete - FinalCount int64 `json:"final_count"` - // returns true if no transaction observation remains to be done - Completed bool `json:"completed"` -} - -// InboundConfirmationCountedStage struct for InboundConfirmationCountedStage. -type InboundConfirmationCountedStage struct { - // the THORChain block height when confirmation counting began - CountingStartHeight *int64 `json:"counting_start_height,omitempty"` - // the external source chain for which confirmation counting takes place - Chain *string `json:"chain,omitempty"` - // the block height on the external source chain when the transaction was observed - ExternalObservedHeight *int64 `json:"external_observed_height,omitempty"` - // the block height on the external source chain when confirmation counting will be complete - ExternalConfirmationDelayHeight *int64 `json:"external_confirmation_delay_height,omitempty"` - // the estimated remaining seconds before confirmation counting completes - RemainingConfirmationSeconds *int64 `json:"remaining_confirmation_seconds,omitempty"` - // returns true if no transaction confirmation counting remains to be done - Completed bool `json:"completed"` -} - -// InboundFinalisedStage struct for InboundFinalisedStage. -type InboundFinalisedStage struct { - // returns true if the inbound transaction has been finalised (THORChain agreeing it exists) - Completed bool `json:"completed"` -} - -// StreamingStatus struct for StreamingStatus. -type StreamingStatus struct { - // how often each swap is made, in blocks - Interval int64 `json:"interval"` - // the total number of swaps in a streaming swaps - Quantity int64 `json:"quantity"` - // the amount of swap attempts so far - Count int64 `json:"count"` -} - -// SwapStatus struct for SwapStatus. -type SwapStatus struct { - // true when awaiting a swap - Pending bool `json:"pending"` - Streaming *StreamingStatus `json:"streaming,omitempty"` -} - -// SwapFinalisedStage struct for SwapFinalisedStage. -type SwapFinalisedStage struct { - // (to be deprecated in favor of swap_status) returns true if an inbound transaction's swap (successful or refunded) is no longer pending - Completed bool `json:"completed"` -} - -// OutboundDelayStage struct for OutboundDelayStage. -type OutboundDelayStage struct { - // the number of remaining THORChain blocks the outbound will be delayed - RemainingDelayBlocks *int64 `json:"remaining_delay_blocks,omitempty"` - // the estimated remaining seconds of the outbound delay before it will be sent - RemainingDelaySeconds *int64 `json:"remaining_delay_seconds,omitempty"` - // returns true if no transaction outbound delay remains - Completed bool `json:"completed"` -} - -// OutboundSignedStage struct for OutboundSignedStage. -type OutboundSignedStage struct { - // THORChain height for which the external outbound is scheduled - ScheduledOutboundHeight *int64 `json:"scheduled_outbound_height,omitempty"` - // THORChain blocks since the scheduled outbound height - BlocksSinceScheduled *int64 `json:"blocks_since_scheduled,omitempty"` - // returns true if an external transaction has been signed and broadcast (and observed in its mempool) - Completed bool `json:"completed"` -} - -// TxStagesResponse struct for TxStagesResponse. -type TxStagesResponse struct { - InboundObserved InboundObservedStage `json:"inbound_observed"` - InboundConfirmationCounted *InboundConfirmationCountedStage `json:"inbound_confirmation_counted,omitempty"` - InboundFinalised *InboundFinalisedStage `json:"inbound_finalised,omitempty"` - SwapStatus *SwapStatus `json:"swap_status,omitempty"` - SwapFinalised *SwapFinalisedStage `json:"swap_finalised,omitempty"` - OutboundDelay *OutboundDelayStage `json:"outbound_delay,omitempty"` - OutboundSigned *OutboundSignedStage `json:"outbound_signed,omitempty"` -} - -// Coin struct for Coin. -type Coin struct { - Asset string `json:"asset"` - Amount string `json:"amount"` - Decimals *int64 `json:"decimals,omitempty"` -} - -// Tx struct for Tx. -type Tx struct { - ID *string `json:"id,omitempty"` - Chain *string `json:"chain,omitempty"` - FromAddress *string `json:"from_address,omitempty"` - ToAddress *string `json:"to_address,omitempty"` - Coins []Coin `json:"coins"` - Gas []Coin `json:"gas"` - Memo *string `json:"memo,omitempty"` -} - -// ObservedTx struct for ObservedTx. -type ObservedTx struct { - Tx Tx `json:"tx"` - ObservedPubKey *string `json:"observed_pub_key,omitempty"` - // the block height on the external source chain when the transaction was observed, not provided if chain is THOR - ExternalObservedHeight *int64 `json:"external_observed_height,omitempty"` - // the block height on the external source chain when confirmation counting will be complete, not provided if chain is THOR - ExternalConfirmationDelayHeight *int64 `json:"external_confirmation_delay_height,omitempty"` - // the outbound aggregator to use, will also match a suffix - Aggregator *string `json:"aggregator,omitempty"` - // the aggregator target asset provided to transferOutAndCall - AggregatorTarget *string `json:"aggregator_target,omitempty"` - // the aggregator target asset limit provided to transferOutAndCall - AggregatorTargetLimit *string `json:"aggregator_target_limit,omitempty"` - Signers []string `json:"signers,omitempty"` - KeysignMs *int64 `json:"keysign_ms,omitempty"` - OutHashes []string `json:"out_hashes,omitempty"` - Status *string `json:"status,omitempty"` -} - -// TxOutItem struct for TxOutItem. -type TxOutItem struct { - Chain string `json:"chain"` - ToAddress string `json:"to_address"` - VaultPubKey *string `json:"vault_pub_key,omitempty"` - Coin Coin `json:"coin"` - Memo *string `json:"memo,omitempty"` - MaxGas []Coin `json:"max_gas"` - GasRate *int64 `json:"gas_rate,omitempty"` - InHash *string `json:"in_hash,omitempty"` - OutHash *string `json:"out_hash,omitempty"` - Height *int64 `json:"height,omitempty"` - // clout spent in RUNE for the outbound - CloutSpent *string `json:"clout_spent,omitempty"` -} - -// TxDetailsResponse struct for TxDetailsResponse. -type TxDetailsResponse struct { - TxID *string `json:"tx_id,omitempty"` - Tx ObservedTx `json:"tx"` - Txs []ObservedTx `json:"txs"` - Actions []TxOutItem `json:"actions"` - OutTxs []Tx `json:"out_txs"` - // the thorchain height at which the inbound reached consensus - ConsensusHeight *int64 `json:"consensus_height,omitempty"` - // the thorchain height at which the outbound was finalised - FinalisedHeight *int64 `json:"finalised_height,omitempty"` - UpdatedVault *bool `json:"updated_vault,omitempty"` - Reverted *bool `json:"reverted,omitempty"` - // the thorchain height for which the outbound was scheduled - OutboundHeight *int64 `json:"outbound_height,omitempty"` -} diff --git a/chain/thorchain/wallet.go b/chain/thorchain/wallet.go deleted file mode 100644 index 992c76e5..00000000 --- a/chain/thorchain/wallet.go +++ /dev/null @@ -1,51 +0,0 @@ -package thorchain - -import ( - "github.com/cosmos/cosmos-sdk/types" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -var ( - _ ibc.Wallet = &CosmosWallet{} - _ User = &CosmosWallet{} -) - -type CosmosWallet struct { - mnemonic string - address []byte - keyName string - chainCfg ibc.ChainConfig -} - -func NewWallet(keyname string, address []byte, mnemonic string, chainCfg ibc.ChainConfig) ibc.Wallet { - return &CosmosWallet{ - mnemonic: mnemonic, - address: address, - keyName: keyname, - chainCfg: chainCfg, - } -} - -func (w *CosmosWallet) KeyName() string { - return w.keyName -} - -// Get formatted address, passing in a prefix. -func (w *CosmosWallet) FormattedAddress() string { - return types.MustBech32ifyAddressBytes(w.chainCfg.Bech32Prefix, w.address) -} - -// Get mnemonic, only used for relayer wallets. -func (w *CosmosWallet) Mnemonic() string { - return w.mnemonic -} - -// Get Address with chain's prefix. -func (w *CosmosWallet) Address() []byte { - return w.address -} - -func (w *CosmosWallet) FormattedAddressWithPrefix(prefix string) string { - return types.MustBech32ifyAddressBytes(prefix, w.address) -} diff --git a/chain/utxo/cli.go b/chain/utxo/cli.go deleted file mode 100644 index c32b8e59..00000000 --- a/chain/utxo/cli.go +++ /dev/null @@ -1,410 +0,0 @@ -package utxo - -import ( - "context" - "encoding/hex" - "encoding/json" - "fmt" - "strconv" - "strings" -) - -// Depending on the wallet version, getwalletinfo may require a created wallet name. -func (c *UtxoChain) GetWalletVersion(ctx context.Context, keyName string) (int, error) { - var walletInfo WalletInfo - var stdout []byte - var err error - - if keyName == "" { - cmd := append(c.BaseCli, "getwalletinfo") - stdout, _, err = c.Exec(ctx, cmd, nil) - if err != nil { - return 0, err - } - } else { - if err := c.LoadWallet(ctx, keyName); err != nil { - return 0, err - } - - cmd := append(c.BaseCli, fmt.Sprintf("-rpcwallet=%s", keyName), "getwalletinfo") - stdout, _, err = c.Exec(ctx, cmd, nil) - if err != nil { - return 0, err - } - if err := c.UnloadWallet(ctx, keyName); err != nil { - return 0, err - } - } - - if err := json.Unmarshal(stdout, &walletInfo); err != nil { - return 0, err - } - - return walletInfo.WalletVersion, nil -} - -// UnloadWalletAfterUse() sets whether non-default wallets stay loaded -// Default value is false, wallets will stay loaded -// Setting this to true will load/unload a wallet for each action on a specific wallet. -// Currently, the only know case where this is required true is when using bifrost. -func (c *UtxoChain) UnloadWalletAfterUse(on bool) { - c.unloadWalletAfterUse = on -} - -func (c *UtxoChain) LoadWallet(ctx context.Context, keyName string) error { - if !c.unloadWalletAfterUse { - return nil - } - - if c.WalletVersion == 0 || c.WalletVersion >= noDefaultKeyWalletVersion { - wallet, err := c.getWallet(keyName) - if err != nil { - return err - } - wallet.mu.Lock() - defer wallet.mu.Unlock() - if wallet.loadCount == 0 { - cmd := append(c.BaseCli, "loadwallet", keyName) - _, _, err = c.Exec(ctx, cmd, nil) - if err != nil { - return err - } - } - wallet.loadCount++ - } - return nil -} - -func (c *UtxoChain) UnloadWallet(ctx context.Context, keyName string) error { - if !c.unloadWalletAfterUse { - return nil - } - - if c.WalletVersion == 0 || c.WalletVersion >= noDefaultKeyWalletVersion { - wallet, err := c.getWallet(keyName) - if err != nil { - return err - } - wallet.mu.Lock() - defer wallet.mu.Unlock() - if wallet.loadCount == 1 { - cmd := append(c.BaseCli, "unloadwallet", keyName) - _, _, err = c.Exec(ctx, cmd, nil) - if err != nil { - return err - } - } - if wallet.loadCount > 0 { - wallet.loadCount-- - } - } - return nil -} - -func (c *UtxoChain) CreateWallet(ctx context.Context, keyName string) error { - if c.WalletVersion == 0 || c.WalletVersion >= noDefaultKeyWalletVersion { - cmd := append(c.BaseCli, "createwallet", keyName) - _, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return err - } - - c.MapAccess.Lock() - c.KeyNameToWalletMap[keyName] = &NodeWallet{ - keyName: keyName, - loadCount: 1, - } - c.MapAccess.Unlock() - } - - return c.UnloadWallet(ctx, keyName) -} - -func (c *UtxoChain) GetNewAddress(ctx context.Context, keyName string, mweb bool) (string, error) { - wallet, err := c.getWalletForNewAddress(keyName) - if err != nil { - return "", err - } - - if err := c.LoadWallet(ctx, keyName); err != nil { - return "", err - } - - var cmd []string - if c.WalletVersion >= noDefaultKeyWalletVersion { - cmd = append(c.BaseCli, fmt.Sprintf("-rpcwallet=%s", keyName), "getnewaddress") - } else { - cmd = append(c.BaseCli, "getnewaddress") - } - - if mweb { - cmd = append(cmd, "mweb", "mweb") - } - - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return "", err - } - addr := strings.TrimSpace(string(stdout)) - - // Remove "bchreg:" from addresses like: bchreg:qz2lxh4vzg2tqw294p7d6taxntu2snwnjuxd2k9auq - splitAddr := strings.Split(addr, ":") - if len(splitAddr) == 2 { - addr = splitAddr[1] - } - - c.MapAccess.Lock() - wallet.address = addr - c.AddrToKeyNameMap[addr] = keyName - - if c.WalletVersion >= noDefaultKeyWalletVersion { - wallet.ready = true - } - c.MapAccess.Unlock() - - if err := c.UnloadWallet(ctx, keyName); err != nil { - return "", err - } - - return addr, nil -} - -func (c *UtxoChain) SetAccount(ctx context.Context, addr string, keyName string) error { - if c.WalletVersion < noDefaultKeyWalletVersion { - wallet, err := c.getWalletForSetAccount(keyName, addr) - if err != nil { - return err - } - cmd := append(c.BaseCli, "setaccount", addr, keyName) - _, _, err = c.Exec(ctx, cmd, nil) - if err != nil { - return err - } - wallet.ready = true - } - - return nil -} - -// sendToMwebAddress is used for creating the mweb transaction needed at block 431 -// no other use case is currently supported. -func (c *UtxoChain) sendToMwebAddress(ctx context.Context, keyName string, addr string, amount float64) error { - wallet, err := c.getWalletForUse(keyName) - if err != nil { - return err - } - - if err := c.LoadWallet(ctx, keyName); err != nil { - return err - } - - cmd := append(c.BaseCli, - fmt.Sprintf("-rpcwallet=%s", keyName), "-named", "sendtoaddress", - fmt.Sprintf("address=%s", addr), - fmt.Sprintf("amount=%.8f", amount), - ) - - wallet.txLock.Lock() - _, _, err = c.Exec(ctx, cmd, nil) - wallet.txLock.Unlock() - if err != nil { - return err - } - - return c.UnloadWallet(ctx, keyName) -} - -func (c *UtxoChain) ListUnspent(ctx context.Context, keyName string) (ListUtxo, error) { - wallet, err := c.getWalletForUse(keyName) - if err != nil { - return nil, err - } - - if err := c.LoadWallet(ctx, keyName); err != nil { - return nil, err - } - - var cmd []string - if c.WalletVersion >= noDefaultKeyWalletVersion { - cmd = append(c.BaseCli, fmt.Sprintf("-rpcwallet=%s", keyName), "listunspent") - } else { - cmd = append(c.BaseCli, "listunspent", "0", "99999999", fmt.Sprintf("[\"%s\"]", wallet.address)) - } - - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return nil, err - } - - if err := c.UnloadWallet(ctx, keyName); err != nil { - return nil, err - } - - var listUtxo ListUtxo - if err := json.Unmarshal(stdout, &listUtxo); err != nil { - return nil, err - } - - return listUtxo, nil -} - -func (c *UtxoChain) CreateRawTransaction(ctx context.Context, keyName string, listUtxo ListUtxo, addr string, sendAmount float64, script []byte) (string, error) { - wallet, err := c.getWalletForUse(keyName) - if err != nil { - return "", err - } - - var sendInputs SendInputs - utxoTotal := float64(0.0) - fees, err := strconv.ParseFloat(c.cfg.GasPrices, 64) - if err != nil { - return "", err - } - fees *= c.cfg.GasAdjustment - for _, utxo := range listUtxo { - if wallet.address == utxo.Address || strings.Contains(utxo.Address, wallet.address) { - sendInputs = append(sendInputs, SendInput{ - TxID: utxo.TxID, - Vout: utxo.Vout, - }) - utxoTotal += utxo.Amount - if utxoTotal > sendAmount+fees { - break - } - } - } - sendInputsBz, err := json.Marshal(sendInputs) - if err != nil { - return "", err - } - - sanitizedSendAmount, err := strconv.ParseFloat(fmt.Sprintf("%.8f", sendAmount), 64) - if err != nil { - return "", err - } - - sanitizedChange, err := strconv.ParseFloat(fmt.Sprintf("%.8f", utxoTotal-sendAmount-fees), 64) - if err != nil { - return "", err - } - - var sendOutputsBz []byte - if c.WalletVersion >= noDefaultKeyWalletVersion { - sendOutputs := SendOutputs{ - SendOutput{ - Amount: sanitizedSendAmount, - }, - SendOutput{ - Change: sanitizedChange, - }, - } - - if len(script) > 0 { - sendOutputs = append(sendOutputs, SendOutput{ - Data: hex.EncodeToString(script), - }) - } - - sendOutputsBz, err = json.Marshal(sendOutputs) - if err != nil { - return "", err - } - } else { - sendOutputs := SendOutput{ - Amount: sanitizedSendAmount, - Change: sanitizedChange, - Data: hex.EncodeToString(script), - } - - sendOutputsBz, err = json.Marshal(sendOutputs) - if err != nil { - return "", err - } - } - - // create raw transaction - - sendInputsStr := string(sendInputsBz) - sendOutputsStr := strings.Replace(string(sendOutputsBz), "replaceWithAddress", addr, 1) - sendOutputsStr = strings.Replace(sendOutputsStr, "replaceWithChangeAddr", wallet.address, 1) - - // createrawtransaction - cmd := append(c.BaseCli, "createrawtransaction", sendInputsStr, sendOutputsStr) - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return "", err - } - - return strings.TrimSpace(string(stdout)), nil -} - -func (c *UtxoChain) SignRawTransaction(ctx context.Context, keyName string, rawTxHex string) (string, error) { - wallet, err := c.getWalletForUse(keyName) - if err != nil { - return "", err - } - - var cmd []string - if c.WalletVersion >= noDefaultKeyWalletVersion { - cmd = append(c.BaseCli, - fmt.Sprintf("-rpcwallet=%s", keyName), "signrawtransactionwithwallet", rawTxHex) - } else { - // export priv key of sending address - cmd = append(c.BaseCli, "dumpprivkey", wallet.address) - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return "", err - } - - // sign raw tx with priv key - cmd = append(c.BaseCli, - "signrawtransaction", rawTxHex, "null", fmt.Sprintf("[\"%s\"]", - strings.TrimSpace(string(stdout)))) - } - - if err := c.LoadWallet(ctx, keyName); err != nil { - return "", err - } - - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return "", err - } - - if err := c.UnloadWallet(ctx, keyName); err != nil { - return "", err - } - - var signRawTxOutput SignRawTxOutput - if err := json.Unmarshal(stdout, &signRawTxOutput); err != nil { - return "", err - } - - if !signRawTxOutput.Complete { - c.logger().Error(fmt.Sprintf("signing transaction did not complete, (%d) errors", len(signRawTxOutput.Errors))) - for i, sErr := range signRawTxOutput.Errors { - c.logger().Error(fmt.Sprintf("Signing error %d: %s", i, sErr.Error)) - } - return "", fmt.Errorf("sign transaction error on %s", c.cfg.Name) - } - - return signRawTxOutput.Hex, nil -} - -func (c *UtxoChain) SendRawTransaction(ctx context.Context, signedRawTxHex string) (string, error) { - var cmd []string - switch { - case c.WalletVersion >= namedFixWalletVersion: - cmd = append(c.BaseCli, "sendrawtransaction", signedRawTxHex) - case c.WalletVersion > noDefaultKeyWalletVersion: - cmd = append(c.BaseCli, "sendrawtransaction", signedRawTxHex, "0") - default: - cmd = append(c.BaseCli, "sendrawtransaction", signedRawTxHex) - } - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return "", err - } - - return strings.TrimSpace(string(stdout)), nil -} diff --git a/chain/utxo/default_configs.go b/chain/utxo/default_configs.go deleted file mode 100644 index 5341a520..00000000 --- a/chain/utxo/default_configs.go +++ /dev/null @@ -1,141 +0,0 @@ -package utxo - -import ( - "fmt" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -func DefaultBitcoinChainConfig( - name string, - rpcUser string, - rpcPassword string, -) ibc.ChainConfig { - return ibc.ChainConfig{ - Type: "utxo", - Name: name, - ChainID: name, - Bech32Prefix: "n/a", - CoinType: "0", - Denom: "sat", - GasPrices: "0.00001", // min fee / kb - GasAdjustment: 4, // min fee multiplier - TrustingPeriod: "0", - NoHostMount: false, - Images: []ibc.DockerImage{ - { - Repository: "bitcoin/bitcoin", - Version: "26.2", - UIDGID: "1025:1025", - }, - }, - Bin: "bitcoind,bitcoin-cli", - AdditionalStartArgs: []string{ - fmt.Sprintf("-rpcuser=%s", rpcUser), - fmt.Sprintf("-rpcpassword=%s", rpcPassword), - "-fallbackfee=0.0005", - "-mintxfee=0.00001", - }, - } -} - -func DefaultBitcoinCashChainConfig( - name string, - rpcUser string, - rpcPassword string, -) ibc.ChainConfig { - return ibc.ChainConfig{ - Type: "utxo", - Name: name, - ChainID: name, - Bech32Prefix: "n/a", - CoinType: "145", - Denom: "sat", - GasPrices: "0.00001", // min fee / kb - GasAdjustment: 4, // min fee multiplier - TrustingPeriod: "0", - NoHostMount: false, - Images: []ibc.DockerImage{ - { - Repository: "zquestz/bitcoin-cash-node", - Version: "27.1.0", - UIDGID: "1025:1025", - }, - }, - Bin: "bitcoind,bitcoin-cli", - AdditionalStartArgs: []string{ - fmt.Sprintf("-rpcuser=%s", rpcUser), - fmt.Sprintf("-rpcpassword=%s", rpcPassword), - "-fallbackfee=0.0005", - "-mintxfee=0.00001", - }, - } -} - -func DefaultLitecoinChainConfig( - name string, - rpcUser string, - rpcPassword string, -) ibc.ChainConfig { - return ibc.ChainConfig{ - Type: "utxo", - Name: name, - ChainID: name, - Bech32Prefix: "n/a", - CoinType: "2", - Denom: "sat", - GasPrices: "0.0001", // min fee / kb - GasAdjustment: 4, // min fee multiplier - TrustingPeriod: "0", - NoHostMount: false, - Images: []ibc.DockerImage{ - { - Repository: "uphold/litecoin-core", - Version: "0.21", - UIDGID: "1025:1025", - }, - }, - Bin: "litecoind,litecoin-cli", - AdditionalStartArgs: []string{ - fmt.Sprintf("-rpcuser=%s", rpcUser), - fmt.Sprintf("-rpcpassword=%s", rpcPassword), - "-fallbackfee=0.005", - "-mintxfee=0.0001", - }, - } -} - -func DefaultDogecoinChainConfig( - name string, - rpcUser string, - rpcPassword string, -) ibc.ChainConfig { - return ibc.ChainConfig{ - Type: "utxo", - Name: name, - ChainID: name, - Bech32Prefix: "n/a", - CoinType: "3", - Denom: "sat", - GasPrices: "0.01", // min fee / kb - GasAdjustment: 4, // min fee multiplier - TrustingPeriod: "0", - NoHostMount: false, - Images: []ibc.DockerImage{ - { - Repository: "registry.gitlab.com/thorchain/devops/node-launcher", - Version: "dogecoin-daemon-1.14.7", - // Repository: "coinmetrics/dogecoin", - // Version: "1.14.7", - UIDGID: "1000:1000", - }, - }, - Bin: "dogecoind,dogecoin-cli", - AdditionalStartArgs: []string{ - fmt.Sprintf("-rpcuser=%s", rpcUser), - fmt.Sprintf("-rpcpassword=%s", rpcPassword), - "-fallbackfee=0.5", - "-mintxfee=0.01", - }, - } -} diff --git a/chain/utxo/types.go b/chain/utxo/types.go deleted file mode 100644 index a65dd81d..00000000 --- a/chain/utxo/types.go +++ /dev/null @@ -1,62 +0,0 @@ -package utxo - -type ListReceivedByAddress []ReceivedByAddress - -type ReceivedByAddress struct { - Address string `json:"address"` - Amount float64 `json:"amount"` -} - -type TransactionReceipt struct { - TxHash string `json:"transactionHash"` -} - -type ListUtxo []Utxo - -type Utxo struct { - TxID string `json:"txid,omitempty"` - Vout int `json:"vout,omitempty"` - Address string `json:"address,omitempty"` - Label string `json:"label,omitempty"` - ScriptPubKey string `json:"scriptPubKey,omitempty"` - Amount float64 `json:"amount,omitempty"` - Confirmations int `json:"confirmations,omitempty"` - Spendable bool `json:"spendable,omitempty"` - Solvable bool `json:"solvable,omitempty"` - Desc string `json:"desc,omitempty"` - Safe bool `json:"safe,omitempty"` -} - -type SendInputs []SendInput - -type SendInput struct { - TxID string `json:"txid"` // hex - Vout int `json:"vout"` -} - -type SendOutputs []SendOutput - -type SendOutput struct { - Amount float64 `json:"replaceWithAddress,omitempty"` - Change float64 `json:"replaceWithChangeAddr,omitempty"` - Data string `json:"data,omitempty"` // hex -} - -type SignRawTxError struct { - Txid string `json:"txid"` - Vout int `json:"vout"` - Witness []string `json:"witness"` - ScriptSig string `json:"scriptSig"` - Sequence int `json:"sequence"` - Error string `json:"error"` -} - -type SignRawTxOutput struct { - Hex string `json:"hex"` - Complete bool `json:"complete"` - Errors []SignRawTxError `json:"errors"` -} - -type WalletInfo struct { - WalletVersion int `json:"walletversion"` -} diff --git a/chain/utxo/unimplemented.go b/chain/utxo/unimplemented.go deleted file mode 100644 index dc4dca6f..00000000 --- a/chain/utxo/unimplemented.go +++ /dev/null @@ -1,63 +0,0 @@ -package utxo - -import ( - "context" - "runtime" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -func PanicFunctionName() { - pc, _, _, _ := runtime.Caller(1) - panic(runtime.FuncForPC(pc).Name() + " not implemented") -} - -func (c *UtxoChain) ExportState(ctx context.Context, height int64) (string, error) { - PanicFunctionName() - return "", nil -} - -func (c *UtxoChain) GetGRPCAddress() string { - PanicFunctionName() - return "" -} - -func (c *UtxoChain) GetHostGRPCAddress() string { - PanicFunctionName() - return "" -} - -func (*UtxoChain) GetHostPeerAddress() string { - PanicFunctionName() - return "" -} - -func (c *UtxoChain) GetGasFeesInNativeDenom(gasPaid int64) int64 { - PanicFunctionName() - return 0 -} - -func (c *UtxoChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error { - PanicFunctionName() - return nil -} - -func (c *UtxoChain) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, options ibc.TransferOptions) (ibc.Tx, error) { - PanicFunctionName() - return ibc.Tx{}, nil -} - -func (c *UtxoChain) Acknowledgements(ctx context.Context, height int64) ([]ibc.PacketAcknowledgement, error) { - PanicFunctionName() - return nil, nil -} - -func (c *UtxoChain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketTimeout, error) { - PanicFunctionName() - return nil, nil -} - -func (c *UtxoChain) BuildRelayerWallet(ctx context.Context, keyName string) (ibc.Wallet, error) { - PanicFunctionName() - return &UtxoWallet{}, nil -} diff --git a/chain/utxo/utxo_chain.go b/chain/utxo/utxo_chain.go deleted file mode 100644 index 66f4e128..00000000 --- a/chain/utxo/utxo_chain.go +++ /dev/null @@ -1,560 +0,0 @@ -package utxo - -import ( - "context" - "fmt" - "io" - "math" - "strconv" - "strings" - "sync" - "time" - - dockerimage "github.com/docker/docker/api/types/image" - "github.com/docker/docker/api/types/mount" - "github.com/docker/docker/api/types/volume" - dockerclient "github.com/docker/docker/client" - "github.com/docker/go-connections/nat" - "go.uber.org/zap" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10/dockerutil" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -var _ ibc.Chain = &UtxoChain{} - -const ( - blockTime = 2 // seconds - rpcPort = "18443/tcp" - noDefaultKeyWalletVersion = 159_900 - namedFixWalletVersion = 169_901 - faucetKeyName = "faucet" -) - -var natPorts = nat.PortMap{ - nat.Port(rpcPort): {}, -} - -type UtxoChain struct { - testName string - cfg ibc.ChainConfig - cancel context.CancelFunc - - log *zap.Logger - - VolumeName string - NetworkID string - DockerClient *dockerclient.Client - - containerLifecycle *dockerutil.ContainerLifecycle - - hostRPCPort string - - // cli arguments - BinDaemon string - BinCli string - RPCUser string - RPCPassword string - BaseCli []string - AddrToKeyNameMap map[string]string - KeyNameToWalletMap map[string]*NodeWallet - - // Mutex for reading/writing AddrToKeyNameMap and KeyNameToWalletMap - MapAccess sync.Mutex - - WalletVersion int - unloadWalletAfterUse bool -} - -func NewUtxoChain(testName string, chainConfig ibc.ChainConfig, log *zap.Logger) *UtxoChain { - bins := strings.Split(chainConfig.Bin, ",") - if len(bins) != 2 { - panic(fmt.Sprintf("%s chain must set the daemon and cli binaries (i.e. appd,app-cli)", chainConfig.Name)) - } - rpcUser := "" - rpcPassword := "" - for _, arg := range chainConfig.AdditionalStartArgs { - if strings.Contains(arg, "-rpcuser") { - rpcUser = arg - } - if strings.Contains(arg, "-rpcpassword") { - rpcPassword = arg - } - } - if rpcUser == "" || rpcPassword == "" { - panic(fmt.Sprintf("%s chain must have -rpcuser and -rpcpassword set in config's AdditionalStartArgs", chainConfig.Name)) - } - - return &UtxoChain{ - testName: testName, - cfg: chainConfig, - log: log, - BinDaemon: bins[0], - BinCli: bins[1], - RPCUser: rpcUser, - RPCPassword: rpcPassword, - AddrToKeyNameMap: make(map[string]string), - KeyNameToWalletMap: make(map[string]*NodeWallet), - unloadWalletAfterUse: false, - } -} - -func (c *UtxoChain) Config() ibc.ChainConfig { - return c.cfg -} - -func (c *UtxoChain) Initialize(ctx context.Context, testName string, cli *dockerclient.Client, networkID string) error { - chainCfg := c.Config() - c.pullImages(ctx, cli) - image := chainCfg.Images[0] - - c.containerLifecycle = dockerutil.NewContainerLifecycle(c.log, cli, c.Name()) - - v, err := cli.VolumeCreate(ctx, volume.CreateOptions{ - Labels: map[string]string{ - dockerutil.CleanupLabel: testName, - - dockerutil.NodeOwnerLabel: c.Name(), - }, - }) - if err != nil { - return fmt.Errorf("creating volume for chain node: %w", err) - } - c.VolumeName = v.Name - c.NetworkID = networkID - c.DockerClient = cli - - if err := dockerutil.SetVolumeOwner(ctx, dockerutil.VolumeOwnerOptions{ - Log: c.log, - - Client: cli, - - VolumeName: v.Name, - ImageRef: image.Ref(), - TestName: testName, - UidGid: image.UIDGID, - }); err != nil { - return fmt.Errorf("set volume owner: %w", err) - } - - return nil -} - -func (c *UtxoChain) Name() string { - return fmt.Sprintf("utxo-%s-%s", c.cfg.ChainID, dockerutil.SanitizeContainerName(c.testName)) -} - -func (c *UtxoChain) HomeDir() string { - return "/home/utxo" -} - -func (c *UtxoChain) Bind() []string { - return []string{fmt.Sprintf("%s:%s", c.VolumeName, c.HomeDir())} -} - -func (c *UtxoChain) pullImages(ctx context.Context, cli *dockerclient.Client) { - for _, image := range c.Config().Images { - rc, err := cli.ImagePull( - ctx, - image.Repository+":"+image.Version, - dockerimage.PullOptions{}, - ) - if err != nil { - c.log.Error("Failed to pull image", - zap.Error(err), - zap.String("repository", image.Repository), - zap.String("tag", image.Version), - ) - } else { - _, _ = io.Copy(io.Discard, rc) - _ = rc.Close() - } - } -} - -func (c *UtxoChain) Start(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error { - cmd := []string{ - c.BinDaemon, - "--regtest", - "-printtoconsole", - "-regtest=1", - "-txindex", - "-rpcallowip=0.0.0.0/0", - "-rpcbind=0.0.0.0", - "-deprecatedrpc=create_bdb", - "-rpcport=18443", - } - - cmd = append(cmd, c.cfg.AdditionalStartArgs...) - - usingPorts := nat.PortMap{} - for k, v := range natPorts { - usingPorts[k] = v - } - - if c.cfg.HostPortOverride != nil { - var fields []zap.Field - - i := 0 - for intP, extP := range c.cfg.HostPortOverride { - port := nat.Port(fmt.Sprintf("%d/tcp", intP)) - - usingPorts[port] = []nat.PortBinding{ - { - HostPort: fmt.Sprintf("%d", extP), - }, - } - - fields = append(fields, zap.String(fmt.Sprintf("port_overrides_%d", i), fmt.Sprintf("%s:%d", port, extP))) - i++ - } - - c.log.Info("Port overrides", fields...) - } - - env := []string{} - if c.cfg.Images[0].UIDGID != "" { - uidGID := strings.Split(c.cfg.Images[0].UIDGID, ":") - if len(uidGID) != 2 { - panic(fmt.Sprintf("%s chain does not have valid UidGid", c.cfg.Name)) - } - env = []string{ - fmt.Sprintf("UID=%s", uidGID[0]), - fmt.Sprintf("GID=%s", uidGID[1]), - } - } - - entrypoint := []string{"/entrypoint.sh"} - if c.cfg.Images[0].Repository == "registry.gitlab.com/thorchain/devops/node-launcher" { // these images don't have "/entrypoint.sh" - entrypoint = []string{} - cmd = append(cmd, fmt.Sprintf("--datadir=%s", c.HomeDir())) - } - - err := c.containerLifecycle.CreateContainer(ctx, c.testName, c.NetworkID, c.cfg.Images[0], - usingPorts, "", c.Bind(), []mount.Mount{}, c.HostName(), cmd, env, entrypoint) - if err != nil { - return err - } - - c.log.Info("Starting container", zap.String("container", c.Name())) - - if err := c.containerLifecycle.StartContainer(ctx); err != nil { - return err - } - - hostPorts, err := c.containerLifecycle.GetHostPorts(ctx, rpcPort) - if err != nil { - return err - } - - c.hostRPCPort = strings.Split(hostPorts[0], ":")[1] - - c.BaseCli = []string{ - c.BinCli, - "-regtest", - c.RPCUser, - c.RPCPassword, - fmt.Sprintf("-rpcconnect=%s", c.HostName()), - "-rpcport=18443", - } - - // Wait for rpc to come up - time.Sleep(time.Second * 5) - - c.WalletVersion, _ = c.GetWalletVersion(ctx, "") - - if err := c.CreateWallet(ctx, faucetKeyName); err != nil { - return err - } - - if c.WalletVersion == 0 { - c.WalletVersion, err = c.GetWalletVersion(ctx, faucetKeyName) - if err != nil { - return err - } - } - - addr, err := c.GetNewAddress(ctx, faucetKeyName, false) - if err != nil { - return err - } - - if err := c.SetAccount(ctx, addr, faucetKeyName); err != nil { - return err - } - - go func() { - // Don't use ctx from Start(), it gets cancelled soon after returning. - goRoutineCtx := context.Background() - goRoutineCtx, c.cancel = context.WithCancel(goRoutineCtx) - amount := "100" - nextBlockHeight := 100 - if c.cfg.CoinType == "3" { - amount = "1000" // Dogecoin needs more blocks for more coins - nextBlockHeight = 1000 - } - - c.MapAccess.Lock() - faucetWallet, found := c.KeyNameToWalletMap[faucetKeyName] - if !found || !faucetWallet.ready { - c.logger().Error("faucet wallet not found or not ready") - c.MapAccess.Unlock() - return - } - c.MapAccess.Unlock() - - utxoBlockTime := time.Second * 2 - timer := time.NewTimer(utxoBlockTime) - defer timer.Stop() - for { - select { - case <-goRoutineCtx.Done(): - return - case <-timer.C: - cmd = append(c.BaseCli, "generatetoaddress", amount, faucetWallet.address) - _, _, err := c.Exec(goRoutineCtx, cmd, nil) - if err != nil { - c.logger().Error("generatetoaddress error", zap.Error(err)) - return - } - amount = "1" - if nextBlockHeight == 431 && c.cfg.CoinType == "2" { - keyName := "mweb" - if err := c.CreateWallet(goRoutineCtx, keyName); err != nil { - c.logger().Error("error creating mweb wallet at block 431", zap.String("chain", c.cfg.ChainID), zap.Error(err)) - return - } - addr, err := c.GetNewAddress(goRoutineCtx, keyName, true) - if err != nil { - c.logger().Error("error creating mweb wallet at block 431", zap.String("chain", c.cfg.ChainID), zap.Error(err)) - return - } - if err := c.sendToMwebAddress(goRoutineCtx, faucetKeyName, addr, 1); err != nil { - c.logger().Error("error sending to mweb wallet at block 431", zap.String("chain", c.cfg.ChainID), zap.Error(err)) - return - } - } - nextBlockHeight++ - timer.Reset(utxoBlockTime) - } - } - }() - - // Wait for 100 blocks to be created, coins mature after 100 blocks and the faucet starts getting 50 spendable coins/block onwards - // Then wait the standard 2 blocks which also gives the faucet a starting balance of 100 coins - for height, err := c.Height(ctx); err == nil && height < int64(102); { - time.Sleep(time.Second) - height, err = c.Height(ctx) - } - return err -} - -func (c *UtxoChain) HostName() string { - return dockerutil.CondenseHostName(c.Name()) -} - -func (c *UtxoChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error) { - logger := zap.NewNop() - if cmd[len(cmd)-1] != "getblockcount" && cmd[len(cmd)-3] != "generatetoaddress" { // too much logging, maybe switch to an rpc lib in the future - logger = c.logger() - } - job := dockerutil.NewImage(logger, c.DockerClient, c.NetworkID, c.testName, c.cfg.Images[0].Repository, c.cfg.Images[0].Version) - opts := dockerutil.ContainerOptions{ - Env: env, - Binds: c.Bind(), - } - res := job.Run(ctx, cmd, opts) - return res.Stdout, res.Stderr, res.Err -} - -func (c *UtxoChain) logger() *zap.Logger { - return c.log.With( - zap.String("chain_id", c.cfg.ChainID), - zap.String("test", c.testName), - ) -} - -func (c *UtxoChain) GetRPCAddress() string { - return fmt.Sprintf("http://%s:18443", c.HostName()) -} - -func (c *UtxoChain) GetWSAddress() string { - return fmt.Sprintf("ws://%s:18443", c.HostName()) -} - -func (c *UtxoChain) GetHostRPCAddress() string { - return "http://0.0.0.0:" + c.hostRPCPort -} - -func (c *UtxoChain) GetHostWSAddress() string { - return "ws://0.0.0.0:" + c.hostRPCPort -} - -func (c *UtxoChain) CreateKey(ctx context.Context, keyName string) error { - if keyName == "faucet" { - // chain has not started, cannot create wallet yet. Faucet will be created in Start(). - return nil - } - - if err := c.CreateWallet(ctx, keyName); err != nil { - return err - } - - addr, err := c.GetNewAddress(ctx, keyName, false) - if err != nil { - return err - } - - return c.SetAccount(ctx, addr, keyName) -} - -// Get address of account, cast to a string to use. -func (c *UtxoChain) GetAddress(ctx context.Context, keyName string) ([]byte, error) { - c.MapAccess.Lock() - defer c.MapAccess.Unlock() - wallet, ok := c.KeyNameToWalletMap[keyName] - if ok { - return []byte(wallet.address), nil - } - - // Pre-start GetAddress doesn't matter - if keyName == "faucet" { - return []byte(keyName), nil - } - - return nil, fmt.Errorf("keyname: %s's address not found", keyName) -} - -func (c *UtxoChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - _, err := c.SendFundsWithNote(ctx, keyName, amount, "") - return err -} - -func (c *UtxoChain) SendFundsWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error) { - partialCoin := amount.Amount.ModRaw(int64(math.Pow10(int(*c.Config().CoinDecimals)))) - fullCoins := amount.Amount.Sub(partialCoin).QuoRaw(int64(math.Pow10(int(*c.Config().CoinDecimals)))) - sendAmountFloat := float64(fullCoins.Int64()) + float64(partialCoin.Int64())/math.Pow10(int(*c.Config().CoinDecimals)) - - if err := c.LoadWallet(ctx, keyName); err != nil { - return "", err - } - - wallet, err := c.getWalletForUse(keyName) - if err != nil { - return "", err - } - wallet.txLock.Lock() - defer wallet.txLock.Unlock() - - // get utxo - listUtxo, err := c.ListUnspent(ctx, keyName) - if err != nil { - return "", err - } - - rawTxHex, err := c.CreateRawTransaction(ctx, keyName, listUtxo, amount.Address, sendAmountFloat, []byte(note)) - if err != nil { - return "", err - } - - // sign raw transaction - signedRawTxHex, err := c.SignRawTransaction(ctx, keyName, rawTxHex) - if err != nil { - return "", err - } - - // send raw transaction - txHash, err := c.SendRawTransaction(ctx, signedRawTxHex) - if err != nil { - return "", err - } - - if err := c.UnloadWallet(ctx, keyName); err != nil { - return "", err - } - - err = testutil.WaitForBlocks(ctx, 1, c) - return txHash, err -} - -func (c *UtxoChain) Height(ctx context.Context) (int64, error) { - time.Sleep(time.Millisecond * 200) // TODO: slow down WaitForBlocks instead of here - cmd := append(c.BaseCli, "getblockcount") - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return 0, err - } - - return strconv.ParseInt(strings.TrimSpace(string(stdout)), 10, 64) -} - -func (c *UtxoChain) GetBalance(ctx context.Context, address string, denom string) (sdkmath.Int, error) { - c.MapAccess.Lock() - keyName, ok := c.AddrToKeyNameMap[address] - if !ok { - return sdkmath.Int{}, fmt.Errorf("wallet not found for address: %s", address) - } - c.MapAccess.Unlock() - - var coinsWithDecimal float64 - if c.WalletVersion >= noDefaultKeyWalletVersion { - if err := c.LoadWallet(ctx, keyName); err != nil { - return sdkmath.Int{}, err - } - cmd := append(c.BaseCli, fmt.Sprintf("-rpcwallet=%s", keyName), "getbalance") - stdout, _, err := c.Exec(ctx, cmd, nil) - if err != nil { - return sdkmath.Int{}, err - } - if err := c.UnloadWallet(ctx, keyName); err != nil { - return sdkmath.Int{}, err - } - balance := strings.TrimSpace(string(stdout)) - coinsWithDecimal, err = strconv.ParseFloat(balance, 64) - if err != nil { - return sdkmath.Int{}, err - } - } else { - listUtxo, err := c.ListUnspent(ctx, keyName) - if err != nil { - return sdkmath.Int{}, err - } - - for _, utxo := range listUtxo { - if utxo.Spendable { - coinsWithDecimal += utxo.Amount - } - } - } - - coinsScaled := int64(coinsWithDecimal * math.Pow10(int(*c.Config().CoinDecimals))) - return sdkmath.NewInt(coinsScaled), nil -} - -func (c *UtxoChain) BuildWallet(ctx context.Context, keyName string, mnemonic string) (ibc.Wallet, error) { - if mnemonic != "" { - err := c.RecoverKey(ctx, keyName, mnemonic) - if err != nil { - return nil, err - } - } else { - // Create new account - err := c.CreateKey(ctx, keyName) - if err != nil { - return nil, err - } - } - - address, err := c.GetAddress(ctx, keyName) - if err != nil { - return nil, err - } - return NewWallet(keyName, string(address)), nil -} - -func (c *UtxoChain) Stop() { - c.cancel() -} diff --git a/chain/utxo/wallet.go b/chain/utxo/wallet.go deleted file mode 100644 index 2512b2e2..00000000 --- a/chain/utxo/wallet.go +++ /dev/null @@ -1,114 +0,0 @@ -package utxo - -import ( - "fmt" - "sync" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -var _ ibc.Wallet = &UtxoWallet{} - -type UtxoWallet struct { - address string - keyName string -} - -func NewWallet(keyname string, address string) ibc.Wallet { - return &UtxoWallet{ - address: address, - keyName: keyname, - } -} - -func (w *UtxoWallet) KeyName() string { - return w.keyName -} - -// Get formatted address, passing in a prefix. -func (w *UtxoWallet) FormattedAddress() string { - return w.address -} - -// Get mnemonic, only used for relayer wallets. -func (w *UtxoWallet) Mnemonic() string { - return "" -} - -// Get Address with chain's prefix. -func (w *UtxoWallet) Address() []byte { - return []byte(w.address) -} - -type NodeWallet struct { - keyName string - address string - mu sync.Mutex - txLock sync.Mutex - loadCount int - ready bool -} - -func (c *UtxoChain) getWalletForNewAddress(keyName string) (*NodeWallet, error) { - c.MapAccess.Lock() - defer c.MapAccess.Unlock() - wallet, found := c.KeyNameToWalletMap[keyName] - if c.WalletVersion >= noDefaultKeyWalletVersion { - if !found { - return nil, fmt.Errorf("wallet keyname (%s) not found, has it been created?", keyName) - } - if wallet.address != "" { - return nil, fmt.Errorf("wallet keyname (%s) already has an address", keyName) - } - } - - if c.WalletVersion < noDefaultKeyWalletVersion { - if found { - return nil, fmt.Errorf("wallet keyname (%s) already has an address", keyName) - } else { - wallet = &NodeWallet{ - keyName: keyName, - } - c.KeyNameToWalletMap[keyName] = wallet - } - } - - return wallet, nil -} - -func (c *UtxoChain) getWalletForSetAccount(keyName string, addr string) (*NodeWallet, error) { - c.MapAccess.Lock() - defer c.MapAccess.Unlock() - wallet, found := c.KeyNameToWalletMap[keyName] - if !found { - return nil, fmt.Errorf("wallet keyname (%s) not found, get new address not called", keyName) - } - if wallet.address != addr { - return nil, fmt.Errorf("wallet keyname (%s) is associated with address (%s), not (%s)", keyName, wallet.address, addr) - } - return wallet, nil -} - -func (c *UtxoChain) getWalletForUse(keyName string) (*NodeWallet, error) { - wallet, err := c.getWallet(keyName) - if err != nil { - return nil, err - } - // Verifies wallet has expected state on node - // For chain without wallet support, GetNewAddress() and SetAccount() must be called. - // For chains with wallet support, CreateWallet() and GetNewAddress() must be called. - if !wallet.ready { - return nil, fmt.Errorf("wallet keyname (%s) is not ready for use, check creation steps", keyName) - } - return wallet, nil -} - -func (c *UtxoChain) getWallet(keyName string) (*NodeWallet, error) { - c.MapAccess.Lock() - defer c.MapAccess.Unlock() - wallet, found := c.KeyNameToWalletMap[keyName] - if !found { - return nil, fmt.Errorf("wallet keyname (%s) not found", keyName) - } - return wallet, nil -} diff --git a/chainfactory.go b/chainfactory.go index 8ed07136..c6023f39 100644 --- a/chainfactory.go +++ b/chainfactory.go @@ -14,10 +14,6 @@ import ( "github.com/cosmos/interchaintest/v10/chain/cosmos" "github.com/cosmos/interchaintest/v10/chain/ethereum/foundry" "github.com/cosmos/interchaintest/v10/chain/ethereum/geth" - "github.com/cosmos/interchaintest/v10/chain/namada" - "github.com/cosmos/interchaintest/v10/chain/penumbra" - "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/utxo" "github.com/cosmos/interchaintest/v10/ibc" ) @@ -137,8 +133,6 @@ func buildChain(log *zap.Logger, testName string, cfg ibc.ChainConfig, numValida switch cfg.Type { case ibc.Cosmos: return cosmos.NewCosmosChain(testName, cfg, nv, nf, log), nil - case ibc.Penumbra: - return penumbra.NewPenumbraChain(log, testName, cfg, nv, nf), nil case ibc.Ethereum: switch cfg.Bin { case "anvil": @@ -148,12 +142,6 @@ func buildChain(log *zap.Logger, testName string, cfg ibc.ChainConfig, numValida default: return nil, fmt.Errorf("unknown binary: %s for ethereum chain type, must be anvil or geth", cfg.Bin) } - case ibc.Thorchain: - return thorchain.NewThorchain(testName, cfg, nv, nf, log), nil - case ibc.UTXO: - return utxo.NewUtxoChain(testName, cfg, log), nil - case ibc.Namada: - return namada.NewNamadaChain(testName, cfg, nv, nf, log), nil default: return nil, fmt.Errorf("unexpected error, unknown chain type: %s for chain: %s", cfg.Type, cfg.Name) } diff --git a/chainspec_test.go b/chainspec_test.go index 45216de3..3d0702a7 100644 --- a/chainspec_test.go +++ b/chainspec_test.go @@ -1,7 +1,6 @@ package interchaintest_test import ( - "regexp" "testing" "github.com/google/go-cmp/cmp" diff --git a/dockerutil/image.go b/dockerutil/image.go index cf61c437..9ad7126c 100644 --- a/dockerutil/image.go +++ b/dockerutil/image.go @@ -130,7 +130,7 @@ func (image *Image) imageRef() string { // EnsurePulled can only pull public images. func (image *Image) EnsurePulled(ctx context.Context) error { ref := image.imageRef() - _, _, err := image.client.ImageInspectWithRaw(ctx, ref) + _, _, err := image.client.ImageInspectWithRaw(ctx, ref) // nolint:staticcheck // continue using deprecated if err != nil { rc, err := image.client.ImagePull(ctx, ref, dockerimage.PullOptions{}) if err != nil { diff --git a/dockerutil/strings.go b/dockerutil/strings.go index 8921b343..c154ac21 100644 --- a/dockerutil/strings.go +++ b/dockerutil/strings.go @@ -18,7 +18,7 @@ const ( // GetHostPort returns a resource's published port with an address. // cont is the type returned by the Docker client's ContainerInspect method. -func GetHostPort(cont types.ContainerJSON, portID string) string { +func GetHostPort(cont types.ContainerJSON, portID string) string { // nolint:staticcheck // continue using deprecated if cont.NetworkSettings == nil { return "" } diff --git a/dockerutil/strings_test.go b/dockerutil/strings_test.go index fccc096b..3ff617fa 100644 --- a/dockerutil/strings_test.go +++ b/dockerutil/strings_test.go @@ -11,14 +11,14 @@ import ( func TestGetHostPort(t *testing.T) { for _, tt := range []struct { - Container types.ContainerJSON + Container types.ContainerJSON // nolint:staticcheck // continue using deprecated PortID string Want string }{ { - types.ContainerJSON{ - NetworkSettings: &types.NetworkSettings{ - NetworkSettingsBase: types.NetworkSettingsBase{ + types.ContainerJSON{ // nolint:staticcheck // continue using deprecated + NetworkSettings: &types.NetworkSettings{ // nolint:staticcheck // continue using deprecated + NetworkSettingsBase: types.NetworkSettingsBase{ // nolint:staticcheck // continue using deprecated Ports: nat.PortMap{ nat.Port("test"): []nat.PortBinding{ {HostIP: "1.2.3.4", HostPort: "8080"}, @@ -30,9 +30,9 @@ func TestGetHostPort(t *testing.T) { }, "test", "1.2.3.4:8080", }, { - types.ContainerJSON{ - NetworkSettings: &types.NetworkSettings{ - NetworkSettingsBase: types.NetworkSettingsBase{ + types.ContainerJSON{ // nolint:staticcheck // continue using deprecated + NetworkSettings: &types.NetworkSettings{ // nolint:staticcheck // continue using deprecated + NetworkSettingsBase: types.NetworkSettingsBase{ // nolint:staticcheck // continue using deprecated Ports: nat.PortMap{ nat.Port("test"): []nat.PortBinding{ {HostIP: "0.0.0.0", HostPort: "3000"}, @@ -43,8 +43,8 @@ func TestGetHostPort(t *testing.T) { }, "test", "0.0.0.0:3000", }, - {types.ContainerJSON{}, "", ""}, - {types.ContainerJSON{NetworkSettings: &types.NetworkSettings{}}, "does-not-matter", ""}, + {types.ContainerJSON{}, "", ""}, // nolint:staticcheck // continue using deprecated + {types.ContainerJSON{NetworkSettings: &types.NetworkSettings{}}, "does-not-matter", ""}, // nolint:staticcheck // continue using deprecated } { require.Equal(t, tt.Want, GetHostPort(tt.Container, tt.PortID), tt) } diff --git a/examples/cosmos/chain_core_test.go b/examples/cosmos/chain_core_test.go index 0a97a295..61afc912 100644 --- a/examples/cosmos/chain_core_test.go +++ b/examples/cosmos/chain_core_test.go @@ -59,6 +59,8 @@ var ( ) func TestCoreSDKCommands(t *testing.T) { + t.Parallel() + if testing.Short() { t.Skip("skipping in short mode") } @@ -161,6 +163,8 @@ func TestCoreSDKCommands(t *testing.T) { } func testAuth(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + // get gov address govAddr, err := chain.AuthQueryModuleAddress(ctx, "gov") require.NoError(t, err) @@ -204,6 +208,8 @@ func testAuth(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { // testUpgrade test the queries for upgrade information. Actual upgrades take place in other test. func testUpgrade(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + v, err := chain.UpgradeQueryAllModuleVersions(ctx) require.NoError(t, err) require.NotEmpty(t, v) @@ -222,6 +228,8 @@ func testUpgrade(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { } func testAuthz(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + granter := users[0].FormattedAddress() grantee := users[1].FormattedAddress() @@ -233,7 +241,7 @@ func testAuthz(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, use grants, err := chain.AuthzQueryGrants(ctx, granter, grantee, "") require.NoError(t, err) require.Len(t, grants, 1) - require.EqualValues(t, "/cosmos.authz.v1beta1.GenericAuthorization", grants[0].Authorization.TypeUrl) + require.Equal(t, "/cosmos.authz.v1beta1.GenericAuthorization", grants[0].Authorization.TypeUrl) require.Contains(t, string(grants[0].Authorization.Value), "/cosmos.bank.v1beta1.MsgSend") byGrantee, err := chain.AuthzQueryGrantsByGrantee(ctx, grantee, "") @@ -248,11 +256,11 @@ func testAuthz(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, use require.Equal(t, byGranter[0].Granter, granter) require.Equal(t, byGranter[0].Grantee, grantee) - fmt.Printf("grants: %+v %+v %+v\n", grants, byGrantee, byGranter) + t.Logf("grants: %+v %+v %+v\n", grants, byGrantee, byGranter) balanceBefore, err := chain.GetBalance(ctx, granter, chain.Config().Denom) require.NoError(t, err) - fmt.Printf("balanceBefore: %+v\n", balanceBefore) + t.Logf("balanceBefore: %+v\n", balanceBefore) sendAmt := 1234 @@ -275,11 +283,13 @@ func testAuthz(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, use balanceAfter, err := chain.GetBalance(ctx, granter, chain.Config().Denom) require.NoError(t, err) - fmt.Printf("balanceAfter: %+v\n", balanceAfter) + t.Logf("balanceAfter: %+v\n", balanceAfter) require.Equal(t, balanceBefore.SubRaw(int64(sendAmt)), balanceAfter) } func testBank(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + user0 := users[0].FormattedAddress() user1 := users[1].FormattedAddress() user2 := users[2].FormattedAddress() @@ -359,6 +369,8 @@ func testBank(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, user } func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + var err error node := chain.GetNode() acc := authtypes.NewModuleAddress("distribution") @@ -366,7 +378,7 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha vals, err := chain.StakingQueryValidators(ctx, stakingtypes.Bonded.String()) require.NoError(err) - fmt.Printf("validators: %+v\n", vals) + t.Logf("validators: %+v\n", vals) del, err := chain.StakingQueryDelegationsTo(ctx, vals[0].OperatorAddress) require.NoError(err) @@ -383,7 +395,7 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha valDistInfo, err := chain.DistributionQueryValidatorDistributionInfo(ctx, valAddr) require.NoError(err) - fmt.Printf("valDistInfo: %+v\n", valDistInfo) + t.Logf("valDistInfo: %+v\n", valDistInfo) require.Equal(1, valDistInfo.Commission.Len()) valOutRewards, err := chain.DistributionQueryValidatorOutstandingRewards(ctx, valAddr) @@ -405,21 +417,21 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha before, err := chain.BankQueryBalance(ctx, acc.String(), chain.Config().Denom) require.NoError(err) - fmt.Printf("before: %+v\n", before) + t.Logf("before: %+v\n", before) err = node.DistributionWithdrawAllRewards(ctx, users[2].KeyName()) require.NoError(err) after, err := chain.BankQueryBalance(ctx, acc.String(), chain.Config().Denom) require.NoError(err) - fmt.Printf("after: %+v\n", after) + t.Logf("after: %+v\n", after) require.True(after.GT(before)) }) t.Run("fund-pools", func(t *testing.T) { bal, err := chain.BankQueryBalance(ctx, acc.String(), chain.Config().Denom) require.NoError(err) - fmt.Printf("CP balance: %+v\n", bal) + t.Logf("CP balance: %+v\n", bal) amount := uint64(9_000 * math.Pow10(6)) @@ -431,7 +443,7 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha bal2, err := chain.BankQueryBalance(ctx, acc.String(), chain.Config().Denom) require.NoError(err) - fmt.Printf("New CP balance: %+v\n", bal2) // 9147579661 + t.Logf("New CP balance: %+v\n", bal2) // 9147579661 require.True(bal2.Sub(bal).GT(sdkmath.NewInt(int64(amount)))) @@ -468,6 +480,8 @@ func testDistribution(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha } func testFeeGrant(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + var err error node := chain.GetNode() @@ -482,7 +496,7 @@ func testFeeGrant(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, g, err := chain.FeeGrantQueryAllowance(ctx, granter.FormattedAddress(), grantee.FormattedAddress()) require.NoError(t, err) - fmt.Printf("g: %+v\n", g) + t.Logf("g: %+v\n", g) require.Equal(t, granter.FormattedAddress(), g.Granter) require.Equal(t, grantee.FormattedAddress(), g.Grantee) require.Equal(t, "/cosmos.feegrant.v1beta1.AllowedMsgAllowance", g.Allowance.TypeUrl) @@ -527,6 +541,8 @@ func testFeeGrant(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, } func testGov(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + node := chain.GetNode() govModule := "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn" @@ -556,7 +572,7 @@ func testGov(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users v, err := chain.GovQueryVote(ctx, 1, users[0].FormattedAddress()) require.NoError(t, err) - require.EqualValues(t, govv1.VoteOption_VOTE_OPTION_YES, v.Options[0].Option) + require.Equal(t, govv1.VoteOption_VOTE_OPTION_YES, v.Options[0].Option) // pass vote with all validators err = chain.VoteOnProposalAllValidators(ctx, 1, "yes") @@ -576,6 +592,8 @@ func testGov(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users } func testSlashing(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + p, err := chain.SlashingQueryParams(ctx) require.NoError(t, err) require.NotNil(t, p) @@ -590,6 +608,8 @@ func testSlashing(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) } func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + vals, err := chain.StakingQueryValidators(ctx, stakingtypes.Bonded.String()) require.NoError(t, err) require.NotEmpty(t, vals) @@ -640,7 +660,7 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u height, err := chain.Height(ctx) require.NoError(t, err) - searchHeight := int64(height - 1) + searchHeight := height - 1 hi, err := chain.StakingQueryHistoricalInfo(ctx, searchHeight) require.NoError(t, err) @@ -698,6 +718,7 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u } func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, admin ibc.Wallet) { + t.Helper() t.Parallel() var err error @@ -716,7 +737,7 @@ func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, a res, err := chain.AuthQueryAccount(ctx, acc) require.NoError(t, err) require.Equal(t, "/cosmos.vesting.v1beta1.ContinuousVestingAccount", res.TypeUrl) - chain.AuthPrintAccountInfo(chain, res) + _ = chain.AuthPrintAccountInfo(chain, res) }) t.Run("perm locked account", func(t *testing.T) { @@ -728,7 +749,7 @@ func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, a res, err := chain.AuthQueryAccount(ctx, acc) require.NoError(t, err) require.Equal(t, "/cosmos.vesting.v1beta1.PermanentLockedAccount", res.TypeUrl) - chain.AuthPrintAccountInfo(chain, res) + _ = chain.AuthPrintAccountInfo(chain, res) }) t.Run("periodic account", func(t *testing.T) { @@ -756,13 +777,13 @@ func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, a res, err := chain.AuthQueryAccount(ctx, acc) require.NoError(t, err) require.Equal(t, "/cosmos.vesting.v1beta1.PeriodicVestingAccount", res.TypeUrl) - chain.AuthPrintAccountInfo(chain, res) + _ = chain.AuthPrintAccountInfo(chain, res) }) t.Run("Base Account", func(t *testing.T) { res, err := chain.AuthQueryAccount(ctx, admin.FormattedAddress()) require.NoError(t, err) require.Equal(t, "/cosmos.auth.v1beta1.BaseAccount", res.TypeUrl) - chain.AuthPrintAccountInfo(chain, res) + _ = chain.AuthPrintAccountInfo(chain, res) }) } diff --git a/examples/cosmos/chain_export_test.go b/examples/cosmos/chain_export_test.go index b96bd196..3ea6a2dc 100644 --- a/examples/cosmos/chain_export_test.go +++ b/examples/cosmos/chain_export_test.go @@ -28,7 +28,9 @@ func TestJunoStateExport(t *testing.T) { HaltChainAndExportGenesis(ctx, t, chain, nil, 3) } -func HaltChainAndExportGenesis(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, relayer ibc.Relayer, haltHeight int64) { +func HaltChainAndExportGenesis(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, _ ibc.Relayer, haltHeight int64) { + t.Helper() + timeoutCtx, timeoutCtxCancel := context.WithTimeout(ctx, time.Minute*2) defer timeoutCtxCancel() @@ -38,7 +40,7 @@ func HaltChainAndExportGenesis(ctx context.Context, t *testing.T, chain *cosmos. err = chain.StopAllNodes(ctx) require.NoError(t, err, "error stopping node(s)") - state, err := chain.ExportState(ctx, int64(haltHeight)) + state, err := chain.ExportState(ctx, haltHeight) require.NoError(t, err, "error exporting state") appToml := make(testutil.Toml) diff --git a/examples/cosmos/chain_miscellaneous_test.go b/examples/cosmos/chain_miscellaneous_test.go index 06d8f495..44ae20f7 100644 --- a/examples/cosmos/chain_miscellaneous_test.go +++ b/examples/cosmos/chain_miscellaneous_test.go @@ -2,7 +2,6 @@ package cosmos_test import ( "context" - "fmt" "testing" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" @@ -104,6 +103,8 @@ func wasmEncoding() *testutil.TestEncodingConfig { } func testBuildDependencies(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + deps := chain.Validators[0].GetBuildInformation(ctx) require.Equal(t, "juno", deps.Name) @@ -111,7 +112,6 @@ func testBuildDependencies(ctx context.Context, t *testing.T, chain *cosmos.Cosm require.Equal(t, "netgo muslc,", deps.BuildTags) for _, dep := range deps.BuildDeps { - // Verify specific examples switch dep.Parent { case "github.com/cosmos/cosmos-sdk": @@ -135,6 +135,8 @@ func testBuildDependencies(ctx context.Context, t *testing.T, chain *cosmos.Cosm } func testFailedCWExecute(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + user := users[0] keyName := user.KeyName() @@ -151,12 +153,14 @@ func testFailedCWExecute(ctx context.Context, t *testing.T, chain *cosmos.Cosmos // execute on the contract with the wrong message (err) txResp, err := chain.ExecuteContract(ctx, keyName, contractAddr, `{"not_a_func":{}}`) require.Error(t, err) - fmt.Printf("txResp.RawLog: %+v\n", txResp.RawLog) - fmt.Printf("err: %+v\n", err) + t.Logf("txResp.RawLog: %+v\n", txResp.RawLog) + t.Logf("err: %+v\n", err) require.Contains(t, err.Error(), "failed to execute message") } func testWalletKeys(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + // create a general key randKey := "randkey123" err := chain.CreateKey(ctx, randKey) @@ -193,6 +197,8 @@ func testWalletKeys(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain } func testSendingTokens(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + _, err := chain.GetBalance(ctx, users[0].FormattedAddress(), chain.Config().Denom) require.NoError(t, err) b2, err := chain.GetBalance(ctx, users[1].FormattedAddress(), chain.Config().Denom) @@ -209,6 +215,8 @@ func testSendingTokens(ctx context.Context, t *testing.T, chain *cosmos.CosmosCh } func testFindTxs(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + height, _ := chain.Height(ctx) _, err := sendTokens(ctx, chain, users[0], users[1], "", 1) @@ -221,6 +229,8 @@ func testFindTxs(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u } func testPollForBalance(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + bal2, err := chain.GetBalance(ctx, users[1].FormattedAddress(), chain.Config().Denom) require.NoError(t, err) @@ -245,6 +255,8 @@ func testPollForBalance(ctx context.Context, t *testing.T, chain *cosmos.CosmosC } func testRangeBlockMessages(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + height, _ := chain.Height(ctx) _, err := sendTokens(ctx, chain, users[0], users[1], "", 1) @@ -262,13 +274,17 @@ func testRangeBlockMessages(ctx context.Context, t *testing.T, chain *cosmos.Cos } func testAddingNode(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + // This should be tested last or else Txs will fail on the new full node. nodesAmt := len(chain.Nodes()) - chain.AddFullNodes(ctx, nil, 1) + _ = chain.AddFullNodes(ctx, nil, 1) require.Len(t, chain.Nodes(), nodesAmt+1) } func testBroadcaster(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + from := users[0].FormattedAddress() addr1 := "juno190g5j8aszqhvtg7cprmev8xcxs6csra7xnk3n3" addr2 := "juno1a53udazy8ayufvy0s434pfwjcedzqv34q7p7vj" @@ -301,7 +317,7 @@ func testBroadcaster(ctx context.Context, t *testing.T, chain *cosmos.CosmosChai ) require.NoError(t, err) require.NotEmpty(t, txResp.TxHash) - fmt.Printf("txResp: %+v\n", txResp) + t.Logf("txResp: %+v\n", txResp) updatedBal1, err := chain.GetBalance(ctx, addr1, chain.Config().Denom) require.NoError(t, err) @@ -324,6 +340,8 @@ func testBroadcaster(ctx context.Context, t *testing.T, chain *cosmos.CosmosChai } func testQueryCmd(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + tn := chain.Validators[0] stdout, stderr, err := tn.ExecQuery(ctx, "slashing", "params") require.NoError(t, err) @@ -332,6 +350,8 @@ func testQueryCmd(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) } func testHasCommand(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + tn := chain.Validators[0] res := tn.HasCommand(ctx, "query") require.True(t, res) @@ -354,6 +374,8 @@ func testHasCommand(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain } func testTokenFactory(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + user := users[0] user2 := users[1] @@ -417,6 +439,8 @@ func testTokenFactory(ctx context.Context, t *testing.T, chain *cosmos.CosmosCha } func testGetGovernanceAddress(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain) { + t.Helper() + govAddr, err := chain.GetGovernanceAddress(ctx) require.NoError(t, err) _, err = chain.AccAddressFromBech32(govAddr) @@ -424,6 +448,8 @@ func testGetGovernanceAddress(ctx context.Context, t *testing.T, chain *cosmos.C } func testTXFailsOnBlockInclusion(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + // this isn't a real validator, but is well formed, so it will only fail once a validator checks the staking transaction fakeValoper, err := chain.GetNode().KeyBech32(ctx, users[0].KeyName(), "val") require.NoError(t, err) @@ -434,6 +460,8 @@ func testTXFailsOnBlockInclusion(ctx context.Context, t *testing.T, chain *cosmo } func testTXEncodeDecode(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users []ibc.Wallet) { + t.Helper() + generate := chain.GetNode().TxCommand(users[0].KeyName(), "bank", "send", users[0].FormattedAddress(), users[1].FormattedAddress(), "1"+chain.Config().Denom, "--generate-only") txJson, _, err := chain.GetNode().Exec(ctx, generate, nil) require.NoError(t, err) @@ -464,8 +492,8 @@ func testTXEncodeDecode(ctx context.Context, t *testing.T, chain *cosmos.CosmosC } // helpers. -func sendTokens(ctx context.Context, chain *cosmos.CosmosChain, from, to ibc.Wallet, token string, amount int64) (ibc.WalletAmount, error) { - if token == "" { // nolint:unparam +func sendTokens(ctx context.Context, chain *cosmos.CosmosChain, from, to ibc.Wallet, token string, amount int64) (ibc.WalletAmount, error) { // nolint:unparam + if token == "" { token = chain.Config().Denom } @@ -479,6 +507,8 @@ func sendTokens(ctx context.Context, chain *cosmos.CosmosChain, from, to ibc.Wal } func validateBalance(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, user ibc.Wallet, tfDenom string, expected int64) { + t.Helper() + balance, err := chain.GetBalance(ctx, user.FormattedAddress(), tfDenom) require.NoError(t, err) require.Equal(t, balance, math.NewInt(expected)) diff --git a/examples/cosmos/chain_param_change_test.go b/examples/cosmos/chain_param_change_test.go index 940f22d8..f76ee963 100644 --- a/examples/cosmos/chain_param_change_test.go +++ b/examples/cosmos/chain_param_change_test.go @@ -22,6 +22,8 @@ func TestJunoParamChange(t *testing.T) { } func CosmosChainParamChangeTest(t *testing.T, name, version string) { + t.Helper() + if testing.Short() { t.Skip("skipping in short mode") } diff --git a/examples/cosmos/chain_upgrade_ibc_test.go b/examples/cosmos/chain_upgrade_ibc_test.go index cef54a19..e0e29d4c 100644 --- a/examples/cosmos/chain_upgrade_ibc_test.go +++ b/examples/cosmos/chain_upgrade_ibc_test.go @@ -38,6 +38,8 @@ func TestGaiaUpgradeIBC(t *testing.T) { } func CosmosChainUpgradeIBCTest(t *testing.T, chainName, initialVersion, upgradeContainerRepo, upgradeVersion string, upgradeName string) { + t.Helper() + if testing.Short() { t.Skip("skipping in short mode") } diff --git a/examples/cosmos/ethermint_test.go b/examples/cosmos/ethermint_test.go index dde4fcc1..903d21c2 100644 --- a/examples/cosmos/ethermint_test.go +++ b/examples/cosmos/ethermint_test.go @@ -151,7 +151,7 @@ func TestEthermintChain(t *testing.T) { require.NoError(t, err) data := []byte(`{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["0x1", null]}`) - resp, err := http.Post(evmJsonRpcUrl, "application/json", bytes.NewBuffer(data)) + resp, err := http.Post(evmJsonRpcUrl, "application/json", bytes.NewBuffer(data)) // nolint:gosec,noctx // not a security issue for testing require.NoError(t, err) defer resp.Body.Close() diff --git a/examples/cosmos/sdk_boundary_test.go b/examples/cosmos/sdk_boundary_test.go index 61cb9afa..aef0724d 100644 --- a/examples/cosmos/sdk_boundary_test.go +++ b/examples/cosmos/sdk_boundary_test.go @@ -23,12 +23,12 @@ type boundarySpecs struct { } func TestSDKBoundaries(t *testing.T) { + t.Parallel() + if testing.Short() { t.Skip("skipping in short mode") } - t.Parallel() - tests := []boundarySpecs{ { name: "sdk 45 <-> 50", @@ -61,7 +61,6 @@ func TestSDKBoundaries(t *testing.T) { } for _, tt := range tests { - testname := tt.name t.Run(testname, func(t *testing.T) { t.Parallel() diff --git a/examples/ethereum/foundry_test.go b/examples/ethereum/foundry_test.go index e289d33a..584b75ad 100644 --- a/examples/ethereum/foundry_test.go +++ b/examples/ethereum/foundry_test.go @@ -68,7 +68,7 @@ func TestFoundry(t *testing.T) { // BlockDatabaseFile: interchaintest.DefaultBlockDatabaseFilepath(), SkipPathCreation: true, // Skip path creation, so we can have granular control over the process })) - fmt.Println("Interchain built") + t.Log("Interchain built") // Check faucet balance on start faucetAddr := "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" diff --git a/examples/ethereum/geth_test.go b/examples/ethereum/geth_test.go index 4993839a..a97df654 100644 --- a/examples/ethereum/geth_test.go +++ b/examples/ethereum/geth_test.go @@ -56,7 +56,8 @@ func TestGeth(t *testing.T) { NetworkID: network, SkipPathCreation: true, // Skip path creation, so we can have granular control over the process })) - fmt.Println("Interchain built") + + t.Log("Interchain built") // Create and fund a user using GetAndFundTestUsers ethUserInitialAmount := ethereum.ETHER.MulRaw(1000) diff --git a/examples/ibc/client_creation_test.go b/examples/ibc/client_creation_test.go index 97f5709a..9462837a 100644 --- a/examples/ibc/client_creation_test.go +++ b/examples/ibc/client_creation_test.go @@ -24,6 +24,8 @@ type relayerImp struct { } func TestCreatClient(t *testing.T) { + t.Parallel() + if testing.Short() { t.Skip("skipping in short mode") } @@ -42,7 +44,6 @@ func TestCreatClient(t *testing.T) { } for _, tt := range tests { - testname := tt.name t.Run(testname, func(t *testing.T) { t.Parallel() diff --git a/examples/ibc/ics_test.go b/examples/ibc/ics_test.go index 466faf86..cdddd68e 100644 --- a/examples/ibc/ics_test.go +++ b/examples/ibc/ics_test.go @@ -44,7 +44,6 @@ func TestICS(t *testing.T) { relayers := []relayerTypes{{rly: ibc.CosmosRly, name: "rly"}} for _, version := range icsVersions { - testName := "ics_" + strings.ReplaceAll(version, ".", "_") for _, rly := range relayers { @@ -57,6 +56,8 @@ func TestICS(t *testing.T) { } func icsTest(t *testing.T, version string, rly ibc.RelayerImplementation) { + t.Helper() + ctx := context.Background() consumerBechPrefix := "cosmos" diff --git a/examples/namada/namada_chain_test.go b/examples/namada/namada_chain_test.go deleted file mode 100644 index ecdee303..00000000 --- a/examples/namada/namada_chain_test.go +++ /dev/null @@ -1,291 +0,0 @@ -package namada_test - -import ( - "context" - "fmt" - stdmath "math" - "strconv" - "testing" - "time" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" - - "cosmossdk.io/math" - - transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" - - "github.com/cosmos/interchaintest/v10" - namadachain "github.com/cosmos/interchaintest/v10/chain/namada" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/relayer" - "github.com/cosmos/interchaintest/v10/testreporter" -) - -func TestNamadaNetwork(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - t.Parallel() - client, network := interchaintest.DockerSetup(t) - - nv := 2 - fn := 1 - - coinDecimals := namadachain.NamTokenDenom - chains, err := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - {Name: "gaia", Version: "v19.2.0", ChainConfig: ibc.ChainConfig{ - GasPrices: "1uatom", - }}, - { - Name: "namada", - Version: "v1.0.0", - ChainConfig: ibc.ChainConfig{ - ChainID: "namada-test", - Denom: namadachain.NamAddress, - Gas: "50000", - GasPrices: "0.00001", - CoinDecimals: &coinDecimals, - Bin: "namada", - }, - NumValidators: &nv, - NumFullNodes: &fn, - }, - }, - ).Chains(t.Name()) - require.NoError(t, err, "failed to get namada chain") - chain := chains[0] - namada := chains[1].(*namadachain.NamadaChain) - - // Relayer Factory - r := interchaintest.NewBuiltinRelayerFactory(ibc.Hermes, zaptest.NewLogger(t), - relayer.CustomDockerImage( - "ghcr.io/informalsystems/hermes", - "luca_joss-test-namada-docker-action@sha256:3bae7e68fe76647d5dba19982d01d4c33e2eebef17e3506da17129f4e9483b11", - "2000:2000", - )). - Build(t, client, network) - - // Prep Interchain - const ibcPath = "namada-ibc-test" - ic := interchaintest.NewInterchain(). - AddChain(chain). - AddChain(namada). - AddRelayer(r, "relayer"). - AddLink(interchaintest.InterchainLink{ - Chain1: chain, - Chain2: namada, - Relayer: r, - Path: ibcPath, - }) - - // Log location - f, err := interchaintest.CreateLogFile(fmt.Sprintf("%d.json", time.Now().Unix())) - require.NoError(t, err) - // Reporter/logs - rep := testreporter.NewReporter(f) - eRep := rep.RelayerExecReporter(t) - - ctx := context.Background() - - // Build interchain - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: false, - })) - - t.Cleanup(func() { - err := ic.Close() - if err != nil { - panic(err) - } - }) - - initBalance := math.NewInt(1_000_000) - - gasSpent, _ := strconv.ParseFloat(namada.Config().Gas, 64) - gasPrice, _ := strconv.ParseFloat(namada.Config().GasPrices, 64) - tokenDenomVal := stdmath.Pow(10, float64(*namada.Config().CoinDecimals)) - // GasSpent should be an integer - namadaGasSpent := math.NewInt(int64(gasSpent * gasPrice * tokenDenomVal)) - tokenDenom := math.NewInt(int64(tokenDenomVal)) - namadaInitBalance := initBalance.Mul(tokenDenom) - - users := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chain, namada) - chainUser := users[0] - namadaUser := users[1] - - chainUserBalInitial, err := chain.GetBalance(ctx, chainUser.FormattedAddress(), chain.Config().Denom) - require.NoError(t, err) - require.True(t, chainUserBalInitial.Equal(initBalance)) - - namadaUserBalInitial, err := namada.GetBalance(ctx, namadaUser.KeyName(), namada.Config().Denom) - require.NoError(t, err) - require.True(t, namadaUserBalInitial.Equal(namadaInitBalance)) - - // Get Channel ID - chainChannelInfo, err := r.GetChannels(ctx, eRep, chain.Config().ChainID) - require.NoError(t, err) - chainChannelID := chainChannelInfo[0].ChannelID - namadaChannelInfo, err := r.GetChannels(ctx, eRep, namada.Config().ChainID) - require.NoError(t, err) - namadaChannelID := namadaChannelInfo[0].ChannelID - - // 1. Send Transaction from the chain to Namada - amountToSend := math.NewInt(1) - dstAddress := namadaUser.FormattedAddress() - transfer := ibc.WalletAmount{ - Address: dstAddress, - Denom: chain.Config().Denom, - Amount: amountToSend, - } - tx, err := chain.SendIBCTransfer(ctx, chainChannelID, chainUser.KeyName(), transfer, ibc.TransferOptions{}) - require.NoError(t, err) - require.NoError(t, tx.Validate()) - - // relay packets - require.NoError(t, r.Flush(ctx, eRep, ibcPath, chainChannelID)) - - // test source wallet has decreased funds - expectedBal := chainUserBalInitial.Sub(amountToSend).Sub(math.NewInt(tx.GasSpent)) - chainUserBalAfter1, err := chain.GetBalance(ctx, chainUser.FormattedAddress(), chain.Config().Denom) - require.NoError(t, err) - require.True(t, chainUserBalAfter1.Equal(expectedBal)) - - // Test destination wallet has increased funds - dstIbcTrace := transfertypes.NewDenom(chain.Config().Denom, transfertypes.NewHop("transfer", namadaChannelID)) - namadaUserIbcBalAfter1, err := namada.GetBalance(ctx, namadaUser.KeyName(), dstIbcTrace.IBCDenom()) - require.NoError(t, err) - require.True(t, namadaUserIbcBalAfter1.Equal(amountToSend)) - - // 2. Send Transaction from Namada to the chain - amountToSend = math.NewInt(1) - dstAddress = chainUser.FormattedAddress() - transfer = ibc.WalletAmount{ - Address: dstAddress, - Denom: namada.Config().Denom, - Amount: amountToSend, - } - tx, err = namada.SendIBCTransfer(ctx, namadaChannelID, namadaUser.KeyName(), transfer, ibc.TransferOptions{}) - require.NoError(t, err) - require.NoError(t, tx.Validate()) - - // relay packets - require.NoError(t, r.Flush(ctx, eRep, ibcPath, namadaChannelID)) - - // test source wallet has decreased funds - expectedBal = namadaUserBalInitial.Sub(amountToSend.Mul(tokenDenom)).Sub(namadaGasSpent) - namadaUserBalAfter2, err := namada.GetBalance(ctx, namadaUser.KeyName(), namada.Config().Denom) - require.NoError(t, err) - require.True(t, namadaUserBalAfter2.Equal(expectedBal)) - - // test destination wallet has increased funds - srcDenomTrace := transfertypes.NewDenom(namada.Config().Denom, transfertypes.NewHop("transfer", chainChannelID)) - dstIbcDenom := srcDenomTrace.IBCDenom() - chainUserIbcBalAfter2, err := chain.GetBalance(ctx, chainUser.FormattedAddress(), dstIbcDenom) - require.NoError(t, err) - require.True(t, chainUserIbcBalAfter2.Equal(amountToSend.Mul(tokenDenom))) - - // 3. Shielding transfer (chain -> Namada's shielded account) test - // generate a shielded account - users = interchaintest.GetAndFundTestUsers(t, ctx, "shielded", initBalance, namada) - namadaShieldedUser := users[0].(*namadachain.NamadaWallet) - namadaShieldedUserBalInitial, err := namada.GetBalance(ctx, namadaShieldedUser.KeyName(), namada.Config().Denom) - require.NoError(t, err) - require.True(t, namadaShieldedUserBalInitial.Equal(namadaInitBalance)) - - amountToSend = math.NewInt(1) - destAddress, err := namada.GetAddress(ctx, namadaShieldedUser.PaymentAddressKeyName()) - require.NoError(t, err) - transfer = ibc.WalletAmount{ - Address: string(destAddress), - Denom: chain.Config().Denom, - Amount: amountToSend, - } - // generate the IBC shielding transfer from the destination Namada - shieldedTransfer, err := namada.GenIbcShieldingTransfer(ctx, namadaChannelID, transfer, ibc.TransferOptions{}) - require.NoError(t, err) - - // replace the destination address with the MASP address - // because it has been already set in the IBC shielding transfer - transfer.Address = namadachain.MaspAddress - tx, err = chain.SendIBCTransfer(ctx, chainChannelID, chainUser.KeyName(), transfer, ibc.TransferOptions{ - Memo: shieldedTransfer, - }) - require.NoError(t, err) - require.NoError(t, tx.Validate()) - - // relay packets - require.NoError(t, r.Flush(ctx, eRep, ibcPath, chainChannelID)) - - // test source wallet has decreased funds - expectedBal = chainUserBalAfter1.Sub(amountToSend).Sub(math.NewInt(tx.GasSpent)) - chainUserBalAfter3, err := chain.GetBalance(ctx, chainUser.FormattedAddress(), chain.Config().Denom) - require.NoError(t, err) - require.True(t, chainUserBalAfter3.Equal(expectedBal)) - - // test destination wallet has increased funds - dstIbcTrace = transfertypes.NewDenom(chain.Config().Denom, transfertypes.NewHop("transfer", namadaChannelID)) - namadaShieldedUserIbcBalAfter3, err := namada.GetBalance(ctx, namadaShieldedUser.KeyName(), dstIbcTrace.IBCDenom()) - require.NoError(t, err) - require.True(t, namadaShieldedUserIbcBalAfter3.Equal(amountToSend)) - - // 4. Shielded transfer (Shielded account 1 -> Shielded account 2) on Namada - // generate another shielded account - users = interchaintest.GetAndFundTestUsers(t, ctx, "shielded", initBalance, namada) - namadaShieldedUser2 := users[0].(*namadachain.NamadaWallet) - namadaShieldedUser2BalInitial, err := namada.GetBalance(ctx, namadaShieldedUser2.KeyName(), namada.Config().Denom) - require.NoError(t, err) - require.True(t, namadaShieldedUser2BalInitial.Equal(namadaInitBalance)) - - amountToSend = math.NewInt(1) - transfer = ibc.WalletAmount{ - Address: namadaShieldedUser2.FormattedAddress(), - Denom: dstIbcTrace.IBCDenom(), - Amount: amountToSend, - } - err = namada.ShieldedTransfer(ctx, namadaShieldedUser.KeyName(), transfer) - require.NoError(t, err) - require.NoError(t, tx.Validate()) - - // test source wallet has decreased funds - expectedBal = namadaShieldedUserIbcBalAfter3.Sub(amountToSend) - namadaShieldedUserBalAfter4, err := namada.GetBalance(ctx, namadaShieldedUser.KeyName(), dstIbcTrace.IBCDenom()) - require.NoError(t, err) - require.True(t, namadaShieldedUserBalAfter4.Equal(expectedBal)) - - // test destination wallet has increased funds - namadaShieldedUser2IbcBalAfter4, err := namada.GetBalance(ctx, namadaShieldedUser2.KeyName(), dstIbcTrace.IBCDenom()) - require.NoError(t, err) - require.True(t, namadaShieldedUser2IbcBalAfter4.Equal(amountToSend)) - - // 5. Unshielding transfer (Namada's shielded account 2 -> chain) test - amountToSend = math.NewInt(1) - dstAddress = chainUser.FormattedAddress() - transfer = ibc.WalletAmount{ - Address: dstAddress, - Denom: dstIbcTrace.IBCDenom(), - Amount: amountToSend, - } - tx, err = namada.SendIBCTransfer(ctx, namadaChannelID, namadaShieldedUser2.KeyName(), transfer, ibc.TransferOptions{}) - require.NoError(t, err) - require.NoError(t, tx.Validate()) - - // relay packets - require.NoError(t, r.Flush(ctx, eRep, ibcPath, namadaChannelID)) - - // test source wallet has decreased funds - expectedBal = namadaShieldedUser2IbcBalAfter4.Sub(amountToSend) - namadaShieldedUser2BalAfter5, err := namada.GetBalance(ctx, namadaShieldedUser2.KeyName(), dstIbcTrace.IBCDenom()) - require.NoError(t, err) - require.True(t, namadaShieldedUser2BalAfter5.Equal(expectedBal)) - - // test destination wallet has increased funds - expectedBal = chainUserBalAfter3.Add(amountToSend) - chainUserIbcBalAfter4, err := chain.GetBalance(ctx, chainUser.FormattedAddress(), chain.Config().Denom) - require.NoError(t, err) - require.True(t, chainUserIbcBalAfter4.Equal(expectedBal)) -} diff --git a/examples/penumbra/penumbra_chain_test.go b/examples/penumbra/penumbra_chain_test.go deleted file mode 100644 index 9a472edb..00000000 --- a/examples/penumbra/penumbra_chain_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package penumbra_test - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" - - "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/chain/penumbra" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/cosmos/interchaintest/v10/testutil" -) - -// TestPenumbraNetworkIntegration exercises various facilities of pclientd and is used as a basic integration test -// to assert that interacting with a local Penumbra testnet via pclientd works as intended. -// -// This test case is ported from a Rust integration test found in the Penumbra repo at the link below: -// https://github.com/penumbra-zone/penumbra/blob/45bdbbeefc2f0d3ebf09e2f37d0545d8b1e094d8/crates/bin/pclientd/tests/network_integration.rs -func TestPenumbraNetworkIntegration(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - t.Parallel() - client, network := interchaintest.DockerSetup(t) - - nv := 2 - fn := 0 - - chains, err := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - Name: "penumbra", - Version: "v0.64.1,v0.37.2", - ChainConfig: ibc.ChainConfig{ - ChainID: "penumbra-1", - }, - NumValidators: &nv, - NumFullNodes: &fn, - }, - }, - ).Chains(t.Name()) - require.NoError(t, err, "failed to get penumbra chain") - require.Len(t, chains, 1) - chain := chains[0].(*penumbra.PenumbraChain) - - ic := interchaintest.NewInterchain(). - AddChain(chain) - - ctx := context.Background() - rep := testreporter.NewNopReporter() - - require.NoError(t, ic.Build(ctx, rep.RelayerExecReporter(t), interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: true, - })) - - t.Cleanup(func() { - err := ic.Close() - if err != nil { - panic(err) - } - }) - - initBalance := math.NewInt(1_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chain) - require.Len(t, users, 1) - - alice := users[0] - - err = testutil.WaitForBlocks(ctx, 5, chain) - require.NoError(t, err) - - aliceBal, err := chain.GetBalance(ctx, alice.KeyName(), chain.Config().Denom) - require.NoError(t, err) - require.True(t, aliceBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) - - users = interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chain) - require.Len(t, users, 1) - - bob := users[0] - - err = testutil.WaitForBlocks(ctx, 5, chain) - require.NoError(t, err) - - bobBal, err := chain.GetBalance(ctx, bob.KeyName(), chain.Config().Denom) - require.NoError(t, err) - require.True(t, bobBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", bobBal, initBalance) - - bobAddr, err := chain.GetAddress(ctx, bob.KeyName()) - require.NoError(t, err) - - transfer := ibc.WalletAmount{ - Address: string(bobAddr), - Denom: chain.Config().Denom, - Amount: math.NewInt(1_000), - } - - err = chain.SendFunds(ctx, alice.KeyName(), transfer) - require.NoError(t, err) - - /* - TODO: - without this sleep statement we see intermittent failures where we will observe the tokens taken from alice's balance - but not added to bob's balance. after debugging it seems like this is because alice's client is in sync but bob's is not. - we may need a way to check if each client is in sync before making any assertions about chain state after some state transition. - alternatively, we may want to wrap penumbra related queries in a retry. - */ - time.Sleep(1 * time.Second) - - aliceNewBal, err := chain.GetBalance(ctx, alice.KeyName(), chain.Config().Denom) - require.NoError(t, err) - - bobNewBal, err := chain.GetBalance(ctx, bob.KeyName(), chain.Config().Denom) - require.NoError(t, err) - - aliceExpected := aliceBal.Sub(transfer.Amount) - bobExpected := bobBal.Add(transfer.Amount) - - require.True(t, aliceNewBal.Equal(aliceExpected), "incorrect balance, got (%s) expected (%s)", aliceNewBal, aliceExpected) - require.True(t, bobNewBal.Equal(bobExpected), "incorrect balance, got (%s) expected (%s)", bobNewBal, bobExpected) -} diff --git a/examples/penumbra/penumbra_ibc_test.go b/examples/penumbra/penumbra_ibc_test.go deleted file mode 100644 index 82f4dec6..00000000 --- a/examples/penumbra/penumbra_ibc_test.go +++ /dev/null @@ -1,645 +0,0 @@ -package penumbra - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" - - "cosmossdk.io/math" - - transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types" - - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/chain/penumbra" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/relayer" - "github.com/cosmos/interchaintest/v10/testreporter" - "github.com/cosmos/interchaintest/v10/testutil" -) - -// TestPenumbraToPenumbraIBC asserts that basic IBC functionality works between two Penumbra testnet networks. -// Two instances of Penumbra will be spun up, the relayer will be configured, and an ics-20 token transfer will be -// sent from chainA -> chainB successfully. At the end two more ics-20 transfers will be sent from chainA -> chainB, -// these transfers will time out due to the timeout height and timeout timestamp being reached respectively. -func TestPenumbraToPenumbraIBC(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - t.Parallel() - client, network := interchaintest.DockerSetup(t) - - nv := 1 - fn := 0 - - chains, err := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - Name: "penumbra", - Version: "v0.78.0,v0.37.5", - ChainConfig: ibc.ChainConfig{ - ChainID: "penumbraA-0", - }, - NumValidators: &nv, - NumFullNodes: &fn, - }, - { - Name: "penumbra", - Version: "v0.78.0,v0.37.5", - ChainConfig: ibc.ChainConfig{ - ChainID: "penumbraB-0", - }, - NumValidators: &nv, - NumFullNodes: &fn, - }, - }, - ).Chains(t.Name()) - require.NoError(t, err, "failed to get penumbra chains") - require.Len(t, chains, 2) - - chainA := chains[0].(*penumbra.PenumbraChain) - chainB := chains[1].(*penumbra.PenumbraChain) - - i := ibc.DockerImage{ - Repository: "ghcr.io/cosmos/relayer", - Version: "justin-pen-0.77", - UIDGID: "1025:1025", - } - r := interchaintest.NewBuiltinRelayerFactory( - ibc.CosmosRly, - zaptest.NewLogger(t), - relayer.DockerImage(&i), - relayer.ImagePull(false), - ).Build(t, client, network) - - const pathName = "ab" - - ic := interchaintest.NewInterchain(). - AddChain(chainA). - AddChain(chainB). - AddRelayer(r, "relayer"). - AddLink(interchaintest.InterchainLink{ - Chain1: chainA, - Chain2: chainB, - Relayer: r, - Path: pathName, - CreateClientOpts: ibc.CreateClientOptions{}, - CreateChannelOpts: ibc.CreateChannelOptions{}, - }) - - ctx := context.Background() - rep := testreporter.NewNopReporter() - eRep := rep.RelayerExecReporter(t) - - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: false, - })) - - t.Cleanup(func() { - err := ic.Close() - if err != nil { - panic(err) - } - }) - - // Start the relayer - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - t.Cleanup( - func() { - err := r.StopRelayer(ctx, eRep) - if err != nil { - panic(fmt.Errorf("an error occurred while stopping the relayer: %s", err)) - } - }, - ) - - // Fund users and check init balances - initBalance := math.NewInt(1_000_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainA) - require.Len(t, users, 1) - - alice := users[0] - - err = testutil.WaitForBlocks(ctx, 5, chainA) - require.NoError(t, err) - - aliceBal, err := chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - require.True(t, aliceBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) - - users = interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainB) - require.Len(t, users, 1) - - bob := users[0] - - err = testutil.WaitForBlocks(ctx, 5, chainA) - require.NoError(t, err) - - bobBal, err := chainB.GetBalance(ctx, bob.KeyName(), chainB.Config().Denom) - require.NoError(t, err) - require.True(t, bobBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", bobBal, initBalance) - - // Compose ics-20 transfer details and initialize transfer - bobAddr, err := chainB.GetAddress(ctx, bob.KeyName()) - require.NoError(t, err) - - transferAmount := math.NewInt(1_000_000) - transfer := ibc.WalletAmount{ - Address: string(bobAddr), - Denom: chainA.Config().Denom, - Amount: transferAmount, - } - - abChan, err := ibc.GetTransferChannel(ctx, r, eRep, chainA.Config().ChainID, chainB.Config().ChainID) - require.NoError(t, err) - - h, err := chainB.Height(ctx) - require.NoError(t, err) - - _, err = chainA.SendIBCTransfer(ctx, abChan.ChannelID, alice.KeyName(), transfer, ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: MinuteRoundedTimeNanos(time.Now().Add(time.Duration(6) * time.Hour)), - Height: h + 50, - }, - Memo: "", - }) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 5, chainA) - require.NoError(t, err) - - expectedBal := initBalance.Sub(transferAmount) - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) - - // Compose IBC token denom information for Chain A's native token denom represented on Chain B - ibcDenom := transfertypes.NewDenom(chainA.Config().Denom, transfertypes.NewHop(abChan.Counterparty.PortID, abChan.Counterparty.ChannelID)) - - bobBal, err = chainB.GetBalance(ctx, bob.KeyName(), ibcDenom.IBCDenom()) - require.NoError(t, err) - require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) - - // send ics-20 transfer from chainA -> chainB that will time out due to the timeout timestamp being reached - transfer = ibc.WalletAmount{ - Address: bob.FormattedAddress(), - Denom: chainA.Config().Denom, - Amount: transferAmount, - } - - h, err = chainB.Height(ctx) - require.NoError(t, err) - - err = r.StopRelayer(ctx, eRep) - require.NoError(t, err) - - _, err = chainA.SendIBCTransfer(ctx, abChan.ChannelID, alice.KeyName(), transfer, ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: MinuteRoundedTimeNanos(time.Now().Add(time.Duration(1) * time.Minute)), - Height: h + 5000, // use a large value here so only the timestamp is respected - }, - Memo: "", - }) - require.NoError(t, err) - - // Wait for the packet to time out then restart the relayer. - time.Sleep(130 * time.Second) - - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 10, chainA) - require.NoError(t, err) - - bobBal, err = chainB.GetBalance(ctx, bob.KeyName(), ibcDenom.IBCDenom()) - require.NoError(t, err) - - require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) - - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - - require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) - - // send ics-20 transfer from chainA -> chainB that will time out due to the timeout height being reached - h, err = chainB.Height(ctx) - require.NoError(t, err) - - err = r.StopRelayer(ctx, eRep) - require.NoError(t, err) - - _, err = chainA.SendIBCTransfer(ctx, abChan.ChannelID, alice.KeyName(), transfer, ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: MinuteRoundedTimeNanos(time.Now().Add(time.Duration(100) * time.Minute)), // use a large value here so only height is respected - Height: h + 5, - }, - Memo: "", - }) - require.NoError(t, err) - - // Wait for the packet to time out then restart the relayer. - err = testutil.WaitForBlocks(ctx, 7, chainA) - require.NoError(t, err) - - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 10, chainA) - require.NoError(t, err) - - bobBal, err = chainB.GetBalance(ctx, bob.KeyName(), ibcDenom.IBCDenom()) - require.NoError(t, err) - - require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) - - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - - require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) -} - -// TestPenumbraToPenumbraIBC asserts that basic IBC functionality works between Penumbra and Cosmos testnet networks. -// An instance of Penumbra and a basic Cosmos network will be spun up, the go-relayer will be configured, -// and an ics-20 token transfer will be conducted from Penumbra -> Cosmos and then back from Cosmos -> Penumbra. -func TestPenumbraToCosmosIBC(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - t.Parallel() - client, network := interchaintest.DockerSetup(t) - - nv := 1 - fn := 0 - - image := ibc.DockerImage{ - Repository: "ghcr.io/cosmos/ibc-go-simd", - Version: "v8.3.2", - UIDGID: "100:1000", - } - - chains, err := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - { - Name: "penumbra", - Version: "v0.78.0,v0.37.5", - ChainConfig: ibc.ChainConfig{ - ChainID: "penumbraA-0", - }, - NumValidators: &nv, - NumFullNodes: &fn, - }, - { - Name: "ibc-go-simd", - ChainName: "simd", - Version: "v8.3.2", - NumValidators: &nv, - NumFullNodes: &fn, - ChainConfig: ibc.ChainConfig{ - Type: "cosmos", - Name: "simd", - ChainID: "cosmos-0", - Images: []ibc.DockerImage{image}, - Bin: "simd", - Bech32Prefix: "cosmos", - Denom: "stake", - CoinType: "118", - GasPrices: "0.0stake", - GasAdjustment: 1.1, - }, - }, - }, - ).Chains(t.Name()) - require.NoError(t, err, "failed to get chains") - require.Len(t, chains, 2) - - chainA := chains[0].(*penumbra.PenumbraChain) - chainB := chains[1] - - i := ibc.DockerImage{ - Repository: "ghcr.io/cosmos/relayer", - Version: "justin-proto-update", - UIDGID: "1025:1025", - } - r := interchaintest.NewBuiltinRelayerFactory( - ibc.CosmosRly, - zaptest.NewLogger(t), - relayer.DockerImage(&i), - relayer.ImagePull(false), - ).Build(t, client, network) - - const pathName = "ab" - - ic := interchaintest.NewInterchain(). - AddChain(chainA). - AddChain(chainB). - AddRelayer(r, "relayer"). - AddLink(interchaintest.InterchainLink{ - Chain1: chainA, - Chain2: chainB, - Relayer: r, - Path: pathName, - CreateClientOpts: ibc.CreateClientOptions{}, - CreateChannelOpts: ibc.CreateChannelOptions{}, - }) - - ctx := context.Background() - rep := testreporter.NewNopReporter() - eRep := rep.RelayerExecReporter(t) - - require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: false, - })) - - t.Cleanup(func() { - err := ic.Close() - if err != nil { - panic(err) - } - }) - - // Start the relayer - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - t.Cleanup( - func() { - err := r.StopRelayer(ctx, eRep) - if err != nil { - panic(fmt.Errorf("an error occurred while stopping the relayer: %s", err)) - } - }, - ) - - // Fund users and check init balances - initBalance := math.NewInt(1_000_000_000) - pUsers := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainA) - require.Len(t, pUsers, 1) - - alice := pUsers[0] - - err = testutil.WaitForBlocks(ctx, 5, chainA) - require.NoError(t, err) - - aliceBal, err := chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - require.True(t, aliceBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) - - cUsers := interchaintest.GetAndFundTestUsers(t, ctx, "user", initBalance, chainB) - require.Len(t, cUsers, 1) - - bob := cUsers[0] - - err = testutil.WaitForBlocks(ctx, 5, chainA) - require.NoError(t, err) - - bobBal, err := chainB.GetBalance(ctx, bob.FormattedAddress(), chainB.Config().Denom) - require.NoError(t, err) - require.True(t, bobBal.Equal(initBalance), "incorrect balance, got (%s) expected (%s)", bobBal, initBalance) - - // Compose ics-20 transfer details and initialize transfer - transferAmount := math.NewInt(1_000_000) - transfer := ibc.WalletAmount{ - Address: bob.FormattedAddress(), - Denom: chainA.Config().Denom, - Amount: transferAmount, - } - - abChan, err := ibc.GetTransferChannel(ctx, r, eRep, chainA.Config().ChainID, chainB.Config().ChainID) - require.NoError(t, err) - - h, err := chainB.Height(ctx) - require.NoError(t, err) - - _, err = chainA.SendIBCTransfer(ctx, abChan.ChannelID, alice.KeyName(), transfer, ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: MinuteRoundedTimeNanos(time.Now().Add(time.Duration(6) * time.Hour)), - Height: h + 50, - }, - Memo: "", - }) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 5, chainA) - require.NoError(t, err) - - expectedBal := initBalance.Sub(transferAmount) - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - require.True(t, aliceBal.Equal(expectedBal), "incorrect balance, got (%s) expected (%s)", aliceBal, expectedBal) - - // Compose IBC token denom information for Chain A's native token denom represented on Chain B - ibcDenom := transfertypes.NewDenom(chainA.Config().Denom, transfertypes.NewHop(abChan.Counterparty.PortID, abChan.Counterparty.ChannelID)) - chainADenomOnChainB := ibcDenom.IBCDenom() - - bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) - require.NoError(t, err) - require.True(t, bobBal.Equal(transferAmount), "incorrect balance, got (%s) expected (%s)", bobBal, transferAmount) - - aliceAddr, err := chainA.GetAddress(ctx, alice.KeyName()) - require.NoError(t, err) - - transfer = ibc.WalletAmount{ - Address: string(aliceAddr), - Denom: ibcDenom.IBCDenom(), - Amount: transferAmount, - } - - // chain B is cosmos which uses a relative timeout instead of absolute - _, err = chainB.SendIBCTransfer(ctx, abChan.Counterparty.ChannelID, bob.KeyName(), transfer, - ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - NanoSeconds: uint64((time.Duration(6) * time.Hour).Nanoseconds()), - Height: h + 50, - }, - Memo: "", - }) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 10, chainA) - require.NoError(t, err) - - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - require.True(t, initBalance.Equal(aliceBal), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) - - bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) - require.NoError(t, err) - require.True(t, bobBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt()) - - transfer = ibc.WalletAmount{ - Address: bob.FormattedAddress(), - Denom: chainA.Config().Denom, - Amount: transferAmount, - } - - h, err = chainB.Height(ctx) - require.NoError(t, err) - - err = r.StopRelayer(ctx, eRep) - require.NoError(t, err) - - _, err = chainA.SendIBCTransfer(ctx, abChan.ChannelID, alice.KeyName(), transfer, ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - // Time out very quickly based on time - NanoSeconds: MinuteRoundedTimeNanos(time.Now()), - Height: h + 500000, - }, - Memo: "", - }) - require.NoError(t, err) - - // Wait for the packet to time out then restart the relayer. - time.Sleep(130 * time.Second) - - err = testutil.WaitForBlocks(ctx, 7, chainA) - require.NoError(t, err) - - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 10, chainA) - require.NoError(t, err) - - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - require.True(t, initBalance.Equal(aliceBal), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) - - bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) - require.NoError(t, err) - require.True(t, bobBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt()) - - h, err = chainB.Height(ctx) - require.NoError(t, err) - - err = r.StopRelayer(ctx, eRep) - require.NoError(t, err) - - _, err = chainA.SendIBCTransfer(ctx, abChan.ChannelID, alice.KeyName(), transfer, ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - // Time out very quickly based on blocks - NanoSeconds: MinuteRoundedTimeNanos(time.Now().Add(time.Duration(6) * time.Hour)), - Height: h + 5, - }, - Memo: "", - }) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 7, chainA) - require.NoError(t, err) - - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 10, chainA) - require.NoError(t, err) - - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainA.Config().Denom) - require.NoError(t, err) - require.True(t, initBalance.Equal(aliceBal), "incorrect balance, got (%s) expected (%s)", aliceBal, initBalance) - - bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainADenomOnChainB) - require.NoError(t, err) - require.True(t, bobBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", bobBal, math.ZeroInt()) - - // Timeout test in the other direction - h, err = chainA.Height(ctx) - require.NoError(t, err) - - err = r.StopRelayer(ctx, eRep) - require.NoError(t, err) - - // Compose IBC token denom information for Chain B's native token denom represented on Chain A - chainBIbcDenom := transfertypes.NewDenom(chainB.Config().Denom, transfertypes.NewHop(abChan.PortID, abChan.ChannelID)) - chainBDenomOnChainA := chainBIbcDenom.IBCDenom() - - transfer = ibc.WalletAmount{ - Address: string(aliceAddr), - Denom: chainB.Config().Denom, - Amount: transferAmount, - } - - preTransferBobBal, err := chainB.GetBalance(ctx, bob.FormattedAddress(), chainB.Config().Denom) - require.NoError(t, err) - - // chain B is cosmos which uses a relative timeout instead of absolute - _, err = chainB.SendIBCTransfer(ctx, abChan.Counterparty.ChannelID, bob.KeyName(), transfer, ibc.TransferOptions{ - Timeout: &ibc.IBCTimeout{ - // Time out very quickly based on time - NanoSeconds: 100, - Height: h + 100000, - }, - Memo: "", - }) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 7, chainB) - require.NoError(t, err) - - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 10, chainB) - require.NoError(t, err) - - bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainB.Config().Denom) - require.NoError(t, err) - require.True(t, preTransferBobBal.Equal(bobBal), "incorrect balance, got (%s) expected (%s)", bobBal, preTransferBobBal) - - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainBDenomOnChainA) - require.NoError(t, err) - require.True(t, aliceBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", aliceBal, math.ZeroInt()) - - h, err = chainA.Height(ctx) - require.NoError(t, err) - require.NoError(t, err) - - err = r.StopRelayer(ctx, eRep) - require.NoError(t, err) - - preTransferBobBal = bobBal - - // chain B is cosmos which uses a relative timeout instead of absolute - _, err = chainB.SendIBCTransfer(ctx, abChan.Counterparty.ChannelID, bob.KeyName(), transfer, ibc.TransferOptions{ - AbsoluteTimeouts: true, - Timeout: &ibc.IBCTimeout{ - NanoSeconds: uint64(time.Now().Add(time.Duration(6) * time.Hour).UnixNano()), - // Time out very quickly based on blocks - Height: h + 5, - }, - Memo: "", - }) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 7, chainA) - require.NoError(t, err) - - err = r.StartRelayer(ctx, eRep, pathName) - require.NoError(t, err) - - err = testutil.WaitForBlocks(ctx, 10, chainA) - require.NoError(t, err) - - bobBal, err = chainB.GetBalance(ctx, bob.FormattedAddress(), chainB.Config().Denom) - require.NoError(t, err) - require.True(t, preTransferBobBal.Equal(bobBal), "incorrect balance, got (%s) expected (%s)", bobBal, preTransferBobBal) - - aliceBal, err = chainA.GetBalance(ctx, alice.KeyName(), chainBDenomOnChainA) - require.NoError(t, err) - require.True(t, aliceBal.Equal(math.ZeroInt()), "incorrect balance, got (%s) expected (%s)", aliceBal, math.ZeroInt()) -} - -// penumbra requires rounding up timeout timestamps to the next minute. -func MinuteRoundedTimeNanos(t time.Time) uint64 { - return uint64(t.Add(time.Minute - time.Nanosecond).Truncate(time.Minute).UnixNano()) -} diff --git a/examples/thorchain/chainspec_exochains_test.go b/examples/thorchain/chainspec_exochains_test.go deleted file mode 100644 index 5567d004..00000000 --- a/examples/thorchain/chainspec_exochains_test.go +++ /dev/null @@ -1,124 +0,0 @@ -package thorchain_test - -import ( - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/chain/cosmos" - "github.com/cosmos/interchaintest/v10/chain/ethereum/foundry" - "github.com/cosmos/interchaintest/v10/chain/ethereum/geth" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/chain/utxo" - "github.com/cosmos/interchaintest/v10/ibc" -) - -type ExoChains map[string]*ExoChain - -type ExoChain struct { - chain ibc.Chain - lpers []ibc.Wallet - savers []ibc.Wallet - genWallets []ibc.Wallet -} - -func (e ExoChains) GetChains() []ibc.Chain { - var chains []ibc.Chain - for _, exoChain := range e { - chains = append(chains, exoChain.chain) - } - - return chains -} - -func GaiaChainSpec() *interchaintest.ChainSpec { - name := common.GAIAChain.String() // Must use this name for tests - version := "v18.1.0" - numVals := 1 - numFn := 0 - denom := "uatom" - gasPrices := "0.01uatom" - genesisKVMods := []cosmos.GenesisKV{ - cosmos.NewGenesisKV("app_state.feemarket.params.enabled", false), - cosmos.NewGenesisKV("app_state.feemarket.params.min_base_gas_price", "0.001000000000000000"), - cosmos.NewGenesisKV("app_state.feemarket.state.base_gas_price", "0.001000000000000000"), - } - - defaultChainConfig := ibc.ChainConfig{ - Denom: denom, - GasPrices: gasPrices, - ChainID: "localgaia", - ModifyGenesis: cosmos.ModifyGenesis(genesisKVMods), - } - - return &interchaintest.ChainSpec{ - Name: "gaia", - ChainName: name, - Version: version, - ChainConfig: defaultChainConfig, - NumValidators: &numVals, - NumFullNodes: &numFn, - } -} - -func EthChainSpec(chainType string) *interchaintest.ChainSpec { - ethChainName := common.ETHChain.String() // must use this name for test - - chainConfig := geth.DefaultEthereumGethChainConfig(ethChainName) - if chainType == "anvil" { - chainConfig = foundry.DefaultEthereumAnvilChainConfig(ethChainName) - } - - return &interchaintest.ChainSpec{ - ChainName: ethChainName, - Name: ethChainName, - ChainConfig: chainConfig, - } -} - -func BscChainSpec() *interchaintest.ChainSpec { - bscChainName := common.BSCChain.String() // must use this name for test - - return &interchaintest.ChainSpec{ - ChainName: bscChainName, - Name: bscChainName, - ChainConfig: geth.DefaultBscChainConfig(bscChainName), - } -} - -func BtcChainSpec() *interchaintest.ChainSpec { - btcChainName := common.BTCChain.String() // must use this name for test - - return &interchaintest.ChainSpec{ - ChainName: btcChainName, - Name: btcChainName, - ChainConfig: utxo.DefaultBitcoinChainConfig(btcChainName, "thorchain", "password"), - } -} - -func BchChainSpec() *interchaintest.ChainSpec { - bchChainName := common.BCHChain.String() // must use this name for test - - return &interchaintest.ChainSpec{ - ChainName: bchChainName, - Name: bchChainName, - ChainConfig: utxo.DefaultBitcoinCashChainConfig(bchChainName, "thorchain", "password"), - } -} - -func LtcChainSpec() *interchaintest.ChainSpec { - liteChainName := common.LTCChain.String() // must use this name for test - - return &interchaintest.ChainSpec{ - ChainName: liteChainName, - Name: liteChainName, - ChainConfig: utxo.DefaultLitecoinChainConfig(liteChainName, "thorchain", "password"), - } -} - -func DogeChainSpec() *interchaintest.ChainSpec { - dogeChainName := common.DOGEChain.String() // must use this name for test - - return &interchaintest.ChainSpec{ - ChainName: dogeChainName, - Name: dogeChainName, - ChainConfig: utxo.DefaultDogecoinChainConfig(dogeChainName, "thorchain", "password"), - } -} diff --git a/examples/thorchain/chainspec_thorchain_test.go b/examples/thorchain/chainspec_thorchain_test.go deleted file mode 100644 index 76ca6df8..00000000 --- a/examples/thorchain/chainspec_thorchain_test.go +++ /dev/null @@ -1,178 +0,0 @@ -package thorchain_test - -import ( - "fmt" - "strings" - - "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" -) - -var ( - Denom = "rune" - Binary = "thornode" - Bech32 = "tthor" - CoinScale = math.NewInt(100_000_000) - StaticGas = math.NewInt(2_000_000) - InitialFaucetAmount = math.NewInt(100_000_000).Mul(CoinScale) -) - -type ChainContract struct { - Chain string `json:"chain"` - Router string `json:"router"` -} - -func ThorchainDefaultChainSpec(testName string, numVals int, numFn int, ethRouter string, bscRouter string, thornodeEnvOverrides, bifrostEnvOverrides map[string]string) *interchaintest.ChainSpec { - chainID := "thorchain" - name := common.THORChain.String() // Must use this name for test - chainImage := ibc.NewDockerImage("thorchain", "local", "1025:1025") - genesisKVMods := []thorchain.GenesisKV{ - thorchain.NewGenesisKV("app_state.bank.params.default_send_enabled", true), // disable bank module transfers - thorchain.NewGenesisKV("app_state.thorchain.reserve", "22000000000000000"), // mint to reserve for mocknet (220M) - thorchain.NewGenesisKV("app_state.thorchain.chain_contracts", []ChainContract{ - { - Chain: "ETH", - Router: ethRouter, - }, - { - Chain: "BSC", - Router: bscRouter, - }, - }), - } - - thornodeEnv := thornodeDefaults - for k, v := range thornodeEnvOverrides { - found := false - modifiedEnv := fmt.Sprintf("%s=%s", k, v) - for i, env := range thornodeEnv { - if strings.Contains(env, fmt.Sprintf("%s=", k)) { - found = true - thornodeEnv[i] = modifiedEnv - } - } - if !found { - thornodeEnv = append(thornodeEnv, modifiedEnv) - } - } - - bifrostEnv := bifrostDefaults - for k, v := range bifrostEnvOverrides { - found := false - modifiedEnv := fmt.Sprintf("%s=%s", k, v) - for i, env := range bifrostEnv { - if strings.Contains(env, fmt.Sprintf("%s=", k)) { - found = true - bifrostEnv[i] = modifiedEnv - } - } - if !found { - bifrostEnv = append(bifrostEnv, modifiedEnv) - } - } - - defaultChainConfig := ibc.ChainConfig{ - Images: []ibc.DockerImage{ - chainImage, - }, - GasAdjustment: 1.5, - Type: "thorchain", - Name: name, - ChainID: chainID, - Bin: Binary, - Bech32Prefix: Bech32, - Denom: Denom, - CoinType: "931", - GasPrices: "0" + Denom, - TrustingPeriod: "336h", - Env: thornodeEnv, - SidecarConfigs: []ibc.SidecarConfig{ - { - ProcessName: "bifrost", - Image: chainImage, - HomeDir: "/var/data/bifrost", - Ports: []string{"5040", "6040", "9000"}, - // StartCmd: []string{"bifrost", "-p"}, - StartCmd: []string{"bifrost", "-p", "-l", "debug"}, - Env: bifrostEnv, - PreStart: false, - ValidatorProcess: true, - }, - }, - ModifyGenesis: thorchain.ModifyGenesis(genesisKVMods), - HostPortOverride: map[int]int{1317: 1317}, - } - - return &interchaintest.ChainSpec{ - Name: name, - ChainName: name, - Version: chainImage.Version, - ChainConfig: defaultChainConfig, - NumValidators: &numVals, - NumFullNodes: &numFn, - } -} - -var ( - allNodeDefaults = []string{ - "NET=mocknet", - "CHAIN_ID=thorchain", - "SIGNER_NAME=thorchain", // Must be thorchain, hardcoded in thorchain module - "SIGNER_PASSWD=password", // Must use this password, used to generate ed25519 - } - - thornodeDefaults = append(allNodeDefaults, []string{ - "THOR_BLOCK_TIME=2s", // link to config override - "THOR_API_LIMIT_COUNT=500", - "THOR_API_LIMIT_DURATION=1s", - "HARDFORK_BLOCK_HEIGHT=", - "NEW_GENESIS_TIME=", - "CHURN_MIGRATION_ROUNDS=2", - "FUND_MIGRATION_INTERVAL=10", - }...) - - bifrostDefaults = append(thornodeDefaults, []string{ - "BIFROST_CHAINS_AVAX_DISABLED=true", - "BIFROST_CHAINS_BCH_DISABLED=true", - "BIFROST_CHAINS_BNB_DISABLED=true", - "BIFROST_CHAINS_BSC_DISABLED=true", - "BIFROST_CHAINS_BTC_DISABLED=true", - "BIFROST_CHAINS_DOGE_DISABLED=true", - "BIFROST_CHAINS_ETH_DISABLED=true", - "BIFROST_CHAINS_GAIA_DISABLED=true", - "BIFROST_CHAINS_LTC_DISABLED=true", - - "BLOCK_SCANNER_BACKOFF=5s", - "BIFROST_METRICS_PPROF_ENABLED=false", // todo change to true - "BIFROST_SIGNER_BACKUP_KEYSHARES=false", // todo change to true - "BIFROST_SIGNER_AUTO_OBSERVE=false", - "BIFROST_SIGNER_KEYGEN_TIMEOUT=30s", - "BIFROST_SIGNER_KEYSIGN_TIMEOUT=30s", - "BIFROST_CHAINS_AVAX_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=5", - "BIFROST_CHAINS_BCH_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=5", - "BIFROST_CHAINS_BNB_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=5", - "BIFROST_CHAINS_BTC_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=5", - "BIFROST_CHAINS_DOGE_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=5", - "BIFROST_CHAINS_ETH_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=5", - "BIFROST_CHAINS_GAIA_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=25", - "BIFROST_CHAINS_LTC_BLOCK_SCANNER_OBSERVATION_FLEXIBILITY_BLOCKS=5", - - // maintain historical gas behavior for hard-coded smoke test values - "BIFROST_CHAINS_ETH_BLOCK_SCANNER_MAX_GAS_LIMIT=80000", - "BIFROST_CHAINS_AVAX_BLOCK_SCANNER_MAX_GAS_LIMIT=80000", - "BIFROST_CHAINS_BSC_BLOCK_SCANNER_MAX_GAS_LIMIT=80000", - - // set fixed gas rate for evm chains - "BIFROST_CHAINS_ETH_BLOCK_SCANNER_FIXED_GAS_RATE=30000000000", // 30 gwei - "BIFROST_CHAINS_AVAX_BLOCK_SCANNER_FIXED_GAS_RATE=100_000_000_000", // 100 navax - "BIFROST_CHAINS_BSC_BLOCK_SCANNER_FIXED_GAS_RATE=50_000_000_000", // 50 gwei - - // override bifrost whitelist tokens - "BIFROST_CHAINS_AVAX_BLOCK_SCANNER_WHITELIST_TOKENS=0x52C84043CD9c865236f11d9Fc9F56aa003c1f922,0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E,0x17aB05351fC94a1a67Bf3f56DdbB941aE6c63E25", - "BIFROST_CHAINS_BSC_BLOCK_SCANNER_WHITELIST_TOKENS=0x52C84043CD9c865236f11d9Fc9F56aa003c1f922,0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", - }...) -) diff --git a/examples/thorchain/contracts/.gitignore b/examples/thorchain/contracts/.gitignore deleted file mode 100644 index 59ae5b19..00000000 --- a/examples/thorchain/contracts/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# Compiler files -cache/ -out/ - -# Ignores development broadcast logs -/broadcast -/broadcast/*/11155111/ -/broadcast/*/31337/ -/broadcast/**/dry-run/ - -# Docs -docs/ - -# Dotenv file -.env diff --git a/examples/thorchain/contracts/README.md b/examples/thorchain/contracts/README.md deleted file mode 100644 index 9265b455..00000000 --- a/examples/thorchain/contracts/README.md +++ /dev/null @@ -1,66 +0,0 @@ -## Foundry - -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** - -Foundry consists of: - -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. - -## Documentation - -https://book.getfoundry.sh/ - -## Usage - -### Build - -```shell -$ forge build -``` - -### Test - -```shell -$ forge test -``` - -### Format - -```shell -$ forge fmt -``` - -### Gas Snapshots - -```shell -$ forge snapshot -``` - -### Anvil - -```shell -$ anvil -``` - -### Deploy - -```shell -$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key -``` - -### Cast - -```shell -$ cast -``` - -### Help - -```shell -$ forge --help -$ anvil --help -$ cast --help -``` diff --git a/examples/thorchain/contracts/eth-router-abi.json b/examples/thorchain/contracts/eth-router-abi.json deleted file mode 100644 index 17026c0b..00000000 --- a/examples/thorchain/contracts/eth-router-abi.json +++ /dev/null @@ -1,308 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "rune", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldVault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newVault", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "TransferAllowance", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "TransferOut", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "finalAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "TransferOutAndCall", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldVault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newVault", - "type": "address" - }, - { - "components": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "indexed": false, - "internalType": "struct THORChain_Router.Coin[]", - "name": "coins", - "type": "tuple[]" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "VaultTransfer", - "type": "event" - }, - { - "inputs": [], - "name": "RUNE", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address payable", "name": "vault", "type": "address" }, - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "string", "name": "memo", "type": "string" } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address payable", "name": "vault", "type": "address" }, - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "string", "name": "memo", "type": "string" }, - { "internalType": "uint256", "name": "expiration", "type": "uint256" } - ], - "name": "depositWithExpiry", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "router", "type": "address" }, - { - "internalType": "address payable", - "name": "asgard", - "type": "address" - }, - { - "components": [ - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "internalType": "struct THORChain_Router.Coin[]", - "name": "coins", - "type": "tuple[]" - }, - { "internalType": "string", "name": "memo", "type": "string" } - ], - "name": "returnVaultAssets", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "router", "type": "address" }, - { "internalType": "address", "name": "newVault", "type": "address" }, - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "string", "name": "memo", "type": "string" } - ], - "name": "transferAllowance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address payable", "name": "to", "type": "address" }, - { "internalType": "address", "name": "asset", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "string", "name": "memo", "type": "string" } - ], - "name": "transferOut", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "target", - "type": "address" - }, - { "internalType": "address", "name": "finalToken", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, - { "internalType": "string", "name": "memo", "type": "string" } - ], - "name": "transferOutAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "vault", "type": "address" }, - { "internalType": "address", "name": "token", "type": "address" } - ], - "name": "vaultAllowance", - "outputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/examples/thorchain/contracts/eth-router-bytecode.txt b/examples/thorchain/contracts/eth-router-bytecode.txt deleted file mode 100644 index ce3557b5..00000000 --- a/examples/thorchain/contracts/eth-router-bytecode.txt +++ /dev/null @@ -1 +0,0 @@ -0x608060405234801561001057600080fd5b5060405161149e38038061149e83398101604081905261002f91610059565b600080546001600160a01b0319166001600160a01b03929092169190911790556001600255610089565b60006020828403121561006b57600080fd5b81516001600160a01b038116811461008257600080fd5b9392505050565b611406806100986000396000f3fe60806040526004361061007b5760003560e01c80634039fd4b1161004e5780634039fd4b1461012157806344bc937b14610134578063574da7171461014757806393e4eaa91461015a57600080fd5b806303b6a673146100805780631b738b32146100d95780631fece7b4146100fb5780632923e82e1461010e575b600080fd5b34801561008c57600080fd5b506100c661009b366004610d91565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6040519081526020015b60405180910390f35b3480156100e557600080fd5b506100f96100f4366004610eaa565b610192565b005b6100f9610109366004610f29565b610248565b6100f961011c366004610f95565b61048d565b6100f961012f366004610eaa565b610611565b6100f96101423660046110a8565b61079d565b6100f9610155366004610f29565b6107ff565b34801561016657600080fd5b5060005461017a906001600160a01b031681565b6040516001600160a01b0390911681526020016100d0565b60028054036101bc5760405162461bcd60e51b81526004016101b39061111c565b60405180910390fd5b60028055306001600160a01b0386160361022f576101db8484846109ee565b836001600160a01b0316336001600160a01b03167f05b90458f953d3fcb2d7fb25616a2fddeca749d0c47cc5c9832d0266b5346eea858585604051610222939291906111af565b60405180910390a361023c565b61023c8585858585610a67565b50506001600255505050565b60028054036102695760405162461bcd60e51b81526004016101b39061111c565b6002805560006001600160a01b0384166102b9575060405134906000906001600160a01b0387169083156108fc0290849084818181858888f193505050509050806102b357600080fd5b50610434565b34156102f85760405162461bcd60e51b815260206004820152600e60248201526d0eadccaf0e0cac6e8cac840cae8d60931b60448201526064016101b3565b6000546001600160a01b03908116908516036103e857506000546040516302ccb1b360e41b81523060048201526024810184905283916001600160a01b031690632ccb1b30906044016020604051808303816000875af1158015610360573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038491906111df565b50600054604051630852cd8d60e31b8152600481018590526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156103cb57600080fd5b505af11580156103df573d6000803e3d6000fd5b50505050610434565b6103f28484610bb8565b6001600160a01b03808716600090815260016020908152604080832093891683529290529081208054929350839290919061042e90849061121e565b90915550505b836001600160a01b0316856001600160a01b03167fef519b7eb82aaf6ac376a6df2d793843ebfd593de5f1a0601d3cc6ab49ebb3958385604051610479929190611236565b60405180910390a350506001600255505050565b60028054036104ae5760405162461bcd60e51b81526004016101b39061111c565b60028055306001600160a01b038516036105785760005b825181101561052557610513848483815181106104e4576104e4611257565b60200260200101516000015185848151811061050257610502611257565b6020026020010151602001516109ee565b8061051d8161126d565b9150506104c5565b50826001600160a01b0316336001600160a01b03167f281daef48d91e5cd3d32db0784f6af69cd8d8d2e8c612a3568dca51ded51e08f848460405161056b929190611286565b60405180910390a36105df565b60005b82518110156105dd576105cb858585848151811061059b5761059b611257565b6020026020010151600001518685815181106105b9576105b9611257565b60200260200101516020015186610a67565b806105d58161126d565b91505061057b565b505b6040516000906001600160a01b038516903480156108fc029184818181858888f1935050505090508061023c57600080fd5b60028054036106325760405162461bcd60e51b81526004016101b39061111c565b600280556040516001600160a01b0385811660248301528481166044830152606482018490523491600091881690839060840160408051601f198184030181529181526020820180516001600160e01b0316631230c53d60e21b1790525161069a91906112f1565b60006040518083038185875af1925050503d80600081146106d7576040519150601f19603f3d011682016040523d82523d6000602084013e6106dc565b606091505b5050905080610744576040516000906001600160a01b0387169084156108fc0290859084818181858888f1935050505090508061074257604051339084156108fc029085906000818181858888f19350505050158015610740573d6000803e3d6000fd5b505b505b336001600160a01b03167f8e5841bcd195b858d53b38bcf91b38d47f3bc800469b6812d35451ab619c6f6c8884898989896040516107879695949392919061130d565b60405180910390a2505060016002555050505050565b8042106107ec5760405162461bcd60e51b815260206004820152601960248201527f54484f52436861696e5f526f757465723a20657870697265640000000000000060448201526064016101b3565b6107f885858585610248565b5050505050565b60028054036108205760405162461bcd60e51b81526004016101b39061111c565b6002805560006001600160a01b03841661089a575060405134906000906001600160a01b0387169083156108fc0290849084818181858888f1935050505090508061089457604051339083156108fc029084906000818181858888f19350505050158015610892573d6000803e3d6000fd5b505b506109a7565b3360009081526001602090815260408083206001600160a01b0388168452909152812080548592906108cd90849061135b565b90915550506040516001600160a01b03868116602483015260448201859052600091829187169060640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525161092c91906112f1565b6000604051808303816000865af19150503d8060008114610969576040519150601f19603f3d011682016040523d82523d6000602084013e61096e565b606091505b509150915081801561099857508051158061099857508080602001905181019061099891906111df565b6109a157600080fd5b84925050505b846001600160a01b0316336001600160a01b03167fa9cd03aa3c1b4515114539cd53d22085129d495cb9e9f9af77864526240f1bf7868486604051610479939291906111af565b3360009081526001602090815260408083206001600160a01b038616845290915281208054839290610a2190849061135b565b90915550506001600160a01b03808416600090815260016020908152604080832093861683529290529081208054839290610a5d90849061121e565b9091555050505050565b3360009081526001602090815260408083206001600160a01b038716845290915281208054849290610a9a90849061135b565b90915550506040516001600160a01b038681166024830152604482018490526000919085169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b17905251610af891906112f1565b6000604051808303816000865af19150503d8060008114610b35576040519150601f19603f3d011682016040523d82523d6000602084013e610b3a565b606091505b5050905080610b4857600080fd5b6040516344bc937b60e01b81526001600160a01b038716906344bc937b90610b7e90889088908890889060001990600401611372565b600060405180830381600087803b158015610b9857600080fd5b505af1158015610bac573d6000803e3d6000fd5b50505050505050505050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a0823190602401602060405180830381865afa158015610c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2591906113b7565b6040513360248201523060448201526064810185905290915060009081906001600160a01b0387169060840160408051601f198184030181529181526020820180516001600160e01b03166323b872dd60e01b17905251610c8691906112f1565b6000604051808303816000865af19150503d8060008114610cc3576040519150601f19603f3d011682016040523d82523d6000602084013e610cc8565b606091505b5091509150818015610cf2575080511580610cf2575080806020019051810190610cf291906111df565b610cfb57600080fd5b6040516370a0823160e01b815230600482015283906001600160a01b038816906370a0823190602401602060405180830381865afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6591906113b7565b610d6f919061135b565b9695505050505050565b6001600160a01b0381168114610d8e57600080fd5b50565b60008060408385031215610da457600080fd5b8235610daf81610d79565b91506020830135610dbf81610d79565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715610e0357610e03610dca565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e3257610e32610dca565b604052919050565b600082601f830112610e4b57600080fd5b813567ffffffffffffffff811115610e6557610e65610dca565b610e78601f8201601f1916602001610e09565b818152846020838601011115610e8d57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610ec257600080fd5b8535610ecd81610d79565b94506020860135610edd81610d79565b93506040860135610eed81610d79565b925060608601359150608086013567ffffffffffffffff811115610f1057600080fd5b610f1c88828901610e3a565b9150509295509295909350565b60008060008060808587031215610f3f57600080fd5b8435610f4a81610d79565b93506020850135610f5a81610d79565b925060408501359150606085013567ffffffffffffffff811115610f7d57600080fd5b610f8987828801610e3a565b91505092959194509250565b60008060008060808587031215610fab57600080fd5b8435610fb681610d79565b9350602085810135610fc781610d79565b935060408681013567ffffffffffffffff80821115610fe557600080fd5b818901915089601f830112610ff957600080fd5b81358181111561100b5761100b610dca565b611019858260051b01610e09565b81815260069190911b8301850190858101908c83111561103857600080fd5b938601935b828510156110815785858e0312156110555760008081fd5b61105d610de0565b853561106881610d79565b815285880135888201528252938501939086019061103d565b97505050606089013593508084111561109957600080fd5b505050610f8987828801610e3a565b600080600080600060a086880312156110c057600080fd5b85356110cb81610d79565b945060208601356110db81610d79565b935060408601359250606086013567ffffffffffffffff8111156110fe57600080fd5b61110a88828901610e3a565b95989497509295608001359392505050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60005b8381101561116e578181015183820152602001611156565b8381111561117d576000848401525b50505050565b6000815180845261119b816020860160208601611153565b601f01601f19169290920160200192915050565b60018060a01b03841681528260208201526060604082015260006111d66060830184611183565b95945050505050565b6000602082840312156111f157600080fd5b8151801515811461120157600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561123157611231611208565b500190565b82815260406020820152600061124f6040830184611183565b949350505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161127f5761127f611208565b5060010190565b60408082528351828201819052600091906020906060850190828801855b828110156112d257815180516001600160a01b031685528501518585015292850192908401906001016112a4565b505050848103828601526112e68187611183565b979650505050505050565b60008251611303818460208701611153565b9190910192915050565b6001600160a01b038781168252602082018790528581166040830152841660608201526080810183905260c060a0820181905260009061134f90830184611183565b98975050505050505050565b60008282101561136d5761136d611208565b500390565b6001600160a01b038681168252851660208201526040810184905260a0606082018190526000906113a590830185611183565b90508260808301529695505050505050565b6000602082840312156113c957600080fd5b505191905056fea264697066735822122081bfb5152612852b02c6e856e49c9abbe953e45e649e4ea942477a8b50a3773064736f6c634300080d0033 \ No newline at end of file diff --git a/examples/thorchain/contracts/foundry.toml b/examples/thorchain/contracts/foundry.toml deleted file mode 100644 index 25b918f9..00000000 --- a/examples/thorchain/contracts/foundry.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile.default] -src = "src" -out = "out" -libs = ["lib"] - -# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options diff --git a/examples/thorchain/contracts/lib/forge-std/.gitattributes b/examples/thorchain/contracts/lib/forge-std/.gitattributes deleted file mode 100644 index 27042d45..00000000 --- a/examples/thorchain/contracts/lib/forge-std/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -src/Vm.sol linguist-generated diff --git a/examples/thorchain/contracts/lib/forge-std/.github/workflows/ci.yml b/examples/thorchain/contracts/lib/forge-std/.github/workflows/ci.yml deleted file mode 100644 index 2d68e91f..00000000 --- a/examples/thorchain/contracts/lib/forge-std/.github/workflows/ci.yml +++ /dev/null @@ -1,128 +0,0 @@ -name: CI - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Print forge version - run: forge --version - - # Backwards compatibility checks: - # - the oldest and newest version of each supported minor version - # - versions with specific issues - - name: Check compatibility with latest - if: always() - run: | - output=$(forge build --skip test) - if echo "$output" | grep -q "Warning"; then - echo "$output" - exit 1 - fi - - - name: Check compatibility with 0.8.0 - if: always() - run: | - output=$(forge build --skip test --use solc:0.8.0) - if echo "$output" | grep -q "Warning"; then - echo "$output" - exit 1 - fi - - - name: Check compatibility with 0.7.6 - if: always() - run: | - output=$(forge build --skip test --use solc:0.7.6) - if echo "$output" | grep -q "Warning"; then - echo "$output" - exit 1 - fi - - - name: Check compatibility with 0.7.0 - if: always() - run: | - output=$(forge build --skip test --use solc:0.7.0) - if echo "$output" | grep -q "Warning"; then - echo "$output" - exit 1 - fi - - - name: Check compatibility with 0.6.12 - if: always() - run: | - output=$(forge build --skip test --use solc:0.6.12) - if echo "$output" | grep -q "Warning"; then - echo "$output" - exit 1 - fi - - - name: Check compatibility with 0.6.2 - if: always() - run: | - output=$(forge build --skip test --use solc:0.6.2) - if echo "$output" | grep -q "Warning"; then - echo "$output" - exit 1 - fi - - # via-ir compilation time checks. - - name: Measure compilation time of Test with 0.8.17 --via-ir - if: always() - run: forge build --skip test --contracts test/compilation/CompilationTest.sol --use solc:0.8.17 --via-ir - - - name: Measure compilation time of TestBase with 0.8.17 --via-ir - if: always() - run: forge build --skip test --contracts test/compilation/CompilationTestBase.sol --use solc:0.8.17 --via-ir - - - name: Measure compilation time of Script with 0.8.17 --via-ir - if: always() - run: forge build --skip test --contracts test/compilation/CompilationScript.sol --use solc:0.8.17 --via-ir - - - name: Measure compilation time of ScriptBase with 0.8.17 --via-ir - if: always() - run: forge build --skip test --contracts test/compilation/CompilationScriptBase.sol --use solc:0.8.17 --via-ir - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Print forge version - run: forge --version - - - name: Run tests - run: forge test -vvv - - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Print forge version - run: forge --version - - - name: Check formatting - run: forge fmt --check diff --git a/examples/thorchain/contracts/lib/forge-std/.github/workflows/sync.yml b/examples/thorchain/contracts/lib/forge-std/.github/workflows/sync.yml deleted file mode 100644 index 9b170f0b..00000000 --- a/examples/thorchain/contracts/lib/forge-std/.github/workflows/sync.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Sync Release Branch - -on: - release: - types: - - created - -jobs: - sync-release-branch: - runs-on: ubuntu-latest - if: startsWith(github.event.release.tag_name, 'v1') - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: v1 - - # The email is derived from the bots user id, - # found here: https://api.github.com/users/github-actions%5Bbot%5D - - name: Configure Git - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - - name: Sync Release Branch - run: | - git fetch --tags - git checkout v1 - git reset --hard ${GITHUB_REF} - git push --force diff --git a/examples/thorchain/contracts/lib/forge-std/.gitignore b/examples/thorchain/contracts/lib/forge-std/.gitignore deleted file mode 100644 index 756106d3..00000000 --- a/examples/thorchain/contracts/lib/forge-std/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -cache/ -out/ -.vscode -.idea diff --git a/examples/thorchain/contracts/lib/forge-std/LICENSE-APACHE b/examples/thorchain/contracts/lib/forge-std/LICENSE-APACHE deleted file mode 100644 index cf01a499..00000000 --- a/examples/thorchain/contracts/lib/forge-std/LICENSE-APACHE +++ /dev/null @@ -1,203 +0,0 @@ -Copyright Contributors to Forge Standard Library - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/examples/thorchain/contracts/lib/forge-std/LICENSE-MIT b/examples/thorchain/contracts/lib/forge-std/LICENSE-MIT deleted file mode 100644 index 28f98304..00000000 --- a/examples/thorchain/contracts/lib/forge-std/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright Contributors to Forge Standard Library - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE O THE USE OR OTHER -DEALINGS IN THE SOFTWARE.R diff --git a/examples/thorchain/contracts/lib/forge-std/README.md b/examples/thorchain/contracts/lib/forge-std/README.md deleted file mode 100644 index 0cb86602..00000000 --- a/examples/thorchain/contracts/lib/forge-std/README.md +++ /dev/null @@ -1,250 +0,0 @@ -# Forge Standard Library • [![CI status](https://github.com/foundry-rs/forge-std/actions/workflows/ci.yml/badge.svg)](https://github.com/foundry-rs/forge-std/actions/workflows/ci.yml) - -Forge Standard Library is a collection of helpful contracts and libraries for use with [Forge and Foundry](https://github.com/foundry-rs/foundry). It leverages Forge's cheatcodes to make writing tests easier and faster, while improving the UX of cheatcodes. - -**Learn how to use Forge-Std with the [📖 Foundry Book (Forge-Std Guide)](https://book.getfoundry.sh/forge/forge-std.html).** - -## Install - -```bash -forge install foundry-rs/forge-std -``` - -## Contracts -### stdError - -This is a helper contract for errors and reverts. In Forge, this contract is particularly helpful for the `expectRevert` cheatcode, as it provides all compiler builtin errors. - -See the contract itself for all error codes. - -#### Example usage - -```solidity - -import "forge-std/Test.sol"; - -contract TestContract is Test { - ErrorsTest test; - - function setUp() public { - test = new ErrorsTest(); - } - - function testExpectArithmetic() public { - vm.expectRevert(stdError.arithmeticError); - test.arithmeticError(10); - } -} - -contract ErrorsTest { - function arithmeticError(uint256 a) public { - uint256 a = a - 100; - } -} -``` - -### stdStorage - -This is a rather large contract due to all of the overloading to make the UX decent. Primarily, it is a wrapper around the `record` and `accesses` cheatcodes. It can *always* find and write the storage slot(s) associated with a particular variable without knowing the storage layout. The one _major_ caveat to this is while a slot can be found for packed storage variables, we can't write to that variable safely. If a user tries to write to a packed slot, the execution throws an error, unless it is uninitialized (`bytes32(0)`). - -This works by recording all `SLOAD`s and `SSTORE`s during a function call. If there is a single slot read or written to, it immediately returns the slot. Otherwise, behind the scenes, we iterate through and check each one (assuming the user passed in a `depth` parameter). If the variable is a struct, you can pass in a `depth` parameter which is basically the field depth. - -I.e.: -```solidity -struct T { - // depth 0 - uint256 a; - // depth 1 - uint256 b; -} -``` - -#### Example usage - -```solidity -import "forge-std/Test.sol"; - -contract TestContract is Test { - using stdStorage for StdStorage; - - Storage test; - - function setUp() public { - test = new Storage(); - } - - function testFindExists() public { - // Lets say we want to find the slot for the public - // variable `exists`. We just pass in the function selector - // to the `find` command - uint256 slot = stdstore.target(address(test)).sig("exists()").find(); - assertEq(slot, 0); - } - - function testWriteExists() public { - // Lets say we want to write to the slot for the public - // variable `exists`. We just pass in the function selector - // to the `checked_write` command - stdstore.target(address(test)).sig("exists()").checked_write(100); - assertEq(test.exists(), 100); - } - - // It supports arbitrary storage layouts, like assembly based storage locations - function testFindHidden() public { - // `hidden` is a random hash of a bytes, iteration through slots would - // not find it. Our mechanism does - // Also, you can use the selector instead of a string - uint256 slot = stdstore.target(address(test)).sig(test.hidden.selector).find(); - assertEq(slot, uint256(keccak256("my.random.var"))); - } - - // If targeting a mapping, you have to pass in the keys necessary to perform the find - // i.e.: - function testFindMapping() public { - uint256 slot = stdstore - .target(address(test)) - .sig(test.map_addr.selector) - .with_key(address(this)) - .find(); - // in the `Storage` constructor, we wrote that this address' value was 1 in the map - // so when we load the slot, we expect it to be 1 - assertEq(uint(vm.load(address(test), bytes32(slot))), 1); - } - - // If the target is a struct, you can specify the field depth: - function testFindStruct() public { - // NOTE: see the depth parameter - 0 means 0th field, 1 means 1st field, etc. - uint256 slot_for_a_field = stdstore - .target(address(test)) - .sig(test.basicStruct.selector) - .depth(0) - .find(); - - uint256 slot_for_b_field = stdstore - .target(address(test)) - .sig(test.basicStruct.selector) - .depth(1) - .find(); - - assertEq(uint(vm.load(address(test), bytes32(slot_for_a_field))), 1); - assertEq(uint(vm.load(address(test), bytes32(slot_for_b_field))), 2); - } -} - -// A complex storage contract -contract Storage { - struct UnpackedStruct { - uint256 a; - uint256 b; - } - - constructor() { - map_addr[msg.sender] = 1; - } - - uint256 public exists = 1; - mapping(address => uint256) public map_addr; - // mapping(address => Packed) public map_packed; - mapping(address => UnpackedStruct) public map_struct; - mapping(address => mapping(address => uint256)) public deep_map; - mapping(address => mapping(address => UnpackedStruct)) public deep_map_struct; - UnpackedStruct public basicStruct = UnpackedStruct({ - a: 1, - b: 2 - }); - - function hidden() public view returns (bytes32 t) { - // an extremely hidden storage slot - bytes32 slot = keccak256("my.random.var"); - assembly { - t := sload(slot) - } - } -} -``` - -### stdCheats - -This is a wrapper over miscellaneous cheatcodes that need wrappers to be more dev friendly. Currently there are only functions related to `prank`. In general, users may expect ETH to be put into an address on `prank`, but this is not the case for safety reasons. Explicitly this `hoax` function should only be used for address that have expected balances as it will get overwritten. If an address already has ETH, you should just use `prank`. If you want to change that balance explicitly, just use `deal`. If you want to do both, `hoax` is also right for you. - - -#### Example usage: -```solidity - -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import "forge-std/Test.sol"; - -// Inherit the stdCheats -contract StdCheatsTest is Test { - Bar test; - function setUp() public { - test = new Bar(); - } - - function testHoax() public { - // we call `hoax`, which gives the target address - // eth and then calls `prank` - hoax(address(1337)); - test.bar{value: 100}(address(1337)); - - // overloaded to allow you to specify how much eth to - // initialize the address with - hoax(address(1337), 1); - test.bar{value: 1}(address(1337)); - } - - function testStartHoax() public { - // we call `startHoax`, which gives the target address - // eth and then calls `startPrank` - // - // it is also overloaded so that you can specify an eth amount - startHoax(address(1337)); - test.bar{value: 100}(address(1337)); - test.bar{value: 100}(address(1337)); - vm.stopPrank(); - test.bar(address(this)); - } -} - -contract Bar { - function bar(address expectedSender) public payable { - require(msg.sender == expectedSender, "!prank"); - } -} -``` - -### Std Assertions - -Contains various assertions. - -### `console.log` - -Usage follows the same format as [Hardhat](https://hardhat.org/hardhat-network/reference/#console-log). -It's recommended to use `console2.sol` as shown below, as this will show the decoded logs in Forge traces. - -```solidity -// import it indirectly via Test.sol -import "forge-std/Test.sol"; -// or directly import it -import "forge-std/console2.sol"; -... -console2.log(someValue); -``` - -If you need compatibility with Hardhat, you must use the standard `console.sol` instead. -Due to a bug in `console.sol`, logs that use `uint256` or `int256` types will not be properly decoded in Forge traces. - -```solidity -// import it indirectly via Test.sol -import "forge-std/Test.sol"; -// or directly import it -import "forge-std/console.sol"; -... -console.log(someValue); -``` - -## License - -Forge Standard Library is offered under either [MIT](LICENSE-MIT) or [Apache 2.0](LICENSE-APACHE) license. diff --git a/examples/thorchain/contracts/lib/forge-std/foundry.toml b/examples/thorchain/contracts/lib/forge-std/foundry.toml deleted file mode 100644 index 2bc66fa7..00000000 --- a/examples/thorchain/contracts/lib/forge-std/foundry.toml +++ /dev/null @@ -1,21 +0,0 @@ -[profile.default] -fs_permissions = [{ access = "read-write", path = "./"}] - -[rpc_endpoints] -# The RPC URLs are modified versions of the default for testing initialization. -mainnet = "https://eth-mainnet.alchemyapi.io/v2/WV407BEiBmjNJfKo9Uo_55u0z0ITyCOX" # Different API key. -optimism_sepolia = "https://sepolia.optimism.io/" # Adds a trailing slash. -arbitrum_one_sepolia = "https://sepolia-rollup.arbitrum.io/rpc/" # Adds a trailing slash. -needs_undefined_env_var = "${UNDEFINED_RPC_URL_PLACEHOLDER}" - -[fmt] -# These are all the `forge fmt` defaults. -line_length = 120 -tab_width = 4 -bracket_spacing = false -int_types = 'long' -multiline_func_header = 'attributes_first' -quote_style = 'double' -number_underscore = 'preserve' -single_line_statement_blocks = 'preserve' -ignore = ["src/console.sol", "src/console2.sol"] \ No newline at end of file diff --git a/examples/thorchain/contracts/lib/forge-std/package.json b/examples/thorchain/contracts/lib/forge-std/package.json deleted file mode 100644 index 7e661858..00000000 --- a/examples/thorchain/contracts/lib/forge-std/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "forge-std", - "version": "1.9.1", - "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", - "homepage": "https://book.getfoundry.sh/forge/forge-std", - "bugs": "https://github.com/foundry-rs/forge-std/issues", - "license": "(Apache-2.0 OR MIT)", - "author": "Contributors to Forge Standard Library", - "files": [ - "src/**/*" - ], - "repository": { - "type": "git", - "url": "https://github.com/foundry-rs/forge-std.git" - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/scripts/vm.py b/examples/thorchain/contracts/lib/forge-std/scripts/vm.py deleted file mode 100755 index f0537db9..00000000 --- a/examples/thorchain/contracts/lib/forge-std/scripts/vm.py +++ /dev/null @@ -1,635 +0,0 @@ -#!/usr/bin/env python3 - -import copy -import json -import re -import subprocess -from enum import Enum as PyEnum -from typing import Callable -from urllib import request - -VoidFn = Callable[[], None] - -CHEATCODES_JSON_URL = "https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json" -OUT_PATH = "src/Vm.sol" - -VM_SAFE_DOC = """\ -/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may -/// result in Script simulations differing from on-chain execution. It is recommended to only use -/// these cheats in scripts. -""" - -VM_DOC = """\ -/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used -/// in tests, but it is not recommended to use these cheats in scripts. -""" - - -def main(): - json_str = request.urlopen(CHEATCODES_JSON_URL).read().decode("utf-8") - contract = Cheatcodes.from_json(json_str) - - ccs = contract.cheatcodes - ccs = list(filter(lambda cc: cc.status not in ["experimental", "internal"], ccs)) - ccs.sort(key=lambda cc: cc.func.id) - - safe = list(filter(lambda cc: cc.safety == "safe", ccs)) - safe.sort(key=CmpCheatcode) - unsafe = list(filter(lambda cc: cc.safety == "unsafe", ccs)) - unsafe.sort(key=CmpCheatcode) - assert len(safe) + len(unsafe) == len(ccs) - - prefix_with_group_headers(safe) - prefix_with_group_headers(unsafe) - - out = "" - - out += "// Automatically @generated by scripts/vm.py. Do not modify manually.\n\n" - - pp = CheatcodesPrinter( - spdx_identifier="MIT OR Apache-2.0", - solidity_requirement=">=0.6.2 <0.9.0", - abicoder_pragma=True, - ) - pp.p_prelude() - pp.prelude = False - out += pp.finish() - - out += "\n\n" - out += VM_SAFE_DOC - vm_safe = Cheatcodes( - # TODO: Custom errors were introduced in 0.8.4 - errors=[], # contract.errors - events=contract.events, - enums=contract.enums, - structs=contract.structs, - cheatcodes=safe, - ) - pp.p_contract(vm_safe, "VmSafe") - out += pp.finish() - - out += "\n\n" - out += VM_DOC - vm_unsafe = Cheatcodes( - errors=[], - events=[], - enums=[], - structs=[], - cheatcodes=unsafe, - ) - pp.p_contract(vm_unsafe, "Vm", "VmSafe") - out += pp.finish() - - # Compatibility with <0.8.0 - def memory_to_calldata(m: re.Match) -> str: - return " calldata " + m.group(1) - - out = re.sub(r" memory (.*returns)", memory_to_calldata, out) - - with open(OUT_PATH, "w") as f: - f.write(out) - - forge_fmt = ["forge", "fmt", OUT_PATH] - res = subprocess.run(forge_fmt) - assert res.returncode == 0, f"command failed: {forge_fmt}" - - print(f"Wrote to {OUT_PATH}") - - -class CmpCheatcode: - cheatcode: "Cheatcode" - - def __init__(self, cheatcode: "Cheatcode"): - self.cheatcode = cheatcode - - def __lt__(self, other: "CmpCheatcode") -> bool: - return cmp_cheatcode(self.cheatcode, other.cheatcode) < 0 - - def __eq__(self, other: "CmpCheatcode") -> bool: - return cmp_cheatcode(self.cheatcode, other.cheatcode) == 0 - - def __gt__(self, other: "CmpCheatcode") -> bool: - return cmp_cheatcode(self.cheatcode, other.cheatcode) > 0 - - -def cmp_cheatcode(a: "Cheatcode", b: "Cheatcode") -> int: - if a.group != b.group: - return -1 if a.group < b.group else 1 - if a.status != b.status: - return -1 if a.status < b.status else 1 - if a.safety != b.safety: - return -1 if a.safety < b.safety else 1 - if a.func.id != b.func.id: - return -1 if a.func.id < b.func.id else 1 - return 0 - - -# HACK: A way to add group header comments without having to modify printer code -def prefix_with_group_headers(cheats: list["Cheatcode"]): - s = set() - for i, cheat in enumerate(cheats): - if cheat.group in s: - continue - - s.add(cheat.group) - - c = copy.deepcopy(cheat) - c.func.description = "" - c.func.declaration = f"// ======== {group(c.group)} ========" - cheats.insert(i, c) - return cheats - - -def group(s: str) -> str: - if s == "evm": - return "EVM" - if s == "json": - return "JSON" - return s[0].upper() + s[1:] - - -class Visibility(PyEnum): - EXTERNAL: str = "external" - PUBLIC: str = "public" - INTERNAL: str = "internal" - PRIVATE: str = "private" - - def __str__(self): - return self.value - - -class Mutability(PyEnum): - PURE: str = "pure" - VIEW: str = "view" - NONE: str = "" - - def __str__(self): - return self.value - - -class Function: - id: str - description: str - declaration: str - visibility: Visibility - mutability: Mutability - signature: str - selector: str - selector_bytes: bytes - - def __init__( - self, - id: str, - description: str, - declaration: str, - visibility: Visibility, - mutability: Mutability, - signature: str, - selector: str, - selector_bytes: bytes, - ): - self.id = id - self.description = description - self.declaration = declaration - self.visibility = visibility - self.mutability = mutability - self.signature = signature - self.selector = selector - self.selector_bytes = selector_bytes - - @staticmethod - def from_dict(d: dict) -> "Function": - return Function( - d["id"], - d["description"], - d["declaration"], - Visibility(d["visibility"]), - Mutability(d["mutability"]), - d["signature"], - d["selector"], - bytes(d["selectorBytes"]), - ) - - -class Cheatcode: - func: Function - group: str - status: str - safety: str - - def __init__(self, func: Function, group: str, status: str, safety: str): - self.func = func - self.group = group - self.status = status - self.safety = safety - - @staticmethod - def from_dict(d: dict) -> "Cheatcode": - return Cheatcode( - Function.from_dict(d["func"]), - str(d["group"]), - str(d["status"]), - str(d["safety"]), - ) - - -class Error: - name: str - description: str - declaration: str - - def __init__(self, name: str, description: str, declaration: str): - self.name = name - self.description = description - self.declaration = declaration - - @staticmethod - def from_dict(d: dict) -> "Error": - return Error(**d) - - -class Event: - name: str - description: str - declaration: str - - def __init__(self, name: str, description: str, declaration: str): - self.name = name - self.description = description - self.declaration = declaration - - @staticmethod - def from_dict(d: dict) -> "Event": - return Event(**d) - - -class EnumVariant: - name: str - description: str - - def __init__(self, name: str, description: str): - self.name = name - self.description = description - - -class Enum: - name: str - description: str - variants: list[EnumVariant] - - def __init__(self, name: str, description: str, variants: list[EnumVariant]): - self.name = name - self.description = description - self.variants = variants - - @staticmethod - def from_dict(d: dict) -> "Enum": - return Enum( - d["name"], - d["description"], - list(map(lambda v: EnumVariant(**v), d["variants"])), - ) - - -class StructField: - name: str - ty: str - description: str - - def __init__(self, name: str, ty: str, description: str): - self.name = name - self.ty = ty - self.description = description - - -class Struct: - name: str - description: str - fields: list[StructField] - - def __init__(self, name: str, description: str, fields: list[StructField]): - self.name = name - self.description = description - self.fields = fields - - @staticmethod - def from_dict(d: dict) -> "Struct": - return Struct( - d["name"], - d["description"], - list(map(lambda f: StructField(**f), d["fields"])), - ) - - -class Cheatcodes: - errors: list[Error] - events: list[Event] - enums: list[Enum] - structs: list[Struct] - cheatcodes: list[Cheatcode] - - def __init__( - self, - errors: list[Error], - events: list[Event], - enums: list[Enum], - structs: list[Struct], - cheatcodes: list[Cheatcode], - ): - self.errors = errors - self.events = events - self.enums = enums - self.structs = structs - self.cheatcodes = cheatcodes - - @staticmethod - def from_dict(d: dict) -> "Cheatcodes": - return Cheatcodes( - errors=[Error.from_dict(e) for e in d["errors"]], - events=[Event.from_dict(e) for e in d["events"]], - enums=[Enum.from_dict(e) for e in d["enums"]], - structs=[Struct.from_dict(e) for e in d["structs"]], - cheatcodes=[Cheatcode.from_dict(e) for e in d["cheatcodes"]], - ) - - @staticmethod - def from_json(s) -> "Cheatcodes": - return Cheatcodes.from_dict(json.loads(s)) - - @staticmethod - def from_json_file(file_path: str) -> "Cheatcodes": - with open(file_path, "r") as f: - return Cheatcodes.from_dict(json.load(f)) - - -class Item(PyEnum): - ERROR: str = "error" - EVENT: str = "event" - ENUM: str = "enum" - STRUCT: str = "struct" - FUNCTION: str = "function" - - -class ItemOrder: - _list: list[Item] - - def __init__(self, list: list[Item]) -> None: - assert len(list) <= len(Item), "list must not contain more items than Item" - assert len(list) == len(set(list)), "list must not contain duplicates" - self._list = list - pass - - def get_list(self) -> list[Item]: - return self._list - - @staticmethod - def default() -> "ItemOrder": - return ItemOrder( - [ - Item.ERROR, - Item.EVENT, - Item.ENUM, - Item.STRUCT, - Item.FUNCTION, - ] - ) - - -class CheatcodesPrinter: - buffer: str - - prelude: bool - spdx_identifier: str - solidity_requirement: str - abicoder_v2: bool - - block_doc_style: bool - - indent_level: int - _indent_str: str - - nl_str: str - - items_order: ItemOrder - - def __init__( - self, - buffer: str = "", - prelude: bool = True, - spdx_identifier: str = "UNLICENSED", - solidity_requirement: str = "", - abicoder_pragma: bool = False, - block_doc_style: bool = False, - indent_level: int = 0, - indent_with: int | str = 4, - nl_str: str = "\n", - items_order: ItemOrder = ItemOrder.default(), - ): - self.prelude = prelude - self.spdx_identifier = spdx_identifier - self.solidity_requirement = solidity_requirement - self.abicoder_v2 = abicoder_pragma - self.block_doc_style = block_doc_style - self.buffer = buffer - self.indent_level = indent_level - self.nl_str = nl_str - - if isinstance(indent_with, int): - assert indent_with >= 0 - self._indent_str = " " * indent_with - elif isinstance(indent_with, str): - self._indent_str = indent_with - else: - assert False, "indent_with must be int or str" - - self.items_order = items_order - - def finish(self) -> str: - ret = self.buffer.rstrip() - self.buffer = "" - return ret - - def p_contract(self, contract: Cheatcodes, name: str, inherits: str = ""): - if self.prelude: - self.p_prelude(contract) - - self._p_str("interface ") - name = name.strip() - if name != "": - self._p_str(name) - self._p_str(" ") - if inherits != "": - self._p_str("is ") - self._p_str(inherits) - self._p_str(" ") - self._p_str("{") - self._p_nl() - self._with_indent(lambda: self._p_items(contract)) - self._p_str("}") - self._p_nl() - - def _p_items(self, contract: Cheatcodes): - for item in self.items_order.get_list(): - if item == Item.ERROR: - self.p_errors(contract.errors) - elif item == Item.EVENT: - self.p_events(contract.events) - elif item == Item.ENUM: - self.p_enums(contract.enums) - elif item == Item.STRUCT: - self.p_structs(contract.structs) - elif item == Item.FUNCTION: - self.p_functions(contract.cheatcodes) - else: - assert False, f"unknown item {item}" - - def p_prelude(self, contract: Cheatcodes | None = None): - self._p_str(f"// SPDX-License-Identifier: {self.spdx_identifier}") - self._p_nl() - - if self.solidity_requirement != "": - req = self.solidity_requirement - elif contract and len(contract.errors) > 0: - req = ">=0.8.4 <0.9.0" - else: - req = ">=0.6.0 <0.9.0" - self._p_str(f"pragma solidity {req};") - self._p_nl() - - if self.abicoder_v2: - self._p_str("pragma experimental ABIEncoderV2;") - self._p_nl() - - self._p_nl() - - def p_errors(self, errors: list[Error]): - for error in errors: - self._p_line(lambda: self.p_error(error)) - - def p_error(self, error: Error): - self._p_comment(error.description, doc=True) - self._p_line(lambda: self._p_str(error.declaration)) - - def p_events(self, events: list[Event]): - for event in events: - self._p_line(lambda: self.p_event(event)) - - def p_event(self, event: Event): - self._p_comment(event.description, doc=True) - self._p_line(lambda: self._p_str(event.declaration)) - - def p_enums(self, enums: list[Enum]): - for enum in enums: - self._p_line(lambda: self.p_enum(enum)) - - def p_enum(self, enum: Enum): - self._p_comment(enum.description, doc=True) - self._p_line(lambda: self._p_str(f"enum {enum.name} {{")) - self._with_indent(lambda: self.p_enum_variants(enum.variants)) - self._p_line(lambda: self._p_str("}")) - - def p_enum_variants(self, variants: list[EnumVariant]): - for i, variant in enumerate(variants): - self._p_indent() - self._p_comment(variant.description) - - self._p_indent() - self._p_str(variant.name) - if i < len(variants) - 1: - self._p_str(",") - self._p_nl() - - def p_structs(self, structs: list[Struct]): - for struct in structs: - self._p_line(lambda: self.p_struct(struct)) - - def p_struct(self, struct: Struct): - self._p_comment(struct.description, doc=True) - self._p_line(lambda: self._p_str(f"struct {struct.name} {{")) - self._with_indent(lambda: self.p_struct_fields(struct.fields)) - self._p_line(lambda: self._p_str("}")) - - def p_struct_fields(self, fields: list[StructField]): - for field in fields: - self._p_line(lambda: self.p_struct_field(field)) - - def p_struct_field(self, field: StructField): - self._p_comment(field.description) - self._p_indented(lambda: self._p_str(f"{field.ty} {field.name};")) - - def p_functions(self, cheatcodes: list[Cheatcode]): - for cheatcode in cheatcodes: - self._p_line(lambda: self.p_function(cheatcode.func)) - - def p_function(self, func: Function): - self._p_comment(func.description, doc=True) - self._p_line(lambda: self._p_str(func.declaration)) - - def _p_comment(self, s: str, doc: bool = False): - s = s.strip() - if s == "": - return - - s = map(lambda line: line.lstrip(), s.split("\n")) - if self.block_doc_style: - self._p_str("/*") - if doc: - self._p_str("*") - self._p_nl() - for line in s: - self._p_indent() - self._p_str(" ") - if doc: - self._p_str("* ") - self._p_str(line) - self._p_nl() - self._p_indent() - self._p_str(" */") - self._p_nl() - else: - first_line = True - for line in s: - if not first_line: - self._p_indent() - first_line = False - - if doc: - self._p_str("/// ") - else: - self._p_str("// ") - self._p_str(line) - self._p_nl() - - def _with_indent(self, f: VoidFn): - self._inc_indent() - f() - self._dec_indent() - - def _p_line(self, f: VoidFn): - self._p_indent() - f() - self._p_nl() - - def _p_indented(self, f: VoidFn): - self._p_indent() - f() - - def _p_indent(self): - for _ in range(self.indent_level): - self._p_str(self._indent_str) - - def _p_nl(self): - self._p_str(self.nl_str) - - def _p_str(self, txt: str): - self.buffer += txt - - def _inc_indent(self): - self.indent_level += 1 - - def _dec_indent(self): - self.indent_level -= 1 - - -if __name__ == "__main__": - main() diff --git a/examples/thorchain/contracts/lib/forge-std/src/Base.sol b/examples/thorchain/contracts/lib/forge-std/src/Base.sol deleted file mode 100644 index 851ac0cd..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/Base.sol +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -import {StdStorage} from "./StdStorage.sol"; -import {Vm, VmSafe} from "./Vm.sol"; - -abstract contract CommonBase { - // Cheat code address, 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D. - address internal constant VM_ADDRESS = address(uint160(uint256(keccak256("hevm cheat code")))); - // console.sol and console2.sol work by executing a staticcall to this address. - address internal constant CONSOLE = 0x000000000000000000636F6e736F6c652e6c6f67; - // Used when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy. - address internal constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; - // Default address for tx.origin and msg.sender, 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38. - address internal constant DEFAULT_SENDER = address(uint160(uint256(keccak256("foundry default caller")))); - // Address of the test contract, deployed by the DEFAULT_SENDER. - address internal constant DEFAULT_TEST_CONTRACT = 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f; - // Deterministic deployment address of the Multicall3 contract. - address internal constant MULTICALL3_ADDRESS = 0xcA11bde05977b3631167028862bE2a173976CA11; - // The order of the secp256k1 curve. - uint256 internal constant SECP256K1_ORDER = - 115792089237316195423570985008687907852837564279074904382605163141518161494337; - - uint256 internal constant UINT256_MAX = - 115792089237316195423570985008687907853269984665640564039457584007913129639935; - - Vm internal constant vm = Vm(VM_ADDRESS); - StdStorage internal stdstore; -} - -abstract contract TestBase is CommonBase {} - -abstract contract ScriptBase is CommonBase { - VmSafe internal constant vmSafe = VmSafe(VM_ADDRESS); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/Script.sol b/examples/thorchain/contracts/lib/forge-std/src/Script.sol deleted file mode 100644 index 94e75f6c..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/Script.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -// 💬 ABOUT -// Forge Std's default Script. - -// 🧩 MODULES -import {console} from "./console.sol"; -import {console2} from "./console2.sol"; -import {safeconsole} from "./safeconsole.sol"; -import {StdChains} from "./StdChains.sol"; -import {StdCheatsSafe} from "./StdCheats.sol"; -import {stdJson} from "./StdJson.sol"; -import {stdMath} from "./StdMath.sol"; -import {StdStorage, stdStorageSafe} from "./StdStorage.sol"; -import {StdStyle} from "./StdStyle.sol"; -import {StdUtils} from "./StdUtils.sol"; -import {VmSafe} from "./Vm.sol"; - -// 📦 BOILERPLATE -import {ScriptBase} from "./Base.sol"; - -// ⭐️ SCRIPT -abstract contract Script is ScriptBase, StdChains, StdCheatsSafe, StdUtils { - // Note: IS_SCRIPT() must return true. - bool public IS_SCRIPT = true; -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdAssertions.sol b/examples/thorchain/contracts/lib/forge-std/src/StdAssertions.sol deleted file mode 100644 index 857ecd57..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdAssertions.sol +++ /dev/null @@ -1,669 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; -pragma experimental ABIEncoderV2; - -import {Vm} from "./Vm.sol"; - -abstract contract StdAssertions { - Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); - - event log(string); - event logs(bytes); - - event log_address(address); - event log_bytes32(bytes32); - event log_int(int256); - event log_uint(uint256); - event log_bytes(bytes); - event log_string(string); - - event log_named_address(string key, address val); - event log_named_bytes32(string key, bytes32 val); - event log_named_decimal_int(string key, int256 val, uint256 decimals); - event log_named_decimal_uint(string key, uint256 val, uint256 decimals); - event log_named_int(string key, int256 val); - event log_named_uint(string key, uint256 val); - event log_named_bytes(string key, bytes val); - event log_named_string(string key, string val); - - event log_array(uint256[] val); - event log_array(int256[] val); - event log_array(address[] val); - event log_named_array(string key, uint256[] val); - event log_named_array(string key, int256[] val); - event log_named_array(string key, address[] val); - - bool private _failed; - - function failed() public view returns (bool) { - if (_failed) { - return _failed; - } else { - return vm.load(address(vm), bytes32("failed")) != bytes32(0); - } - } - - function fail() internal virtual { - vm.store(address(vm), bytes32("failed"), bytes32(uint256(1))); - _failed = true; - } - - function assertTrue(bool data) internal pure virtual { - vm.assertTrue(data); - } - - function assertTrue(bool data, string memory err) internal pure virtual { - vm.assertTrue(data, err); - } - - function assertFalse(bool data) internal pure virtual { - vm.assertFalse(data); - } - - function assertFalse(bool data, string memory err) internal pure virtual { - vm.assertFalse(data, err); - } - - function assertEq(bool left, bool right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(bool left, bool right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(uint256 left, uint256 right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(uint256 left, uint256 right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { - vm.assertEqDecimal(left, right, decimals); - } - - function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertEqDecimal(left, right, decimals, err); - } - - function assertEq(int256 left, int256 right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(int256 left, int256 right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { - vm.assertEqDecimal(left, right, decimals); - } - - function assertEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertEqDecimal(left, right, decimals, err); - } - - function assertEq(address left, address right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(address left, address right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(bytes32 left, bytes32 right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(bytes32 left, bytes32 right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq32(bytes32 left, bytes32 right) internal pure virtual { - assertEq(left, right); - } - - function assertEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual { - assertEq(left, right, err); - } - - function assertEq(string memory left, string memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(string memory left, string memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(bytes memory left, bytes memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(bytes memory left, bytes memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(bool[] memory left, bool[] memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(uint256[] memory left, uint256[] memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(int256[] memory left, int256[] memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(address[] memory left, address[] memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(address[] memory left, address[] memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(string[] memory left, string[] memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(string[] memory left, string[] memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - function assertEq(bytes[] memory left, bytes[] memory right) internal pure virtual { - vm.assertEq(left, right); - } - - function assertEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual { - vm.assertEq(left, right, err); - } - - // Legacy helper - function assertEqUint(uint256 left, uint256 right) internal pure virtual { - assertEq(left, right); - } - - function assertNotEq(bool left, bool right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(bool left, bool right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(uint256 left, uint256 right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(uint256 left, uint256 right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { - vm.assertNotEqDecimal(left, right, decimals); - } - - function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) - internal - pure - virtual - { - vm.assertNotEqDecimal(left, right, decimals, err); - } - - function assertNotEq(int256 left, int256 right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(int256 left, int256 right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { - vm.assertNotEqDecimal(left, right, decimals); - } - - function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertNotEqDecimal(left, right, decimals, err); - } - - function assertNotEq(address left, address right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(address left, address right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(bytes32 left, bytes32 right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(bytes32 left, bytes32 right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq32(bytes32 left, bytes32 right) internal pure virtual { - assertNotEq(left, right); - } - - function assertNotEq32(bytes32 left, bytes32 right, string memory err) internal pure virtual { - assertNotEq(left, right, err); - } - - function assertNotEq(string memory left, string memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(string memory left, string memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(bytes memory left, bytes memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(bytes memory left, bytes memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(bool[] memory left, bool[] memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(bool[] memory left, bool[] memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(uint256[] memory left, uint256[] memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(uint256[] memory left, uint256[] memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(int256[] memory left, int256[] memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(int256[] memory left, int256[] memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(address[] memory left, address[] memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(address[] memory left, address[] memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(bytes32[] memory left, bytes32[] memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(bytes32[] memory left, bytes32[] memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(string[] memory left, string[] memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(string[] memory left, string[] memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertNotEq(bytes[] memory left, bytes[] memory right) internal pure virtual { - vm.assertNotEq(left, right); - } - - function assertNotEq(bytes[] memory left, bytes[] memory right, string memory err) internal pure virtual { - vm.assertNotEq(left, right, err); - } - - function assertLt(uint256 left, uint256 right) internal pure virtual { - vm.assertLt(left, right); - } - - function assertLt(uint256 left, uint256 right, string memory err) internal pure virtual { - vm.assertLt(left, right, err); - } - - function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { - vm.assertLtDecimal(left, right, decimals); - } - - function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertLtDecimal(left, right, decimals, err); - } - - function assertLt(int256 left, int256 right) internal pure virtual { - vm.assertLt(left, right); - } - - function assertLt(int256 left, int256 right, string memory err) internal pure virtual { - vm.assertLt(left, right, err); - } - - function assertLtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { - vm.assertLtDecimal(left, right, decimals); - } - - function assertLtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertLtDecimal(left, right, decimals, err); - } - - function assertGt(uint256 left, uint256 right) internal pure virtual { - vm.assertGt(left, right); - } - - function assertGt(uint256 left, uint256 right, string memory err) internal pure virtual { - vm.assertGt(left, right, err); - } - - function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { - vm.assertGtDecimal(left, right, decimals); - } - - function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertGtDecimal(left, right, decimals, err); - } - - function assertGt(int256 left, int256 right) internal pure virtual { - vm.assertGt(left, right); - } - - function assertGt(int256 left, int256 right, string memory err) internal pure virtual { - vm.assertGt(left, right, err); - } - - function assertGtDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { - vm.assertGtDecimal(left, right, decimals); - } - - function assertGtDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertGtDecimal(left, right, decimals, err); - } - - function assertLe(uint256 left, uint256 right) internal pure virtual { - vm.assertLe(left, right); - } - - function assertLe(uint256 left, uint256 right, string memory err) internal pure virtual { - vm.assertLe(left, right, err); - } - - function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { - vm.assertLeDecimal(left, right, decimals); - } - - function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertLeDecimal(left, right, decimals, err); - } - - function assertLe(int256 left, int256 right) internal pure virtual { - vm.assertLe(left, right); - } - - function assertLe(int256 left, int256 right, string memory err) internal pure virtual { - vm.assertLe(left, right, err); - } - - function assertLeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { - vm.assertLeDecimal(left, right, decimals); - } - - function assertLeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertLeDecimal(left, right, decimals, err); - } - - function assertGe(uint256 left, uint256 right) internal pure virtual { - vm.assertGe(left, right); - } - - function assertGe(uint256 left, uint256 right, string memory err) internal pure virtual { - vm.assertGe(left, right, err); - } - - function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) internal pure virtual { - vm.assertGeDecimal(left, right, decimals); - } - - function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertGeDecimal(left, right, decimals, err); - } - - function assertGe(int256 left, int256 right) internal pure virtual { - vm.assertGe(left, right); - } - - function assertGe(int256 left, int256 right, string memory err) internal pure virtual { - vm.assertGe(left, right, err); - } - - function assertGeDecimal(int256 left, int256 right, uint256 decimals) internal pure virtual { - vm.assertGeDecimal(left, right, decimals); - } - - function assertGeDecimal(int256 left, int256 right, uint256 decimals, string memory err) internal pure virtual { - vm.assertGeDecimal(left, right, decimals, err); - } - - function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) internal pure virtual { - vm.assertApproxEqAbs(left, right, maxDelta); - } - - function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string memory err) - internal - pure - virtual - { - vm.assertApproxEqAbs(left, right, maxDelta, err); - } - - function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) - internal - pure - virtual - { - vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); - } - - function assertApproxEqAbsDecimal( - uint256 left, - uint256 right, - uint256 maxDelta, - uint256 decimals, - string memory err - ) internal pure virtual { - vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); - } - - function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) internal pure virtual { - vm.assertApproxEqAbs(left, right, maxDelta); - } - - function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string memory err) internal pure virtual { - vm.assertApproxEqAbs(left, right, maxDelta, err); - } - - function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) - internal - pure - virtual - { - vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals); - } - - function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals, string memory err) - internal - pure - virtual - { - vm.assertApproxEqAbsDecimal(left, right, maxDelta, decimals, err); - } - - function assertApproxEqRel( - uint256 left, - uint256 right, - uint256 maxPercentDelta // An 18 decimal fixed point number, where 1e18 == 100% - ) internal pure virtual { - vm.assertApproxEqRel(left, right, maxPercentDelta); - } - - function assertApproxEqRel( - uint256 left, - uint256 right, - uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% - string memory err - ) internal pure virtual { - vm.assertApproxEqRel(left, right, maxPercentDelta, err); - } - - function assertApproxEqRelDecimal( - uint256 left, - uint256 right, - uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% - uint256 decimals - ) internal pure virtual { - vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); - } - - function assertApproxEqRelDecimal( - uint256 left, - uint256 right, - uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% - uint256 decimals, - string memory err - ) internal pure virtual { - vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); - } - - function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) internal pure virtual { - vm.assertApproxEqRel(left, right, maxPercentDelta); - } - - function assertApproxEqRel( - int256 left, - int256 right, - uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% - string memory err - ) internal pure virtual { - vm.assertApproxEqRel(left, right, maxPercentDelta, err); - } - - function assertApproxEqRelDecimal( - int256 left, - int256 right, - uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% - uint256 decimals - ) internal pure virtual { - vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals); - } - - function assertApproxEqRelDecimal( - int256 left, - int256 right, - uint256 maxPercentDelta, // An 18 decimal fixed point number, where 1e18 == 100% - uint256 decimals, - string memory err - ) internal pure virtual { - vm.assertApproxEqRelDecimal(left, right, maxPercentDelta, decimals, err); - } - - // Inherited from DSTest, not used but kept for backwards-compatibility - function checkEq0(bytes memory left, bytes memory right) internal pure returns (bool) { - return keccak256(left) == keccak256(right); - } - - function assertEq0(bytes memory left, bytes memory right) internal pure virtual { - assertEq(left, right); - } - - function assertEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual { - assertEq(left, right, err); - } - - function assertNotEq0(bytes memory left, bytes memory right) internal pure virtual { - assertNotEq(left, right); - } - - function assertNotEq0(bytes memory left, bytes memory right, string memory err) internal pure virtual { - assertNotEq(left, right, err); - } - - function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB) internal virtual { - assertEqCall(target, callDataA, target, callDataB, true); - } - - function assertEqCall(address targetA, bytes memory callDataA, address targetB, bytes memory callDataB) - internal - virtual - { - assertEqCall(targetA, callDataA, targetB, callDataB, true); - } - - function assertEqCall(address target, bytes memory callDataA, bytes memory callDataB, bool strictRevertData) - internal - virtual - { - assertEqCall(target, callDataA, target, callDataB, strictRevertData); - } - - function assertEqCall( - address targetA, - bytes memory callDataA, - address targetB, - bytes memory callDataB, - bool strictRevertData - ) internal virtual { - (bool successA, bytes memory returnDataA) = address(targetA).call(callDataA); - (bool successB, bytes memory returnDataB) = address(targetB).call(callDataB); - - if (successA && successB) { - assertEq(returnDataA, returnDataB, "Call return data does not match"); - } - - if (!successA && !successB && strictRevertData) { - assertEq(returnDataA, returnDataB, "Call revert data does not match"); - } - - if (!successA && successB) { - emit log("Error: Calls were not equal"); - emit log_named_bytes(" Left call revert data", returnDataA); - emit log_named_bytes(" Right call return data", returnDataB); - revert("assertion failed"); - } - - if (successA && !successB) { - emit log("Error: Calls were not equal"); - emit log_named_bytes(" Left call return data", returnDataA); - emit log_named_bytes(" Right call revert data", returnDataB); - revert("assertion failed"); - } - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdChains.sol b/examples/thorchain/contracts/lib/forge-std/src/StdChains.sol deleted file mode 100644 index 0fe827e4..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdChains.sol +++ /dev/null @@ -1,259 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -import {VmSafe} from "./Vm.sol"; - -/** - * StdChains provides information about EVM compatible chains that can be used in scripts/tests. - * For each chain, the chain's name, chain ID, and a default RPC URL are provided. Chains are - * identified by their alias, which is the same as the alias in the `[rpc_endpoints]` section of - * the `foundry.toml` file. For best UX, ensure the alias in the `foundry.toml` file match the - * alias used in this contract, which can be found as the first argument to the - * `setChainWithDefaultRpcUrl` call in the `initializeStdChains` function. - * - * There are two main ways to use this contract: - * 1. Set a chain with `setChain(string memory chainAlias, ChainData memory chain)` or - * `setChain(string memory chainAlias, Chain memory chain)` - * 2. Get a chain with `getChain(string memory chainAlias)` or `getChain(uint256 chainId)`. - * - * The first time either of those are used, chains are initialized with the default set of RPC URLs. - * This is done in `initializeStdChains`, which uses `setChainWithDefaultRpcUrl`. Defaults are recorded in - * `defaultRpcUrls`. - * - * The `setChain` function is straightforward, and it simply saves off the given chain data. - * - * The `getChain` methods use `getChainWithUpdatedRpcUrl` to return a chain. For example, let's say - * we want to retrieve the RPC URL for `mainnet`: - * - If you have specified data with `setChain`, it will return that. - * - If you have configured a mainnet RPC URL in `foundry.toml`, it will return the URL, provided it - * is valid (e.g. a URL is specified, or an environment variable is given and exists). - * - If neither of the above conditions is met, the default data is returned. - * - * Summarizing the above, the prioritization hierarchy is `setChain` -> `foundry.toml` -> environment variable -> defaults. - */ -abstract contract StdChains { - VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); - - bool private stdChainsInitialized; - - struct ChainData { - string name; - uint256 chainId; - string rpcUrl; - } - - struct Chain { - // The chain name. - string name; - // The chain's Chain ID. - uint256 chainId; - // The chain's alias. (i.e. what gets specified in `foundry.toml`). - string chainAlias; - // A default RPC endpoint for this chain. - // NOTE: This default RPC URL is included for convenience to facilitate quick tests and - // experimentation. Do not use this RPC URL for production test suites, CI, or other heavy - // usage as you will be throttled and this is a disservice to others who need this endpoint. - string rpcUrl; - } - - // Maps from the chain's alias (matching the alias in the `foundry.toml` file) to chain data. - mapping(string => Chain) private chains; - // Maps from the chain's alias to it's default RPC URL. - mapping(string => string) private defaultRpcUrls; - // Maps from a chain ID to it's alias. - mapping(uint256 => string) private idToAlias; - - bool private fallbackToDefaultRpcUrls = true; - - // The RPC URL will be fetched from config or defaultRpcUrls if possible. - function getChain(string memory chainAlias) internal virtual returns (Chain memory chain) { - require(bytes(chainAlias).length != 0, "StdChains getChain(string): Chain alias cannot be the empty string."); - - initializeStdChains(); - chain = chains[chainAlias]; - require( - chain.chainId != 0, - string(abi.encodePacked("StdChains getChain(string): Chain with alias \"", chainAlias, "\" not found.")) - ); - - chain = getChainWithUpdatedRpcUrl(chainAlias, chain); - } - - function getChain(uint256 chainId) internal virtual returns (Chain memory chain) { - require(chainId != 0, "StdChains getChain(uint256): Chain ID cannot be 0."); - initializeStdChains(); - string memory chainAlias = idToAlias[chainId]; - - chain = chains[chainAlias]; - - require( - chain.chainId != 0, - string(abi.encodePacked("StdChains getChain(uint256): Chain with ID ", vm.toString(chainId), " not found.")) - ); - - chain = getChainWithUpdatedRpcUrl(chainAlias, chain); - } - - // set chain info, with priority to argument's rpcUrl field. - function setChain(string memory chainAlias, ChainData memory chain) internal virtual { - require( - bytes(chainAlias).length != 0, - "StdChains setChain(string,ChainData): Chain alias cannot be the empty string." - ); - - require(chain.chainId != 0, "StdChains setChain(string,ChainData): Chain ID cannot be 0."); - - initializeStdChains(); - string memory foundAlias = idToAlias[chain.chainId]; - - require( - bytes(foundAlias).length == 0 || keccak256(bytes(foundAlias)) == keccak256(bytes(chainAlias)), - string( - abi.encodePacked( - "StdChains setChain(string,ChainData): Chain ID ", - vm.toString(chain.chainId), - " already used by \"", - foundAlias, - "\"." - ) - ) - ); - - uint256 oldChainId = chains[chainAlias].chainId; - delete idToAlias[oldChainId]; - - chains[chainAlias] = - Chain({name: chain.name, chainId: chain.chainId, chainAlias: chainAlias, rpcUrl: chain.rpcUrl}); - idToAlias[chain.chainId] = chainAlias; - } - - // set chain info, with priority to argument's rpcUrl field. - function setChain(string memory chainAlias, Chain memory chain) internal virtual { - setChain(chainAlias, ChainData({name: chain.name, chainId: chain.chainId, rpcUrl: chain.rpcUrl})); - } - - function _toUpper(string memory str) private pure returns (string memory) { - bytes memory strb = bytes(str); - bytes memory copy = new bytes(strb.length); - for (uint256 i = 0; i < strb.length; i++) { - bytes1 b = strb[i]; - if (b >= 0x61 && b <= 0x7A) { - copy[i] = bytes1(uint8(b) - 32); - } else { - copy[i] = b; - } - } - return string(copy); - } - - // lookup rpcUrl, in descending order of priority: - // current -> config (foundry.toml) -> environment variable -> default - function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) - private - view - returns (Chain memory) - { - if (bytes(chain.rpcUrl).length == 0) { - try vm.rpcUrl(chainAlias) returns (string memory configRpcUrl) { - chain.rpcUrl = configRpcUrl; - } catch (bytes memory err) { - string memory envName = string(abi.encodePacked(_toUpper(chainAlias), "_RPC_URL")); - if (fallbackToDefaultRpcUrls) { - chain.rpcUrl = vm.envOr(envName, defaultRpcUrls[chainAlias]); - } else { - chain.rpcUrl = vm.envString(envName); - } - // Distinguish 'not found' from 'cannot read' - // The upstream error thrown by forge for failing cheats changed so we check both the old and new versions - bytes memory oldNotFoundError = - abi.encodeWithSignature("CheatCodeError", string(abi.encodePacked("invalid rpc url ", chainAlias))); - bytes memory newNotFoundError = abi.encodeWithSignature( - "CheatcodeError(string)", string(abi.encodePacked("invalid rpc url: ", chainAlias)) - ); - bytes32 errHash = keccak256(err); - if ( - (errHash != keccak256(oldNotFoundError) && errHash != keccak256(newNotFoundError)) - || bytes(chain.rpcUrl).length == 0 - ) { - /// @solidity memory-safe-assembly - assembly { - revert(add(32, err), mload(err)) - } - } - } - } - return chain; - } - - function setFallbackToDefaultRpcUrls(bool useDefault) internal { - fallbackToDefaultRpcUrls = useDefault; - } - - function initializeStdChains() private { - if (stdChainsInitialized) return; - - stdChainsInitialized = true; - - // If adding an RPC here, make sure to test the default RPC URL in `test_Rpcs` in `StdChains.t.sol` - setChainWithDefaultRpcUrl("anvil", ChainData("Anvil", 31337, "http://127.0.0.1:8545")); - setChainWithDefaultRpcUrl( - "mainnet", ChainData("Mainnet", 1, "https://eth-mainnet.alchemyapi.io/v2/pwc5rmJhrdoaSEfimoKEmsvOjKSmPDrP") - ); - setChainWithDefaultRpcUrl( - "sepolia", ChainData("Sepolia", 11155111, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001") - ); - setChainWithDefaultRpcUrl("holesky", ChainData("Holesky", 17000, "https://rpc.holesky.ethpandaops.io")); - setChainWithDefaultRpcUrl("optimism", ChainData("Optimism", 10, "https://mainnet.optimism.io")); - setChainWithDefaultRpcUrl( - "optimism_sepolia", ChainData("Optimism Sepolia", 11155420, "https://sepolia.optimism.io") - ); - setChainWithDefaultRpcUrl("arbitrum_one", ChainData("Arbitrum One", 42161, "https://arb1.arbitrum.io/rpc")); - setChainWithDefaultRpcUrl( - "arbitrum_one_sepolia", ChainData("Arbitrum One Sepolia", 421614, "https://sepolia-rollup.arbitrum.io/rpc") - ); - setChainWithDefaultRpcUrl("arbitrum_nova", ChainData("Arbitrum Nova", 42170, "https://nova.arbitrum.io/rpc")); - setChainWithDefaultRpcUrl("polygon", ChainData("Polygon", 137, "https://polygon-rpc.com")); - setChainWithDefaultRpcUrl( - "polygon_amoy", ChainData("Polygon Amoy", 80002, "https://rpc-amoy.polygon.technology") - ); - setChainWithDefaultRpcUrl("avalanche", ChainData("Avalanche", 43114, "https://api.avax.network/ext/bc/C/rpc")); - setChainWithDefaultRpcUrl( - "avalanche_fuji", ChainData("Avalanche Fuji", 43113, "https://api.avax-test.network/ext/bc/C/rpc") - ); - setChainWithDefaultRpcUrl( - "bnb_smart_chain", ChainData("BNB Smart Chain", 56, "https://bsc-dataseed1.binance.org") - ); - setChainWithDefaultRpcUrl( - "bnb_smart_chain_testnet", - ChainData("BNB Smart Chain Testnet", 97, "https://rpc.ankr.com/bsc_testnet_chapel") - ); - setChainWithDefaultRpcUrl("gnosis_chain", ChainData("Gnosis Chain", 100, "https://rpc.gnosischain.com")); - setChainWithDefaultRpcUrl("moonbeam", ChainData("Moonbeam", 1284, "https://rpc.api.moonbeam.network")); - setChainWithDefaultRpcUrl( - "moonriver", ChainData("Moonriver", 1285, "https://rpc.api.moonriver.moonbeam.network") - ); - setChainWithDefaultRpcUrl("moonbase", ChainData("Moonbase", 1287, "https://rpc.testnet.moonbeam.network")); - setChainWithDefaultRpcUrl("base_sepolia", ChainData("Base Sepolia", 84532, "https://sepolia.base.org")); - setChainWithDefaultRpcUrl("base", ChainData("Base", 8453, "https://mainnet.base.org")); - setChainWithDefaultRpcUrl("blast_sepolia", ChainData("Blast Sepolia", 168587773, "https://sepolia.blast.io")); - setChainWithDefaultRpcUrl("blast", ChainData("Blast", 81457, "https://rpc.blast.io")); - setChainWithDefaultRpcUrl("fantom_opera", ChainData("Fantom Opera", 250, "https://rpc.ankr.com/fantom/")); - setChainWithDefaultRpcUrl( - "fantom_opera_testnet", ChainData("Fantom Opera Testnet", 4002, "https://rpc.ankr.com/fantom_testnet/") - ); - setChainWithDefaultRpcUrl("fraxtal", ChainData("Fraxtal", 252, "https://rpc.frax.com")); - setChainWithDefaultRpcUrl("fraxtal_testnet", ChainData("Fraxtal Testnet", 2522, "https://rpc.testnet.frax.com")); - setChainWithDefaultRpcUrl( - "berachain_bartio_testnet", ChainData("Berachain bArtio Testnet", 80084, "https://bartio.rpc.berachain.com") - ); - } - - // set chain info, with priority to chainAlias' rpc url in foundry.toml - function setChainWithDefaultRpcUrl(string memory chainAlias, ChainData memory chain) private { - string memory rpcUrl = chain.rpcUrl; - defaultRpcUrls[chainAlias] = rpcUrl; - chain.rpcUrl = ""; - setChain(chainAlias, chain); - chain.rpcUrl = rpcUrl; // restore argument - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdCheats.sol b/examples/thorchain/contracts/lib/forge-std/src/StdCheats.sol deleted file mode 100644 index f2933139..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdCheats.sol +++ /dev/null @@ -1,817 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -import {StdStorage, stdStorage} from "./StdStorage.sol"; -import {console2} from "./console2.sol"; -import {Vm} from "./Vm.sol"; - -abstract contract StdCheatsSafe { - Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); - - uint256 private constant UINT256_MAX = - 115792089237316195423570985008687907853269984665640564039457584007913129639935; - - bool private gasMeteringOff; - - // Data structures to parse Transaction objects from the broadcast artifact - // that conform to EIP1559. The Raw structs is what is parsed from the JSON - // and then converted to the one that is used by the user for better UX. - - struct RawTx1559 { - string[] arguments; - address contractAddress; - string contractName; - // json value name = function - string functionSig; - bytes32 hash; - // json value name = tx - RawTx1559Detail txDetail; - // json value name = type - string opcode; - } - - struct RawTx1559Detail { - AccessList[] accessList; - bytes data; - address from; - bytes gas; - bytes nonce; - address to; - bytes txType; - bytes value; - } - - struct Tx1559 { - string[] arguments; - address contractAddress; - string contractName; - string functionSig; - bytes32 hash; - Tx1559Detail txDetail; - string opcode; - } - - struct Tx1559Detail { - AccessList[] accessList; - bytes data; - address from; - uint256 gas; - uint256 nonce; - address to; - uint256 txType; - uint256 value; - } - - // Data structures to parse Transaction objects from the broadcast artifact - // that DO NOT conform to EIP1559. The Raw structs is what is parsed from the JSON - // and then converted to the one that is used by the user for better UX. - - struct TxLegacy { - string[] arguments; - address contractAddress; - string contractName; - string functionSig; - string hash; - string opcode; - TxDetailLegacy transaction; - } - - struct TxDetailLegacy { - AccessList[] accessList; - uint256 chainId; - bytes data; - address from; - uint256 gas; - uint256 gasPrice; - bytes32 hash; - uint256 nonce; - bytes1 opcode; - bytes32 r; - bytes32 s; - uint256 txType; - address to; - uint8 v; - uint256 value; - } - - struct AccessList { - address accessAddress; - bytes32[] storageKeys; - } - - // Data structures to parse Receipt objects from the broadcast artifact. - // The Raw structs is what is parsed from the JSON - // and then converted to the one that is used by the user for better UX. - - struct RawReceipt { - bytes32 blockHash; - bytes blockNumber; - address contractAddress; - bytes cumulativeGasUsed; - bytes effectiveGasPrice; - address from; - bytes gasUsed; - RawReceiptLog[] logs; - bytes logsBloom; - bytes status; - address to; - bytes32 transactionHash; - bytes transactionIndex; - } - - struct Receipt { - bytes32 blockHash; - uint256 blockNumber; - address contractAddress; - uint256 cumulativeGasUsed; - uint256 effectiveGasPrice; - address from; - uint256 gasUsed; - ReceiptLog[] logs; - bytes logsBloom; - uint256 status; - address to; - bytes32 transactionHash; - uint256 transactionIndex; - } - - // Data structures to parse the entire broadcast artifact, assuming the - // transactions conform to EIP1559. - - struct EIP1559ScriptArtifact { - string[] libraries; - string path; - string[] pending; - Receipt[] receipts; - uint256 timestamp; - Tx1559[] transactions; - TxReturn[] txReturns; - } - - struct RawEIP1559ScriptArtifact { - string[] libraries; - string path; - string[] pending; - RawReceipt[] receipts; - TxReturn[] txReturns; - uint256 timestamp; - RawTx1559[] transactions; - } - - struct RawReceiptLog { - // json value = address - address logAddress; - bytes32 blockHash; - bytes blockNumber; - bytes data; - bytes logIndex; - bool removed; - bytes32[] topics; - bytes32 transactionHash; - bytes transactionIndex; - bytes transactionLogIndex; - } - - struct ReceiptLog { - // json value = address - address logAddress; - bytes32 blockHash; - uint256 blockNumber; - bytes data; - uint256 logIndex; - bytes32[] topics; - uint256 transactionIndex; - uint256 transactionLogIndex; - bool removed; - } - - struct TxReturn { - string internalType; - string value; - } - - struct Account { - address addr; - uint256 key; - } - - enum AddressType { - Payable, - NonPayable, - ZeroAddress, - Precompile, - ForgeAddress - } - - // Checks that `addr` is not blacklisted by token contracts that have a blacklist. - function assumeNotBlacklisted(address token, address addr) internal view virtual { - // Nothing to check if `token` is not a contract. - uint256 tokenCodeSize; - assembly { - tokenCodeSize := extcodesize(token) - } - require(tokenCodeSize > 0, "StdCheats assumeNotBlacklisted(address,address): Token address is not a contract."); - - bool success; - bytes memory returnData; - - // 4-byte selector for `isBlacklisted(address)`, used by USDC. - (success, returnData) = token.staticcall(abi.encodeWithSelector(0xfe575a87, addr)); - vm.assume(!success || abi.decode(returnData, (bool)) == false); - - // 4-byte selector for `isBlackListed(address)`, used by USDT. - (success, returnData) = token.staticcall(abi.encodeWithSelector(0xe47d6060, addr)); - vm.assume(!success || abi.decode(returnData, (bool)) == false); - } - - // Checks that `addr` is not blacklisted by token contracts that have a blacklist. - // This is identical to `assumeNotBlacklisted(address,address)` but with a different name, for - // backwards compatibility, since this name was used in the original PR which has already has - // a release. This function can be removed in a future release once we want a breaking change. - function assumeNoBlacklisted(address token, address addr) internal view virtual { - assumeNotBlacklisted(token, addr); - } - - function assumeAddressIsNot(address addr, AddressType addressType) internal virtual { - if (addressType == AddressType.Payable) { - assumeNotPayable(addr); - } else if (addressType == AddressType.NonPayable) { - assumePayable(addr); - } else if (addressType == AddressType.ZeroAddress) { - assumeNotZeroAddress(addr); - } else if (addressType == AddressType.Precompile) { - assumeNotPrecompile(addr); - } else if (addressType == AddressType.ForgeAddress) { - assumeNotForgeAddress(addr); - } - } - - function assumeAddressIsNot(address addr, AddressType addressType1, AddressType addressType2) internal virtual { - assumeAddressIsNot(addr, addressType1); - assumeAddressIsNot(addr, addressType2); - } - - function assumeAddressIsNot( - address addr, - AddressType addressType1, - AddressType addressType2, - AddressType addressType3 - ) internal virtual { - assumeAddressIsNot(addr, addressType1); - assumeAddressIsNot(addr, addressType2); - assumeAddressIsNot(addr, addressType3); - } - - function assumeAddressIsNot( - address addr, - AddressType addressType1, - AddressType addressType2, - AddressType addressType3, - AddressType addressType4 - ) internal virtual { - assumeAddressIsNot(addr, addressType1); - assumeAddressIsNot(addr, addressType2); - assumeAddressIsNot(addr, addressType3); - assumeAddressIsNot(addr, addressType4); - } - - // This function checks whether an address, `addr`, is payable. It works by sending 1 wei to - // `addr` and checking the `success` return value. - // NOTE: This function may result in state changes depending on the fallback/receive logic - // implemented by `addr`, which should be taken into account when this function is used. - function _isPayable(address addr) private returns (bool) { - require( - addr.balance < UINT256_MAX, - "StdCheats _isPayable(address): Balance equals max uint256, so it cannot receive any more funds" - ); - uint256 origBalanceTest = address(this).balance; - uint256 origBalanceAddr = address(addr).balance; - - vm.deal(address(this), 1); - (bool success,) = payable(addr).call{value: 1}(""); - - // reset balances - vm.deal(address(this), origBalanceTest); - vm.deal(addr, origBalanceAddr); - - return success; - } - - // NOTE: This function may result in state changes depending on the fallback/receive logic - // implemented by `addr`, which should be taken into account when this function is used. See the - // `_isPayable` method for more information. - function assumePayable(address addr) internal virtual { - vm.assume(_isPayable(addr)); - } - - function assumeNotPayable(address addr) internal virtual { - vm.assume(!_isPayable(addr)); - } - - function assumeNotZeroAddress(address addr) internal pure virtual { - vm.assume(addr != address(0)); - } - - function assumeNotPrecompile(address addr) internal pure virtual { - assumeNotPrecompile(addr, _pureChainId()); - } - - function assumeNotPrecompile(address addr, uint256 chainId) internal pure virtual { - // Note: For some chains like Optimism these are technically predeploys (i.e. bytecode placed at a specific - // address), but the same rationale for excluding them applies so we include those too. - - // These should be present on all EVM-compatible chains. - vm.assume(addr < address(0x1) || addr > address(0x9)); - - // forgefmt: disable-start - if (chainId == 10 || chainId == 420) { - // https://github.com/ethereum-optimism/optimism/blob/eaa371a0184b56b7ca6d9eb9cb0a2b78b2ccd864/op-bindings/predeploys/addresses.go#L6-L21 - vm.assume(addr < address(0x4200000000000000000000000000000000000000) || addr > address(0x4200000000000000000000000000000000000800)); - } else if (chainId == 42161 || chainId == 421613) { - // https://developer.arbitrum.io/useful-addresses#arbitrum-precompiles-l2-same-on-all-arb-chains - vm.assume(addr < address(0x0000000000000000000000000000000000000064) || addr > address(0x0000000000000000000000000000000000000068)); - } else if (chainId == 43114 || chainId == 43113) { - // https://github.com/ava-labs/subnet-evm/blob/47c03fd007ecaa6de2c52ea081596e0a88401f58/precompile/params.go#L18-L59 - vm.assume(addr < address(0x0100000000000000000000000000000000000000) || addr > address(0x01000000000000000000000000000000000000ff)); - vm.assume(addr < address(0x0200000000000000000000000000000000000000) || addr > address(0x02000000000000000000000000000000000000FF)); - vm.assume(addr < address(0x0300000000000000000000000000000000000000) || addr > address(0x03000000000000000000000000000000000000Ff)); - } - // forgefmt: disable-end - } - - function assumeNotForgeAddress(address addr) internal pure virtual { - // vm, console, and Create2Deployer addresses - vm.assume( - addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67 - && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C - ); - } - - function readEIP1559ScriptArtifact(string memory path) - internal - view - virtual - returns (EIP1559ScriptArtifact memory) - { - string memory data = vm.readFile(path); - bytes memory parsedData = vm.parseJson(data); - RawEIP1559ScriptArtifact memory rawArtifact = abi.decode(parsedData, (RawEIP1559ScriptArtifact)); - EIP1559ScriptArtifact memory artifact; - artifact.libraries = rawArtifact.libraries; - artifact.path = rawArtifact.path; - artifact.timestamp = rawArtifact.timestamp; - artifact.pending = rawArtifact.pending; - artifact.txReturns = rawArtifact.txReturns; - artifact.receipts = rawToConvertedReceipts(rawArtifact.receipts); - artifact.transactions = rawToConvertedEIPTx1559s(rawArtifact.transactions); - return artifact; - } - - function rawToConvertedEIPTx1559s(RawTx1559[] memory rawTxs) internal pure virtual returns (Tx1559[] memory) { - Tx1559[] memory txs = new Tx1559[](rawTxs.length); - for (uint256 i; i < rawTxs.length; i++) { - txs[i] = rawToConvertedEIPTx1559(rawTxs[i]); - } - return txs; - } - - function rawToConvertedEIPTx1559(RawTx1559 memory rawTx) internal pure virtual returns (Tx1559 memory) { - Tx1559 memory transaction; - transaction.arguments = rawTx.arguments; - transaction.contractName = rawTx.contractName; - transaction.functionSig = rawTx.functionSig; - transaction.hash = rawTx.hash; - transaction.txDetail = rawToConvertedEIP1559Detail(rawTx.txDetail); - transaction.opcode = rawTx.opcode; - return transaction; - } - - function rawToConvertedEIP1559Detail(RawTx1559Detail memory rawDetail) - internal - pure - virtual - returns (Tx1559Detail memory) - { - Tx1559Detail memory txDetail; - txDetail.data = rawDetail.data; - txDetail.from = rawDetail.from; - txDetail.to = rawDetail.to; - txDetail.nonce = _bytesToUint(rawDetail.nonce); - txDetail.txType = _bytesToUint(rawDetail.txType); - txDetail.value = _bytesToUint(rawDetail.value); - txDetail.gas = _bytesToUint(rawDetail.gas); - txDetail.accessList = rawDetail.accessList; - return txDetail; - } - - function readTx1559s(string memory path) internal view virtual returns (Tx1559[] memory) { - string memory deployData = vm.readFile(path); - bytes memory parsedDeployData = vm.parseJson(deployData, ".transactions"); - RawTx1559[] memory rawTxs = abi.decode(parsedDeployData, (RawTx1559[])); - return rawToConvertedEIPTx1559s(rawTxs); - } - - function readTx1559(string memory path, uint256 index) internal view virtual returns (Tx1559 memory) { - string memory deployData = vm.readFile(path); - string memory key = string(abi.encodePacked(".transactions[", vm.toString(index), "]")); - bytes memory parsedDeployData = vm.parseJson(deployData, key); - RawTx1559 memory rawTx = abi.decode(parsedDeployData, (RawTx1559)); - return rawToConvertedEIPTx1559(rawTx); - } - - // Analogous to readTransactions, but for receipts. - function readReceipts(string memory path) internal view virtual returns (Receipt[] memory) { - string memory deployData = vm.readFile(path); - bytes memory parsedDeployData = vm.parseJson(deployData, ".receipts"); - RawReceipt[] memory rawReceipts = abi.decode(parsedDeployData, (RawReceipt[])); - return rawToConvertedReceipts(rawReceipts); - } - - function readReceipt(string memory path, uint256 index) internal view virtual returns (Receipt memory) { - string memory deployData = vm.readFile(path); - string memory key = string(abi.encodePacked(".receipts[", vm.toString(index), "]")); - bytes memory parsedDeployData = vm.parseJson(deployData, key); - RawReceipt memory rawReceipt = abi.decode(parsedDeployData, (RawReceipt)); - return rawToConvertedReceipt(rawReceipt); - } - - function rawToConvertedReceipts(RawReceipt[] memory rawReceipts) internal pure virtual returns (Receipt[] memory) { - Receipt[] memory receipts = new Receipt[](rawReceipts.length); - for (uint256 i; i < rawReceipts.length; i++) { - receipts[i] = rawToConvertedReceipt(rawReceipts[i]); - } - return receipts; - } - - function rawToConvertedReceipt(RawReceipt memory rawReceipt) internal pure virtual returns (Receipt memory) { - Receipt memory receipt; - receipt.blockHash = rawReceipt.blockHash; - receipt.to = rawReceipt.to; - receipt.from = rawReceipt.from; - receipt.contractAddress = rawReceipt.contractAddress; - receipt.effectiveGasPrice = _bytesToUint(rawReceipt.effectiveGasPrice); - receipt.cumulativeGasUsed = _bytesToUint(rawReceipt.cumulativeGasUsed); - receipt.gasUsed = _bytesToUint(rawReceipt.gasUsed); - receipt.status = _bytesToUint(rawReceipt.status); - receipt.transactionIndex = _bytesToUint(rawReceipt.transactionIndex); - receipt.blockNumber = _bytesToUint(rawReceipt.blockNumber); - receipt.logs = rawToConvertedReceiptLogs(rawReceipt.logs); - receipt.logsBloom = rawReceipt.logsBloom; - receipt.transactionHash = rawReceipt.transactionHash; - return receipt; - } - - function rawToConvertedReceiptLogs(RawReceiptLog[] memory rawLogs) - internal - pure - virtual - returns (ReceiptLog[] memory) - { - ReceiptLog[] memory logs = new ReceiptLog[](rawLogs.length); - for (uint256 i; i < rawLogs.length; i++) { - logs[i].logAddress = rawLogs[i].logAddress; - logs[i].blockHash = rawLogs[i].blockHash; - logs[i].blockNumber = _bytesToUint(rawLogs[i].blockNumber); - logs[i].data = rawLogs[i].data; - logs[i].logIndex = _bytesToUint(rawLogs[i].logIndex); - logs[i].topics = rawLogs[i].topics; - logs[i].transactionIndex = _bytesToUint(rawLogs[i].transactionIndex); - logs[i].transactionLogIndex = _bytesToUint(rawLogs[i].transactionLogIndex); - logs[i].removed = rawLogs[i].removed; - } - return logs; - } - - // Deploy a contract by fetching the contract bytecode from - // the artifacts directory - // e.g. `deployCode(code, abi.encode(arg1,arg2,arg3))` - function deployCode(string memory what, bytes memory args) internal virtual returns (address addr) { - bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); - /// @solidity memory-safe-assembly - assembly { - addr := create(0, add(bytecode, 0x20), mload(bytecode)) - } - - require(addr != address(0), "StdCheats deployCode(string,bytes): Deployment failed."); - } - - function deployCode(string memory what) internal virtual returns (address addr) { - bytes memory bytecode = vm.getCode(what); - /// @solidity memory-safe-assembly - assembly { - addr := create(0, add(bytecode, 0x20), mload(bytecode)) - } - - require(addr != address(0), "StdCheats deployCode(string): Deployment failed."); - } - - /// @dev deploy contract with value on construction - function deployCode(string memory what, bytes memory args, uint256 val) internal virtual returns (address addr) { - bytes memory bytecode = abi.encodePacked(vm.getCode(what), args); - /// @solidity memory-safe-assembly - assembly { - addr := create(val, add(bytecode, 0x20), mload(bytecode)) - } - - require(addr != address(0), "StdCheats deployCode(string,bytes,uint256): Deployment failed."); - } - - function deployCode(string memory what, uint256 val) internal virtual returns (address addr) { - bytes memory bytecode = vm.getCode(what); - /// @solidity memory-safe-assembly - assembly { - addr := create(val, add(bytecode, 0x20), mload(bytecode)) - } - - require(addr != address(0), "StdCheats deployCode(string,uint256): Deployment failed."); - } - - // creates a labeled address and the corresponding private key - function makeAddrAndKey(string memory name) internal virtual returns (address addr, uint256 privateKey) { - privateKey = uint256(keccak256(abi.encodePacked(name))); - addr = vm.addr(privateKey); - vm.label(addr, name); - } - - // creates a labeled address - function makeAddr(string memory name) internal virtual returns (address addr) { - (addr,) = makeAddrAndKey(name); - } - - // Destroys an account immediately, sending the balance to beneficiary. - // Destroying means: balance will be zero, code will be empty, and nonce will be 0 - // This is similar to selfdestruct but not identical: selfdestruct destroys code and nonce - // only after tx ends, this will run immediately. - function destroyAccount(address who, address beneficiary) internal virtual { - uint256 currBalance = who.balance; - vm.etch(who, abi.encode()); - vm.deal(who, 0); - vm.resetNonce(who); - - uint256 beneficiaryBalance = beneficiary.balance; - vm.deal(beneficiary, currBalance + beneficiaryBalance); - } - - // creates a struct containing both a labeled address and the corresponding private key - function makeAccount(string memory name) internal virtual returns (Account memory account) { - (account.addr, account.key) = makeAddrAndKey(name); - } - - function deriveRememberKey(string memory mnemonic, uint32 index) - internal - virtual - returns (address who, uint256 privateKey) - { - privateKey = vm.deriveKey(mnemonic, index); - who = vm.rememberKey(privateKey); - } - - function _bytesToUint(bytes memory b) private pure returns (uint256) { - require(b.length <= 32, "StdCheats _bytesToUint(bytes): Bytes length exceeds 32."); - return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); - } - - function isFork() internal view virtual returns (bool status) { - try vm.activeFork() { - status = true; - } catch (bytes memory) {} - } - - modifier skipWhenForking() { - if (!isFork()) { - _; - } - } - - modifier skipWhenNotForking() { - if (isFork()) { - _; - } - } - - modifier noGasMetering() { - vm.pauseGasMetering(); - // To prevent turning gas monitoring back on with nested functions that use this modifier, - // we check if gasMetering started in the off position. If it did, we don't want to turn - // it back on until we exit the top level function that used the modifier - // - // i.e. funcA() noGasMetering { funcB() }, where funcB has noGasMetering as well. - // funcA will have `gasStartedOff` as false, funcB will have it as true, - // so we only turn metering back on at the end of the funcA - bool gasStartedOff = gasMeteringOff; - gasMeteringOff = true; - - _; - - // if gas metering was on when this modifier was called, turn it back on at the end - if (!gasStartedOff) { - gasMeteringOff = false; - vm.resumeGasMetering(); - } - } - - // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no - // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We - // can't simply access the chain ID in a normal view or pure function because the solc View Pure - // Checker changed `chainid` from pure to view in 0.8.0. - function _viewChainId() private view returns (uint256 chainId) { - // Assembly required since `block.chainid` was introduced in 0.8.0. - assembly { - chainId := chainid() - } - - address(this); // Silence warnings in older Solc versions. - } - - function _pureChainId() private pure returns (uint256 chainId) { - function() internal view returns (uint256) fnIn = _viewChainId; - function() internal pure returns (uint256) pureChainId; - assembly { - pureChainId := fnIn - } - chainId = pureChainId(); - } -} - -// Wrappers around cheatcodes to avoid footguns -abstract contract StdCheats is StdCheatsSafe { - using stdStorage for StdStorage; - - StdStorage private stdstore; - Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); - address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; - - // Skip forward or rewind time by the specified number of seconds - function skip(uint256 time) internal virtual { - vm.warp(block.timestamp + time); - } - - function rewind(uint256 time) internal virtual { - vm.warp(block.timestamp - time); - } - - // Setup a prank from an address that has some ether - function hoax(address msgSender) internal virtual { - vm.deal(msgSender, 1 << 128); - vm.prank(msgSender); - } - - function hoax(address msgSender, uint256 give) internal virtual { - vm.deal(msgSender, give); - vm.prank(msgSender); - } - - function hoax(address msgSender, address origin) internal virtual { - vm.deal(msgSender, 1 << 128); - vm.prank(msgSender, origin); - } - - function hoax(address msgSender, address origin, uint256 give) internal virtual { - vm.deal(msgSender, give); - vm.prank(msgSender, origin); - } - - // Start perpetual prank from an address that has some ether - function startHoax(address msgSender) internal virtual { - vm.deal(msgSender, 1 << 128); - vm.startPrank(msgSender); - } - - function startHoax(address msgSender, uint256 give) internal virtual { - vm.deal(msgSender, give); - vm.startPrank(msgSender); - } - - // Start perpetual prank from an address that has some ether - // tx.origin is set to the origin parameter - function startHoax(address msgSender, address origin) internal virtual { - vm.deal(msgSender, 1 << 128); - vm.startPrank(msgSender, origin); - } - - function startHoax(address msgSender, address origin, uint256 give) internal virtual { - vm.deal(msgSender, give); - vm.startPrank(msgSender, origin); - } - - function changePrank(address msgSender) internal virtual { - console2_log_StdCheats("changePrank is deprecated. Please use vm.startPrank instead."); - vm.stopPrank(); - vm.startPrank(msgSender); - } - - function changePrank(address msgSender, address txOrigin) internal virtual { - vm.stopPrank(); - vm.startPrank(msgSender, txOrigin); - } - - // The same as Vm's `deal` - // Use the alternative signature for ERC20 tokens - function deal(address to, uint256 give) internal virtual { - vm.deal(to, give); - } - - // Set the balance of an account for any ERC20 token - // Use the alternative signature to update `totalSupply` - function deal(address token, address to, uint256 give) internal virtual { - deal(token, to, give, false); - } - - // Set the balance of an account for any ERC1155 token - // Use the alternative signature to update `totalSupply` - function dealERC1155(address token, address to, uint256 id, uint256 give) internal virtual { - dealERC1155(token, to, id, give, false); - } - - function deal(address token, address to, uint256 give, bool adjust) internal virtual { - // get current balance - (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); - uint256 prevBal = abi.decode(balData, (uint256)); - - // update balance - stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(give); - - // update total supply - if (adjust) { - (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0x18160ddd)); - uint256 totSup = abi.decode(totSupData, (uint256)); - if (give < prevBal) { - totSup -= (prevBal - give); - } else { - totSup += (give - prevBal); - } - stdstore.target(token).sig(0x18160ddd).checked_write(totSup); - } - } - - function dealERC1155(address token, address to, uint256 id, uint256 give, bool adjust) internal virtual { - // get current balance - (, bytes memory balData) = token.staticcall(abi.encodeWithSelector(0x00fdd58e, to, id)); - uint256 prevBal = abi.decode(balData, (uint256)); - - // update balance - stdstore.target(token).sig(0x00fdd58e).with_key(to).with_key(id).checked_write(give); - - // update total supply - if (adjust) { - (, bytes memory totSupData) = token.staticcall(abi.encodeWithSelector(0xbd85b039, id)); - require( - totSupData.length != 0, - "StdCheats deal(address,address,uint,uint,bool): target contract is not ERC1155Supply." - ); - uint256 totSup = abi.decode(totSupData, (uint256)); - if (give < prevBal) { - totSup -= (prevBal - give); - } else { - totSup += (give - prevBal); - } - stdstore.target(token).sig(0xbd85b039).with_key(id).checked_write(totSup); - } - } - - function dealERC721(address token, address to, uint256 id) internal virtual { - // check if token id is already minted and the actual owner. - (bool successMinted, bytes memory ownerData) = token.staticcall(abi.encodeWithSelector(0x6352211e, id)); - require(successMinted, "StdCheats deal(address,address,uint,bool): id not minted."); - - // get owner current balance - (, bytes memory fromBalData) = - token.staticcall(abi.encodeWithSelector(0x70a08231, abi.decode(ownerData, (address)))); - uint256 fromPrevBal = abi.decode(fromBalData, (uint256)); - - // get new user current balance - (, bytes memory toBalData) = token.staticcall(abi.encodeWithSelector(0x70a08231, to)); - uint256 toPrevBal = abi.decode(toBalData, (uint256)); - - // update balances - stdstore.target(token).sig(0x70a08231).with_key(abi.decode(ownerData, (address))).checked_write(--fromPrevBal); - stdstore.target(token).sig(0x70a08231).with_key(to).checked_write(++toPrevBal); - - // update owner - stdstore.target(token).sig(0x6352211e).with_key(id).checked_write(to); - } - - function deployCodeTo(string memory what, address where) internal virtual { - deployCodeTo(what, "", 0, where); - } - - function deployCodeTo(string memory what, bytes memory args, address where) internal virtual { - deployCodeTo(what, args, 0, where); - } - - function deployCodeTo(string memory what, bytes memory args, uint256 value, address where) internal virtual { - bytes memory creationCode = vm.getCode(what); - vm.etch(where, abi.encodePacked(creationCode, args)); - (bool success, bytes memory runtimeBytecode) = where.call{value: value}(""); - require(success, "StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode."); - vm.etch(where, runtimeBytecode); - } - - // Used to prevent the compilation of console, which shortens the compilation time when console is not used elsewhere. - function console2_log_StdCheats(string memory p0) private view { - (bool status,) = address(CONSOLE2_ADDRESS).staticcall(abi.encodeWithSignature("log(string)", p0)); - status; - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdError.sol b/examples/thorchain/contracts/lib/forge-std/src/StdError.sol deleted file mode 100644 index a302191f..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdError.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: MIT -// Panics work for versions >=0.8.0, but we lowered the pragma to make this compatible with Test -pragma solidity >=0.6.2 <0.9.0; - -library stdError { - bytes public constant assertionError = abi.encodeWithSignature("Panic(uint256)", 0x01); - bytes public constant arithmeticError = abi.encodeWithSignature("Panic(uint256)", 0x11); - bytes public constant divisionError = abi.encodeWithSignature("Panic(uint256)", 0x12); - bytes public constant enumConversionError = abi.encodeWithSignature("Panic(uint256)", 0x21); - bytes public constant encodeStorageError = abi.encodeWithSignature("Panic(uint256)", 0x22); - bytes public constant popError = abi.encodeWithSignature("Panic(uint256)", 0x31); - bytes public constant indexOOBError = abi.encodeWithSignature("Panic(uint256)", 0x32); - bytes public constant memOverflowError = abi.encodeWithSignature("Panic(uint256)", 0x41); - bytes public constant zeroVarError = abi.encodeWithSignature("Panic(uint256)", 0x51); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdInvariant.sol b/examples/thorchain/contracts/lib/forge-std/src/StdInvariant.sol deleted file mode 100644 index 056db98f..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdInvariant.sol +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -abstract contract StdInvariant { - struct FuzzSelector { - address addr; - bytes4[] selectors; - } - - struct FuzzArtifactSelector { - string artifact; - bytes4[] selectors; - } - - struct FuzzInterface { - address addr; - string[] artifacts; - } - - address[] private _excludedContracts; - address[] private _excludedSenders; - address[] private _targetedContracts; - address[] private _targetedSenders; - - string[] private _excludedArtifacts; - string[] private _targetedArtifacts; - - FuzzArtifactSelector[] private _targetedArtifactSelectors; - - FuzzSelector[] private _excludedSelectors; - FuzzSelector[] private _targetedSelectors; - - FuzzInterface[] private _targetedInterfaces; - - // Functions for users: - // These are intended to be called in tests. - - function excludeContract(address newExcludedContract_) internal { - _excludedContracts.push(newExcludedContract_); - } - - function excludeSelector(FuzzSelector memory newExcludedSelector_) internal { - _excludedSelectors.push(newExcludedSelector_); - } - - function excludeSender(address newExcludedSender_) internal { - _excludedSenders.push(newExcludedSender_); - } - - function excludeArtifact(string memory newExcludedArtifact_) internal { - _excludedArtifacts.push(newExcludedArtifact_); - } - - function targetArtifact(string memory newTargetedArtifact_) internal { - _targetedArtifacts.push(newTargetedArtifact_); - } - - function targetArtifactSelector(FuzzArtifactSelector memory newTargetedArtifactSelector_) internal { - _targetedArtifactSelectors.push(newTargetedArtifactSelector_); - } - - function targetContract(address newTargetedContract_) internal { - _targetedContracts.push(newTargetedContract_); - } - - function targetSelector(FuzzSelector memory newTargetedSelector_) internal { - _targetedSelectors.push(newTargetedSelector_); - } - - function targetSender(address newTargetedSender_) internal { - _targetedSenders.push(newTargetedSender_); - } - - function targetInterface(FuzzInterface memory newTargetedInterface_) internal { - _targetedInterfaces.push(newTargetedInterface_); - } - - // Functions for forge: - // These are called by forge to run invariant tests and don't need to be called in tests. - - function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) { - excludedArtifacts_ = _excludedArtifacts; - } - - function excludeContracts() public view returns (address[] memory excludedContracts_) { - excludedContracts_ = _excludedContracts; - } - - function excludeSelectors() public view returns (FuzzSelector[] memory excludedSelectors_) { - excludedSelectors_ = _excludedSelectors; - } - - function excludeSenders() public view returns (address[] memory excludedSenders_) { - excludedSenders_ = _excludedSenders; - } - - function targetArtifacts() public view returns (string[] memory targetedArtifacts_) { - targetedArtifacts_ = _targetedArtifacts; - } - - function targetArtifactSelectors() public view returns (FuzzArtifactSelector[] memory targetedArtifactSelectors_) { - targetedArtifactSelectors_ = _targetedArtifactSelectors; - } - - function targetContracts() public view returns (address[] memory targetedContracts_) { - targetedContracts_ = _targetedContracts; - } - - function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) { - targetedSelectors_ = _targetedSelectors; - } - - function targetSenders() public view returns (address[] memory targetedSenders_) { - targetedSenders_ = _targetedSenders; - } - - function targetInterfaces() public view returns (FuzzInterface[] memory targetedInterfaces_) { - targetedInterfaces_ = _targetedInterfaces; - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdJson.sol b/examples/thorchain/contracts/lib/forge-std/src/StdJson.sol deleted file mode 100644 index 6dbde835..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdJson.sol +++ /dev/null @@ -1,179 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.0 <0.9.0; - -pragma experimental ABIEncoderV2; - -import {VmSafe} from "./Vm.sol"; - -// Helpers for parsing and writing JSON files -// To parse: -// ``` -// using stdJson for string; -// string memory json = vm.readFile(""); -// json.readUint(""); -// ``` -// To write: -// ``` -// using stdJson for string; -// string memory json = "json"; -// json.serialize("a", uint256(123)); -// string memory semiFinal = json.serialize("b", string("test")); -// string memory finalJson = json.serialize("c", semiFinal); -// finalJson.write(""); -// ``` - -library stdJson { - VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); - - function parseRaw(string memory json, string memory key) internal pure returns (bytes memory) { - return vm.parseJson(json, key); - } - - function readUint(string memory json, string memory key) internal pure returns (uint256) { - return vm.parseJsonUint(json, key); - } - - function readUintArray(string memory json, string memory key) internal pure returns (uint256[] memory) { - return vm.parseJsonUintArray(json, key); - } - - function readInt(string memory json, string memory key) internal pure returns (int256) { - return vm.parseJsonInt(json, key); - } - - function readIntArray(string memory json, string memory key) internal pure returns (int256[] memory) { - return vm.parseJsonIntArray(json, key); - } - - function readBytes32(string memory json, string memory key) internal pure returns (bytes32) { - return vm.parseJsonBytes32(json, key); - } - - function readBytes32Array(string memory json, string memory key) internal pure returns (bytes32[] memory) { - return vm.parseJsonBytes32Array(json, key); - } - - function readString(string memory json, string memory key) internal pure returns (string memory) { - return vm.parseJsonString(json, key); - } - - function readStringArray(string memory json, string memory key) internal pure returns (string[] memory) { - return vm.parseJsonStringArray(json, key); - } - - function readAddress(string memory json, string memory key) internal pure returns (address) { - return vm.parseJsonAddress(json, key); - } - - function readAddressArray(string memory json, string memory key) internal pure returns (address[] memory) { - return vm.parseJsonAddressArray(json, key); - } - - function readBool(string memory json, string memory key) internal pure returns (bool) { - return vm.parseJsonBool(json, key); - } - - function readBoolArray(string memory json, string memory key) internal pure returns (bool[] memory) { - return vm.parseJsonBoolArray(json, key); - } - - function readBytes(string memory json, string memory key) internal pure returns (bytes memory) { - return vm.parseJsonBytes(json, key); - } - - function readBytesArray(string memory json, string memory key) internal pure returns (bytes[] memory) { - return vm.parseJsonBytesArray(json, key); - } - - function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) { - return vm.serializeJson(jsonKey, rootObject); - } - - function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) { - return vm.serializeBool(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bool[] memory value) - internal - returns (string memory) - { - return vm.serializeBool(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) { - return vm.serializeUint(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, uint256[] memory value) - internal - returns (string memory) - { - return vm.serializeUint(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) { - return vm.serializeInt(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, int256[] memory value) - internal - returns (string memory) - { - return vm.serializeInt(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) { - return vm.serializeAddress(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, address[] memory value) - internal - returns (string memory) - { - return vm.serializeAddress(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) { - return vm.serializeBytes32(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes32[] memory value) - internal - returns (string memory) - { - return vm.serializeBytes32(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) { - return vm.serializeBytes(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes[] memory value) - internal - returns (string memory) - { - return vm.serializeBytes(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, string memory value) - internal - returns (string memory) - { - return vm.serializeString(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, string[] memory value) - internal - returns (string memory) - { - return vm.serializeString(jsonKey, key, value); - } - - function write(string memory jsonKey, string memory path) internal { - vm.writeJson(jsonKey, path); - } - - function write(string memory jsonKey, string memory path, string memory valueKey) internal { - vm.writeJson(jsonKey, path, valueKey); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdMath.sol b/examples/thorchain/contracts/lib/forge-std/src/StdMath.sol deleted file mode 100644 index 459523bd..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdMath.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -library stdMath { - int256 private constant INT256_MIN = -57896044618658097711785492504343953926634992332820282019728792003956564819968; - - function abs(int256 a) internal pure returns (uint256) { - // Required or it will fail when `a = type(int256).min` - if (a == INT256_MIN) { - return 57896044618658097711785492504343953926634992332820282019728792003956564819968; - } - - return uint256(a > 0 ? a : -a); - } - - function delta(uint256 a, uint256 b) internal pure returns (uint256) { - return a > b ? a - b : b - a; - } - - function delta(int256 a, int256 b) internal pure returns (uint256) { - // a and b are of the same sign - // this works thanks to two's complement, the left-most bit is the sign bit - if ((a ^ b) > -1) { - return delta(abs(a), abs(b)); - } - - // a and b are of opposite signs - return abs(a) + abs(b); - } - - function percentDelta(uint256 a, uint256 b) internal pure returns (uint256) { - uint256 absDelta = delta(a, b); - - return absDelta * 1e18 / b; - } - - function percentDelta(int256 a, int256 b) internal pure returns (uint256) { - uint256 absDelta = delta(a, b); - uint256 absB = abs(b); - - return absDelta * 1e18 / absB; - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdStorage.sol b/examples/thorchain/contracts/lib/forge-std/src/StdStorage.sol deleted file mode 100644 index bf3223de..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdStorage.sol +++ /dev/null @@ -1,473 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -import {Vm} from "./Vm.sol"; - -struct FindData { - uint256 slot; - uint256 offsetLeft; - uint256 offsetRight; - bool found; -} - -struct StdStorage { - mapping(address => mapping(bytes4 => mapping(bytes32 => FindData))) finds; - bytes32[] _keys; - bytes4 _sig; - uint256 _depth; - address _target; - bytes32 _set; - bool _enable_packed_slots; - bytes _calldata; -} - -library stdStorageSafe { - event SlotFound(address who, bytes4 fsig, bytes32 keysHash, uint256 slot); - event WARNING_UninitedSlot(address who, uint256 slot); - - Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); - uint256 constant UINT256_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; - - function sigs(string memory sigStr) internal pure returns (bytes4) { - return bytes4(keccak256(bytes(sigStr))); - } - - function getCallParams(StdStorage storage self) internal view returns (bytes memory) { - if (self._calldata.length == 0) { - return flatten(self._keys); - } else { - return self._calldata; - } - } - - // Calls target contract with configured parameters - function callTarget(StdStorage storage self) internal view returns (bool, bytes32) { - bytes memory cald = abi.encodePacked(self._sig, getCallParams(self)); - (bool success, bytes memory rdat) = self._target.staticcall(cald); - bytes32 result = bytesToBytes32(rdat, 32 * self._depth); - - return (success, result); - } - - // Tries mutating slot value to determine if the targeted value is stored in it. - // If current value is 0, then we are setting slot value to type(uint256).max - // Otherwise, we set it to 0. That way, return value should always be affected. - function checkSlotMutatesCall(StdStorage storage self, bytes32 slot) internal returns (bool) { - bytes32 prevSlotValue = vm.load(self._target, slot); - (bool success, bytes32 prevReturnValue) = callTarget(self); - - bytes32 testVal = prevReturnValue == bytes32(0) ? bytes32(UINT256_MAX) : bytes32(0); - vm.store(self._target, slot, testVal); - - (, bytes32 newReturnValue) = callTarget(self); - - vm.store(self._target, slot, prevSlotValue); - - return (success && (prevReturnValue != newReturnValue)); - } - - // Tries setting one of the bits in slot to 1 until return value changes. - // Index of resulted bit is an offset packed slot has from left/right side - function findOffset(StdStorage storage self, bytes32 slot, bool left) internal returns (bool, uint256) { - for (uint256 offset = 0; offset < 256; offset++) { - uint256 valueToPut = left ? (1 << (255 - offset)) : (1 << offset); - vm.store(self._target, slot, bytes32(valueToPut)); - - (bool success, bytes32 data) = callTarget(self); - - if (success && (uint256(data) > 0)) { - return (true, offset); - } - } - return (false, 0); - } - - function findOffsets(StdStorage storage self, bytes32 slot) internal returns (bool, uint256, uint256) { - bytes32 prevSlotValue = vm.load(self._target, slot); - - (bool foundLeft, uint256 offsetLeft) = findOffset(self, slot, true); - (bool foundRight, uint256 offsetRight) = findOffset(self, slot, false); - - // `findOffset` may mutate slot value, so we are setting it to initial value - vm.store(self._target, slot, prevSlotValue); - return (foundLeft && foundRight, offsetLeft, offsetRight); - } - - function find(StdStorage storage self) internal returns (FindData storage) { - return find(self, true); - } - - /// @notice find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against - // slot complexity: - // if flat, will be bytes32(uint256(uint)); - // if map, will be keccak256(abi.encode(key, uint(slot))); - // if deep map, will be keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot))))); - // if map struct, will be bytes32(uint256(keccak256(abi.encode(key1, keccak256(abi.encode(key0, uint(slot)))))) + structFieldDepth); - function find(StdStorage storage self, bool _clear) internal returns (FindData storage) { - address who = self._target; - bytes4 fsig = self._sig; - uint256 field_depth = self._depth; - bytes memory params = getCallParams(self); - - // calldata to test against - if (self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) { - if (_clear) { - clear(self); - } - return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; - } - vm.record(); - (, bytes32 callResult) = callTarget(self); - (bytes32[] memory reads,) = vm.accesses(address(who)); - - if (reads.length == 0) { - revert("stdStorage find(StdStorage): No storage use detected for target."); - } else { - for (uint256 i = reads.length; --i >= 0;) { - bytes32 prev = vm.load(who, reads[i]); - if (prev == bytes32(0)) { - emit WARNING_UninitedSlot(who, uint256(reads[i])); - } - - if (!checkSlotMutatesCall(self, reads[i])) { - continue; - } - - (uint256 offsetLeft, uint256 offsetRight) = (0, 0); - - if (self._enable_packed_slots) { - bool found; - (found, offsetLeft, offsetRight) = findOffsets(self, reads[i]); - if (!found) { - continue; - } - } - - // Check that value between found offsets is equal to the current call result - uint256 curVal = (uint256(prev) & getMaskByOffsets(offsetLeft, offsetRight)) >> offsetRight; - - if (uint256(callResult) != curVal) { - continue; - } - - emit SlotFound(who, fsig, keccak256(abi.encodePacked(params, field_depth)), uint256(reads[i])); - self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))] = - FindData(uint256(reads[i]), offsetLeft, offsetRight, true); - break; - } - } - - require( - self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found, - "stdStorage find(StdStorage): Slot(s) not found." - ); - - if (_clear) { - clear(self); - } - return self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; - } - - function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { - self._target = _target; - return self; - } - - function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { - self._sig = _sig; - return self; - } - - function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { - self._sig = sigs(_sig); - return self; - } - - function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) { - self._calldata = _calldata; - return self; - } - - function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { - self._keys.push(bytes32(uint256(uint160(who)))); - return self; - } - - function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { - self._keys.push(bytes32(amt)); - return self; - } - - function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { - self._keys.push(key); - return self; - } - - function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) { - self._enable_packed_slots = true; - return self; - } - - function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { - self._depth = _depth; - return self; - } - - function read(StdStorage storage self) private returns (bytes memory) { - FindData storage data = find(self, false); - uint256 mask = getMaskByOffsets(data.offsetLeft, data.offsetRight); - uint256 value = (uint256(vm.load(self._target, bytes32(data.slot))) & mask) >> data.offsetRight; - clear(self); - return abi.encode(value); - } - - function read_bytes32(StdStorage storage self) internal returns (bytes32) { - return abi.decode(read(self), (bytes32)); - } - - function read_bool(StdStorage storage self) internal returns (bool) { - int256 v = read_int(self); - if (v == 0) return false; - if (v == 1) return true; - revert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool."); - } - - function read_address(StdStorage storage self) internal returns (address) { - return abi.decode(read(self), (address)); - } - - function read_uint(StdStorage storage self) internal returns (uint256) { - return abi.decode(read(self), (uint256)); - } - - function read_int(StdStorage storage self) internal returns (int256) { - return abi.decode(read(self), (int256)); - } - - function parent(StdStorage storage self) internal returns (uint256, bytes32) { - address who = self._target; - uint256 field_depth = self._depth; - vm.startMappingRecording(); - uint256 child = find(self, true).slot - field_depth; - (bool found, bytes32 key, bytes32 parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); - if (!found) { - revert( - "stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." - ); - } - return (uint256(parent_slot), key); - } - - function root(StdStorage storage self) internal returns (uint256) { - address who = self._target; - uint256 field_depth = self._depth; - vm.startMappingRecording(); - uint256 child = find(self, true).slot - field_depth; - bool found; - bytes32 root_slot; - bytes32 parent_slot; - (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(child)); - if (!found) { - revert( - "stdStorage read_bool(StdStorage): Cannot find parent. Make sure you give a slot and startMappingRecording() has been called." - ); - } - while (found) { - root_slot = parent_slot; - (found,, parent_slot) = vm.getMappingKeyAndParentOf(who, bytes32(root_slot)); - } - return uint256(root_slot); - } - - function bytesToBytes32(bytes memory b, uint256 offset) private pure returns (bytes32) { - bytes32 out; - - uint256 max = b.length > 32 ? 32 : b.length; - for (uint256 i = 0; i < max; i++) { - out |= bytes32(b[offset + i] & 0xFF) >> (i * 8); - } - return out; - } - - function flatten(bytes32[] memory b) private pure returns (bytes memory) { - bytes memory result = new bytes(b.length * 32); - for (uint256 i = 0; i < b.length; i++) { - bytes32 k = b[i]; - /// @solidity memory-safe-assembly - assembly { - mstore(add(result, add(32, mul(32, i))), k) - } - } - - return result; - } - - function clear(StdStorage storage self) internal { - delete self._target; - delete self._sig; - delete self._keys; - delete self._depth; - delete self._enable_packed_slots; - delete self._calldata; - } - - // Returns mask which contains non-zero bits for values between `offsetLeft` and `offsetRight` - // (slotValue & mask) >> offsetRight will be the value of the given packed variable - function getMaskByOffsets(uint256 offsetLeft, uint256 offsetRight) internal pure returns (uint256 mask) { - // mask = ((1 << (256 - (offsetRight + offsetLeft))) - 1) << offsetRight; - // using assembly because (1 << 256) causes overflow - assembly { - mask := shl(offsetRight, sub(shl(sub(256, add(offsetRight, offsetLeft)), 1), 1)) - } - } - - // Returns slot value with updated packed variable. - function getUpdatedSlotValue(bytes32 curValue, uint256 varValue, uint256 offsetLeft, uint256 offsetRight) - internal - pure - returns (bytes32 newValue) - { - return bytes32((uint256(curValue) & ~getMaskByOffsets(offsetLeft, offsetRight)) | (varValue << offsetRight)); - } -} - -library stdStorage { - Vm private constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); - - function sigs(string memory sigStr) internal pure returns (bytes4) { - return stdStorageSafe.sigs(sigStr); - } - - function find(StdStorage storage self) internal returns (uint256) { - return find(self, true); - } - - function find(StdStorage storage self, bool _clear) internal returns (uint256) { - return stdStorageSafe.find(self, _clear).slot; - } - - function target(StdStorage storage self, address _target) internal returns (StdStorage storage) { - return stdStorageSafe.target(self, _target); - } - - function sig(StdStorage storage self, bytes4 _sig) internal returns (StdStorage storage) { - return stdStorageSafe.sig(self, _sig); - } - - function sig(StdStorage storage self, string memory _sig) internal returns (StdStorage storage) { - return stdStorageSafe.sig(self, _sig); - } - - function with_key(StdStorage storage self, address who) internal returns (StdStorage storage) { - return stdStorageSafe.with_key(self, who); - } - - function with_key(StdStorage storage self, uint256 amt) internal returns (StdStorage storage) { - return stdStorageSafe.with_key(self, amt); - } - - function with_key(StdStorage storage self, bytes32 key) internal returns (StdStorage storage) { - return stdStorageSafe.with_key(self, key); - } - - function with_calldata(StdStorage storage self, bytes memory _calldata) internal returns (StdStorage storage) { - return stdStorageSafe.with_calldata(self, _calldata); - } - - function enable_packed_slots(StdStorage storage self) internal returns (StdStorage storage) { - return stdStorageSafe.enable_packed_slots(self); - } - - function depth(StdStorage storage self, uint256 _depth) internal returns (StdStorage storage) { - return stdStorageSafe.depth(self, _depth); - } - - function clear(StdStorage storage self) internal { - stdStorageSafe.clear(self); - } - - function checked_write(StdStorage storage self, address who) internal { - checked_write(self, bytes32(uint256(uint160(who)))); - } - - function checked_write(StdStorage storage self, uint256 amt) internal { - checked_write(self, bytes32(amt)); - } - - function checked_write_int(StdStorage storage self, int256 val) internal { - checked_write(self, bytes32(uint256(val))); - } - - function checked_write(StdStorage storage self, bool write) internal { - bytes32 t; - /// @solidity memory-safe-assembly - assembly { - t := write - } - checked_write(self, t); - } - - function checked_write(StdStorage storage self, bytes32 set) internal { - address who = self._target; - bytes4 fsig = self._sig; - uint256 field_depth = self._depth; - bytes memory params = stdStorageSafe.getCallParams(self); - - if (!self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))].found) { - find(self, false); - } - FindData storage data = self.finds[who][fsig][keccak256(abi.encodePacked(params, field_depth))]; - if ((data.offsetLeft + data.offsetRight) > 0) { - uint256 maxVal = 2 ** (256 - (data.offsetLeft + data.offsetRight)); - require( - uint256(set) < maxVal, - string( - abi.encodePacked( - "stdStorage find(StdStorage): Packed slot. We can't fit value greater than ", - vm.toString(maxVal) - ) - ) - ); - } - bytes32 curVal = vm.load(who, bytes32(data.slot)); - bytes32 valToSet = stdStorageSafe.getUpdatedSlotValue(curVal, uint256(set), data.offsetLeft, data.offsetRight); - - vm.store(who, bytes32(data.slot), valToSet); - - (bool success, bytes32 callResult) = stdStorageSafe.callTarget(self); - - if (!success || callResult != set) { - vm.store(who, bytes32(data.slot), curVal); - revert("stdStorage find(StdStorage): Failed to write value."); - } - clear(self); - } - - function read_bytes32(StdStorage storage self) internal returns (bytes32) { - return stdStorageSafe.read_bytes32(self); - } - - function read_bool(StdStorage storage self) internal returns (bool) { - return stdStorageSafe.read_bool(self); - } - - function read_address(StdStorage storage self) internal returns (address) { - return stdStorageSafe.read_address(self); - } - - function read_uint(StdStorage storage self) internal returns (uint256) { - return stdStorageSafe.read_uint(self); - } - - function read_int(StdStorage storage self) internal returns (int256) { - return stdStorageSafe.read_int(self); - } - - function parent(StdStorage storage self) internal returns (uint256, bytes32) { - return stdStorageSafe.parent(self); - } - - function root(StdStorage storage self) internal returns (uint256) { - return stdStorageSafe.root(self); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdStyle.sol b/examples/thorchain/contracts/lib/forge-std/src/StdStyle.sol deleted file mode 100644 index d371e0c6..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdStyle.sol +++ /dev/null @@ -1,333 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.4.22 <0.9.0; - -import {VmSafe} from "./Vm.sol"; - -library StdStyle { - VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); - - string constant RED = "\u001b[91m"; - string constant GREEN = "\u001b[92m"; - string constant YELLOW = "\u001b[93m"; - string constant BLUE = "\u001b[94m"; - string constant MAGENTA = "\u001b[95m"; - string constant CYAN = "\u001b[96m"; - string constant BOLD = "\u001b[1m"; - string constant DIM = "\u001b[2m"; - string constant ITALIC = "\u001b[3m"; - string constant UNDERLINE = "\u001b[4m"; - string constant INVERSE = "\u001b[7m"; - string constant RESET = "\u001b[0m"; - - function styleConcat(string memory style, string memory self) private pure returns (string memory) { - return string(abi.encodePacked(style, self, RESET)); - } - - function red(string memory self) internal pure returns (string memory) { - return styleConcat(RED, self); - } - - function red(uint256 self) internal pure returns (string memory) { - return red(vm.toString(self)); - } - - function red(int256 self) internal pure returns (string memory) { - return red(vm.toString(self)); - } - - function red(address self) internal pure returns (string memory) { - return red(vm.toString(self)); - } - - function red(bool self) internal pure returns (string memory) { - return red(vm.toString(self)); - } - - function redBytes(bytes memory self) internal pure returns (string memory) { - return red(vm.toString(self)); - } - - function redBytes32(bytes32 self) internal pure returns (string memory) { - return red(vm.toString(self)); - } - - function green(string memory self) internal pure returns (string memory) { - return styleConcat(GREEN, self); - } - - function green(uint256 self) internal pure returns (string memory) { - return green(vm.toString(self)); - } - - function green(int256 self) internal pure returns (string memory) { - return green(vm.toString(self)); - } - - function green(address self) internal pure returns (string memory) { - return green(vm.toString(self)); - } - - function green(bool self) internal pure returns (string memory) { - return green(vm.toString(self)); - } - - function greenBytes(bytes memory self) internal pure returns (string memory) { - return green(vm.toString(self)); - } - - function greenBytes32(bytes32 self) internal pure returns (string memory) { - return green(vm.toString(self)); - } - - function yellow(string memory self) internal pure returns (string memory) { - return styleConcat(YELLOW, self); - } - - function yellow(uint256 self) internal pure returns (string memory) { - return yellow(vm.toString(self)); - } - - function yellow(int256 self) internal pure returns (string memory) { - return yellow(vm.toString(self)); - } - - function yellow(address self) internal pure returns (string memory) { - return yellow(vm.toString(self)); - } - - function yellow(bool self) internal pure returns (string memory) { - return yellow(vm.toString(self)); - } - - function yellowBytes(bytes memory self) internal pure returns (string memory) { - return yellow(vm.toString(self)); - } - - function yellowBytes32(bytes32 self) internal pure returns (string memory) { - return yellow(vm.toString(self)); - } - - function blue(string memory self) internal pure returns (string memory) { - return styleConcat(BLUE, self); - } - - function blue(uint256 self) internal pure returns (string memory) { - return blue(vm.toString(self)); - } - - function blue(int256 self) internal pure returns (string memory) { - return blue(vm.toString(self)); - } - - function blue(address self) internal pure returns (string memory) { - return blue(vm.toString(self)); - } - - function blue(bool self) internal pure returns (string memory) { - return blue(vm.toString(self)); - } - - function blueBytes(bytes memory self) internal pure returns (string memory) { - return blue(vm.toString(self)); - } - - function blueBytes32(bytes32 self) internal pure returns (string memory) { - return blue(vm.toString(self)); - } - - function magenta(string memory self) internal pure returns (string memory) { - return styleConcat(MAGENTA, self); - } - - function magenta(uint256 self) internal pure returns (string memory) { - return magenta(vm.toString(self)); - } - - function magenta(int256 self) internal pure returns (string memory) { - return magenta(vm.toString(self)); - } - - function magenta(address self) internal pure returns (string memory) { - return magenta(vm.toString(self)); - } - - function magenta(bool self) internal pure returns (string memory) { - return magenta(vm.toString(self)); - } - - function magentaBytes(bytes memory self) internal pure returns (string memory) { - return magenta(vm.toString(self)); - } - - function magentaBytes32(bytes32 self) internal pure returns (string memory) { - return magenta(vm.toString(self)); - } - - function cyan(string memory self) internal pure returns (string memory) { - return styleConcat(CYAN, self); - } - - function cyan(uint256 self) internal pure returns (string memory) { - return cyan(vm.toString(self)); - } - - function cyan(int256 self) internal pure returns (string memory) { - return cyan(vm.toString(self)); - } - - function cyan(address self) internal pure returns (string memory) { - return cyan(vm.toString(self)); - } - - function cyan(bool self) internal pure returns (string memory) { - return cyan(vm.toString(self)); - } - - function cyanBytes(bytes memory self) internal pure returns (string memory) { - return cyan(vm.toString(self)); - } - - function cyanBytes32(bytes32 self) internal pure returns (string memory) { - return cyan(vm.toString(self)); - } - - function bold(string memory self) internal pure returns (string memory) { - return styleConcat(BOLD, self); - } - - function bold(uint256 self) internal pure returns (string memory) { - return bold(vm.toString(self)); - } - - function bold(int256 self) internal pure returns (string memory) { - return bold(vm.toString(self)); - } - - function bold(address self) internal pure returns (string memory) { - return bold(vm.toString(self)); - } - - function bold(bool self) internal pure returns (string memory) { - return bold(vm.toString(self)); - } - - function boldBytes(bytes memory self) internal pure returns (string memory) { - return bold(vm.toString(self)); - } - - function boldBytes32(bytes32 self) internal pure returns (string memory) { - return bold(vm.toString(self)); - } - - function dim(string memory self) internal pure returns (string memory) { - return styleConcat(DIM, self); - } - - function dim(uint256 self) internal pure returns (string memory) { - return dim(vm.toString(self)); - } - - function dim(int256 self) internal pure returns (string memory) { - return dim(vm.toString(self)); - } - - function dim(address self) internal pure returns (string memory) { - return dim(vm.toString(self)); - } - - function dim(bool self) internal pure returns (string memory) { - return dim(vm.toString(self)); - } - - function dimBytes(bytes memory self) internal pure returns (string memory) { - return dim(vm.toString(self)); - } - - function dimBytes32(bytes32 self) internal pure returns (string memory) { - return dim(vm.toString(self)); - } - - function italic(string memory self) internal pure returns (string memory) { - return styleConcat(ITALIC, self); - } - - function italic(uint256 self) internal pure returns (string memory) { - return italic(vm.toString(self)); - } - - function italic(int256 self) internal pure returns (string memory) { - return italic(vm.toString(self)); - } - - function italic(address self) internal pure returns (string memory) { - return italic(vm.toString(self)); - } - - function italic(bool self) internal pure returns (string memory) { - return italic(vm.toString(self)); - } - - function italicBytes(bytes memory self) internal pure returns (string memory) { - return italic(vm.toString(self)); - } - - function italicBytes32(bytes32 self) internal pure returns (string memory) { - return italic(vm.toString(self)); - } - - function underline(string memory self) internal pure returns (string memory) { - return styleConcat(UNDERLINE, self); - } - - function underline(uint256 self) internal pure returns (string memory) { - return underline(vm.toString(self)); - } - - function underline(int256 self) internal pure returns (string memory) { - return underline(vm.toString(self)); - } - - function underline(address self) internal pure returns (string memory) { - return underline(vm.toString(self)); - } - - function underline(bool self) internal pure returns (string memory) { - return underline(vm.toString(self)); - } - - function underlineBytes(bytes memory self) internal pure returns (string memory) { - return underline(vm.toString(self)); - } - - function underlineBytes32(bytes32 self) internal pure returns (string memory) { - return underline(vm.toString(self)); - } - - function inverse(string memory self) internal pure returns (string memory) { - return styleConcat(INVERSE, self); - } - - function inverse(uint256 self) internal pure returns (string memory) { - return inverse(vm.toString(self)); - } - - function inverse(int256 self) internal pure returns (string memory) { - return inverse(vm.toString(self)); - } - - function inverse(address self) internal pure returns (string memory) { - return inverse(vm.toString(self)); - } - - function inverse(bool self) internal pure returns (string memory) { - return inverse(vm.toString(self)); - } - - function inverseBytes(bytes memory self) internal pure returns (string memory) { - return inverse(vm.toString(self)); - } - - function inverseBytes32(bytes32 self) internal pure returns (string memory) { - return inverse(vm.toString(self)); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdToml.sol b/examples/thorchain/contracts/lib/forge-std/src/StdToml.sol deleted file mode 100644 index ef88db6d..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdToml.sol +++ /dev/null @@ -1,179 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.0 <0.9.0; - -pragma experimental ABIEncoderV2; - -import {VmSafe} from "./Vm.sol"; - -// Helpers for parsing and writing TOML files -// To parse: -// ``` -// using stdToml for string; -// string memory toml = vm.readFile(""); -// toml.readUint(""); -// ``` -// To write: -// ``` -// using stdToml for string; -// string memory json = "json"; -// json.serialize("a", uint256(123)); -// string memory semiFinal = json.serialize("b", string("test")); -// string memory finalJson = json.serialize("c", semiFinal); -// finalJson.write(""); -// ``` - -library stdToml { - VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); - - function parseRaw(string memory toml, string memory key) internal pure returns (bytes memory) { - return vm.parseToml(toml, key); - } - - function readUint(string memory toml, string memory key) internal pure returns (uint256) { - return vm.parseTomlUint(toml, key); - } - - function readUintArray(string memory toml, string memory key) internal pure returns (uint256[] memory) { - return vm.parseTomlUintArray(toml, key); - } - - function readInt(string memory toml, string memory key) internal pure returns (int256) { - return vm.parseTomlInt(toml, key); - } - - function readIntArray(string memory toml, string memory key) internal pure returns (int256[] memory) { - return vm.parseTomlIntArray(toml, key); - } - - function readBytes32(string memory toml, string memory key) internal pure returns (bytes32) { - return vm.parseTomlBytes32(toml, key); - } - - function readBytes32Array(string memory toml, string memory key) internal pure returns (bytes32[] memory) { - return vm.parseTomlBytes32Array(toml, key); - } - - function readString(string memory toml, string memory key) internal pure returns (string memory) { - return vm.parseTomlString(toml, key); - } - - function readStringArray(string memory toml, string memory key) internal pure returns (string[] memory) { - return vm.parseTomlStringArray(toml, key); - } - - function readAddress(string memory toml, string memory key) internal pure returns (address) { - return vm.parseTomlAddress(toml, key); - } - - function readAddressArray(string memory toml, string memory key) internal pure returns (address[] memory) { - return vm.parseTomlAddressArray(toml, key); - } - - function readBool(string memory toml, string memory key) internal pure returns (bool) { - return vm.parseTomlBool(toml, key); - } - - function readBoolArray(string memory toml, string memory key) internal pure returns (bool[] memory) { - return vm.parseTomlBoolArray(toml, key); - } - - function readBytes(string memory toml, string memory key) internal pure returns (bytes memory) { - return vm.parseTomlBytes(toml, key); - } - - function readBytesArray(string memory toml, string memory key) internal pure returns (bytes[] memory) { - return vm.parseTomlBytesArray(toml, key); - } - - function serialize(string memory jsonKey, string memory rootObject) internal returns (string memory) { - return vm.serializeJson(jsonKey, rootObject); - } - - function serialize(string memory jsonKey, string memory key, bool value) internal returns (string memory) { - return vm.serializeBool(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bool[] memory value) - internal - returns (string memory) - { - return vm.serializeBool(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, uint256 value) internal returns (string memory) { - return vm.serializeUint(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, uint256[] memory value) - internal - returns (string memory) - { - return vm.serializeUint(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, int256 value) internal returns (string memory) { - return vm.serializeInt(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, int256[] memory value) - internal - returns (string memory) - { - return vm.serializeInt(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, address value) internal returns (string memory) { - return vm.serializeAddress(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, address[] memory value) - internal - returns (string memory) - { - return vm.serializeAddress(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes32 value) internal returns (string memory) { - return vm.serializeBytes32(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes32[] memory value) - internal - returns (string memory) - { - return vm.serializeBytes32(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes memory value) internal returns (string memory) { - return vm.serializeBytes(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, bytes[] memory value) - internal - returns (string memory) - { - return vm.serializeBytes(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, string memory value) - internal - returns (string memory) - { - return vm.serializeString(jsonKey, key, value); - } - - function serialize(string memory jsonKey, string memory key, string[] memory value) - internal - returns (string memory) - { - return vm.serializeString(jsonKey, key, value); - } - - function write(string memory jsonKey, string memory path) internal { - vm.writeToml(jsonKey, path); - } - - function write(string memory jsonKey, string memory path, string memory valueKey) internal { - vm.writeToml(jsonKey, path, valueKey); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/StdUtils.sol b/examples/thorchain/contracts/lib/forge-std/src/StdUtils.sol deleted file mode 100644 index 5d120439..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/StdUtils.sol +++ /dev/null @@ -1,226 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -import {IMulticall3} from "./interfaces/IMulticall3.sol"; -import {MockERC20} from "./mocks/MockERC20.sol"; -import {MockERC721} from "./mocks/MockERC721.sol"; -import {VmSafe} from "./Vm.sol"; - -abstract contract StdUtils { - /*////////////////////////////////////////////////////////////////////////// - CONSTANTS - //////////////////////////////////////////////////////////////////////////*/ - - IMulticall3 private constant multicall = IMulticall3(0xcA11bde05977b3631167028862bE2a173976CA11); - VmSafe private constant vm = VmSafe(address(uint160(uint256(keccak256("hevm cheat code"))))); - address private constant CONSOLE2_ADDRESS = 0x000000000000000000636F6e736F6c652e6c6f67; - uint256 private constant INT256_MIN_ABS = - 57896044618658097711785492504343953926634992332820282019728792003956564819968; - uint256 private constant SECP256K1_ORDER = - 115792089237316195423570985008687907852837564279074904382605163141518161494337; - uint256 private constant UINT256_MAX = - 115792089237316195423570985008687907853269984665640564039457584007913129639935; - - // Used by default when deploying with create2, https://github.com/Arachnid/deterministic-deployment-proxy. - address private constant CREATE2_FACTORY = 0x4e59b44847b379578588920cA78FbF26c0B4956C; - - /*////////////////////////////////////////////////////////////////////////// - INTERNAL FUNCTIONS - //////////////////////////////////////////////////////////////////////////*/ - - function _bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) { - require(min <= max, "StdUtils bound(uint256,uint256,uint256): Max is less than min."); - // If x is between min and max, return x directly. This is to ensure that dictionary values - // do not get shifted if the min is nonzero. More info: https://github.com/foundry-rs/forge-std/issues/188 - if (x >= min && x <= max) return x; - - uint256 size = max - min + 1; - - // If the value is 0, 1, 2, 3, wrap that to min, min+1, min+2, min+3. Similarly for the UINT256_MAX side. - // This helps ensure coverage of the min/max values. - if (x <= 3 && size > x) return min + x; - if (x >= UINT256_MAX - 3 && size > UINT256_MAX - x) return max - (UINT256_MAX - x); - - // Otherwise, wrap x into the range [min, max], i.e. the range is inclusive. - if (x > max) { - uint256 diff = x - max; - uint256 rem = diff % size; - if (rem == 0) return max; - result = min + rem - 1; - } else if (x < min) { - uint256 diff = min - x; - uint256 rem = diff % size; - if (rem == 0) return min; - result = max - rem + 1; - } - } - - function bound(uint256 x, uint256 min, uint256 max) internal pure virtual returns (uint256 result) { - result = _bound(x, min, max); - console2_log_StdUtils("Bound result", result); - } - - function _bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) { - require(min <= max, "StdUtils bound(int256,int256,int256): Max is less than min."); - - // Shifting all int256 values to uint256 to use _bound function. The range of two types are: - // int256 : -(2**255) ~ (2**255 - 1) - // uint256: 0 ~ (2**256 - 1) - // So, add 2**255, INT256_MIN_ABS to the integer values. - // - // If the given integer value is -2**255, we cannot use `-uint256(-x)` because of the overflow. - // So, use `~uint256(x) + 1` instead. - uint256 _x = x < 0 ? (INT256_MIN_ABS - ~uint256(x) - 1) : (uint256(x) + INT256_MIN_ABS); - uint256 _min = min < 0 ? (INT256_MIN_ABS - ~uint256(min) - 1) : (uint256(min) + INT256_MIN_ABS); - uint256 _max = max < 0 ? (INT256_MIN_ABS - ~uint256(max) - 1) : (uint256(max) + INT256_MIN_ABS); - - uint256 y = _bound(_x, _min, _max); - - // To move it back to int256 value, subtract INT256_MIN_ABS at here. - result = y < INT256_MIN_ABS ? int256(~(INT256_MIN_ABS - y) + 1) : int256(y - INT256_MIN_ABS); - } - - function bound(int256 x, int256 min, int256 max) internal pure virtual returns (int256 result) { - result = _bound(x, min, max); - console2_log_StdUtils("Bound result", vm.toString(result)); - } - - function boundPrivateKey(uint256 privateKey) internal pure virtual returns (uint256 result) { - result = _bound(privateKey, 1, SECP256K1_ORDER - 1); - } - - function bytesToUint(bytes memory b) internal pure virtual returns (uint256) { - require(b.length <= 32, "StdUtils bytesToUint(bytes): Bytes length exceeds 32."); - return abi.decode(abi.encodePacked(new bytes(32 - b.length), b), (uint256)); - } - - /// @dev Compute the address a contract will be deployed at for a given deployer address and nonce - /// @notice adapted from Solmate implementation (https://github.com/Rari-Capital/solmate/blob/main/src/utils/LibRLP.sol) - function computeCreateAddress(address deployer, uint256 nonce) internal pure virtual returns (address) { - console2_log_StdUtils("computeCreateAddress is deprecated. Please use vm.computeCreateAddress instead."); - return vm.computeCreateAddress(deployer, nonce); - } - - function computeCreate2Address(bytes32 salt, bytes32 initcodeHash, address deployer) - internal - pure - virtual - returns (address) - { - console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead."); - return vm.computeCreate2Address(salt, initcodeHash, deployer); - } - - /// @dev returns the address of a contract created with CREATE2 using the default CREATE2 deployer - function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) internal pure returns (address) { - console2_log_StdUtils("computeCreate2Address is deprecated. Please use vm.computeCreate2Address instead."); - return vm.computeCreate2Address(salt, initCodeHash); - } - - /// @dev returns an initialized mock ERC20 contract - function deployMockERC20(string memory name, string memory symbol, uint8 decimals) - internal - returns (MockERC20 mock) - { - mock = new MockERC20(); - mock.initialize(name, symbol, decimals); - } - - /// @dev returns an initialized mock ERC721 contract - function deployMockERC721(string memory name, string memory symbol) internal returns (MockERC721 mock) { - mock = new MockERC721(); - mock.initialize(name, symbol); - } - - /// @dev returns the hash of the init code (creation code + no args) used in CREATE2 with no constructor arguments - /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode - function hashInitCode(bytes memory creationCode) internal pure returns (bytes32) { - return hashInitCode(creationCode, ""); - } - - /// @dev returns the hash of the init code (creation code + ABI-encoded args) used in CREATE2 - /// @param creationCode the creation code of a contract C, as returned by type(C).creationCode - /// @param args the ABI-encoded arguments to the constructor of C - function hashInitCode(bytes memory creationCode, bytes memory args) internal pure returns (bytes32) { - return keccak256(abi.encodePacked(creationCode, args)); - } - - // Performs a single call with Multicall3 to query the ERC-20 token balances of the given addresses. - function getTokenBalances(address token, address[] memory addresses) - internal - virtual - returns (uint256[] memory balances) - { - uint256 tokenCodeSize; - assembly { - tokenCodeSize := extcodesize(token) - } - require(tokenCodeSize > 0, "StdUtils getTokenBalances(address,address[]): Token address is not a contract."); - - // ABI encode the aggregate call to Multicall3. - uint256 length = addresses.length; - IMulticall3.Call[] memory calls = new IMulticall3.Call[](length); - for (uint256 i = 0; i < length; ++i) { - // 0x70a08231 = bytes4("balanceOf(address)")) - calls[i] = IMulticall3.Call({target: token, callData: abi.encodeWithSelector(0x70a08231, (addresses[i]))}); - } - - // Make the aggregate call. - (, bytes[] memory returnData) = multicall.aggregate(calls); - - // ABI decode the return data and return the balances. - balances = new uint256[](length); - for (uint256 i = 0; i < length; ++i) { - balances[i] = abi.decode(returnData[i], (uint256)); - } - } - - /*////////////////////////////////////////////////////////////////////////// - PRIVATE FUNCTIONS - //////////////////////////////////////////////////////////////////////////*/ - - function addressFromLast20Bytes(bytes32 bytesValue) private pure returns (address) { - return address(uint160(uint256(bytesValue))); - } - - // This section is used to prevent the compilation of console, which shortens the compilation time when console is - // not used elsewhere. We also trick the compiler into letting us make the console log methods as `pure` to avoid - // any breaking changes to function signatures. - function _castLogPayloadViewToPure(function(bytes memory) internal view fnIn) - internal - pure - returns (function(bytes memory) internal pure fnOut) - { - assembly { - fnOut := fnIn - } - } - - function _sendLogPayload(bytes memory payload) internal pure { - _castLogPayloadViewToPure(_sendLogPayloadView)(payload); - } - - function _sendLogPayloadView(bytes memory payload) private view { - uint256 payloadLength = payload.length; - address consoleAddress = CONSOLE2_ADDRESS; - /// @solidity memory-safe-assembly - assembly { - let payloadStart := add(payload, 32) - let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) - } - } - - function console2_log_StdUtils(string memory p0) private pure { - _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); - } - - function console2_log_StdUtils(string memory p0, uint256 p1) private pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); - } - - function console2_log_StdUtils(string memory p0, string memory p1) private pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/Test.sol b/examples/thorchain/contracts/lib/forge-std/src/Test.sol deleted file mode 100644 index 5ff60ea3..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/Test.sol +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -// 💬 ABOUT -// Forge Std's default Test. - -// 🧩 MODULES -import {console} from "./console.sol"; -import {console2} from "./console2.sol"; -import {safeconsole} from "./safeconsole.sol"; -import {StdAssertions} from "./StdAssertions.sol"; -import {StdChains} from "./StdChains.sol"; -import {StdCheats} from "./StdCheats.sol"; -import {stdError} from "./StdError.sol"; -import {StdInvariant} from "./StdInvariant.sol"; -import {stdJson} from "./StdJson.sol"; -import {stdMath} from "./StdMath.sol"; -import {StdStorage, stdStorage} from "./StdStorage.sol"; -import {StdStyle} from "./StdStyle.sol"; -import {stdToml} from "./StdToml.sol"; -import {StdUtils} from "./StdUtils.sol"; -import {Vm} from "./Vm.sol"; - -// 📦 BOILERPLATE -import {TestBase} from "./Base.sol"; - -// ⭐️ TEST -abstract contract Test is TestBase, StdAssertions, StdChains, StdCheats, StdInvariant, StdUtils { - // Note: IS_TEST() must return true. - bool public IS_TEST = true; -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/Vm.sol b/examples/thorchain/contracts/lib/forge-std/src/Vm.sol deleted file mode 100644 index 16a14e2f..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/Vm.sol +++ /dev/null @@ -1,1842 +0,0 @@ -// Automatically @generated by scripts/vm.py. Do not modify manually. - -// SPDX-License-Identifier: MIT OR Apache-2.0 -pragma solidity >=0.6.2 <0.9.0; -pragma experimental ABIEncoderV2; - -/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may -/// result in Script simulations differing from on-chain execution. It is recommended to only use -/// these cheats in scripts. -interface VmSafe { - /// A modification applied to either `msg.sender` or `tx.origin`. Returned by `readCallers`. - enum CallerMode { - // No caller modification is currently active. - None, - // A one time broadcast triggered by a `vm.broadcast()` call is currently active. - Broadcast, - // A recurrent broadcast triggered by a `vm.startBroadcast()` call is currently active. - RecurrentBroadcast, - // A one time prank triggered by a `vm.prank()` call is currently active. - Prank, - // A recurrent prank triggered by a `vm.startPrank()` call is currently active. - RecurrentPrank - } - - /// The kind of account access that occurred. - enum AccountAccessKind { - // The account was called. - Call, - // The account was called via delegatecall. - DelegateCall, - // The account was called via callcode. - CallCode, - // The account was called via staticcall. - StaticCall, - // The account was created. - Create, - // The account was selfdestructed. - SelfDestruct, - // Synthetic access indicating the current context has resumed after a previous sub-context (AccountAccess). - Resume, - // The account's balance was read. - Balance, - // The account's codesize was read. - Extcodesize, - // The account's codehash was read. - Extcodehash, - // The account's code was copied. - Extcodecopy - } - - /// Forge execution contexts. - enum ForgeContext { - // Test group execution context (test, coverage or snapshot). - TestGroup, - // `forge test` execution context. - Test, - // `forge coverage` execution context. - Coverage, - // `forge snapshot` execution context. - Snapshot, - // Script group execution context (dry run, broadcast or resume). - ScriptGroup, - // `forge script` execution context. - ScriptDryRun, - // `forge script --broadcast` execution context. - ScriptBroadcast, - // `forge script --resume` execution context. - ScriptResume, - // Unknown `forge` execution context. - Unknown - } - - /// An Ethereum log. Returned by `getRecordedLogs`. - struct Log { - // The topics of the log, including the signature, if any. - bytes32[] topics; - // The raw data of the log. - bytes data; - // The address of the log's emitter. - address emitter; - } - - /// An RPC URL and its alias. Returned by `rpcUrlStructs`. - struct Rpc { - // The alias of the RPC URL. - string key; - // The RPC URL. - string url; - } - - /// An RPC log object. Returned by `eth_getLogs`. - struct EthGetLogs { - // The address of the log's emitter. - address emitter; - // The topics of the log, including the signature, if any. - bytes32[] topics; - // The raw data of the log. - bytes data; - // The block hash. - bytes32 blockHash; - // The block number. - uint64 blockNumber; - // The transaction hash. - bytes32 transactionHash; - // The transaction index in the block. - uint64 transactionIndex; - // The log index. - uint256 logIndex; - // Whether the log was removed. - bool removed; - } - - /// A single entry in a directory listing. Returned by `readDir`. - struct DirEntry { - // The error message, if any. - string errorMessage; - // The path of the entry. - string path; - // The depth of the entry. - uint64 depth; - // Whether the entry is a directory. - bool isDir; - // Whether the entry is a symlink. - bool isSymlink; - } - - /// Metadata information about a file. - /// This structure is returned from the `fsMetadata` function and represents known - /// metadata about a file such as its permissions, size, modification - /// times, etc. - struct FsMetadata { - // True if this metadata is for a directory. - bool isDir; - // True if this metadata is for a symlink. - bool isSymlink; - // The size of the file, in bytes, this metadata is for. - uint256 length; - // True if this metadata is for a readonly (unwritable) file. - bool readOnly; - // The last modification time listed in this metadata. - uint256 modified; - // The last access time of this metadata. - uint256 accessed; - // The creation time listed in this metadata. - uint256 created; - } - - /// A wallet with a public and private key. - struct Wallet { - // The wallet's address. - address addr; - // The wallet's public key `X`. - uint256 publicKeyX; - // The wallet's public key `Y`. - uint256 publicKeyY; - // The wallet's private key. - uint256 privateKey; - } - - /// The result of a `tryFfi` call. - struct FfiResult { - // The exit code of the call. - int32 exitCode; - // The optionally hex-decoded `stdout` data. - bytes stdout; - // The `stderr` data. - bytes stderr; - } - - /// Information on the chain and fork. - struct ChainInfo { - // The fork identifier. Set to zero if no fork is active. - uint256 forkId; - // The chain ID of the current fork. - uint256 chainId; - } - - /// The result of a `stopAndReturnStateDiff` call. - struct AccountAccess { - // The chain and fork the access occurred. - ChainInfo chainInfo; - // The kind of account access that determines what the account is. - // If kind is Call, DelegateCall, StaticCall or CallCode, then the account is the callee. - // If kind is Create, then the account is the newly created account. - // If kind is SelfDestruct, then the account is the selfdestruct recipient. - // If kind is a Resume, then account represents a account context that has resumed. - AccountAccessKind kind; - // The account that was accessed. - // It's either the account created, callee or a selfdestruct recipient for CREATE, CALL or SELFDESTRUCT. - address account; - // What accessed the account. - address accessor; - // If the account was initialized or empty prior to the access. - // An account is considered initialized if it has code, a - // non-zero nonce, or a non-zero balance. - bool initialized; - // The previous balance of the accessed account. - uint256 oldBalance; - // The potential new balance of the accessed account. - // That is, all balance changes are recorded here, even if reverts occurred. - uint256 newBalance; - // Code of the account deployed by CREATE. - bytes deployedCode; - // Value passed along with the account access - uint256 value; - // Input data provided to the CREATE or CALL - bytes data; - // If this access reverted in either the current or parent context. - bool reverted; - // An ordered list of storage accesses made during an account access operation. - StorageAccess[] storageAccesses; - // Call depth traversed during the recording of state differences - uint64 depth; - } - - /// The storage accessed during an `AccountAccess`. - struct StorageAccess { - // The account whose storage was accessed. - address account; - // The slot that was accessed. - bytes32 slot; - // If the access was a write. - bool isWrite; - // The previous value of the slot. - bytes32 previousValue; - // The new value of the slot. - bytes32 newValue; - // If the access was reverted. - bool reverted; - } - - /// Gas used. Returned by `lastCallGas`. - struct Gas { - // The gas limit of the call. - uint64 gasLimit; - // The total gas used. - uint64 gasTotalUsed; - // DEPRECATED: The amount of gas used for memory expansion. Ref: - uint64 gasMemoryUsed; - // The amount of gas refunded. - int64 gasRefunded; - // The amount of gas remaining. - uint64 gasRemaining; - } - - // ======== Environment ======== - - /// Gets the environment variable `name` and parses it as `address`. - /// Reverts if the variable was not found or could not be parsed. - function envAddress(string calldata name) external view returns (address value); - - /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. - /// Reverts if the variable was not found or could not be parsed. - function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value); - - /// Gets the environment variable `name` and parses it as `bool`. - /// Reverts if the variable was not found or could not be parsed. - function envBool(string calldata name) external view returns (bool value); - - /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. - /// Reverts if the variable was not found or could not be parsed. - function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value); - - /// Gets the environment variable `name` and parses it as `bytes32`. - /// Reverts if the variable was not found or could not be parsed. - function envBytes32(string calldata name) external view returns (bytes32 value); - - /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. - /// Reverts if the variable was not found or could not be parsed. - function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value); - - /// Gets the environment variable `name` and parses it as `bytes`. - /// Reverts if the variable was not found or could not be parsed. - function envBytes(string calldata name) external view returns (bytes memory value); - - /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. - /// Reverts if the variable was not found or could not be parsed. - function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value); - - /// Gets the environment variable `name` and returns true if it exists, else returns false. - function envExists(string calldata name) external view returns (bool result); - - /// Gets the environment variable `name` and parses it as `int256`. - /// Reverts if the variable was not found or could not be parsed. - function envInt(string calldata name) external view returns (int256 value); - - /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. - /// Reverts if the variable was not found or could not be parsed. - function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value); - - /// Gets the environment variable `name` and parses it as `bool`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, bool defaultValue) external view returns (bool value); - - /// Gets the environment variable `name` and parses it as `uint256`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value); - - /// Gets the environment variable `name` and parses it as an array of `address`, delimited by `delim`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata delim, address[] calldata defaultValue) - external - view - returns (address[] memory value); - - /// Gets the environment variable `name` and parses it as an array of `bytes32`, delimited by `delim`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue) - external - view - returns (bytes32[] memory value); - - /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata delim, string[] calldata defaultValue) - external - view - returns (string[] memory value); - - /// Gets the environment variable `name` and parses it as an array of `bytes`, delimited by `delim`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue) - external - view - returns (bytes[] memory value); - - /// Gets the environment variable `name` and parses it as `int256`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, int256 defaultValue) external view returns (int256 value); - - /// Gets the environment variable `name` and parses it as `address`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, address defaultValue) external view returns (address value); - - /// Gets the environment variable `name` and parses it as `bytes32`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value); - - /// Gets the environment variable `name` and parses it as `string`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value); - - /// Gets the environment variable `name` and parses it as `bytes`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value); - - /// Gets the environment variable `name` and parses it as an array of `bool`, delimited by `delim`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue) - external - view - returns (bool[] memory value); - - /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue) - external - view - returns (uint256[] memory value); - - /// Gets the environment variable `name` and parses it as an array of `int256`, delimited by `delim`. - /// Reverts if the variable could not be parsed. - /// Returns `defaultValue` if the variable was not found. - function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue) - external - view - returns (int256[] memory value); - - /// Gets the environment variable `name` and parses it as `string`. - /// Reverts if the variable was not found or could not be parsed. - function envString(string calldata name) external view returns (string memory value); - - /// Gets the environment variable `name` and parses it as an array of `string`, delimited by `delim`. - /// Reverts if the variable was not found or could not be parsed. - function envString(string calldata name, string calldata delim) external view returns (string[] memory value); - - /// Gets the environment variable `name` and parses it as `uint256`. - /// Reverts if the variable was not found or could not be parsed. - function envUint(string calldata name) external view returns (uint256 value); - - /// Gets the environment variable `name` and parses it as an array of `uint256`, delimited by `delim`. - /// Reverts if the variable was not found or could not be parsed. - function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value); - - /// Returns true if `forge` command was executed in given context. - function isContext(ForgeContext context) external view returns (bool result); - - /// Sets environment variables. - function setEnv(string calldata name, string calldata value) external; - - // ======== EVM ======== - - /// Gets all accessed reads and write slot from a `vm.record` session, for a given address. - function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots); - - /// Gets the address for a given private key. - function addr(uint256 privateKey) external pure returns (address keyAddr); - - /// Gets all the logs according to specified filter. - function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics) - external - returns (EthGetLogs[] memory logs); - - /// Gets the current `block.blobbasefee`. - /// You should use this instead of `block.blobbasefee` if you use `vm.blobBaseFee`, as `block.blobbasefee` is assumed to be constant across a transaction, - /// and as a result will get optimized out by the compiler. - /// See https://github.com/foundry-rs/foundry/issues/6180 - function getBlobBaseFee() external view returns (uint256 blobBaseFee); - - /// Gets the current `block.number`. - /// You should use this instead of `block.number` if you use `vm.roll`, as `block.number` is assumed to be constant across a transaction, - /// and as a result will get optimized out by the compiler. - /// See https://github.com/foundry-rs/foundry/issues/6180 - function getBlockNumber() external view returns (uint256 height); - - /// Gets the current `block.timestamp`. - /// You should use this instead of `block.timestamp` if you use `vm.warp`, as `block.timestamp` is assumed to be constant across a transaction, - /// and as a result will get optimized out by the compiler. - /// See https://github.com/foundry-rs/foundry/issues/6180 - function getBlockTimestamp() external view returns (uint256 timestamp); - - /// Gets the map key and parent of a mapping at a given slot, for a given address. - function getMappingKeyAndParentOf(address target, bytes32 elementSlot) - external - returns (bool found, bytes32 key, bytes32 parent); - - /// Gets the number of elements in the mapping at the given slot, for a given address. - function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length); - - /// Gets the elements at index idx of the mapping at the given slot, for a given address. The - /// index must be less than the length of the mapping (i.e. the number of keys in the mapping). - function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value); - - /// Gets the nonce of an account. - function getNonce(address account) external view returns (uint64 nonce); - - /// Gets all the recorded logs. - function getRecordedLogs() external returns (Log[] memory logs); - - /// Gets the gas used in the last call. - function lastCallGas() external view returns (Gas memory gas); - - /// Loads a storage slot from an address. - function load(address target, bytes32 slot) external view returns (bytes32 data); - - /// Pauses gas metering (i.e. gas usage is not counted). Noop if already paused. - function pauseGasMetering() external; - - /// Records all storage reads and writes. - function record() external; - - /// Record all the transaction logs. - function recordLogs() external; - - /// Resumes gas metering (i.e. gas usage is counted again). Noop if already on. - function resumeGasMetering() external; - - /// Performs an Ethereum JSON-RPC request to the current fork URL. - function rpc(string calldata method, string calldata params) external returns (bytes memory data); - - /// Performs an Ethereum JSON-RPC request to the given endpoint. - function rpc(string calldata urlOrAlias, string calldata method, string calldata params) - external - returns (bytes memory data); - - /// Signs `digest` with `privateKey` using the secp256r1 curve. - function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s); - - /// Signs `digest` with `privateKey` using the secp256k1 curve. - function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); - - /// Signs `digest` with signer provided to script using the secp256k1 curve. - /// If `--sender` is provided, the signer with provided address is used, otherwise, - /// if exactly one signer is provided to the script, that signer is used. - /// Raises error if signer passed through `--sender` does not match any unlocked signers or - /// if `--sender` is not provided and not exactly one signer is passed to the script. - function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); - - /// Signs `digest` with signer provided to script using the secp256k1 curve. - /// Raises error if none of the signers passed into the script have provided address. - function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s); - - /// Starts recording all map SSTOREs for later retrieval. - function startMappingRecording() external; - - /// Record all account accesses as part of CREATE, CALL or SELFDESTRUCT opcodes in order, - /// along with the context of the calls - function startStateDiffRecording() external; - - /// Returns an ordered array of all account accesses from a `vm.startStateDiffRecording` session. - function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses); - - /// Stops recording all map SSTOREs for later retrieval and clears the recorded data. - function stopMappingRecording() external; - - // ======== Filesystem ======== - - /// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine. - /// `path` is relative to the project root. - function closeFile(string calldata path) external; - - /// Copies the contents of one file to another. This function will **overwrite** the contents of `to`. - /// On success, the total number of bytes copied is returned and it is equal to the length of the `to` file as reported by `metadata`. - /// Both `from` and `to` are relative to the project root. - function copyFile(string calldata from, string calldata to) external returns (uint64 copied); - - /// Creates a new, empty directory at the provided path. - /// This cheatcode will revert in the following situations, but is not limited to just these cases: - /// - User lacks permissions to modify `path`. - /// - A parent of the given path doesn't exist and `recursive` is false. - /// - `path` already exists and `recursive` is false. - /// `path` is relative to the project root. - function createDir(string calldata path, bool recursive) external; - - /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the - /// artifact in the form of :: where and parts are optional. - function deployCode(string calldata artifactPath) external returns (address deployedAddress); - - /// Deploys a contract from an artifact file. Takes in the relative path to the json file or the path to the - /// artifact in the form of :: where and parts are optional. - /// Additionally accepts abi-encoded constructor arguments. - function deployCode(string calldata artifactPath, bytes calldata constructorArgs) - external - returns (address deployedAddress); - - /// Returns true if the given path points to an existing entity, else returns false. - function exists(string calldata path) external returns (bool result); - - /// Performs a foreign function call via the terminal. - function ffi(string[] calldata commandInput) external returns (bytes memory result); - - /// Given a path, query the file system to get information about a file, directory, etc. - function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata); - - /// Gets the creation bytecode from an artifact file. Takes in the relative path to the json file or the path to the - /// artifact in the form of :: where and parts are optional. - function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode); - - /// Gets the deployed bytecode from an artifact file. Takes in the relative path to the json file or the path to the - /// artifact in the form of :: where and parts are optional. - function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode); - - /// Returns true if the path exists on disk and is pointing at a directory, else returns false. - function isDir(string calldata path) external returns (bool result); - - /// Returns true if the path exists on disk and is pointing at a regular file, else returns false. - function isFile(string calldata path) external returns (bool result); - - /// Get the path of the current project root. - function projectRoot() external view returns (string memory path); - - /// Prompts the user for a string value in the terminal. - function prompt(string calldata promptText) external returns (string memory input); - - /// Prompts the user for an address in the terminal. - function promptAddress(string calldata promptText) external returns (address); - - /// Prompts the user for a hidden string value in the terminal. - function promptSecret(string calldata promptText) external returns (string memory input); - - /// Prompts the user for hidden uint256 in the terminal (usually pk). - function promptSecretUint(string calldata promptText) external returns (uint256); - - /// Prompts the user for uint256 in the terminal. - function promptUint(string calldata promptText) external returns (uint256); - - /// Reads the directory at the given path recursively, up to `maxDepth`. - /// `maxDepth` defaults to 1, meaning only the direct children of the given directory will be returned. - /// Follows symbolic links if `followLinks` is true. - function readDir(string calldata path) external view returns (DirEntry[] memory entries); - - /// See `readDir(string)`. - function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries); - - /// See `readDir(string)`. - function readDir(string calldata path, uint64 maxDepth, bool followLinks) - external - view - returns (DirEntry[] memory entries); - - /// Reads the entire content of file to string. `path` is relative to the project root. - function readFile(string calldata path) external view returns (string memory data); - - /// Reads the entire content of file as binary. `path` is relative to the project root. - function readFileBinary(string calldata path) external view returns (bytes memory data); - - /// Reads next line of file to string. - function readLine(string calldata path) external view returns (string memory line); - - /// Reads a symbolic link, returning the path that the link points to. - /// This cheatcode will revert in the following situations, but is not limited to just these cases: - /// - `path` is not a symbolic link. - /// - `path` does not exist. - function readLink(string calldata linkPath) external view returns (string memory targetPath); - - /// Removes a directory at the provided path. - /// This cheatcode will revert in the following situations, but is not limited to just these cases: - /// - `path` doesn't exist. - /// - `path` isn't a directory. - /// - User lacks permissions to modify `path`. - /// - The directory is not empty and `recursive` is false. - /// `path` is relative to the project root. - function removeDir(string calldata path, bool recursive) external; - - /// Removes a file from the filesystem. - /// This cheatcode will revert in the following situations, but is not limited to just these cases: - /// - `path` points to a directory. - /// - The file doesn't exist. - /// - The user lacks permissions to remove the file. - /// `path` is relative to the project root. - function removeFile(string calldata path) external; - - /// Performs a foreign function call via terminal and returns the exit code, stdout, and stderr. - function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result); - - /// Returns the time since unix epoch in milliseconds. - function unixTime() external returns (uint256 milliseconds); - - /// Writes data to file, creating a file if it does not exist, and entirely replacing its contents if it does. - /// `path` is relative to the project root. - function writeFile(string calldata path, string calldata data) external; - - /// Writes binary data to a file, creating a file if it does not exist, and entirely replacing its contents if it does. - /// `path` is relative to the project root. - function writeFileBinary(string calldata path, bytes calldata data) external; - - /// Writes line to file, creating a file if it does not exist. - /// `path` is relative to the project root. - function writeLine(string calldata path, string calldata data) external; - - // ======== JSON ======== - - /// Checks if `key` exists in a JSON object - /// `keyExists` is being deprecated in favor of `keyExistsJson`. It will be removed in future versions. - function keyExists(string calldata json, string calldata key) external view returns (bool); - - /// Checks if `key` exists in a JSON object. - function keyExistsJson(string calldata json, string calldata key) external view returns (bool); - - /// Parses a string of JSON data at `key` and coerces it to `address`. - function parseJsonAddress(string calldata json, string calldata key) external pure returns (address); - - /// Parses a string of JSON data at `key` and coerces it to `address[]`. - function parseJsonAddressArray(string calldata json, string calldata key) - external - pure - returns (address[] memory); - - /// Parses a string of JSON data at `key` and coerces it to `bool`. - function parseJsonBool(string calldata json, string calldata key) external pure returns (bool); - - /// Parses a string of JSON data at `key` and coerces it to `bool[]`. - function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory); - - /// Parses a string of JSON data at `key` and coerces it to `bytes`. - function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory); - - /// Parses a string of JSON data at `key` and coerces it to `bytes32`. - function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32); - - /// Parses a string of JSON data at `key` and coerces it to `bytes32[]`. - function parseJsonBytes32Array(string calldata json, string calldata key) - external - pure - returns (bytes32[] memory); - - /// Parses a string of JSON data at `key` and coerces it to `bytes[]`. - function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory); - - /// Parses a string of JSON data at `key` and coerces it to `int256`. - function parseJsonInt(string calldata json, string calldata key) external pure returns (int256); - - /// Parses a string of JSON data at `key` and coerces it to `int256[]`. - function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory); - - /// Returns an array of all the keys in a JSON object. - function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys); - - /// Parses a string of JSON data at `key` and coerces it to `string`. - function parseJsonString(string calldata json, string calldata key) external pure returns (string memory); - - /// Parses a string of JSON data at `key` and coerces it to `string[]`. - function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory); - - /// Parses a string of JSON data at `key` and coerces it to type array corresponding to `typeDescription`. - function parseJsonTypeArray(string calldata json, string calldata key, string calldata typeDescription) - external - pure - returns (bytes memory); - - /// Parses a string of JSON data and coerces it to type corresponding to `typeDescription`. - function parseJsonType(string calldata json, string calldata typeDescription) - external - pure - returns (bytes memory); - - /// Parses a string of JSON data at `key` and coerces it to type corresponding to `typeDescription`. - function parseJsonType(string calldata json, string calldata key, string calldata typeDescription) - external - pure - returns (bytes memory); - - /// Parses a string of JSON data at `key` and coerces it to `uint256`. - function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256); - - /// Parses a string of JSON data at `key` and coerces it to `uint256[]`. - function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory); - - /// ABI-encodes a JSON object. - function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData); - - /// ABI-encodes a JSON object at `key`. - function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData); - - /// See `serializeJson`. - function serializeAddress(string calldata objectKey, string calldata valueKey, address value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeBool(string calldata objectKey, string calldata valueKey, bool value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeInt(string calldata objectKey, string calldata valueKey, int256 value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values) - external - returns (string memory json); - - /// Serializes a key and value to a JSON object stored in-memory that can be later written to a file. - /// Returns the stringified version of the specific JSON file up to that moment. - function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json); - - /// See `serializeJson`. - function serializeJsonType(string calldata typeDescription, bytes calldata value) - external - pure - returns (string memory json); - - /// See `serializeJson`. - function serializeJsonType( - string calldata objectKey, - string calldata valueKey, - string calldata typeDescription, - bytes calldata value - ) external returns (string memory json); - - /// See `serializeJson`. - function serializeString(string calldata objectKey, string calldata valueKey, string calldata value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeUintToHex(string calldata objectKey, string calldata valueKey, uint256 value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value) - external - returns (string memory json); - - /// See `serializeJson`. - function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values) - external - returns (string memory json); - - /// Write a serialized JSON object to a file. If the file exists, it will be overwritten. - function writeJson(string calldata json, string calldata path) external; - - /// Write a serialized JSON object to an **existing** JSON file, replacing a value with key = - /// This is useful to replace a specific value of a JSON file, without having to parse the entire thing. - function writeJson(string calldata json, string calldata path, string calldata valueKey) external; - - // ======== Scripting ======== - - /// Takes a signed transaction and broadcasts it to the network. - function broadcastRawTransaction(bytes calldata data) external; - - /// Has the next call (at this call depth only) create transactions that can later be signed and sent onchain. - /// Broadcasting address is determined by checking the following in order: - /// 1. If `--sender` argument was provided, that address is used. - /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used. - /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used. - function broadcast() external; - - /// Has the next call (at this call depth only) create a transaction with the address provided - /// as the sender that can later be signed and sent onchain. - function broadcast(address signer) external; - - /// Has the next call (at this call depth only) create a transaction with the private key - /// provided as the sender that can later be signed and sent onchain. - function broadcast(uint256 privateKey) external; - - /// Has all subsequent calls (at this call depth only) create transactions that can later be signed and sent onchain. - /// Broadcasting address is determined by checking the following in order: - /// 1. If `--sender` argument was provided, that address is used. - /// 2. If exactly one signer (e.g. private key, hw wallet, keystore) is set when `forge broadcast` is invoked, that signer is used. - /// 3. Otherwise, default foundry sender (1804c8AB1F12E6bbf3894d4083f33e07309d1f38) is used. - function startBroadcast() external; - - /// Has all subsequent calls (at this call depth only) create transactions with the address - /// provided that can later be signed and sent onchain. - function startBroadcast(address signer) external; - - /// Has all subsequent calls (at this call depth only) create transactions with the private key - /// provided that can later be signed and sent onchain. - function startBroadcast(uint256 privateKey) external; - - /// Stops collecting onchain transactions. - function stopBroadcast() external; - - // ======== String ======== - - /// Returns the index of the first occurrence of a `key` in an `input` string. - /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `key` is not found. - /// Returns 0 in case of an empty `key`. - function indexOf(string calldata input, string calldata key) external pure returns (uint256); - - /// Parses the given `string` into an `address`. - function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue); - - /// Parses the given `string` into a `bool`. - function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue); - - /// Parses the given `string` into `bytes`. - function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue); - - /// Parses the given `string` into a `bytes32`. - function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue); - - /// Parses the given `string` into a `int256`. - function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue); - - /// Parses the given `string` into a `uint256`. - function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue); - - /// Replaces occurrences of `from` in the given `string` with `to`. - function replace(string calldata input, string calldata from, string calldata to) - external - pure - returns (string memory output); - - /// Splits the given `string` into an array of strings divided by the `delimiter`. - function split(string calldata input, string calldata delimiter) external pure returns (string[] memory outputs); - - /// Converts the given `string` value to Lowercase. - function toLowercase(string calldata input) external pure returns (string memory output); - - /// Converts the given value to a `string`. - function toString(address value) external pure returns (string memory stringifiedValue); - - /// Converts the given value to a `string`. - function toString(bytes calldata value) external pure returns (string memory stringifiedValue); - - /// Converts the given value to a `string`. - function toString(bytes32 value) external pure returns (string memory stringifiedValue); - - /// Converts the given value to a `string`. - function toString(bool value) external pure returns (string memory stringifiedValue); - - /// Converts the given value to a `string`. - function toString(uint256 value) external pure returns (string memory stringifiedValue); - - /// Converts the given value to a `string`. - function toString(int256 value) external pure returns (string memory stringifiedValue); - - /// Converts the given `string` value to Uppercase. - function toUppercase(string calldata input) external pure returns (string memory output); - - /// Trims leading and trailing whitespace from the given `string` value. - function trim(string calldata input) external pure returns (string memory output); - - // ======== Testing ======== - - /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. - /// Formats values with decimals in failure message. - function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) external pure; - - /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertApproxEqAbsDecimal( - uint256 left, - uint256 right, - uint256 maxDelta, - uint256 decimals, - string calldata error - ) external pure; - - /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. - /// Formats values with decimals in failure message. - function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) external pure; - - /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertApproxEqAbsDecimal( - int256 left, - int256 right, - uint256 maxDelta, - uint256 decimals, - string calldata error - ) external pure; - - /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. - function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) external pure; - - /// Compares two `uint256` values. Expects difference to be less than or equal to `maxDelta`. - /// Includes error message into revert string on failure. - function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string calldata error) external pure; - - /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. - function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) external pure; - - /// Compares two `int256` values. Expects difference to be less than or equal to `maxDelta`. - /// Includes error message into revert string on failure. - function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string calldata error) external pure; - - /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - /// Formats values with decimals in failure message. - function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals) - external - pure; - - /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertApproxEqRelDecimal( - uint256 left, - uint256 right, - uint256 maxPercentDelta, - uint256 decimals, - string calldata error - ) external pure; - - /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - /// Formats values with decimals in failure message. - function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals) - external - pure; - - /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertApproxEqRelDecimal( - int256 left, - int256 right, - uint256 maxPercentDelta, - uint256 decimals, - string calldata error - ) external pure; - - /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta) external pure; - - /// Compares two `uint256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - /// Includes error message into revert string on failure. - function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta, string calldata error) - external - pure; - - /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) external pure; - - /// Compares two `int256` values. Expects relative difference in percents to be less than or equal to `maxPercentDelta`. - /// `maxPercentDelta` is an 18 decimal fixed point number, where 1e18 == 100% - /// Includes error message into revert string on failure. - function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta, string calldata error) - external - pure; - - /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. - function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; - - /// Asserts that two `uint256` values are equal, formatting them with decimals in failure message. - /// Includes error message into revert string on failure. - function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; - - /// Asserts that two `int256` values are equal, formatting them with decimals in failure message. - function assertEqDecimal(int256 left, int256 right, uint256 decimals) external pure; - - /// Asserts that two `int256` values are equal, formatting them with decimals in failure message. - /// Includes error message into revert string on failure. - function assertEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; - - /// Asserts that two `bool` values are equal. - function assertEq(bool left, bool right) external pure; - - /// Asserts that two `bool` values are equal and includes error message into revert string on failure. - function assertEq(bool left, bool right, string calldata error) external pure; - - /// Asserts that two `string` values are equal. - function assertEq(string calldata left, string calldata right) external pure; - - /// Asserts that two `string` values are equal and includes error message into revert string on failure. - function assertEq(string calldata left, string calldata right, string calldata error) external pure; - - /// Asserts that two `bytes` values are equal. - function assertEq(bytes calldata left, bytes calldata right) external pure; - - /// Asserts that two `bytes` values are equal and includes error message into revert string on failure. - function assertEq(bytes calldata left, bytes calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `bool` values are equal. - function assertEq(bool[] calldata left, bool[] calldata right) external pure; - - /// Asserts that two arrays of `bool` values are equal and includes error message into revert string on failure. - function assertEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `uint256 values are equal. - function assertEq(uint256[] calldata left, uint256[] calldata right) external pure; - - /// Asserts that two arrays of `uint256` values are equal and includes error message into revert string on failure. - function assertEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `int256` values are equal. - function assertEq(int256[] calldata left, int256[] calldata right) external pure; - - /// Asserts that two arrays of `int256` values are equal and includes error message into revert string on failure. - function assertEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure; - - /// Asserts that two `uint256` values are equal. - function assertEq(uint256 left, uint256 right) external pure; - - /// Asserts that two arrays of `address` values are equal. - function assertEq(address[] calldata left, address[] calldata right) external pure; - - /// Asserts that two arrays of `address` values are equal and includes error message into revert string on failure. - function assertEq(address[] calldata left, address[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `bytes32` values are equal. - function assertEq(bytes32[] calldata left, bytes32[] calldata right) external pure; - - /// Asserts that two arrays of `bytes32` values are equal and includes error message into revert string on failure. - function assertEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `string` values are equal. - function assertEq(string[] calldata left, string[] calldata right) external pure; - - /// Asserts that two arrays of `string` values are equal and includes error message into revert string on failure. - function assertEq(string[] calldata left, string[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `bytes` values are equal. - function assertEq(bytes[] calldata left, bytes[] calldata right) external pure; - - /// Asserts that two arrays of `bytes` values are equal and includes error message into revert string on failure. - function assertEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure; - - /// Asserts that two `uint256` values are equal and includes error message into revert string on failure. - function assertEq(uint256 left, uint256 right, string calldata error) external pure; - - /// Asserts that two `int256` values are equal. - function assertEq(int256 left, int256 right) external pure; - - /// Asserts that two `int256` values are equal and includes error message into revert string on failure. - function assertEq(int256 left, int256 right, string calldata error) external pure; - - /// Asserts that two `address` values are equal. - function assertEq(address left, address right) external pure; - - /// Asserts that two `address` values are equal and includes error message into revert string on failure. - function assertEq(address left, address right, string calldata error) external pure; - - /// Asserts that two `bytes32` values are equal. - function assertEq(bytes32 left, bytes32 right) external pure; - - /// Asserts that two `bytes32` values are equal and includes error message into revert string on failure. - function assertEq(bytes32 left, bytes32 right, string calldata error) external pure; - - /// Asserts that the given condition is false. - function assertFalse(bool condition) external pure; - - /// Asserts that the given condition is false and includes error message into revert string on failure. - function assertFalse(bool condition, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than or equal to second. - /// Formats values with decimals in failure message. - function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than or equal to second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be greater than or equal to second. - /// Formats values with decimals in failure message. - function assertGeDecimal(int256 left, int256 right, uint256 decimals) external pure; - - /// Compares two `int256` values. Expects first value to be greater than or equal to second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertGeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than or equal to second. - function assertGe(uint256 left, uint256 right) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than or equal to second. - /// Includes error message into revert string on failure. - function assertGe(uint256 left, uint256 right, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be greater than or equal to second. - function assertGe(int256 left, int256 right) external pure; - - /// Compares two `int256` values. Expects first value to be greater than or equal to second. - /// Includes error message into revert string on failure. - function assertGe(int256 left, int256 right, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than second. - /// Formats values with decimals in failure message. - function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be greater than second. - /// Formats values with decimals in failure message. - function assertGtDecimal(int256 left, int256 right, uint256 decimals) external pure; - - /// Compares two `int256` values. Expects first value to be greater than second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertGtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than second. - function assertGt(uint256 left, uint256 right) external pure; - - /// Compares two `uint256` values. Expects first value to be greater than second. - /// Includes error message into revert string on failure. - function assertGt(uint256 left, uint256 right, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be greater than second. - function assertGt(int256 left, int256 right) external pure; - - /// Compares two `int256` values. Expects first value to be greater than second. - /// Includes error message into revert string on failure. - function assertGt(int256 left, int256 right, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be less than or equal to second. - /// Formats values with decimals in failure message. - function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) external pure; - - /// Compares two `uint256` values. Expects first value to be less than or equal to second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be less than or equal to second. - /// Formats values with decimals in failure message. - function assertLeDecimal(int256 left, int256 right, uint256 decimals) external pure; - - /// Compares two `int256` values. Expects first value to be less than or equal to second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertLeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be less than or equal to second. - function assertLe(uint256 left, uint256 right) external pure; - - /// Compares two `uint256` values. Expects first value to be less than or equal to second. - /// Includes error message into revert string on failure. - function assertLe(uint256 left, uint256 right, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be less than or equal to second. - function assertLe(int256 left, int256 right) external pure; - - /// Compares two `int256` values. Expects first value to be less than or equal to second. - /// Includes error message into revert string on failure. - function assertLe(int256 left, int256 right, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be less than second. - /// Formats values with decimals in failure message. - function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) external pure; - - /// Compares two `uint256` values. Expects first value to be less than second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be less than second. - /// Formats values with decimals in failure message. - function assertLtDecimal(int256 left, int256 right, uint256 decimals) external pure; - - /// Compares two `int256` values. Expects first value to be less than second. - /// Formats values with decimals in failure message. Includes error message into revert string on failure. - function assertLtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; - - /// Compares two `uint256` values. Expects first value to be less than second. - function assertLt(uint256 left, uint256 right) external pure; - - /// Compares two `uint256` values. Expects first value to be less than second. - /// Includes error message into revert string on failure. - function assertLt(uint256 left, uint256 right, string calldata error) external pure; - - /// Compares two `int256` values. Expects first value to be less than second. - function assertLt(int256 left, int256 right) external pure; - - /// Compares two `int256` values. Expects first value to be less than second. - /// Includes error message into revert string on failure. - function assertLt(int256 left, int256 right, string calldata error) external pure; - - /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. - function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure; - - /// Asserts that two `uint256` values are not equal, formatting them with decimals in failure message. - /// Includes error message into revert string on failure. - function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure; - - /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. - function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) external pure; - - /// Asserts that two `int256` values are not equal, formatting them with decimals in failure message. - /// Includes error message into revert string on failure. - function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure; - - /// Asserts that two `bool` values are not equal. - function assertNotEq(bool left, bool right) external pure; - - /// Asserts that two `bool` values are not equal and includes error message into revert string on failure. - function assertNotEq(bool left, bool right, string calldata error) external pure; - - /// Asserts that two `string` values are not equal. - function assertNotEq(string calldata left, string calldata right) external pure; - - /// Asserts that two `string` values are not equal and includes error message into revert string on failure. - function assertNotEq(string calldata left, string calldata right, string calldata error) external pure; - - /// Asserts that two `bytes` values are not equal. - function assertNotEq(bytes calldata left, bytes calldata right) external pure; - - /// Asserts that two `bytes` values are not equal and includes error message into revert string on failure. - function assertNotEq(bytes calldata left, bytes calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `bool` values are not equal. - function assertNotEq(bool[] calldata left, bool[] calldata right) external pure; - - /// Asserts that two arrays of `bool` values are not equal and includes error message into revert string on failure. - function assertNotEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `uint256` values are not equal. - function assertNotEq(uint256[] calldata left, uint256[] calldata right) external pure; - - /// Asserts that two arrays of `uint256` values are not equal and includes error message into revert string on failure. - function assertNotEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `int256` values are not equal. - function assertNotEq(int256[] calldata left, int256[] calldata right) external pure; - - /// Asserts that two arrays of `int256` values are not equal and includes error message into revert string on failure. - function assertNotEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure; - - /// Asserts that two `uint256` values are not equal. - function assertNotEq(uint256 left, uint256 right) external pure; - - /// Asserts that two arrays of `address` values are not equal. - function assertNotEq(address[] calldata left, address[] calldata right) external pure; - - /// Asserts that two arrays of `address` values are not equal and includes error message into revert string on failure. - function assertNotEq(address[] calldata left, address[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `bytes32` values are not equal. - function assertNotEq(bytes32[] calldata left, bytes32[] calldata right) external pure; - - /// Asserts that two arrays of `bytes32` values are not equal and includes error message into revert string on failure. - function assertNotEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `string` values are not equal. - function assertNotEq(string[] calldata left, string[] calldata right) external pure; - - /// Asserts that two arrays of `string` values are not equal and includes error message into revert string on failure. - function assertNotEq(string[] calldata left, string[] calldata right, string calldata error) external pure; - - /// Asserts that two arrays of `bytes` values are not equal. - function assertNotEq(bytes[] calldata left, bytes[] calldata right) external pure; - - /// Asserts that two arrays of `bytes` values are not equal and includes error message into revert string on failure. - function assertNotEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure; - - /// Asserts that two `uint256` values are not equal and includes error message into revert string on failure. - function assertNotEq(uint256 left, uint256 right, string calldata error) external pure; - - /// Asserts that two `int256` values are not equal. - function assertNotEq(int256 left, int256 right) external pure; - - /// Asserts that two `int256` values are not equal and includes error message into revert string on failure. - function assertNotEq(int256 left, int256 right, string calldata error) external pure; - - /// Asserts that two `address` values are not equal. - function assertNotEq(address left, address right) external pure; - - /// Asserts that two `address` values are not equal and includes error message into revert string on failure. - function assertNotEq(address left, address right, string calldata error) external pure; - - /// Asserts that two `bytes32` values are not equal. - function assertNotEq(bytes32 left, bytes32 right) external pure; - - /// Asserts that two `bytes32` values are not equal and includes error message into revert string on failure. - function assertNotEq(bytes32 left, bytes32 right, string calldata error) external pure; - - /// Asserts that the given condition is true. - function assertTrue(bool condition) external pure; - - /// Asserts that the given condition is true and includes error message into revert string on failure. - function assertTrue(bool condition, string calldata error) external pure; - - /// If the condition is false, discard this run's fuzz inputs and generate new ones. - function assume(bool condition) external pure; - - /// Writes a breakpoint to jump to in the debugger. - function breakpoint(string calldata char) external; - - /// Writes a conditional breakpoint to jump to in the debugger. - function breakpoint(string calldata char, bool value) external; - - /// Returns the RPC url for the given alias. - function rpcUrl(string calldata rpcAlias) external view returns (string memory json); - - /// Returns all rpc urls and their aliases as structs. - function rpcUrlStructs() external view returns (Rpc[] memory urls); - - /// Returns all rpc urls and their aliases `[alias, url][]`. - function rpcUrls() external view returns (string[2][] memory urls); - - /// Suspends execution of the main thread for `duration` milliseconds. - function sleep(uint256 duration) external; - - // ======== Toml ======== - - /// Checks if `key` exists in a TOML table. - function keyExistsToml(string calldata toml, string calldata key) external view returns (bool); - - /// Parses a string of TOML data at `key` and coerces it to `address`. - function parseTomlAddress(string calldata toml, string calldata key) external pure returns (address); - - /// Parses a string of TOML data at `key` and coerces it to `address[]`. - function parseTomlAddressArray(string calldata toml, string calldata key) - external - pure - returns (address[] memory); - - /// Parses a string of TOML data at `key` and coerces it to `bool`. - function parseTomlBool(string calldata toml, string calldata key) external pure returns (bool); - - /// Parses a string of TOML data at `key` and coerces it to `bool[]`. - function parseTomlBoolArray(string calldata toml, string calldata key) external pure returns (bool[] memory); - - /// Parses a string of TOML data at `key` and coerces it to `bytes`. - function parseTomlBytes(string calldata toml, string calldata key) external pure returns (bytes memory); - - /// Parses a string of TOML data at `key` and coerces it to `bytes32`. - function parseTomlBytes32(string calldata toml, string calldata key) external pure returns (bytes32); - - /// Parses a string of TOML data at `key` and coerces it to `bytes32[]`. - function parseTomlBytes32Array(string calldata toml, string calldata key) - external - pure - returns (bytes32[] memory); - - /// Parses a string of TOML data at `key` and coerces it to `bytes[]`. - function parseTomlBytesArray(string calldata toml, string calldata key) external pure returns (bytes[] memory); - - /// Parses a string of TOML data at `key` and coerces it to `int256`. - function parseTomlInt(string calldata toml, string calldata key) external pure returns (int256); - - /// Parses a string of TOML data at `key` and coerces it to `int256[]`. - function parseTomlIntArray(string calldata toml, string calldata key) external pure returns (int256[] memory); - - /// Returns an array of all the keys in a TOML table. - function parseTomlKeys(string calldata toml, string calldata key) external pure returns (string[] memory keys); - - /// Parses a string of TOML data at `key` and coerces it to `string`. - function parseTomlString(string calldata toml, string calldata key) external pure returns (string memory); - - /// Parses a string of TOML data at `key` and coerces it to `string[]`. - function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory); - - /// Parses a string of TOML data at `key` and coerces it to `uint256`. - function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256); - - /// Parses a string of TOML data at `key` and coerces it to `uint256[]`. - function parseTomlUintArray(string calldata toml, string calldata key) external pure returns (uint256[] memory); - - /// ABI-encodes a TOML table. - function parseToml(string calldata toml) external pure returns (bytes memory abiEncodedData); - - /// ABI-encodes a TOML table at `key`. - function parseToml(string calldata toml, string calldata key) external pure returns (bytes memory abiEncodedData); - - /// Takes serialized JSON, converts to TOML and write a serialized TOML to a file. - function writeToml(string calldata json, string calldata path) external; - - /// Takes serialized JSON, converts to TOML and write a serialized TOML table to an **existing** TOML file, replacing a value with key = - /// This is useful to replace a specific value of a TOML file, without having to parse the entire thing. - function writeToml(string calldata json, string calldata path, string calldata valueKey) external; - - // ======== Utilities ======== - - /// Compute the address of a contract created with CREATE2 using the given CREATE2 deployer. - function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer) - external - pure - returns (address); - - /// Compute the address of a contract created with CREATE2 using the default CREATE2 deployer. - function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address); - - /// Compute the address a contract will be deployed at for a given deployer address and nonce. - function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address); - - /// Derives a private key from the name, labels the account with that name, and returns the wallet. - function createWallet(string calldata walletLabel) external returns (Wallet memory wallet); - - /// Generates a wallet from the private key and returns the wallet. - function createWallet(uint256 privateKey) external returns (Wallet memory wallet); - - /// Generates a wallet from the private key, labels the account with that name, and returns the wallet. - function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet); - - /// Derive a private key from a provided mnenomic string (or mnenomic file path) - /// at the derivation path `m/44'/60'/0'/0/{index}`. - function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey); - - /// Derive a private key from a provided mnenomic string (or mnenomic file path) - /// at `{derivationPath}{index}`. - function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) - external - pure - returns (uint256 privateKey); - - /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language - /// at the derivation path `m/44'/60'/0'/0/{index}`. - function deriveKey(string calldata mnemonic, uint32 index, string calldata language) - external - pure - returns (uint256 privateKey); - - /// Derive a private key from a provided mnenomic string (or mnenomic file path) in the specified language - /// at `{derivationPath}{index}`. - function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language) - external - pure - returns (uint256 privateKey); - - /// Returns ENS namehash for provided string. - function ensNamehash(string calldata name) external pure returns (bytes32); - - /// Gets the label for the specified address. - function getLabel(address account) external view returns (string memory currentLabel); - - /// Get a `Wallet`'s nonce. - function getNonce(Wallet calldata wallet) external returns (uint64 nonce); - - /// Labels an address in call traces. - function label(address account, string calldata newLabel) external; - - /// Returns a random `address`. - function randomAddress() external returns (address); - - /// Returns a random uint256 value. - function randomUint() external returns (uint256); - - /// Returns random uin256 value between the provided range (=min..=max). - function randomUint(uint256 min, uint256 max) external returns (uint256); - - /// Adds a private key to the local forge wallet and returns the address. - function rememberKey(uint256 privateKey) external returns (address keyAddr); - - /// Signs data with a `Wallet`. - function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s); - - /// Encodes a `bytes` value to a base64url string. - function toBase64URL(bytes calldata data) external pure returns (string memory); - - /// Encodes a `string` value to a base64url string. - function toBase64URL(string calldata data) external pure returns (string memory); - - /// Encodes a `bytes` value to a base64 string. - function toBase64(bytes calldata data) external pure returns (string memory); - - /// Encodes a `string` value to a base64 string. - function toBase64(string calldata data) external pure returns (string memory); -} - -/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used -/// in tests, but it is not recommended to use these cheats in scripts. -interface Vm is VmSafe { - // ======== EVM ======== - - /// Returns the identifier of the currently active fork. Reverts if no fork is currently active. - function activeFork() external view returns (uint256 forkId); - - /// In forking mode, explicitly grant the given address cheatcode access. - function allowCheatcodes(address account) external; - - /// Sets `block.blobbasefee` - function blobBaseFee(uint256 newBlobBaseFee) external; - - /// Sets the blobhashes in the transaction. - /// Not available on EVM versions before Cancun. - /// If used on unsupported EVM versions it will revert. - function blobhashes(bytes32[] calldata hashes) external; - - /// Sets `block.chainid`. - function chainId(uint256 newChainId) external; - - /// Clears all mocked calls. - function clearMockedCalls() external; - - /// Sets `block.coinbase`. - function coinbase(address newCoinbase) external; - - /// Creates a new fork with the given endpoint and the _latest_ block and returns the identifier of the fork. - function createFork(string calldata urlOrAlias) external returns (uint256 forkId); - - /// Creates a new fork with the given endpoint and block and returns the identifier of the fork. - function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); - - /// Creates a new fork with the given endpoint and at the block the given transaction was mined in, - /// replays all transaction mined in the block before the transaction, and returns the identifier of the fork. - function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); - - /// Creates and also selects a new fork with the given endpoint and the latest block and returns the identifier of the fork. - function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId); - - /// Creates and also selects a new fork with the given endpoint and block and returns the identifier of the fork. - function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId); - - /// Creates and also selects new fork with the given endpoint and at the block the given transaction was mined in, - /// replays all transaction mined in the block before the transaction, returns the identifier of the fork. - function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId); - - /// Sets an address' balance. - function deal(address account, uint256 newBalance) external; - - /// Removes the snapshot with the given ID created by `snapshot`. - /// Takes the snapshot ID to delete. - /// Returns `true` if the snapshot was successfully deleted. - /// Returns `false` if the snapshot does not exist. - function deleteSnapshot(uint256 snapshotId) external returns (bool success); - - /// Removes _all_ snapshots previously created by `snapshot`. - function deleteSnapshots() external; - - /// Sets `block.difficulty`. - /// Not available on EVM versions from Paris onwards. Use `prevrandao` instead. - /// Reverts if used on unsupported EVM versions. - function difficulty(uint256 newDifficulty) external; - - /// Dump a genesis JSON file's `allocs` to disk. - function dumpState(string calldata pathToStateJson) external; - - /// Sets an address' code. - function etch(address target, bytes calldata newRuntimeBytecode) external; - - /// Sets `block.basefee`. - function fee(uint256 newBasefee) external; - - /// Gets the blockhashes from the current transaction. - /// Not available on EVM versions before Cancun. - /// If used on unsupported EVM versions it will revert. - function getBlobhashes() external view returns (bytes32[] memory hashes); - - /// Returns true if the account is marked as persistent. - function isPersistent(address account) external view returns (bool persistent); - - /// Load a genesis JSON file's `allocs` into the in-memory revm state. - function loadAllocs(string calldata pathToAllocsJson) external; - - /// Marks that the account(s) should use persistent storage across fork swaps in a multifork setup - /// Meaning, changes made to the state of this account will be kept when switching forks. - function makePersistent(address account) external; - - /// See `makePersistent(address)`. - function makePersistent(address account0, address account1) external; - - /// See `makePersistent(address)`. - function makePersistent(address account0, address account1, address account2) external; - - /// See `makePersistent(address)`. - function makePersistent(address[] calldata accounts) external; - - /// Reverts a call to an address with specified revert data. - function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external; - - /// Reverts a call to an address with a specific `msg.value`, with specified revert data. - function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData) - external; - - /// Mocks a call to an address, returning specified data. - /// Calldata can either be strict or a partial match, e.g. if you only - /// pass a Solidity selector to the expected calldata, then the entire Solidity - /// function will be mocked. - function mockCall(address callee, bytes calldata data, bytes calldata returnData) external; - - /// Mocks a call to an address with a specific `msg.value`, returning specified data. - /// Calldata match takes precedence over `msg.value` in case of ambiguity. - function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external; - - /// Sets the *next* call's `msg.sender` to be the input address. - function prank(address msgSender) external; - - /// Sets the *next* call's `msg.sender` to be the input address, and the `tx.origin` to be the second input. - function prank(address msgSender, address txOrigin) external; - - /// Sets `block.prevrandao`. - /// Not available on EVM versions before Paris. Use `difficulty` instead. - /// If used on unsupported EVM versions it will revert. - function prevrandao(bytes32 newPrevrandao) external; - - /// Sets `block.prevrandao`. - /// Not available on EVM versions before Paris. Use `difficulty` instead. - /// If used on unsupported EVM versions it will revert. - function prevrandao(uint256 newPrevrandao) external; - - /// Reads the current `msg.sender` and `tx.origin` from state and reports if there is any active caller modification. - function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin); - - /// Resets the nonce of an account to 0 for EOAs and 1 for contract accounts. - function resetNonce(address account) external; - - /// Revert the state of the EVM to a previous snapshot - /// Takes the snapshot ID to revert to. - /// Returns `true` if the snapshot was successfully reverted. - /// Returns `false` if the snapshot does not exist. - /// **Note:** This does not automatically delete the snapshot. To delete the snapshot use `deleteSnapshot`. - function revertTo(uint256 snapshotId) external returns (bool success); - - /// Revert the state of the EVM to a previous snapshot and automatically deletes the snapshots - /// Takes the snapshot ID to revert to. - /// Returns `true` if the snapshot was successfully reverted and deleted. - /// Returns `false` if the snapshot does not exist. - function revertToAndDelete(uint256 snapshotId) external returns (bool success); - - /// Revokes persistent status from the address, previously added via `makePersistent`. - function revokePersistent(address account) external; - - /// See `revokePersistent(address)`. - function revokePersistent(address[] calldata accounts) external; - - /// Sets `block.height`. - function roll(uint256 newHeight) external; - - /// Updates the currently active fork to given block number - /// This is similar to `roll` but for the currently active fork. - function rollFork(uint256 blockNumber) external; - - /// Updates the currently active fork to given transaction. This will `rollFork` with the number - /// of the block the transaction was mined in and replays all transaction mined before it in the block. - function rollFork(bytes32 txHash) external; - - /// Updates the given fork to given block number. - function rollFork(uint256 forkId, uint256 blockNumber) external; - - /// Updates the given fork to block number of the given transaction and replays all transaction mined before it in the block. - function rollFork(uint256 forkId, bytes32 txHash) external; - - /// Takes a fork identifier created by `createFork` and sets the corresponding forked state as active. - function selectFork(uint256 forkId) external; - - /// Set blockhash for the current block. - /// It only sets the blockhash for blocks where `block.number - 256 <= number < block.number`. - function setBlockhash(uint256 blockNumber, bytes32 blockHash) external; - - /// Sets the nonce of an account. Must be higher than the current nonce of the account. - function setNonce(address account, uint64 newNonce) external; - - /// Sets the nonce of an account to an arbitrary value. - function setNonceUnsafe(address account, uint64 newNonce) external; - - /// Snapshot the current state of the evm. - /// Returns the ID of the snapshot that was created. - /// To revert a snapshot use `revertTo`. - function snapshot() external returns (uint256 snapshotId); - - /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called. - function startPrank(address msgSender) external; - - /// Sets all subsequent calls' `msg.sender` to be the input address until `stopPrank` is called, and the `tx.origin` to be the second input. - function startPrank(address msgSender, address txOrigin) external; - - /// Resets subsequent calls' `msg.sender` to be `address(this)`. - function stopPrank() external; - - /// Stores a value to an address' storage slot. - function store(address target, bytes32 slot, bytes32 value) external; - - /// Fetches the given transaction from the active fork and executes it on the current state. - function transact(bytes32 txHash) external; - - /// Fetches the given transaction from the given fork and executes it on the current state. - function transact(uint256 forkId, bytes32 txHash) external; - - /// Sets `tx.gasprice`. - function txGasPrice(uint256 newGasPrice) external; - - /// Sets `block.timestamp`. - function warp(uint256 newTimestamp) external; - - // ======== Testing ======== - - /// Expect a call to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. - function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external; - - /// Expect given number of calls to an address with the specified `msg.value` and calldata, and a *minimum* amount of gas. - function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count) - external; - - /// Expects a call to an address with the specified calldata. - /// Calldata can either be a strict or a partial match. - function expectCall(address callee, bytes calldata data) external; - - /// Expects given number of calls to an address with the specified calldata. - function expectCall(address callee, bytes calldata data, uint64 count) external; - - /// Expects a call to an address with the specified `msg.value` and calldata. - function expectCall(address callee, uint256 msgValue, bytes calldata data) external; - - /// Expects given number of calls to an address with the specified `msg.value` and calldata. - function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external; - - /// Expect a call to an address with the specified `msg.value`, gas, and calldata. - function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external; - - /// Expects given number of calls to an address with the specified `msg.value`, gas, and calldata. - function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external; - - /// Prepare an expected anonymous log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). - /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if - /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). - function expectEmitAnonymous(bool checkTopic0, bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) - external; - - /// Same as the previous method, but also checks supplied address against emitting contract. - function expectEmitAnonymous( - bool checkTopic0, - bool checkTopic1, - bool checkTopic2, - bool checkTopic3, - bool checkData, - address emitter - ) external; - - /// Prepare an expected anonymous log with all topic and data checks enabled. - /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if - /// logs were emitted in the expected order with the expected topics and data. - function expectEmitAnonymous() external; - - /// Same as the previous method, but also checks supplied address against emitting contract. - function expectEmitAnonymous(address emitter) external; - - /// Prepare an expected log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). - /// Call this function, then emit an event, then call a function. Internally after the call, we check if - /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). - function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external; - - /// Same as the previous method, but also checks supplied address against emitting contract. - function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) - external; - - /// Prepare an expected log with all topic and data checks enabled. - /// Call this function, then emit an event, then call a function. Internally after the call, we check if - /// logs were emitted in the expected order with the expected topics and data. - function expectEmit() external; - - /// Same as the previous method, but also checks supplied address against emitting contract. - function expectEmit(address emitter) external; - - /// Expects an error on next call with any revert data. - function expectRevert() external; - - /// Expects an error on next call that starts with the revert data. - function expectRevert(bytes4 revertData) external; - - /// Expects an error on next call that exactly matches the revert data. - function expectRevert(bytes calldata revertData) external; - - /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other - /// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set. - function expectSafeMemory(uint64 min, uint64 max) external; - - /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the next created subcontext. - /// If any other memory is written to, the test will fail. Can be called multiple times to add more ranges - /// to the set. - function expectSafeMemoryCall(uint64 min, uint64 max) external; - - /// Marks a test as skipped. Must be called at the top of the test. - function skip(bool skipTest) external; - - /// Stops all safe memory expectation in the current subcontext. - function stopExpectSafeMemory() external; -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/console.sol b/examples/thorchain/contracts/lib/forge-std/src/console.sol deleted file mode 100644 index 755eedcd..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/console.sol +++ /dev/null @@ -1,1552 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.4.22 <0.9.0; - -library console { - address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); - - function _castLogPayloadViewToPure( - function(bytes memory) internal view fnIn - ) internal pure returns (function(bytes memory) internal pure fnOut) { - assembly { - fnOut := fnIn - } - } - - function _sendLogPayload(bytes memory payload) internal pure { - _castLogPayloadViewToPure(_sendLogPayloadView)(payload); - } - - function _sendLogPayloadView(bytes memory payload) private view { - uint256 payloadLength = payload.length; - address consoleAddress = CONSOLE_ADDRESS; - /// @solidity memory-safe-assembly - assembly { - let payloadStart := add(payload, 32) - let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) - } - } - - function log() internal pure { - _sendLogPayload(abi.encodeWithSignature("log()")); - } - - function logInt(int p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); - } - - function logUint(uint p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); - } - - function logString(string memory p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); - } - - function logBool(bool p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); - } - - function logAddress(address p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); - } - - function logBytes(bytes memory p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); - } - - function logBytes1(bytes1 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); - } - - function logBytes2(bytes2 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); - } - - function logBytes3(bytes3 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); - } - - function logBytes4(bytes4 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); - } - - function logBytes5(bytes5 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); - } - - function logBytes6(bytes6 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); - } - - function logBytes7(bytes7 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); - } - - function logBytes8(bytes8 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); - } - - function logBytes9(bytes9 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); - } - - function logBytes10(bytes10 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); - } - - function logBytes11(bytes11 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); - } - - function logBytes12(bytes12 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); - } - - function logBytes13(bytes13 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); - } - - function logBytes14(bytes14 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); - } - - function logBytes15(bytes15 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); - } - - function logBytes16(bytes16 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); - } - - function logBytes17(bytes17 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); - } - - function logBytes18(bytes18 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); - } - - function logBytes19(bytes19 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); - } - - function logBytes20(bytes20 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); - } - - function logBytes21(bytes21 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); - } - - function logBytes22(bytes22 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); - } - - function logBytes23(bytes23 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); - } - - function logBytes24(bytes24 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); - } - - function logBytes25(bytes25 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); - } - - function logBytes26(bytes26 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); - } - - function logBytes27(bytes27 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); - } - - function logBytes28(bytes28 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); - } - - function logBytes29(bytes29 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); - } - - function logBytes30(bytes30 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); - } - - function logBytes31(bytes31 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); - } - - function logBytes32(bytes32 p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); - } - - function log(uint p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); - } - - function log(int p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); - } - - function log(string memory p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); - } - - function log(bool p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); - } - - function log(address p0) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); - } - - function log(uint p0, uint p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); - } - - function log(uint p0, string memory p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); - } - - function log(uint p0, bool p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); - } - - function log(uint p0, address p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); - } - - function log(string memory p0, uint p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); - } - - function log(string memory p0, int p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,int)", p0, p1)); - } - - function log(string memory p0, string memory p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); - } - - function log(string memory p0, bool p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); - } - - function log(string memory p0, address p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); - } - - function log(bool p0, uint p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); - } - - function log(bool p0, string memory p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); - } - - function log(bool p0, bool p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); - } - - function log(bool p0, address p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); - } - - function log(address p0, uint p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); - } - - function log(address p0, string memory p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); - } - - function log(address p0, bool p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); - } - - function log(address p0, address p1) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); - } - - function log(uint p0, uint p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); - } - - function log(uint p0, uint p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); - } - - function log(uint p0, uint p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); - } - - function log(uint p0, uint p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); - } - - function log(uint p0, string memory p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); - } - - function log(uint p0, string memory p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); - } - - function log(uint p0, string memory p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); - } - - function log(uint p0, string memory p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); - } - - function log(uint p0, bool p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); - } - - function log(uint p0, bool p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); - } - - function log(uint p0, bool p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); - } - - function log(uint p0, bool p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); - } - - function log(uint p0, address p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); - } - - function log(uint p0, address p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); - } - - function log(uint p0, address p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); - } - - function log(uint p0, address p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); - } - - function log(string memory p0, uint p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); - } - - function log(string memory p0, uint p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); - } - - function log(string memory p0, uint p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); - } - - function log(string memory p0, uint p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); - } - - function log(string memory p0, string memory p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); - } - - function log(string memory p0, string memory p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); - } - - function log(string memory p0, string memory p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); - } - - function log(string memory p0, string memory p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); - } - - function log(string memory p0, bool p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); - } - - function log(string memory p0, bool p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); - } - - function log(string memory p0, bool p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); - } - - function log(string memory p0, bool p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); - } - - function log(string memory p0, address p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); - } - - function log(string memory p0, address p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); - } - - function log(string memory p0, address p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); - } - - function log(string memory p0, address p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); - } - - function log(bool p0, uint p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); - } - - function log(bool p0, uint p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); - } - - function log(bool p0, uint p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); - } - - function log(bool p0, uint p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); - } - - function log(bool p0, string memory p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); - } - - function log(bool p0, string memory p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); - } - - function log(bool p0, string memory p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); - } - - function log(bool p0, string memory p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); - } - - function log(bool p0, bool p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); - } - - function log(bool p0, bool p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); - } - - function log(bool p0, bool p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); - } - - function log(bool p0, bool p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); - } - - function log(bool p0, address p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); - } - - function log(bool p0, address p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); - } - - function log(bool p0, address p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); - } - - function log(bool p0, address p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); - } - - function log(address p0, uint p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); - } - - function log(address p0, uint p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); - } - - function log(address p0, uint p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); - } - - function log(address p0, uint p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); - } - - function log(address p0, string memory p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); - } - - function log(address p0, string memory p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); - } - - function log(address p0, string memory p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); - } - - function log(address p0, string memory p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); - } - - function log(address p0, bool p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); - } - - function log(address p0, bool p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); - } - - function log(address p0, bool p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); - } - - function log(address p0, bool p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); - } - - function log(address p0, address p1, uint p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); - } - - function log(address p0, address p1, string memory p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); - } - - function log(address p0, address p1, bool p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); - } - - function log(address p0, address p1, address p2) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); - } - - function log(uint p0, uint p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, uint p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, string memory p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, bool p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); - } - - function log(uint p0, address p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, uint p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, string memory p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, bool p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); - } - - function log(string memory p0, address p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, uint p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, string memory p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, bool p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); - } - - function log(bool p0, address p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); - } - - function log(address p0, uint p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); - } - - function log(address p0, string memory p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); - } - - function log(address p0, bool p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, uint p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, uint p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, uint p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, uint p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, string memory p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, string memory p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, string memory p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, string memory p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, bool p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, bool p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, bool p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, bool p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, address p2, uint p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, address p2, string memory p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, address p2, bool p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); - } - - function log(address p0, address p1, address p2, address p3) internal pure { - _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/console2.sol b/examples/thorchain/contracts/lib/forge-std/src/console2.sol deleted file mode 100644 index 03531d91..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/console2.sol +++ /dev/null @@ -1,4 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.4.22 <0.9.0; - -import {console as console2} from "./console.sol"; diff --git a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC1155.sol b/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC1155.sol deleted file mode 100644 index f7dd2b41..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC1155.sol +++ /dev/null @@ -1,105 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2; - -import "./IERC165.sol"; - -/// @title ERC-1155 Multi Token Standard -/// @dev See https://eips.ethereum.org/EIPS/eip-1155 -/// Note: The ERC-165 identifier for this interface is 0xd9b67a26. -interface IERC1155 is IERC165 { - /// @dev - /// - Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). - /// - The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender). - /// - The `_from` argument MUST be the address of the holder whose balance is decreased. - /// - The `_to` argument MUST be the address of the recipient whose balance is increased. - /// - The `_id` argument MUST be the token type being transferred. - /// - The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by. - /// - When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). - /// - When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). - event TransferSingle( - address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value - ); - - /// @dev - /// - Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). - /// - The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender). - /// - The `_from` argument MUST be the address of the holder whose balance is decreased. - /// - The `_to` argument MUST be the address of the recipient whose balance is increased. - /// - The `_ids` argument MUST be the list of tokens being transferred. - /// - The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by. - /// - When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). - /// - When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). - event TransferBatch( - address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values - ); - - /// @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled). - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - - /// @dev MUST emit when the URI is updated for a token ID. URIs are defined in RFC 3986. - /// The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema". - event URI(string _value, uint256 indexed _id); - - /// @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call). - /// @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). - /// - MUST revert if `_to` is the zero address. - /// - MUST revert if balance of holder for token `_id` is lower than the `_value` sent. - /// - MUST revert on any other error. - /// - MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard). - /// - After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). - /// @param _from Source address - /// @param _to Target address - /// @param _id ID of the token type - /// @param _value Transfer amount - /// @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to` - function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external; - - /// @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call). - /// @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). - /// - MUST revert if `_to` is the zero address. - /// - MUST revert if length of `_ids` is not the same as length of `_values`. - /// - MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient. - /// - MUST revert on any other error. - /// - MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard). - /// - Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc). - /// - After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). - /// @param _from Source address - /// @param _to Target address - /// @param _ids IDs of each token type (order and length must match _values array) - /// @param _values Transfer amounts per token type (order and length must match _ids array) - /// @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to` - function safeBatchTransferFrom( - address _from, - address _to, - uint256[] calldata _ids, - uint256[] calldata _values, - bytes calldata _data - ) external; - - /// @notice Get the balance of an account's tokens. - /// @param _owner The address of the token holder - /// @param _id ID of the token - /// @return The _owner's balance of the token type requested - function balanceOf(address _owner, uint256 _id) external view returns (uint256); - - /// @notice Get the balance of multiple account/token pairs - /// @param _owners The addresses of the token holders - /// @param _ids ID of the tokens - /// @return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair) - function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) - external - view - returns (uint256[] memory); - - /// @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. - /// @dev MUST emit the ApprovalForAll event on success. - /// @param _operator Address to add to the set of authorized operators - /// @param _approved True if the operator is approved, false to revoke approval - function setApprovalForAll(address _operator, bool _approved) external; - - /// @notice Queries the approval status of an operator for a given owner. - /// @param _owner The owner of the tokens - /// @param _operator Address of authorized operator - /// @return True if the operator is approved, false if not - function isApprovedForAll(address _owner, address _operator) external view returns (bool); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC165.sol b/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC165.sol deleted file mode 100644 index 9af4bf80..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC165.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2; - -interface IERC165 { - /// @notice Query if a contract implements an interface - /// @param interfaceID The interface identifier, as specified in ERC-165 - /// @dev Interface identification is specified in ERC-165. This function - /// uses less than 30,000 gas. - /// @return `true` if the contract implements `interfaceID` and - /// `interfaceID` is not 0xffffffff, `false` otherwise - function supportsInterface(bytes4 interfaceID) external view returns (bool); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC20.sol b/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC20.sol deleted file mode 100644 index ba40806c..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC20.sol +++ /dev/null @@ -1,43 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2; - -/// @dev Interface of the ERC20 standard as defined in the EIP. -/// @dev This includes the optional name, symbol, and decimals metadata. -interface IERC20 { - /// @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`). - event Transfer(address indexed from, address indexed to, uint256 value); - - /// @dev Emitted when the allowance of a `spender` for an `owner` is set, where `value` - /// is the new allowance. - event Approval(address indexed owner, address indexed spender, uint256 value); - - /// @notice Returns the amount of tokens in existence. - function totalSupply() external view returns (uint256); - - /// @notice Returns the amount of tokens owned by `account`. - function balanceOf(address account) external view returns (uint256); - - /// @notice Moves `amount` tokens from the caller's account to `to`. - function transfer(address to, uint256 amount) external returns (bool); - - /// @notice Returns the remaining number of tokens that `spender` is allowed - /// to spend on behalf of `owner` - function allowance(address owner, address spender) external view returns (uint256); - - /// @notice Sets `amount` as the allowance of `spender` over the caller's tokens. - /// @dev Be aware of front-running risks: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 - function approve(address spender, uint256 amount) external returns (bool); - - /// @notice Moves `amount` tokens from `from` to `to` using the allowance mechanism. - /// `amount` is then deducted from the caller's allowance. - function transferFrom(address from, address to, uint256 amount) external returns (bool); - - /// @notice Returns the name of the token. - function name() external view returns (string memory); - - /// @notice Returns the symbol of the token. - function symbol() external view returns (string memory); - - /// @notice Returns the decimals places of the token. - function decimals() external view returns (uint8); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC4626.sol b/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC4626.sol deleted file mode 100644 index bfe3a115..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC4626.sol +++ /dev/null @@ -1,190 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2; - -import "./IERC20.sol"; - -/// @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in -/// https://eips.ethereum.org/EIPS/eip-4626 -interface IERC4626 is IERC20 { - event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); - - event Withdraw( - address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares - ); - - /// @notice Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. - /// @dev - /// - MUST be an ERC-20 token contract. - /// - MUST NOT revert. - function asset() external view returns (address assetTokenAddress); - - /// @notice Returns the total amount of the underlying asset that is “managed” by Vault. - /// @dev - /// - SHOULD include any compounding that occurs from yield. - /// - MUST be inclusive of any fees that are charged against assets in the Vault. - /// - MUST NOT revert. - function totalAssets() external view returns (uint256 totalManagedAssets); - - /// @notice Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal - /// scenario where all the conditions are met. - /// @dev - /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault. - /// - MUST NOT show any variations depending on the caller. - /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. - /// - MUST NOT revert. - /// - /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the - /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and - /// from. - function convertToShares(uint256 assets) external view returns (uint256 shares); - - /// @notice Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal - /// scenario where all the conditions are met. - /// @dev - /// - MUST NOT be inclusive of any fees that are charged against assets in the Vault. - /// - MUST NOT show any variations depending on the caller. - /// - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. - /// - MUST NOT revert. - /// - /// NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the - /// “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and - /// from. - function convertToAssets(uint256 shares) external view returns (uint256 assets); - - /// @notice Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, - /// through a deposit call. - /// @dev - /// - MUST return a limited value if receiver is subject to some deposit limit. - /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. - /// - MUST NOT revert. - function maxDeposit(address receiver) external view returns (uint256 maxAssets); - - /// @notice Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given - /// current on-chain conditions. - /// @dev - /// - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit - /// call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called - /// in the same transaction. - /// - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the - /// deposit would be accepted, regardless if the user has enough tokens approved, etc. - /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. - /// - MUST NOT revert. - /// - /// NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in - /// share price or some other type of condition, meaning the depositor will lose assets by depositing. - function previewDeposit(uint256 assets) external view returns (uint256 shares); - - /// @notice Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. - /// @dev - /// - MUST emit the Deposit event. - /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the - /// deposit execution, and are accounted for during deposit. - /// - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not - /// approving enough underlying tokens to the Vault contract, etc). - /// - /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. - function deposit(uint256 assets, address receiver) external returns (uint256 shares); - - /// @notice Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. - /// @dev - /// - MUST return a limited value if receiver is subject to some mint limit. - /// - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. - /// - MUST NOT revert. - function maxMint(address receiver) external view returns (uint256 maxShares); - - /// @notice Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given - /// current on-chain conditions. - /// @dev - /// - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call - /// in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the - /// same transaction. - /// - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint - /// would be accepted, regardless if the user has enough tokens approved, etc. - /// - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. - /// - MUST NOT revert. - /// - /// NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in - /// share price or some other type of condition, meaning the depositor will lose assets by minting. - function previewMint(uint256 shares) external view returns (uint256 assets); - - /// @notice Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. - /// @dev - /// - MUST emit the Deposit event. - /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint - /// execution, and are accounted for during mint. - /// - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not - /// approving enough underlying tokens to the Vault contract, etc). - /// - /// NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. - function mint(uint256 shares, address receiver) external returns (uint256 assets); - - /// @notice Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the - /// Vault, through a withdraw call. - /// @dev - /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock. - /// - MUST NOT revert. - function maxWithdraw(address owner) external view returns (uint256 maxAssets); - - /// @notice Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, - /// given current on-chain conditions. - /// @dev - /// - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw - /// call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if - /// called - /// in the same transaction. - /// - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though - /// the withdrawal would be accepted, regardless if the user has enough shares, etc. - /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. - /// - MUST NOT revert. - /// - /// NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in - /// share price or some other type of condition, meaning the depositor will lose assets by depositing. - function previewWithdraw(uint256 assets) external view returns (uint256 shares); - - /// @notice Burns shares from owner and sends exactly assets of underlying tokens to receiver. - /// @dev - /// - MUST emit the Withdraw event. - /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the - /// withdraw execution, and are accounted for during withdraw. - /// - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner - /// not having enough shares, etc). - /// - /// Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. - /// Those methods should be performed separately. - function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); - - /// @notice Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, - /// through a redeem call. - /// @dev - /// - MUST return a limited value if owner is subject to some withdrawal limit or timelock. - /// - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. - /// - MUST NOT revert. - function maxRedeem(address owner) external view returns (uint256 maxShares); - - /// @notice Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, - /// given current on-chain conditions. - /// @dev - /// - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call - /// in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the - /// same transaction. - /// - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the - /// redemption would be accepted, regardless if the user has enough shares, etc. - /// - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. - /// - MUST NOT revert. - /// - /// NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in - /// share price or some other type of condition, meaning the depositor will lose assets by redeeming. - function previewRedeem(uint256 shares) external view returns (uint256 assets); - - /// @notice Burns exactly shares from owner and sends assets of underlying tokens to receiver. - /// @dev - /// - MUST emit the Withdraw event. - /// - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the - /// redeem execution, and are accounted for during redeem. - /// - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner - /// not having enough shares, etc). - /// - /// NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. - /// Those methods should be performed separately. - function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC721.sol b/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC721.sol deleted file mode 100644 index 0a16f45c..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IERC721.sol +++ /dev/null @@ -1,164 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2; - -import "./IERC165.sol"; - -/// @title ERC-721 Non-Fungible Token Standard -/// @dev See https://eips.ethereum.org/EIPS/eip-721 -/// Note: the ERC-165 identifier for this interface is 0x80ac58cd. -interface IERC721 is IERC165 { - /// @dev This emits when ownership of any NFT changes by any mechanism. - /// This event emits when NFTs are created (`from` == 0) and destroyed - /// (`to` == 0). Exception: during contract creation, any number of NFTs - /// may be created and assigned without emitting Transfer. At the time of - /// any transfer, the approved address for that NFT (if any) is reset to none. - event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); - - /// @dev This emits when the approved address for an NFT is changed or - /// reaffirmed. The zero address indicates there is no approved address. - /// When a Transfer event emits, this also indicates that the approved - /// address for that NFT (if any) is reset to none. - event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); - - /// @dev This emits when an operator is enabled or disabled for an owner. - /// The operator can manage all NFTs of the owner. - event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); - - /// @notice Count all NFTs assigned to an owner - /// @dev NFTs assigned to the zero address are considered invalid, and this - /// function throws for queries about the zero address. - /// @param _owner An address for whom to query the balance - /// @return The number of NFTs owned by `_owner`, possibly zero - function balanceOf(address _owner) external view returns (uint256); - - /// @notice Find the owner of an NFT - /// @dev NFTs assigned to zero address are considered invalid, and queries - /// about them do throw. - /// @param _tokenId The identifier for an NFT - /// @return The address of the owner of the NFT - function ownerOf(uint256 _tokenId) external view returns (address); - - /// @notice Transfers the ownership of an NFT from one address to another address - /// @dev Throws unless `msg.sender` is the current owner, an authorized - /// operator, or the approved address for this NFT. Throws if `_from` is - /// not the current owner. Throws if `_to` is the zero address. Throws if - /// `_tokenId` is not a valid NFT. When transfer is complete, this function - /// checks if `_to` is a smart contract (code size > 0). If so, it calls - /// `onERC721Received` on `_to` and throws if the return value is not - /// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`. - /// @param _from The current owner of the NFT - /// @param _to The new owner - /// @param _tokenId The NFT to transfer - /// @param data Additional data with no specified format, sent in call to `_to` - function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable; - - /// @notice Transfers the ownership of an NFT from one address to another address - /// @dev This works identically to the other function with an extra data parameter, - /// except this function just sets data to "". - /// @param _from The current owner of the NFT - /// @param _to The new owner - /// @param _tokenId The NFT to transfer - function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; - - /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE - /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE - /// THEY MAY BE PERMANENTLY LOST - /// @dev Throws unless `msg.sender` is the current owner, an authorized - /// operator, or the approved address for this NFT. Throws if `_from` is - /// not the current owner. Throws if `_to` is the zero address. Throws if - /// `_tokenId` is not a valid NFT. - /// @param _from The current owner of the NFT - /// @param _to The new owner - /// @param _tokenId The NFT to transfer - function transferFrom(address _from, address _to, uint256 _tokenId) external payable; - - /// @notice Change or reaffirm the approved address for an NFT - /// @dev The zero address indicates there is no approved address. - /// Throws unless `msg.sender` is the current NFT owner, or an authorized - /// operator of the current owner. - /// @param _approved The new approved NFT controller - /// @param _tokenId The NFT to approve - function approve(address _approved, uint256 _tokenId) external payable; - - /// @notice Enable or disable approval for a third party ("operator") to manage - /// all of `msg.sender`'s assets - /// @dev Emits the ApprovalForAll event. The contract MUST allow - /// multiple operators per owner. - /// @param _operator Address to add to the set of authorized operators - /// @param _approved True if the operator is approved, false to revoke approval - function setApprovalForAll(address _operator, bool _approved) external; - - /// @notice Get the approved address for a single NFT - /// @dev Throws if `_tokenId` is not a valid NFT. - /// @param _tokenId The NFT to find the approved address for - /// @return The approved address for this NFT, or the zero address if there is none - function getApproved(uint256 _tokenId) external view returns (address); - - /// @notice Query if an address is an authorized operator for another address - /// @param _owner The address that owns the NFTs - /// @param _operator The address that acts on behalf of the owner - /// @return True if `_operator` is an approved operator for `_owner`, false otherwise - function isApprovedForAll(address _owner, address _operator) external view returns (bool); -} - -/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02. -interface IERC721TokenReceiver { - /// @notice Handle the receipt of an NFT - /// @dev The ERC721 smart contract calls this function on the recipient - /// after a `transfer`. This function MAY throw to revert and reject the - /// transfer. Return of other than the magic value MUST result in the - /// transaction being reverted. - /// Note: the contract address is always the message sender. - /// @param _operator The address which called `safeTransferFrom` function - /// @param _from The address which previously owned the token - /// @param _tokenId The NFT identifier which is being transferred - /// @param _data Additional data with no specified format - /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` - /// unless throwing - function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data) - external - returns (bytes4); -} - -/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension -/// @dev See https://eips.ethereum.org/EIPS/eip-721 -/// Note: the ERC-165 identifier for this interface is 0x5b5e139f. -interface IERC721Metadata is IERC721 { - /// @notice A descriptive name for a collection of NFTs in this contract - function name() external view returns (string memory _name); - - /// @notice An abbreviated name for NFTs in this contract - function symbol() external view returns (string memory _symbol); - - /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. - /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC - /// 3986. The URI may point to a JSON file that conforms to the "ERC721 - /// Metadata JSON Schema". - function tokenURI(uint256 _tokenId) external view returns (string memory); -} - -/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension -/// @dev See https://eips.ethereum.org/EIPS/eip-721 -/// Note: the ERC-165 identifier for this interface is 0x780e9d63. -interface IERC721Enumerable is IERC721 { - /// @notice Count NFTs tracked by this contract - /// @return A count of valid NFTs tracked by this contract, where each one of - /// them has an assigned and queryable owner not equal to the zero address - function totalSupply() external view returns (uint256); - - /// @notice Enumerate valid NFTs - /// @dev Throws if `_index` >= `totalSupply()`. - /// @param _index A counter less than `totalSupply()` - /// @return The token identifier for the `_index`th NFT, - /// (sort order not specified) - function tokenByIndex(uint256 _index) external view returns (uint256); - - /// @notice Enumerate NFTs assigned to an owner - /// @dev Throws if `_index` >= `balanceOf(_owner)` or if - /// `_owner` is the zero address, representing invalid NFTs. - /// @param _owner An address where we are interested in NFTs owned by them - /// @param _index A counter less than `balanceOf(_owner)` - /// @return The token identifier for the `_index`th NFT assigned to `_owner`, - /// (sort order not specified) - function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IMulticall3.sol b/examples/thorchain/contracts/lib/forge-std/src/interfaces/IMulticall3.sol deleted file mode 100644 index 0d031b71..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/interfaces/IMulticall3.sol +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -interface IMulticall3 { - struct Call { - address target; - bytes callData; - } - - struct Call3 { - address target; - bool allowFailure; - bytes callData; - } - - struct Call3Value { - address target; - bool allowFailure; - uint256 value; - bytes callData; - } - - struct Result { - bool success; - bytes returnData; - } - - function aggregate(Call[] calldata calls) - external - payable - returns (uint256 blockNumber, bytes[] memory returnData); - - function aggregate3(Call3[] calldata calls) external payable returns (Result[] memory returnData); - - function aggregate3Value(Call3Value[] calldata calls) external payable returns (Result[] memory returnData); - - function blockAndAggregate(Call[] calldata calls) - external - payable - returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); - - function getBasefee() external view returns (uint256 basefee); - - function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash); - - function getBlockNumber() external view returns (uint256 blockNumber); - - function getChainId() external view returns (uint256 chainid); - - function getCurrentBlockCoinbase() external view returns (address coinbase); - - function getCurrentBlockDifficulty() external view returns (uint256 difficulty); - - function getCurrentBlockGasLimit() external view returns (uint256 gaslimit); - - function getCurrentBlockTimestamp() external view returns (uint256 timestamp); - - function getEthBalance(address addr) external view returns (uint256 balance); - - function getLastBlockHash() external view returns (bytes32 blockHash); - - function tryAggregate(bool requireSuccess, Call[] calldata calls) - external - payable - returns (Result[] memory returnData); - - function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls) - external - payable - returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData); -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC20.sol b/examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC20.sol deleted file mode 100644 index 2a022fa3..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC20.sol +++ /dev/null @@ -1,234 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -import {IERC20} from "../interfaces/IERC20.sol"; - -/// @notice This is a mock contract of the ERC20 standard for testing purposes only, it SHOULD NOT be used in production. -/// @dev Forked from: https://github.com/transmissions11/solmate/blob/0384dbaaa4fcb5715738a9254a7c0a4cb62cf458/src/tokens/ERC20.sol -contract MockERC20 is IERC20 { - /*////////////////////////////////////////////////////////////// - METADATA STORAGE - //////////////////////////////////////////////////////////////*/ - - string internal _name; - - string internal _symbol; - - uint8 internal _decimals; - - function name() external view override returns (string memory) { - return _name; - } - - function symbol() external view override returns (string memory) { - return _symbol; - } - - function decimals() external view override returns (uint8) { - return _decimals; - } - - /*////////////////////////////////////////////////////////////// - ERC20 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 internal _totalSupply; - - mapping(address => uint256) internal _balanceOf; - - mapping(address => mapping(address => uint256)) internal _allowance; - - function totalSupply() external view override returns (uint256) { - return _totalSupply; - } - - function balanceOf(address owner) external view override returns (uint256) { - return _balanceOf[owner]; - } - - function allowance(address owner, address spender) external view override returns (uint256) { - return _allowance[owner][spender]; - } - - /*////////////////////////////////////////////////////////////// - EIP-2612 STORAGE - //////////////////////////////////////////////////////////////*/ - - uint256 internal INITIAL_CHAIN_ID; - - bytes32 internal INITIAL_DOMAIN_SEPARATOR; - - mapping(address => uint256) public nonces; - - /*////////////////////////////////////////////////////////////// - INITIALIZE - //////////////////////////////////////////////////////////////*/ - - /// @dev A bool to track whether the contract has been initialized. - bool private initialized; - - /// @dev To hide constructor warnings across solc versions due to different constructor visibility requirements and - /// syntaxes, we add an initialization function that can be called only once. - function initialize(string memory name_, string memory symbol_, uint8 decimals_) public { - require(!initialized, "ALREADY_INITIALIZED"); - - _name = name_; - _symbol = symbol_; - _decimals = decimals_; - - INITIAL_CHAIN_ID = _pureChainId(); - INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); - - initialized = true; - } - - /*////////////////////////////////////////////////////////////// - ERC20 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address spender, uint256 amount) public virtual override returns (bool) { - _allowance[msg.sender][spender] = amount; - - emit Approval(msg.sender, spender, amount); - - return true; - } - - function transfer(address to, uint256 amount) public virtual override returns (bool) { - _balanceOf[msg.sender] = _sub(_balanceOf[msg.sender], amount); - _balanceOf[to] = _add(_balanceOf[to], amount); - - emit Transfer(msg.sender, to, amount); - - return true; - } - - function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { - uint256 allowed = _allowance[from][msg.sender]; // Saves gas for limited approvals. - - if (allowed != ~uint256(0)) _allowance[from][msg.sender] = _sub(allowed, amount); - - _balanceOf[from] = _sub(_balanceOf[from], amount); - _balanceOf[to] = _add(_balanceOf[to], amount); - - emit Transfer(from, to, amount); - - return true; - } - - /*////////////////////////////////////////////////////////////// - EIP-2612 LOGIC - //////////////////////////////////////////////////////////////*/ - - function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) - public - virtual - { - require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); - - address recoveredAddress = ecrecover( - keccak256( - abi.encodePacked( - "\x19\x01", - DOMAIN_SEPARATOR(), - keccak256( - abi.encode( - keccak256( - "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" - ), - owner, - spender, - value, - nonces[owner]++, - deadline - ) - ) - ) - ), - v, - r, - s - ); - - require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); - - _allowance[recoveredAddress][spender] = value; - - emit Approval(owner, spender, value); - } - - function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { - return _pureChainId() == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); - } - - function computeDomainSeparator() internal view virtual returns (bytes32) { - return keccak256( - abi.encode( - keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), - keccak256(bytes(_name)), - keccak256("1"), - _pureChainId(), - address(this) - ) - ); - } - - /*////////////////////////////////////////////////////////////// - INTERNAL MINT/BURN LOGIC - //////////////////////////////////////////////////////////////*/ - - function _mint(address to, uint256 amount) internal virtual { - _totalSupply = _add(_totalSupply, amount); - _balanceOf[to] = _add(_balanceOf[to], amount); - - emit Transfer(address(0), to, amount); - } - - function _burn(address from, uint256 amount) internal virtual { - _balanceOf[from] = _sub(_balanceOf[from], amount); - _totalSupply = _sub(_totalSupply, amount); - - emit Transfer(from, address(0), amount); - } - - /*////////////////////////////////////////////////////////////// - INTERNAL SAFE MATH LOGIC - //////////////////////////////////////////////////////////////*/ - - function _add(uint256 a, uint256 b) internal pure returns (uint256) { - uint256 c = a + b; - require(c >= a, "ERC20: addition overflow"); - return c; - } - - function _sub(uint256 a, uint256 b) internal pure returns (uint256) { - require(a >= b, "ERC20: subtraction underflow"); - return a - b; - } - - /*////////////////////////////////////////////////////////////// - HELPERS - //////////////////////////////////////////////////////////////*/ - - // We use this complex approach of `_viewChainId` and `_pureChainId` to ensure there are no - // compiler warnings when accessing chain ID in any solidity version supported by forge-std. We - // can't simply access the chain ID in a normal view or pure function because the solc View Pure - // Checker changed `chainid` from pure to view in 0.8.0. - function _viewChainId() private view returns (uint256 chainId) { - // Assembly required since `block.chainid` was introduced in 0.8.0. - assembly { - chainId := chainid() - } - - address(this); // Silence warnings in older Solc versions. - } - - function _pureChainId() private pure returns (uint256 chainId) { - function() internal view returns (uint256) fnIn = _viewChainId; - function() internal pure returns (uint256) pureChainId; - assembly { - pureChainId := fnIn - } - chainId = pureChainId(); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC721.sol b/examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC721.sol deleted file mode 100644 index 7a4909e5..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/mocks/MockERC721.sol +++ /dev/null @@ -1,231 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -import {IERC721Metadata, IERC721TokenReceiver} from "../interfaces/IERC721.sol"; - -/// @notice This is a mock contract of the ERC721 standard for testing purposes only, it SHOULD NOT be used in production. -/// @dev Forked from: https://github.com/transmissions11/solmate/blob/0384dbaaa4fcb5715738a9254a7c0a4cb62cf458/src/tokens/ERC721.sol -contract MockERC721 is IERC721Metadata { - /*////////////////////////////////////////////////////////////// - METADATA STORAGE/LOGIC - //////////////////////////////////////////////////////////////*/ - - string internal _name; - - string internal _symbol; - - function name() external view override returns (string memory) { - return _name; - } - - function symbol() external view override returns (string memory) { - return _symbol; - } - - function tokenURI(uint256 id) public view virtual override returns (string memory) {} - - /*////////////////////////////////////////////////////////////// - ERC721 BALANCE/OWNER STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(uint256 => address) internal _ownerOf; - - mapping(address => uint256) internal _balanceOf; - - function ownerOf(uint256 id) public view virtual override returns (address owner) { - require((owner = _ownerOf[id]) != address(0), "NOT_MINTED"); - } - - function balanceOf(address owner) public view virtual override returns (uint256) { - require(owner != address(0), "ZERO_ADDRESS"); - - return _balanceOf[owner]; - } - - /*////////////////////////////////////////////////////////////// - ERC721 APPROVAL STORAGE - //////////////////////////////////////////////////////////////*/ - - mapping(uint256 => address) internal _getApproved; - - mapping(address => mapping(address => bool)) internal _isApprovedForAll; - - function getApproved(uint256 id) public view virtual override returns (address) { - return _getApproved[id]; - } - - function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { - return _isApprovedForAll[owner][operator]; - } - - /*////////////////////////////////////////////////////////////// - INITIALIZE - //////////////////////////////////////////////////////////////*/ - - /// @dev A bool to track whether the contract has been initialized. - bool private initialized; - - /// @dev To hide constructor warnings across solc versions due to different constructor visibility requirements and - /// syntaxes, we add an initialization function that can be called only once. - function initialize(string memory name_, string memory symbol_) public { - require(!initialized, "ALREADY_INITIALIZED"); - - _name = name_; - _symbol = symbol_; - - initialized = true; - } - - /*////////////////////////////////////////////////////////////// - ERC721 LOGIC - //////////////////////////////////////////////////////////////*/ - - function approve(address spender, uint256 id) public payable virtual override { - address owner = _ownerOf[id]; - - require(msg.sender == owner || _isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED"); - - _getApproved[id] = spender; - - emit Approval(owner, spender, id); - } - - function setApprovalForAll(address operator, bool approved) public virtual override { - _isApprovedForAll[msg.sender][operator] = approved; - - emit ApprovalForAll(msg.sender, operator, approved); - } - - function transferFrom(address from, address to, uint256 id) public payable virtual override { - require(from == _ownerOf[id], "WRONG_FROM"); - - require(to != address(0), "INVALID_RECIPIENT"); - - require( - msg.sender == from || _isApprovedForAll[from][msg.sender] || msg.sender == _getApproved[id], - "NOT_AUTHORIZED" - ); - - // Underflow of the sender's balance is impossible because we check for - // ownership above and the recipient's balance can't realistically overflow. - _balanceOf[from]--; - - _balanceOf[to]++; - - _ownerOf[id] = to; - - delete _getApproved[id]; - - emit Transfer(from, to, id); - } - - function safeTransferFrom(address from, address to, uint256 id) public payable virtual override { - transferFrom(from, to, id); - - require( - !_isContract(to) - || IERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") - == IERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - function safeTransferFrom(address from, address to, uint256 id, bytes memory data) - public - payable - virtual - override - { - transferFrom(from, to, id); - - require( - !_isContract(to) - || IERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) - == IERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - /*////////////////////////////////////////////////////////////// - ERC165 LOGIC - //////////////////////////////////////////////////////////////*/ - - function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { - return interfaceId == 0x01ffc9a7 // ERC165 Interface ID for ERC165 - || interfaceId == 0x80ac58cd // ERC165 Interface ID for ERC721 - || interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata - } - - /*////////////////////////////////////////////////////////////// - INTERNAL MINT/BURN LOGIC - //////////////////////////////////////////////////////////////*/ - - function _mint(address to, uint256 id) internal virtual { - require(to != address(0), "INVALID_RECIPIENT"); - - require(_ownerOf[id] == address(0), "ALREADY_MINTED"); - - // Counter overflow is incredibly unrealistic. - - _balanceOf[to]++; - - _ownerOf[id] = to; - - emit Transfer(address(0), to, id); - } - - function _burn(uint256 id) internal virtual { - address owner = _ownerOf[id]; - - require(owner != address(0), "NOT_MINTED"); - - _balanceOf[owner]--; - - delete _ownerOf[id]; - - delete _getApproved[id]; - - emit Transfer(owner, address(0), id); - } - - /*////////////////////////////////////////////////////////////// - INTERNAL SAFE MINT LOGIC - //////////////////////////////////////////////////////////////*/ - - function _safeMint(address to, uint256 id) internal virtual { - _mint(to, id); - - require( - !_isContract(to) - || IERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") - == IERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - function _safeMint(address to, uint256 id, bytes memory data) internal virtual { - _mint(to, id); - - require( - !_isContract(to) - || IERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) - == IERC721TokenReceiver.onERC721Received.selector, - "UNSAFE_RECIPIENT" - ); - } - - /*////////////////////////////////////////////////////////////// - HELPERS - //////////////////////////////////////////////////////////////*/ - - function _isContract(address _addr) private view returns (bool) { - uint256 codeLength; - - // Assembly required for versions < 0.8.0 to check extcodesize. - assembly { - codeLength := extcodesize(_addr) - } - - return codeLength > 0; - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/src/safeconsole.sol b/examples/thorchain/contracts/lib/forge-std/src/safeconsole.sol deleted file mode 100644 index 87c475a5..00000000 --- a/examples/thorchain/contracts/lib/forge-std/src/safeconsole.sol +++ /dev/null @@ -1,13937 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -/// @author philogy -/// @dev Code generated automatically by script. -library safeconsole { - uint256 constant CONSOLE_ADDR = 0x000000000000000000000000000000000000000000636F6e736F6c652e6c6f67; - - // Credit to [0age](https://twitter.com/z0age/status/1654922202930888704) and [0xdapper](https://github.com/foundry-rs/forge-std/pull/374) - // for the view-to-pure log trick. - function _sendLogPayload(uint256 offset, uint256 size) private pure { - function(uint256, uint256) internal view fnIn = _sendLogPayloadView; - function(uint256, uint256) internal pure pureSendLogPayload; - /// @solidity memory-safe-assembly - assembly { - pureSendLogPayload := fnIn - } - pureSendLogPayload(offset, size); - } - - function _sendLogPayloadView(uint256 offset, uint256 size) private view { - /// @solidity memory-safe-assembly - assembly { - pop(staticcall(gas(), CONSOLE_ADDR, offset, size, 0x0, 0x0)) - } - } - - function _memcopy(uint256 fromOffset, uint256 toOffset, uint256 length) private pure { - function(uint256, uint256, uint256) internal view fnIn = _memcopyView; - function(uint256, uint256, uint256) internal pure pureMemcopy; - /// @solidity memory-safe-assembly - assembly { - pureMemcopy := fnIn - } - pureMemcopy(fromOffset, toOffset, length); - } - - function _memcopyView(uint256 fromOffset, uint256 toOffset, uint256 length) private view { - /// @solidity memory-safe-assembly - assembly { - pop(staticcall(gas(), 0x4, fromOffset, length, toOffset, length)) - } - } - - function logMemory(uint256 offset, uint256 length) internal pure { - if (offset >= 0x60) { - // Sufficient memory before slice to prepare call header. - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(sub(offset, 0x60)) - m1 := mload(sub(offset, 0x40)) - m2 := mload(sub(offset, 0x20)) - // Selector of `log(bytes)`. - mstore(sub(offset, 0x60), 0x0be77f56) - mstore(sub(offset, 0x40), 0x20) - mstore(sub(offset, 0x20), length) - } - _sendLogPayload(offset - 0x44, length + 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(sub(offset, 0x60), m0) - mstore(sub(offset, 0x40), m1) - mstore(sub(offset, 0x20), m2) - } - } else { - // Insufficient space, so copy slice forward, add header and reverse. - bytes32 m0; - bytes32 m1; - bytes32 m2; - uint256 endOffset = offset + length; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(add(endOffset, 0x00)) - m1 := mload(add(endOffset, 0x20)) - m2 := mload(add(endOffset, 0x40)) - } - _memcopy(offset, offset + 0x60, length); - /// @solidity memory-safe-assembly - assembly { - // Selector of `log(bytes)`. - mstore(add(offset, 0x00), 0x0be77f56) - mstore(add(offset, 0x20), 0x20) - mstore(add(offset, 0x40), length) - } - _sendLogPayload(offset + 0x1c, length + 0x44); - _memcopy(offset + 0x60, offset, length); - /// @solidity memory-safe-assembly - assembly { - mstore(add(endOffset, 0x00), m0) - mstore(add(endOffset, 0x20), m1) - mstore(add(endOffset, 0x40), m2) - } - } - } - - function log(address p0) internal pure { - bytes32 m0; - bytes32 m1; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - // Selector of `log(address)`. - mstore(0x00, 0x2c2ecbc2) - mstore(0x20, p0) - } - _sendLogPayload(0x1c, 0x24); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - } - } - - function log(bool p0) internal pure { - bytes32 m0; - bytes32 m1; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - // Selector of `log(bool)`. - mstore(0x00, 0x32458eed) - mstore(0x20, p0) - } - _sendLogPayload(0x1c, 0x24); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - } - } - - function log(uint256 p0) internal pure { - bytes32 m0; - bytes32 m1; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - // Selector of `log(uint256)`. - mstore(0x00, 0xf82c50f1) - mstore(0x20, p0) - } - _sendLogPayload(0x1c, 0x24); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - } - } - - function log(bytes32 p0) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(string)`. - mstore(0x00, 0x41304fac) - mstore(0x20, 0x20) - writeString(0x40, p0) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, address p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(address,address)`. - mstore(0x00, 0xdaf0d4aa) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(address p0, bool p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(address,bool)`. - mstore(0x00, 0x75b605d3) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(address p0, uint256 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(address,uint256)`. - mstore(0x00, 0x8309e8a8) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(address p0, bytes32 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,string)`. - mstore(0x00, 0x759f86bb) - mstore(0x20, p0) - mstore(0x40, 0x40) - writeString(0x60, p1) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(bool,address)`. - mstore(0x00, 0x853c4849) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(bool p0, bool p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(bool,bool)`. - mstore(0x00, 0x2a110e83) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(bool p0, uint256 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(bool,uint256)`. - mstore(0x00, 0x399174d3) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(bool p0, bytes32 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,string)`. - mstore(0x00, 0x8feac525) - mstore(0x20, p0) - mstore(0x40, 0x40) - writeString(0x60, p1) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(uint256,address)`. - mstore(0x00, 0x69276c86) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(uint256 p0, bool p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(uint256,bool)`. - mstore(0x00, 0x1c9d7eb3) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(uint256 p0, uint256 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - // Selector of `log(uint256,uint256)`. - mstore(0x00, 0xf666715a) - mstore(0x20, p0) - mstore(0x40, p1) - } - _sendLogPayload(0x1c, 0x44); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - } - } - - function log(uint256 p0, bytes32 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,string)`. - mstore(0x00, 0x643fd0df) - mstore(0x20, p0) - mstore(0x40, 0x40) - writeString(0x60, p1) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bytes32 p0, address p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(string,address)`. - mstore(0x00, 0x319af333) - mstore(0x20, 0x40) - mstore(0x40, p1) - writeString(0x60, p0) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bytes32 p0, bool p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(string,bool)`. - mstore(0x00, 0xc3b55635) - mstore(0x20, 0x40) - mstore(0x40, p1) - writeString(0x60, p0) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bytes32 p0, uint256 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(string,uint256)`. - mstore(0x00, 0xb60e72cc) - mstore(0x20, 0x40) - mstore(0x40, p1) - writeString(0x60, p0) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bytes32 p0, bytes32 p1) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,string)`. - mstore(0x00, 0x4b5c4277) - mstore(0x20, 0x40) - mstore(0x40, 0x80) - writeString(0x60, p0) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, address p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,address,address)`. - mstore(0x00, 0x018c84c2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, address p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,address,bool)`. - mstore(0x00, 0xf2a66286) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, address p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,address,uint256)`. - mstore(0x00, 0x17fe6185) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, address p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(address,address,string)`. - mstore(0x00, 0x007150be) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(address p0, bool p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,bool,address)`. - mstore(0x00, 0xf11699ed) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, bool p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,bool,bool)`. - mstore(0x00, 0xeb830c92) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, bool p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,bool,uint256)`. - mstore(0x00, 0x9c4f99fb) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, bool p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(address,bool,string)`. - mstore(0x00, 0x212255cc) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(address p0, uint256 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,uint256,address)`. - mstore(0x00, 0x7bc0d848) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, uint256 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,uint256,bool)`. - mstore(0x00, 0x678209a8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, uint256 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(address,uint256,uint256)`. - mstore(0x00, 0xb69bcaf6) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(address p0, uint256 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(address,uint256,string)`. - mstore(0x00, 0xa1f2e8aa) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(address p0, bytes32 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(address,string,address)`. - mstore(0x00, 0xf08744e8) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(address p0, bytes32 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(address,string,bool)`. - mstore(0x00, 0xcf020fb1) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(address p0, bytes32 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(address,string,uint256)`. - mstore(0x00, 0x67dd6ff1) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(address p0, bytes32 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(address,string,string)`. - mstore(0x00, 0xfb772265) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, 0xa0) - writeString(0x80, p1) - writeString(0xc0, p2) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bool p0, address p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,address,address)`. - mstore(0x00, 0xd2763667) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, address p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,address,bool)`. - mstore(0x00, 0x18c9c746) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, address p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,address,uint256)`. - mstore(0x00, 0x5f7b9afb) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, address p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(bool,address,string)`. - mstore(0x00, 0xde9a9270) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bool p0, bool p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,bool,address)`. - mstore(0x00, 0x1078f68d) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, bool p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,bool,bool)`. - mstore(0x00, 0x50709698) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, bool p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,bool,uint256)`. - mstore(0x00, 0x12f21602) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, bool p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(bool,bool,string)`. - mstore(0x00, 0x2555fa46) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bool p0, uint256 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,uint256,address)`. - mstore(0x00, 0x088ef9d2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, uint256 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,uint256,bool)`. - mstore(0x00, 0xe8defba9) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, uint256 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(bool,uint256,uint256)`. - mstore(0x00, 0x37103367) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(bool p0, uint256 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(bool,uint256,string)`. - mstore(0x00, 0xc3fc3970) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bool p0, bytes32 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(bool,string,address)`. - mstore(0x00, 0x9591b953) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bool p0, bytes32 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(bool,string,bool)`. - mstore(0x00, 0xdbb4c247) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bool p0, bytes32 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(bool,string,uint256)`. - mstore(0x00, 0x1093ee11) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bool p0, bytes32 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(bool,string,string)`. - mstore(0x00, 0xb076847f) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, 0xa0) - writeString(0x80, p1) - writeString(0xc0, p2) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(uint256 p0, address p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,address,address)`. - mstore(0x00, 0xbcfd9be0) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, address p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,address,bool)`. - mstore(0x00, 0x9b6ec042) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, address p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,address,uint256)`. - mstore(0x00, 0x5a9b5ed5) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, address p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(uint256,address,string)`. - mstore(0x00, 0x63cb41f9) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(uint256 p0, bool p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,bool,address)`. - mstore(0x00, 0x35085f7b) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, bool p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,bool,bool)`. - mstore(0x00, 0x20718650) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, bool p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,bool,uint256)`. - mstore(0x00, 0x20098014) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, bool p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(uint256,bool,string)`. - mstore(0x00, 0x85775021) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(uint256 p0, uint256 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,uint256,address)`. - mstore(0x00, 0x5c96b331) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, uint256 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,uint256,bool)`. - mstore(0x00, 0x4766da72) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, uint256 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - // Selector of `log(uint256,uint256,uint256)`. - mstore(0x00, 0xd1ed7a3c) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - } - _sendLogPayload(0x1c, 0x64); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - } - } - - function log(uint256 p0, uint256 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(uint256,uint256,string)`. - mstore(0x00, 0x71d04af2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x60) - writeString(0x80, p2) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(uint256 p0, bytes32 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(uint256,string,address)`. - mstore(0x00, 0x7afac959) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(uint256 p0, bytes32 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(uint256,string,bool)`. - mstore(0x00, 0x4ceda75a) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(uint256 p0, bytes32 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(uint256,string,uint256)`. - mstore(0x00, 0x37aa7d4c) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, p2) - writeString(0x80, p1) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(uint256 p0, bytes32 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(uint256,string,string)`. - mstore(0x00, 0xb115611f) - mstore(0x20, p0) - mstore(0x40, 0x60) - mstore(0x60, 0xa0) - writeString(0x80, p1) - writeString(0xc0, p2) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bytes32 p0, address p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,address,address)`. - mstore(0x00, 0xfcec75e0) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, address p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,address,bool)`. - mstore(0x00, 0xc91d5ed4) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, address p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,address,uint256)`. - mstore(0x00, 0x0d26b925) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, address p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(string,address,string)`. - mstore(0x00, 0xe0e9ad4f) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, 0xa0) - writeString(0x80, p0) - writeString(0xc0, p2) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bytes32 p0, bool p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,bool,address)`. - mstore(0x00, 0x932bbb38) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, bool p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,bool,bool)`. - mstore(0x00, 0x850b7ad6) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, bool p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,bool,uint256)`. - mstore(0x00, 0xc95958d6) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, bool p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(string,bool,string)`. - mstore(0x00, 0xe298f47d) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, 0xa0) - writeString(0x80, p0) - writeString(0xc0, p2) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bytes32 p0, uint256 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,uint256,address)`. - mstore(0x00, 0x1c7ec448) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, uint256 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,uint256,bool)`. - mstore(0x00, 0xca7733b1) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, uint256 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - // Selector of `log(string,uint256,uint256)`. - mstore(0x00, 0xca47c4eb) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, p2) - writeString(0x80, p0) - } - _sendLogPayload(0x1c, 0xa4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - } - } - - function log(bytes32 p0, uint256 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(string,uint256,string)`. - mstore(0x00, 0x5970e089) - mstore(0x20, 0x60) - mstore(0x40, p1) - mstore(0x60, 0xa0) - writeString(0x80, p0) - writeString(0xc0, p2) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bytes32 p0, bytes32 p1, address p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(string,string,address)`. - mstore(0x00, 0x95ed0195) - mstore(0x20, 0x60) - mstore(0x40, 0xa0) - mstore(0x60, p2) - writeString(0x80, p0) - writeString(0xc0, p1) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bytes32 p0, bytes32 p1, bool p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(string,string,bool)`. - mstore(0x00, 0xb0e0f9b5) - mstore(0x20, 0x60) - mstore(0x40, 0xa0) - mstore(0x60, p2) - writeString(0x80, p0) - writeString(0xc0, p1) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bytes32 p0, bytes32 p1, uint256 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - // Selector of `log(string,string,uint256)`. - mstore(0x00, 0x5821efa1) - mstore(0x20, 0x60) - mstore(0x40, 0xa0) - mstore(0x60, p2) - writeString(0x80, p0) - writeString(0xc0, p1) - } - _sendLogPayload(0x1c, 0xe4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - } - } - - function log(bytes32 p0, bytes32 p1, bytes32 p2) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - // Selector of `log(string,string,string)`. - mstore(0x00, 0x2ced7cef) - mstore(0x20, 0x60) - mstore(0x40, 0xa0) - mstore(0x60, 0xe0) - writeString(0x80, p0) - writeString(0xc0, p1) - writeString(0x100, p2) - } - _sendLogPayload(0x1c, 0x124); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - } - } - - function log(address p0, address p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,address,address)`. - mstore(0x00, 0x665bf134) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,address,bool)`. - mstore(0x00, 0x0e378994) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,address,uint256)`. - mstore(0x00, 0x94250d77) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,address,address,string)`. - mstore(0x00, 0xf808da20) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, address p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,bool,address)`. - mstore(0x00, 0x9f1bc36e) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,bool,bool)`. - mstore(0x00, 0x2cd4134a) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,bool,uint256)`. - mstore(0x00, 0x3971e78c) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,address,bool,string)`. - mstore(0x00, 0xaa6540c8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, address p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,uint256,address)`. - mstore(0x00, 0x8da6def5) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,uint256,bool)`. - mstore(0x00, 0x9b4254e2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,address,uint256,uint256)`. - mstore(0x00, 0xbe553481) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, address p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,address,uint256,string)`. - mstore(0x00, 0xfdb4f990) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, address p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,address,string,address)`. - mstore(0x00, 0x8f736d16) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, address p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,address,string,bool)`. - mstore(0x00, 0x6f1a594e) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, address p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,address,string,uint256)`. - mstore(0x00, 0xef1cefe7) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, address p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,address,string,string)`. - mstore(0x00, 0x21bdaf25) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bool p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,address,address)`. - mstore(0x00, 0x660375dd) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,address,bool)`. - mstore(0x00, 0xa6f50b0f) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,address,uint256)`. - mstore(0x00, 0xa75c59de) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,bool,address,string)`. - mstore(0x00, 0x2dd778e6) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bool p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,bool,address)`. - mstore(0x00, 0xcf394485) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,bool,bool)`. - mstore(0x00, 0xcac43479) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,bool,uint256)`. - mstore(0x00, 0x8c4e5de6) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,bool,bool,string)`. - mstore(0x00, 0xdfc4a2e8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bool p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,uint256,address)`. - mstore(0x00, 0xccf790a1) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,uint256,bool)`. - mstore(0x00, 0xc4643e20) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,bool,uint256,uint256)`. - mstore(0x00, 0x386ff5f4) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, bool p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,bool,uint256,string)`. - mstore(0x00, 0x0aa6cfad) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bool p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,bool,string,address)`. - mstore(0x00, 0x19fd4956) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bool p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,bool,string,bool)`. - mstore(0x00, 0x50ad461d) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bool p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,bool,string,uint256)`. - mstore(0x00, 0x80e6a20b) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bool p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,bool,string,string)`. - mstore(0x00, 0x475c5c33) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, uint256 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,address,address)`. - mstore(0x00, 0x478d1c62) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,address,bool)`. - mstore(0x00, 0xa1bcc9b3) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,address,uint256)`. - mstore(0x00, 0x100f650e) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,uint256,address,string)`. - mstore(0x00, 0x1da986ea) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, uint256 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,bool,address)`. - mstore(0x00, 0xa31bfdcc) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,bool,bool)`. - mstore(0x00, 0x3bf5e537) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,bool,uint256)`. - mstore(0x00, 0x22f6b999) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,uint256,bool,string)`. - mstore(0x00, 0xc5ad85f9) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,uint256,address)`. - mstore(0x00, 0x20e3984d) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,uint256,bool)`. - mstore(0x00, 0x66f1bc67) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(address,uint256,uint256,uint256)`. - mstore(0x00, 0x34f0e636) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(address p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,uint256,uint256,string)`. - mstore(0x00, 0x4a28c017) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, uint256 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,uint256,string,address)`. - mstore(0x00, 0x5c430d47) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, uint256 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,uint256,string,bool)`. - mstore(0x00, 0xcf18105c) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,uint256,string,uint256)`. - mstore(0x00, 0xbf01f891) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,uint256,string,string)`. - mstore(0x00, 0x88a8c406) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bytes32 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,address,address)`. - mstore(0x00, 0x0d36fa20) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,address,bool)`. - mstore(0x00, 0x0df12b76) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,address,uint256)`. - mstore(0x00, 0x457fe3cf) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,string,address,string)`. - mstore(0x00, 0xf7e36245) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bytes32 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,bool,address)`. - mstore(0x00, 0x205871c2) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,bool,bool)`. - mstore(0x00, 0x5f1d5c9f) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,bool,uint256)`. - mstore(0x00, 0x515e38b6) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,string,bool,string)`. - mstore(0x00, 0xbc0b61fe) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bytes32 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,uint256,address)`. - mstore(0x00, 0x63183678) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,uint256,bool)`. - mstore(0x00, 0x0ef7e050) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(address,string,uint256,uint256)`. - mstore(0x00, 0x1dc8e1b8) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(address p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,string,uint256,string)`. - mstore(0x00, 0x448830a8) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bytes32 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,string,string,address)`. - mstore(0x00, 0xa04e2f87) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bytes32 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,string,string,bool)`. - mstore(0x00, 0x35a5071f) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(address,string,string,uint256)`. - mstore(0x00, 0x159f8927) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(address p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(address,string,string,string)`. - mstore(0x00, 0x5d02c50b) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, 0x100) - writeString(0xa0, p1) - writeString(0xe0, p2) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bool p0, address p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,address,address)`. - mstore(0x00, 0x1d14d001) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,address,bool)`. - mstore(0x00, 0x46600be0) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,address,uint256)`. - mstore(0x00, 0x0c66d1be) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,address,address,string)`. - mstore(0x00, 0xd812a167) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, address p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,bool,address)`. - mstore(0x00, 0x1c41a336) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,bool,bool)`. - mstore(0x00, 0x6a9c478b) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,bool,uint256)`. - mstore(0x00, 0x07831502) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,address,bool,string)`. - mstore(0x00, 0x4a66cb34) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, address p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,uint256,address)`. - mstore(0x00, 0x136b05dd) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,uint256,bool)`. - mstore(0x00, 0xd6019f1c) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,address,uint256,uint256)`. - mstore(0x00, 0x7bf181a1) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, address p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,address,uint256,string)`. - mstore(0x00, 0x51f09ff8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, address p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,address,string,address)`. - mstore(0x00, 0x6f7c603e) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, address p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,address,string,bool)`. - mstore(0x00, 0xe2bfd60b) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, address p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,address,string,uint256)`. - mstore(0x00, 0xc21f64c7) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, address p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,address,string,string)`. - mstore(0x00, 0xa73c1db6) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bool p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,address,address)`. - mstore(0x00, 0xf4880ea4) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,address,bool)`. - mstore(0x00, 0xc0a302d8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,address,uint256)`. - mstore(0x00, 0x4c123d57) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,bool,address,string)`. - mstore(0x00, 0xa0a47963) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bool p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,bool,address)`. - mstore(0x00, 0x8c329b1a) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,bool,bool)`. - mstore(0x00, 0x3b2a5ce0) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,bool,uint256)`. - mstore(0x00, 0x6d7045c1) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,bool,bool,string)`. - mstore(0x00, 0x2ae408d4) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bool p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,uint256,address)`. - mstore(0x00, 0x54a7a9a0) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,uint256,bool)`. - mstore(0x00, 0x619e4d0e) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,bool,uint256,uint256)`. - mstore(0x00, 0x0bb00eab) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, bool p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,bool,uint256,string)`. - mstore(0x00, 0x7dd4d0e0) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bool p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,bool,string,address)`. - mstore(0x00, 0xf9ad2b89) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bool p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,bool,string,bool)`. - mstore(0x00, 0xb857163a) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bool p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,bool,string,uint256)`. - mstore(0x00, 0xe3a9ca2f) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bool p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,bool,string,string)`. - mstore(0x00, 0x6d1e8751) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, uint256 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,address,address)`. - mstore(0x00, 0x26f560a8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,address,bool)`. - mstore(0x00, 0xb4c314ff) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,address,uint256)`. - mstore(0x00, 0x1537dc87) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,uint256,address,string)`. - mstore(0x00, 0x1bb3b09a) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, uint256 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,bool,address)`. - mstore(0x00, 0x9acd3616) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,bool,bool)`. - mstore(0x00, 0xceb5f4d7) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,bool,uint256)`. - mstore(0x00, 0x7f9bbca2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,uint256,bool,string)`. - mstore(0x00, 0x9143dbb1) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,uint256,address)`. - mstore(0x00, 0x00dd87b9) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,uint256,bool)`. - mstore(0x00, 0xbe984353) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(bool,uint256,uint256,uint256)`. - mstore(0x00, 0x374bb4b2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(bool p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,uint256,uint256,string)`. - mstore(0x00, 0x8e69fb5d) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, uint256 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,uint256,string,address)`. - mstore(0x00, 0xfedd1fff) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, uint256 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,uint256,string,bool)`. - mstore(0x00, 0xe5e70b2b) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,uint256,string,uint256)`. - mstore(0x00, 0x6a1199e2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,uint256,string,string)`. - mstore(0x00, 0xf5bc2249) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bytes32 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,address,address)`. - mstore(0x00, 0x2b2b18dc) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,address,bool)`. - mstore(0x00, 0x6dd434ca) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,address,uint256)`. - mstore(0x00, 0xa5cada94) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,string,address,string)`. - mstore(0x00, 0x12d6c788) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bytes32 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,bool,address)`. - mstore(0x00, 0x538e06ab) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,bool,bool)`. - mstore(0x00, 0xdc5e935b) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,bool,uint256)`. - mstore(0x00, 0x1606a393) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,string,bool,string)`. - mstore(0x00, 0x483d0416) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bytes32 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,uint256,address)`. - mstore(0x00, 0x1596a1ce) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,uint256,bool)`. - mstore(0x00, 0x6b0e5d53) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(bool,string,uint256,uint256)`. - mstore(0x00, 0x28863fcb) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bool p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,string,uint256,string)`. - mstore(0x00, 0x1ad96de6) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bytes32 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,string,string,address)`. - mstore(0x00, 0x97d394d8) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bytes32 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,string,string,bool)`. - mstore(0x00, 0x1e4b87e5) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(bool,string,string,uint256)`. - mstore(0x00, 0x7be0c3eb) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bool p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(bool,string,string,string)`. - mstore(0x00, 0x1762e32a) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, 0x100) - writeString(0xa0, p1) - writeString(0xe0, p2) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(uint256 p0, address p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,address,address)`. - mstore(0x00, 0x2488b414) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,address,bool)`. - mstore(0x00, 0x091ffaf5) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,address,uint256)`. - mstore(0x00, 0x736efbb6) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,address,address,string)`. - mstore(0x00, 0x031c6f73) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, address p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,bool,address)`. - mstore(0x00, 0xef72c513) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,bool,bool)`. - mstore(0x00, 0xe351140f) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,bool,uint256)`. - mstore(0x00, 0x5abd992a) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,address,bool,string)`. - mstore(0x00, 0x90fb06aa) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,uint256,address)`. - mstore(0x00, 0x15c127b5) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,uint256,bool)`. - mstore(0x00, 0x5f743a7c) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,address,uint256,uint256)`. - mstore(0x00, 0x0c9cd9c1) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, address p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,address,uint256,string)`. - mstore(0x00, 0xddb06521) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, address p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,address,string,address)`. - mstore(0x00, 0x9cba8fff) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, address p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,address,string,bool)`. - mstore(0x00, 0xcc32ab07) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, address p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,address,string,uint256)`. - mstore(0x00, 0x46826b5d) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, address p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,address,string,string)`. - mstore(0x00, 0x3e128ca3) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bool p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,address,address)`. - mstore(0x00, 0xa1ef4cbb) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,address,bool)`. - mstore(0x00, 0x454d54a5) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,address,uint256)`. - mstore(0x00, 0x078287f5) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,bool,address,string)`. - mstore(0x00, 0xade052c7) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bool p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,bool,address)`. - mstore(0x00, 0x69640b59) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,bool,bool)`. - mstore(0x00, 0xb6f577a1) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,bool,uint256)`. - mstore(0x00, 0x7464ce23) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,bool,bool,string)`. - mstore(0x00, 0xdddb9561) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,uint256,address)`. - mstore(0x00, 0x88cb6041) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,uint256,bool)`. - mstore(0x00, 0x91a02e2a) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,bool,uint256,uint256)`. - mstore(0x00, 0xc6acc7a8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, bool p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,bool,uint256,string)`. - mstore(0x00, 0xde03e774) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bool p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,bool,string,address)`. - mstore(0x00, 0xef529018) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bool p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,bool,string,bool)`. - mstore(0x00, 0xeb928d7f) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bool p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,bool,string,uint256)`. - mstore(0x00, 0x2c1d0746) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,bool,string,string)`. - mstore(0x00, 0x68c8b8bd) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,address,address)`. - mstore(0x00, 0x56a5d1b1) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,address,bool)`. - mstore(0x00, 0x15cac476) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,address,uint256)`. - mstore(0x00, 0x88f6e4b2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,uint256,address,string)`. - mstore(0x00, 0x6cde40b8) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,bool,address)`. - mstore(0x00, 0x9a816a83) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,bool,bool)`. - mstore(0x00, 0xab085ae6) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,bool,uint256)`. - mstore(0x00, 0xeb7f6fd2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,uint256,bool,string)`. - mstore(0x00, 0xa5b4fc99) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,uint256,address)`. - mstore(0x00, 0xfa8185af) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,uint256,bool)`. - mstore(0x00, 0xc598d185) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - /// @solidity memory-safe-assembly - assembly { - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - // Selector of `log(uint256,uint256,uint256,uint256)`. - mstore(0x00, 0x193fb800) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - } - _sendLogPayload(0x1c, 0x84); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - } - } - - function log(uint256 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,uint256,uint256,string)`. - mstore(0x00, 0x59cfcbe3) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0x80) - writeString(0xa0, p3) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, uint256 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,uint256,string,address)`. - mstore(0x00, 0x42d21db7) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, uint256 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,uint256,string,bool)`. - mstore(0x00, 0x7af6ab25) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,uint256,string,uint256)`. - mstore(0x00, 0x5da297eb) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, p3) - writeString(0xa0, p2) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,uint256,string,string)`. - mstore(0x00, 0x27d8afd2) - mstore(0x20, p0) - mstore(0x40, p1) - mstore(0x60, 0x80) - mstore(0x80, 0xc0) - writeString(0xa0, p2) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bytes32 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,address,address)`. - mstore(0x00, 0x6168ed61) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,address,bool)`. - mstore(0x00, 0x90c30a56) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,address,uint256)`. - mstore(0x00, 0xe8d3018d) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,string,address,string)`. - mstore(0x00, 0x9c3adfa1) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bytes32 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,bool,address)`. - mstore(0x00, 0xae2ec581) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,bool,bool)`. - mstore(0x00, 0xba535d9c) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,bool,uint256)`. - mstore(0x00, 0xcf009880) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,string,bool,string)`. - mstore(0x00, 0xd2d423cd) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bytes32 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,uint256,address)`. - mstore(0x00, 0x3b2279b4) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,uint256,bool)`. - mstore(0x00, 0x691a8f74) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(uint256,string,uint256,uint256)`. - mstore(0x00, 0x82c25b74) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p1) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(uint256 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,string,uint256,string)`. - mstore(0x00, 0xb7b914ca) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p1) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bytes32 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,string,string,address)`. - mstore(0x00, 0xd583c602) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,string,string,bool)`. - mstore(0x00, 0xb3a6b6bd) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(uint256,string,string,uint256)`. - mstore(0x00, 0xb028c9bd) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p1) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(uint256 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(uint256,string,string,string)`. - mstore(0x00, 0x21ad0683) - mstore(0x20, p0) - mstore(0x40, 0x80) - mstore(0x60, 0xc0) - mstore(0x80, 0x100) - writeString(0xa0, p1) - writeString(0xe0, p2) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, address p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,address,address)`. - mstore(0x00, 0xed8f28f6) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,address,bool)`. - mstore(0x00, 0xb59dbd60) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,address,uint256)`. - mstore(0x00, 0x8ef3f399) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,address,address,string)`. - mstore(0x00, 0x800a1c67) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, address p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,bool,address)`. - mstore(0x00, 0x223603bd) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,bool,bool)`. - mstore(0x00, 0x79884c2b) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,bool,uint256)`. - mstore(0x00, 0x3e9f866a) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,address,bool,string)`. - mstore(0x00, 0x0454c079) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, address p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,uint256,address)`. - mstore(0x00, 0x63fb8bc5) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,uint256,bool)`. - mstore(0x00, 0xfc4845f0) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,address,uint256,uint256)`. - mstore(0x00, 0xf8f51b1e) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, address p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,address,uint256,string)`. - mstore(0x00, 0x5a477632) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, address p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,address,string,address)`. - mstore(0x00, 0xaabc9a31) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, address p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,address,string,bool)`. - mstore(0x00, 0x5f15d28c) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, address p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,address,string,uint256)`. - mstore(0x00, 0x91d1112e) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, address p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,address,string,string)`. - mstore(0x00, 0x245986f2) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, 0x100) - writeString(0xa0, p0) - writeString(0xe0, p2) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bool p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,address,address)`. - mstore(0x00, 0x33e9dd1d) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,address,bool)`. - mstore(0x00, 0x958c28c6) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,address,uint256)`. - mstore(0x00, 0x5d08bb05) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,bool,address,string)`. - mstore(0x00, 0x2d8e33a4) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bool p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,bool,address)`. - mstore(0x00, 0x7190a529) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,bool,bool)`. - mstore(0x00, 0x895af8c5) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,bool,uint256)`. - mstore(0x00, 0x8e3f78a9) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,bool,bool,string)`. - mstore(0x00, 0x9d22d5dd) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bool p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,uint256,address)`. - mstore(0x00, 0x935e09bf) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,uint256,bool)`. - mstore(0x00, 0x8af7cf8a) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,bool,uint256,uint256)`. - mstore(0x00, 0x64b5bb67) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, bool p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,bool,uint256,string)`. - mstore(0x00, 0x742d6ee7) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bool p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,bool,string,address)`. - mstore(0x00, 0xe0625b29) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bool p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,bool,string,bool)`. - mstore(0x00, 0x3f8a701d) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bool p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,bool,string,uint256)`. - mstore(0x00, 0x24f91465) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bool p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,bool,string,string)`. - mstore(0x00, 0xa826caeb) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, 0x100) - writeString(0xa0, p0) - writeString(0xe0, p2) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, uint256 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,address,address)`. - mstore(0x00, 0x5ea2b7ae) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,address,bool)`. - mstore(0x00, 0x82112a42) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,address,uint256)`. - mstore(0x00, 0x4f04fdc6) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,uint256,address,string)`. - mstore(0x00, 0x9ffb2f93) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, uint256 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,bool,address)`. - mstore(0x00, 0xe0e95b98) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,bool,bool)`. - mstore(0x00, 0x354c36d6) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,bool,uint256)`. - mstore(0x00, 0xe41b6f6f) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,uint256,bool,string)`. - mstore(0x00, 0xabf73a98) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, uint256 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,uint256,address)`. - mstore(0x00, 0xe21de278) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,uint256,bool)`. - mstore(0x00, 0x7626db92) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - // Selector of `log(string,uint256,uint256,uint256)`. - mstore(0x00, 0xa7a87853) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - } - _sendLogPayload(0x1c, 0xc4); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - } - } - - function log(bytes32 p0, uint256 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,uint256,uint256,string)`. - mstore(0x00, 0x854b3496) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, p2) - mstore(0x80, 0xc0) - writeString(0xa0, p0) - writeString(0xe0, p3) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, uint256 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,uint256,string,address)`. - mstore(0x00, 0x7c4632a4) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, uint256 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,uint256,string,bool)`. - mstore(0x00, 0x7d24491d) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, uint256 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,uint256,string,uint256)`. - mstore(0x00, 0xc67ea9d1) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p2) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, uint256 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,uint256,string,string)`. - mstore(0x00, 0x5ab84e1f) - mstore(0x20, 0x80) - mstore(0x40, p1) - mstore(0x60, 0xc0) - mstore(0x80, 0x100) - writeString(0xa0, p0) - writeString(0xe0, p2) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bytes32 p1, address p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,address,address)`. - mstore(0x00, 0x439c7bef) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, address p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,address,bool)`. - mstore(0x00, 0x5ccd4e37) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, address p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,address,uint256)`. - mstore(0x00, 0x7cc3c607) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, address p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,string,address,string)`. - mstore(0x00, 0xeb1bff80) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, 0x100) - writeString(0xa0, p0) - writeString(0xe0, p1) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bytes32 p1, bool p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,bool,address)`. - mstore(0x00, 0xc371c7db) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, bool p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,bool,bool)`. - mstore(0x00, 0x40785869) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, bool p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,bool,uint256)`. - mstore(0x00, 0xd6aefad2) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, bool p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,string,bool,string)`. - mstore(0x00, 0x5e84b0ea) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, 0x100) - writeString(0xa0, p0) - writeString(0xe0, p1) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bytes32 p1, uint256 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,uint256,address)`. - mstore(0x00, 0x1023f7b2) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, uint256 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,uint256,bool)`. - mstore(0x00, 0xc3a8a654) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, uint256 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - // Selector of `log(string,string,uint256,uint256)`. - mstore(0x00, 0xf45d7d2c) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - } - _sendLogPayload(0x1c, 0x104); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - } - } - - function log(bytes32 p0, bytes32 p1, uint256 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,string,uint256,string)`. - mstore(0x00, 0x5d1a971a) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, p2) - mstore(0x80, 0x100) - writeString(0xa0, p0) - writeString(0xe0, p1) - writeString(0x120, p3) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bytes32 p1, bytes32 p2, address p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,string,string,address)`. - mstore(0x00, 0x6d572f44) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, 0x100) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - writeString(0x120, p2) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bytes32 p1, bytes32 p2, bool p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,string,string,bool)`. - mstore(0x00, 0x2c1754ed) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, 0x100) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - writeString(0x120, p2) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bytes32 p1, bytes32 p2, uint256 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - // Selector of `log(string,string,string,uint256)`. - mstore(0x00, 0x8eafb02b) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, 0x100) - mstore(0x80, p3) - writeString(0xa0, p0) - writeString(0xe0, p1) - writeString(0x120, p2) - } - _sendLogPayload(0x1c, 0x144); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - } - } - - function log(bytes32 p0, bytes32 p1, bytes32 p2, bytes32 p3) internal pure { - bytes32 m0; - bytes32 m1; - bytes32 m2; - bytes32 m3; - bytes32 m4; - bytes32 m5; - bytes32 m6; - bytes32 m7; - bytes32 m8; - bytes32 m9; - bytes32 m10; - bytes32 m11; - bytes32 m12; - /// @solidity memory-safe-assembly - assembly { - function writeString(pos, w) { - let length := 0 - for {} lt(length, 0x20) { length := add(length, 1) } { if iszero(byte(length, w)) { break } } - mstore(pos, length) - let shift := sub(256, shl(3, length)) - mstore(add(pos, 0x20), shl(shift, shr(shift, w))) - } - m0 := mload(0x00) - m1 := mload(0x20) - m2 := mload(0x40) - m3 := mload(0x60) - m4 := mload(0x80) - m5 := mload(0xa0) - m6 := mload(0xc0) - m7 := mload(0xe0) - m8 := mload(0x100) - m9 := mload(0x120) - m10 := mload(0x140) - m11 := mload(0x160) - m12 := mload(0x180) - // Selector of `log(string,string,string,string)`. - mstore(0x00, 0xde68f20a) - mstore(0x20, 0x80) - mstore(0x40, 0xc0) - mstore(0x60, 0x100) - mstore(0x80, 0x140) - writeString(0xa0, p0) - writeString(0xe0, p1) - writeString(0x120, p2) - writeString(0x160, p3) - } - _sendLogPayload(0x1c, 0x184); - /// @solidity memory-safe-assembly - assembly { - mstore(0x00, m0) - mstore(0x20, m1) - mstore(0x40, m2) - mstore(0x60, m3) - mstore(0x80, m4) - mstore(0xa0, m5) - mstore(0xc0, m6) - mstore(0xe0, m7) - mstore(0x100, m8) - mstore(0x120, m9) - mstore(0x140, m10) - mstore(0x160, m11) - mstore(0x180, m12) - } - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdAssertions.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdAssertions.t.sol deleted file mode 100644 index ea794687..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdAssertions.t.sol +++ /dev/null @@ -1,145 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/StdAssertions.sol"; -import {Vm} from "../src/Vm.sol"; - -interface VmInternal is Vm { - function _expectCheatcodeRevert(bytes memory message) external; -} - -contract StdAssertionsTest is StdAssertions { - string constant errorMessage = "User provided message"; - uint256 constant maxDecimals = 77; - - bool constant SHOULD_REVERT = true; - bool constant SHOULD_RETURN = false; - - bool constant STRICT_REVERT_DATA = true; - bool constant NON_STRICT_REVERT_DATA = false; - - VmInternal constant vm = VmInternal(address(uint160(uint256(keccak256("hevm cheat code"))))); - - function testFuzz_AssertEqCall_Return_Pass( - bytes memory callDataA, - bytes memory callDataB, - bytes memory returnData, - bool strictRevertData - ) external { - address targetA = address(new TestMockCall(returnData, SHOULD_RETURN)); - address targetB = address(new TestMockCall(returnData, SHOULD_RETURN)); - - assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData); - } - - function testFuzz_RevertWhenCalled_AssertEqCall_Return_Fail( - bytes memory callDataA, - bytes memory callDataB, - bytes memory returnDataA, - bytes memory returnDataB, - bool strictRevertData - ) external { - vm.assume(keccak256(returnDataA) != keccak256(returnDataB)); - - address targetA = address(new TestMockCall(returnDataA, SHOULD_RETURN)); - address targetB = address(new TestMockCall(returnDataB, SHOULD_RETURN)); - - vm._expectCheatcodeRevert( - bytes( - string.concat( - "Call return data does not match: ", vm.toString(returnDataA), " != ", vm.toString(returnDataB) - ) - ) - ); - assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData); - } - - function testFuzz_AssertEqCall_Revert_Pass( - bytes memory callDataA, - bytes memory callDataB, - bytes memory revertDataA, - bytes memory revertDataB - ) external { - address targetA = address(new TestMockCall(revertDataA, SHOULD_REVERT)); - address targetB = address(new TestMockCall(revertDataB, SHOULD_REVERT)); - - assertEqCall(targetA, callDataA, targetB, callDataB, NON_STRICT_REVERT_DATA); - } - - function testFuzz_RevertWhenCalled_AssertEqCall_Revert_Fail( - bytes memory callDataA, - bytes memory callDataB, - bytes memory revertDataA, - bytes memory revertDataB - ) external { - vm.assume(keccak256(revertDataA) != keccak256(revertDataB)); - - address targetA = address(new TestMockCall(revertDataA, SHOULD_REVERT)); - address targetB = address(new TestMockCall(revertDataB, SHOULD_REVERT)); - - vm._expectCheatcodeRevert( - bytes( - string.concat( - "Call revert data does not match: ", vm.toString(revertDataA), " != ", vm.toString(revertDataB) - ) - ) - ); - assertEqCall(targetA, callDataA, targetB, callDataB, STRICT_REVERT_DATA); - } - - function testFuzz_RevertWhenCalled_AssertEqCall_Fail( - bytes memory callDataA, - bytes memory callDataB, - bytes memory returnDataA, - bytes memory returnDataB, - bool strictRevertData - ) external { - address targetA = address(new TestMockCall(returnDataA, SHOULD_RETURN)); - address targetB = address(new TestMockCall(returnDataB, SHOULD_REVERT)); - - vm.expectRevert(bytes("assertion failed")); - this.assertEqCallExternal(targetA, callDataA, targetB, callDataB, strictRevertData); - - vm.expectRevert(bytes("assertion failed")); - this.assertEqCallExternal(targetB, callDataB, targetA, callDataA, strictRevertData); - } - - // Helper function to test outcome of assertEqCall via `expect` cheatcodes - function assertEqCallExternal( - address targetA, - bytes memory callDataA, - address targetB, - bytes memory callDataB, - bool strictRevertData - ) public { - assertEqCall(targetA, callDataA, targetB, callDataB, strictRevertData); - } - - function testFailFail() public { - fail(); - } -} - -contract TestMockCall { - bytes returnData; - bool shouldRevert; - - constructor(bytes memory returnData_, bool shouldRevert_) { - returnData = returnData_; - shouldRevert = shouldRevert_; - } - - fallback() external payable { - bytes memory returnData_ = returnData; - - if (shouldRevert) { - assembly { - revert(add(returnData_, 0x20), mload(returnData_)) - } - } else { - assembly { - return(add(returnData_, 0x20), mload(returnData_)) - } - } - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdChains.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdChains.t.sol deleted file mode 100644 index 09059c23..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdChains.t.sol +++ /dev/null @@ -1,226 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/Test.sol"; - -contract StdChainsMock is Test { - function exposed_getChain(string memory chainAlias) public returns (Chain memory) { - return getChain(chainAlias); - } - - function exposed_getChain(uint256 chainId) public returns (Chain memory) { - return getChain(chainId); - } - - function exposed_setChain(string memory chainAlias, ChainData memory chainData) public { - setChain(chainAlias, chainData); - } - - function exposed_setFallbackToDefaultRpcUrls(bool useDefault) public { - setFallbackToDefaultRpcUrls(useDefault); - } -} - -contract StdChainsTest is Test { - function test_ChainRpcInitialization() public { - // RPCs specified in `foundry.toml` should be updated. - assertEq(getChain(1).rpcUrl, "https://eth-mainnet.alchemyapi.io/v2/WV407BEiBmjNJfKo9Uo_55u0z0ITyCOX"); - assertEq(getChain("optimism_sepolia").rpcUrl, "https://sepolia.optimism.io/"); - assertEq(getChain("arbitrum_one_sepolia").rpcUrl, "https://sepolia-rollup.arbitrum.io/rpc/"); - - // Environment variables should be the next fallback - assertEq(getChain("arbitrum_nova").rpcUrl, "https://nova.arbitrum.io/rpc"); - vm.setEnv("ARBITRUM_NOVA_RPC_URL", "myoverride"); - assertEq(getChain("arbitrum_nova").rpcUrl, "myoverride"); - vm.setEnv("ARBITRUM_NOVA_RPC_URL", "https://nova.arbitrum.io/rpc"); - - // Cannot override RPCs defined in `foundry.toml` - vm.setEnv("MAINNET_RPC_URL", "myoverride2"); - assertEq(getChain("mainnet").rpcUrl, "https://eth-mainnet.alchemyapi.io/v2/WV407BEiBmjNJfKo9Uo_55u0z0ITyCOX"); - - // Other RPCs should remain unchanged. - assertEq(getChain(31337).rpcUrl, "http://127.0.0.1:8545"); - assertEq(getChain("sepolia").rpcUrl, "https://sepolia.infura.io/v3/b9794ad1ddf84dfb8c34d6bb5dca2001"); - } - - // Named with a leading underscore to clarify this is not intended to be run as a normal test, - // and is intended to be used in the below `test_Rpcs` test. - function _testRpc(string memory rpcAlias) internal { - string memory rpcUrl = getChain(rpcAlias).rpcUrl; - vm.createSelectFork(rpcUrl); - } - - // Ensure we can connect to the default RPC URL for each chain. - // Currently commented out since this is slow and public RPCs are flaky, often resulting in failing CI. - // function test_Rpcs() public { - // _testRpc("mainnet"); - // _testRpc("sepolia"); - // _testRpc("holesky"); - // _testRpc("optimism"); - // _testRpc("optimism_sepolia"); - // _testRpc("arbitrum_one"); - // _testRpc("arbitrum_one_sepolia"); - // _testRpc("arbitrum_nova"); - // _testRpc("polygon"); - // _testRpc("polygon_amoy"); - // _testRpc("avalanche"); - // _testRpc("avalanche_fuji"); - // _testRpc("bnb_smart_chain"); - // _testRpc("bnb_smart_chain_testnet"); - // _testRpc("gnosis_chain"); - // _testRpc("moonbeam"); - // _testRpc("moonriver"); - // _testRpc("moonbase"); - // _testRpc("base_sepolia"); - // _testRpc("base"); - // _testRpc("blast_sepolia"); - // _testRpc("blast"); - // _testRpc("fantom_opera"); - // _testRpc("fantom_opera_testnet"); - // _testRpc("fraxtal"); - // _testRpc("fraxtal_testnet"); - // _testRpc("berachain_bartio_testnet"); - // } - - function test_ChainNoDefault() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains getChain(string): Chain with alias \"does_not_exist\" not found."); - stdChainsMock.exposed_getChain("does_not_exist"); - } - - function test_SetChainFirstFails() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains setChain(string,ChainData): Chain ID 31337 already used by \"anvil\"."); - stdChainsMock.exposed_setChain("anvil2", ChainData("Anvil", 31337, "URL")); - } - - function test_ChainBubbleUp() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - stdChainsMock.exposed_setChain("needs_undefined_env_var", ChainData("", 123456789, "")); - vm.expectRevert( - "Failed to resolve env var `UNDEFINED_RPC_URL_PLACEHOLDER` in `${UNDEFINED_RPC_URL_PLACEHOLDER}`: environment variable not found" - ); - stdChainsMock.exposed_getChain("needs_undefined_env_var"); - } - - function test_CannotSetChain_ChainIdExists() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - stdChainsMock.exposed_setChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/")); - - vm.expectRevert('StdChains setChain(string,ChainData): Chain ID 123456789 already used by "custom_chain".'); - - stdChainsMock.exposed_setChain("another_custom_chain", ChainData("", 123456789, "")); - } - - function test_SetChain() public { - setChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/")); - Chain memory customChain = getChain("custom_chain"); - assertEq(customChain.name, "Custom Chain"); - assertEq(customChain.chainId, 123456789); - assertEq(customChain.chainAlias, "custom_chain"); - assertEq(customChain.rpcUrl, "https://custom.chain/"); - Chain memory chainById = getChain(123456789); - assertEq(chainById.name, customChain.name); - assertEq(chainById.chainId, customChain.chainId); - assertEq(chainById.chainAlias, customChain.chainAlias); - assertEq(chainById.rpcUrl, customChain.rpcUrl); - customChain.name = "Another Custom Chain"; - customChain.chainId = 987654321; - setChain("another_custom_chain", customChain); - Chain memory anotherCustomChain = getChain("another_custom_chain"); - assertEq(anotherCustomChain.name, "Another Custom Chain"); - assertEq(anotherCustomChain.chainId, 987654321); - assertEq(anotherCustomChain.chainAlias, "another_custom_chain"); - assertEq(anotherCustomChain.rpcUrl, "https://custom.chain/"); - // Verify the first chain data was not overwritten - chainById = getChain(123456789); - assertEq(chainById.name, "Custom Chain"); - assertEq(chainById.chainId, 123456789); - } - - function test_SetNoEmptyAlias() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains setChain(string,ChainData): Chain alias cannot be the empty string."); - stdChainsMock.exposed_setChain("", ChainData("", 123456789, "")); - } - - function test_SetNoChainId0() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains setChain(string,ChainData): Chain ID cannot be 0."); - stdChainsMock.exposed_setChain("alias", ChainData("", 0, "")); - } - - function test_GetNoChainId0() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains getChain(uint256): Chain ID cannot be 0."); - stdChainsMock.exposed_getChain(0); - } - - function test_GetNoEmptyAlias() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains getChain(string): Chain alias cannot be the empty string."); - stdChainsMock.exposed_getChain(""); - } - - function test_ChainIdNotFound() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains getChain(string): Chain with alias \"no_such_alias\" not found."); - stdChainsMock.exposed_getChain("no_such_alias"); - } - - function test_ChainAliasNotFound() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - vm.expectRevert("StdChains getChain(uint256): Chain with ID 321 not found."); - - stdChainsMock.exposed_getChain(321); - } - - function test_SetChain_ExistingOne() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - setChain("custom_chain", ChainData("Custom Chain", 123456789, "https://custom.chain/")); - assertEq(getChain(123456789).chainId, 123456789); - - setChain("custom_chain", ChainData("Modified Chain", 999999999, "https://modified.chain/")); - vm.expectRevert("StdChains getChain(uint256): Chain with ID 123456789 not found."); - stdChainsMock.exposed_getChain(123456789); - - Chain memory modifiedChain = getChain(999999999); - assertEq(modifiedChain.name, "Modified Chain"); - assertEq(modifiedChain.chainId, 999999999); - assertEq(modifiedChain.rpcUrl, "https://modified.chain/"); - } - - function test_DontUseDefaultRpcUrl() public { - // We deploy a mock to properly test the revert. - StdChainsMock stdChainsMock = new StdChainsMock(); - - // Should error if default RPCs flag is set to false. - stdChainsMock.exposed_setFallbackToDefaultRpcUrls(false); - vm.expectRevert(); - stdChainsMock.exposed_getChain(31337); - vm.expectRevert(); - stdChainsMock.exposed_getChain("sepolia"); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdCheats.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdCheats.t.sol deleted file mode 100644 index 7bac4286..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdCheats.t.sol +++ /dev/null @@ -1,618 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/StdCheats.sol"; -import "../src/Test.sol"; -import "../src/StdJson.sol"; -import "../src/StdToml.sol"; -import "../src/interfaces/IERC20.sol"; - -contract StdCheatsTest is Test { - Bar test; - - using stdJson for string; - - function setUp() public { - test = new Bar(); - } - - function test_Skip() public { - vm.warp(100); - skip(25); - assertEq(block.timestamp, 125); - } - - function test_Rewind() public { - vm.warp(100); - rewind(25); - assertEq(block.timestamp, 75); - } - - function test_Hoax() public { - hoax(address(1337)); - test.bar{value: 100}(address(1337)); - } - - function test_HoaxOrigin() public { - hoax(address(1337), address(1337)); - test.origin{value: 100}(address(1337)); - } - - function test_HoaxDifferentAddresses() public { - hoax(address(1337), address(7331)); - test.origin{value: 100}(address(1337), address(7331)); - } - - function test_StartHoax() public { - startHoax(address(1337)); - test.bar{value: 100}(address(1337)); - test.bar{value: 100}(address(1337)); - vm.stopPrank(); - test.bar(address(this)); - } - - function test_StartHoaxOrigin() public { - startHoax(address(1337), address(1337)); - test.origin{value: 100}(address(1337)); - test.origin{value: 100}(address(1337)); - vm.stopPrank(); - test.bar(address(this)); - } - - function test_ChangePrankMsgSender() public { - vm.startPrank(address(1337)); - test.bar(address(1337)); - changePrank(address(0xdead)); - test.bar(address(0xdead)); - changePrank(address(1337)); - test.bar(address(1337)); - vm.stopPrank(); - } - - function test_ChangePrankMsgSenderAndTxOrigin() public { - vm.startPrank(address(1337), address(1338)); - test.origin(address(1337), address(1338)); - changePrank(address(0xdead), address(0xbeef)); - test.origin(address(0xdead), address(0xbeef)); - changePrank(address(1337), address(1338)); - test.origin(address(1337), address(1338)); - vm.stopPrank(); - } - - function test_MakeAccountEquivalence() public { - Account memory account = makeAccount("1337"); - (address addr, uint256 key) = makeAddrAndKey("1337"); - assertEq(account.addr, addr); - assertEq(account.key, key); - } - - function test_MakeAddrEquivalence() public { - (address addr,) = makeAddrAndKey("1337"); - assertEq(makeAddr("1337"), addr); - } - - function test_MakeAddrSigning() public { - (address addr, uint256 key) = makeAddrAndKey("1337"); - bytes32 hash = keccak256("some_message"); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign(key, hash); - assertEq(ecrecover(hash, v, r, s), addr); - } - - function test_Deal() public { - deal(address(this), 1 ether); - assertEq(address(this).balance, 1 ether); - } - - function test_DealToken() public { - Bar barToken = new Bar(); - address bar = address(barToken); - deal(bar, address(this), 10000e18); - assertEq(barToken.balanceOf(address(this)), 10000e18); - } - - function test_DealTokenAdjustTotalSupply() public { - Bar barToken = new Bar(); - address bar = address(barToken); - deal(bar, address(this), 10000e18, true); - assertEq(barToken.balanceOf(address(this)), 10000e18); - assertEq(barToken.totalSupply(), 20000e18); - deal(bar, address(this), 0, true); - assertEq(barToken.balanceOf(address(this)), 0); - assertEq(barToken.totalSupply(), 10000e18); - } - - function test_DealERC1155Token() public { - BarERC1155 barToken = new BarERC1155(); - address bar = address(barToken); - dealERC1155(bar, address(this), 0, 10000e18, false); - assertEq(barToken.balanceOf(address(this), 0), 10000e18); - } - - function test_DealERC1155TokenAdjustTotalSupply() public { - BarERC1155 barToken = new BarERC1155(); - address bar = address(barToken); - dealERC1155(bar, address(this), 0, 10000e18, true); - assertEq(barToken.balanceOf(address(this), 0), 10000e18); - assertEq(barToken.totalSupply(0), 20000e18); - dealERC1155(bar, address(this), 0, 0, true); - assertEq(barToken.balanceOf(address(this), 0), 0); - assertEq(barToken.totalSupply(0), 10000e18); - } - - function test_DealERC721Token() public { - BarERC721 barToken = new BarERC721(); - address bar = address(barToken); - dealERC721(bar, address(2), 1); - assertEq(barToken.balanceOf(address(2)), 1); - assertEq(barToken.balanceOf(address(1)), 0); - dealERC721(bar, address(1), 2); - assertEq(barToken.balanceOf(address(1)), 1); - assertEq(barToken.balanceOf(bar), 1); - } - - function test_DeployCode() public { - address deployed = deployCode("StdCheats.t.sol:Bar", bytes("")); - assertEq(string(getCode(deployed)), string(getCode(address(test)))); - } - - function test_DestroyAccount() public { - // deploy something to destroy it - BarERC721 barToken = new BarERC721(); - address bar = address(barToken); - vm.setNonce(bar, 10); - deal(bar, 100); - - uint256 prevThisBalance = address(this).balance; - uint256 size; - assembly { - size := extcodesize(bar) - } - - assertGt(size, 0); - assertEq(bar.balance, 100); - assertEq(vm.getNonce(bar), 10); - - destroyAccount(bar, address(this)); - assembly { - size := extcodesize(bar) - } - assertEq(address(this).balance, prevThisBalance + 100); - assertEq(vm.getNonce(bar), 0); - assertEq(size, 0); - assertEq(bar.balance, 0); - } - - function test_DeployCodeNoArgs() public { - address deployed = deployCode("StdCheats.t.sol:Bar"); - assertEq(string(getCode(deployed)), string(getCode(address(test)))); - } - - function test_DeployCodeVal() public { - address deployed = deployCode("StdCheats.t.sol:Bar", bytes(""), 1 ether); - assertEq(string(getCode(deployed)), string(getCode(address(test)))); - assertEq(deployed.balance, 1 ether); - } - - function test_DeployCodeValNoArgs() public { - address deployed = deployCode("StdCheats.t.sol:Bar", 1 ether); - assertEq(string(getCode(deployed)), string(getCode(address(test)))); - assertEq(deployed.balance, 1 ether); - } - - // We need this so we can call "this.deployCode" rather than "deployCode" directly - function deployCodeHelper(string memory what) external { - deployCode(what); - } - - function test_DeployCodeFail() public { - vm.expectRevert(bytes("StdCheats deployCode(string): Deployment failed.")); - this.deployCodeHelper("StdCheats.t.sol:RevertingContract"); - } - - function getCode(address who) internal view returns (bytes memory o_code) { - /// @solidity memory-safe-assembly - assembly { - // retrieve the size of the code, this needs assembly - let size := extcodesize(who) - // allocate output byte array - this could also be done without assembly - // by using o_code = new bytes(size) - o_code := mload(0x40) - // new "memory end" including padding - mstore(0x40, add(o_code, and(add(add(size, 0x20), 0x1f), not(0x1f)))) - // store length in memory - mstore(o_code, size) - // actually retrieve the code, this needs assembly - extcodecopy(who, add(o_code, 0x20), 0, size) - } - } - - function test_DeriveRememberKey() public { - string memory mnemonic = "test test test test test test test test test test test junk"; - - (address deployer, uint256 privateKey) = deriveRememberKey(mnemonic, 0); - assertEq(deployer, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); - assertEq(privateKey, 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80); - } - - function test_BytesToUint() public pure { - assertEq(3, bytesToUint_test(hex"03")); - assertEq(2, bytesToUint_test(hex"02")); - assertEq(255, bytesToUint_test(hex"ff")); - assertEq(29625, bytesToUint_test(hex"73b9")); - } - - function test_ParseJsonTxDetail() public view { - string memory root = vm.projectRoot(); - string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); - string memory json = vm.readFile(path); - bytes memory transactionDetails = json.parseRaw(".transactions[0].tx"); - RawTx1559Detail memory rawTxDetail = abi.decode(transactionDetails, (RawTx1559Detail)); - Tx1559Detail memory txDetail = rawToConvertedEIP1559Detail(rawTxDetail); - assertEq(txDetail.from, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); - assertEq(txDetail.to, 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512); - assertEq( - txDetail.data, - hex"23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004" - ); - assertEq(txDetail.nonce, 3); - assertEq(txDetail.txType, 2); - assertEq(txDetail.gas, 29625); - assertEq(txDetail.value, 0); - } - - function test_ReadEIP1559Transaction() public view { - string memory root = vm.projectRoot(); - string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); - uint256 index = 0; - Tx1559 memory transaction = readTx1559(path, index); - transaction; - } - - function test_ReadEIP1559Transactions() public view { - string memory root = vm.projectRoot(); - string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); - Tx1559[] memory transactions = readTx1559s(path); - transactions; - } - - function test_ReadReceipt() public view { - string memory root = vm.projectRoot(); - string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); - uint256 index = 5; - Receipt memory receipt = readReceipt(path, index); - assertEq( - receipt.logsBloom, - hex"00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100" - ); - } - - function test_ReadReceipts() public view { - string memory root = vm.projectRoot(); - string memory path = string.concat(root, "/test/fixtures/broadcast.log.json"); - Receipt[] memory receipts = readReceipts(path); - receipts; - } - - function test_GasMeteringModifier() public { - uint256 gas_start_normal = gasleft(); - addInLoop(); - uint256 gas_used_normal = gas_start_normal - gasleft(); - - uint256 gas_start_single = gasleft(); - addInLoopNoGas(); - uint256 gas_used_single = gas_start_single - gasleft(); - - uint256 gas_start_double = gasleft(); - addInLoopNoGasNoGas(); - uint256 gas_used_double = gas_start_double - gasleft(); - - assertTrue(gas_used_double + gas_used_single < gas_used_normal); - } - - function addInLoop() internal pure returns (uint256) { - uint256 b; - for (uint256 i; i < 10000; i++) { - b += i; - } - return b; - } - - function addInLoopNoGas() internal noGasMetering returns (uint256) { - return addInLoop(); - } - - function addInLoopNoGasNoGas() internal noGasMetering returns (uint256) { - return addInLoopNoGas(); - } - - function bytesToUint_test(bytes memory b) private pure returns (uint256) { - uint256 number; - for (uint256 i = 0; i < b.length; i++) { - number = number + uint256(uint8(b[i])) * (2 ** (8 * (b.length - (i + 1)))); - } - return number; - } - - function testFuzz_AssumeAddressIsNot(address addr) external { - // skip over Payable and NonPayable enums - for (uint8 i = 2; i < uint8(type(AddressType).max); i++) { - assumeAddressIsNot(addr, AddressType(i)); - } - assertTrue(addr != address(0)); - assertTrue(addr < address(1) || addr > address(9)); - assertTrue(addr != address(vm) || addr != 0x000000000000000000636F6e736F6c652e6c6f67); - } - - function test_AssumePayable() external { - // We deploy a mock version so we can properly test the revert. - StdCheatsMock stdCheatsMock = new StdCheatsMock(); - - // all should revert since these addresses are not payable - - // VM address - vm.expectRevert(); - stdCheatsMock.exposed_assumePayable(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); - - // Console address - vm.expectRevert(); - stdCheatsMock.exposed_assumePayable(0x000000000000000000636F6e736F6c652e6c6f67); - - // Create2Deployer - vm.expectRevert(); - stdCheatsMock.exposed_assumePayable(0x4e59b44847b379578588920cA78FbF26c0B4956C); - - // all should pass since these addresses are payable - - // vitalik.eth - stdCheatsMock.exposed_assumePayable(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045); - - // mock payable contract - MockContractPayable cp = new MockContractPayable(); - stdCheatsMock.exposed_assumePayable(address(cp)); - } - - function test_AssumeNotPayable() external { - // We deploy a mock version so we can properly test the revert. - StdCheatsMock stdCheatsMock = new StdCheatsMock(); - - // all should pass since these addresses are not payable - - // VM address - stdCheatsMock.exposed_assumeNotPayable(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D); - - // Console address - stdCheatsMock.exposed_assumeNotPayable(0x000000000000000000636F6e736F6c652e6c6f67); - - // Create2Deployer - stdCheatsMock.exposed_assumeNotPayable(0x4e59b44847b379578588920cA78FbF26c0B4956C); - - // all should revert since these addresses are payable - - // vitalik.eth - vm.expectRevert(); - stdCheatsMock.exposed_assumeNotPayable(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045); - - // mock payable contract - MockContractPayable cp = new MockContractPayable(); - vm.expectRevert(); - stdCheatsMock.exposed_assumeNotPayable(address(cp)); - } - - function testFuzz_AssumeNotPrecompile(address addr) external { - assumeNotPrecompile(addr, getChain("optimism_sepolia").chainId); - assertTrue( - addr < address(1) || (addr > address(9) && addr < address(0x4200000000000000000000000000000000000000)) - || addr > address(0x4200000000000000000000000000000000000800) - ); - } - - function testFuzz_AssumeNotForgeAddress(address addr) external pure { - assumeNotForgeAddress(addr); - assertTrue( - addr != address(vm) && addr != 0x000000000000000000636F6e736F6c652e6c6f67 - && addr != 0x4e59b44847b379578588920cA78FbF26c0B4956C - ); - } - - function test_CannotDeployCodeTo() external { - vm.expectRevert("StdCheats deployCodeTo(string,bytes,uint256,address): Failed to create runtime bytecode."); - this._revertDeployCodeTo(); - } - - function _revertDeployCodeTo() external { - deployCodeTo("StdCheats.t.sol:RevertingContract", address(0)); - } - - function test_DeployCodeTo() external { - address arbitraryAddress = makeAddr("arbitraryAddress"); - - deployCodeTo( - "StdCheats.t.sol:MockContractWithConstructorArgs", - abi.encode(uint256(6), true, bytes20(arbitraryAddress)), - 1 ether, - arbitraryAddress - ); - - MockContractWithConstructorArgs ct = MockContractWithConstructorArgs(arbitraryAddress); - - assertEq(arbitraryAddress.balance, 1 ether); - assertEq(ct.x(), 6); - assertTrue(ct.y()); - assertEq(ct.z(), bytes20(arbitraryAddress)); - } -} - -contract StdCheatsMock is StdCheats { - function exposed_assumePayable(address addr) external { - assumePayable(addr); - } - - function exposed_assumeNotPayable(address addr) external { - assumeNotPayable(addr); - } - - // We deploy a mock version so we can properly test expected reverts. - function exposed_assumeNotBlacklisted(address token, address addr) external view { - return assumeNotBlacklisted(token, addr); - } -} - -contract StdCheatsForkTest is Test { - address internal constant SHIB = 0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE; - address internal constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; - address internal constant USDC_BLACKLISTED_USER = 0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD; - address internal constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7; - address internal constant USDT_BLACKLISTED_USER = 0x8f8a8F4B54a2aAC7799d7bc81368aC27b852822A; - - function setUp() public { - // All tests of the `assumeNotBlacklisted` method are fork tests using live contracts. - vm.createSelectFork({urlOrAlias: "mainnet", blockNumber: 16_428_900}); - } - - function test_CannotAssumeNoBlacklisted_EOA() external { - // We deploy a mock version so we can properly test the revert. - StdCheatsMock stdCheatsMock = new StdCheatsMock(); - address eoa = vm.addr({privateKey: 1}); - vm.expectRevert("StdCheats assumeNotBlacklisted(address,address): Token address is not a contract."); - stdCheatsMock.exposed_assumeNotBlacklisted(eoa, address(0)); - } - - function testFuzz_AssumeNotBlacklisted_TokenWithoutBlacklist(address addr) external view { - assumeNotBlacklisted(SHIB, addr); - assertTrue(true); - } - - function test_AssumeNoBlacklisted_USDC() external { - // We deploy a mock version so we can properly test the revert. - StdCheatsMock stdCheatsMock = new StdCheatsMock(); - vm.expectRevert(); - stdCheatsMock.exposed_assumeNotBlacklisted(USDC, USDC_BLACKLISTED_USER); - } - - function testFuzz_AssumeNotBlacklisted_USDC(address addr) external view { - assumeNotBlacklisted(USDC, addr); - assertFalse(USDCLike(USDC).isBlacklisted(addr)); - } - - function test_AssumeNoBlacklisted_USDT() external { - // We deploy a mock version so we can properly test the revert. - StdCheatsMock stdCheatsMock = new StdCheatsMock(); - vm.expectRevert(); - stdCheatsMock.exposed_assumeNotBlacklisted(USDT, USDT_BLACKLISTED_USER); - } - - function testFuzz_AssumeNotBlacklisted_USDT(address addr) external view { - assumeNotBlacklisted(USDT, addr); - assertFalse(USDTLike(USDT).isBlackListed(addr)); - } - - function test_dealUSDC() external { - // roll fork to the point when USDC contract updated to store balance in packed slots - vm.rollFork(19279215); - - uint256 balance = 100e6; - deal(USDC, address(this), balance); - assertEq(IERC20(USDC).balanceOf(address(this)), balance); - } -} - -contract Bar { - constructor() payable { - /// `DEAL` STDCHEAT - totalSupply = 10000e18; - balanceOf[address(this)] = totalSupply; - } - - /// `HOAX` and `CHANGEPRANK` STDCHEATS - function bar(address expectedSender) public payable { - require(msg.sender == expectedSender, "!prank"); - } - - function origin(address expectedSender) public payable { - require(msg.sender == expectedSender, "!prank"); - require(tx.origin == expectedSender, "!prank"); - } - - function origin(address expectedSender, address expectedOrigin) public payable { - require(msg.sender == expectedSender, "!prank"); - require(tx.origin == expectedOrigin, "!prank"); - } - - /// `DEAL` STDCHEAT - mapping(address => uint256) public balanceOf; - uint256 public totalSupply; -} - -contract BarERC1155 { - constructor() payable { - /// `DEALERC1155` STDCHEAT - _totalSupply[0] = 10000e18; - _balances[0][address(this)] = _totalSupply[0]; - } - - function balanceOf(address account, uint256 id) public view virtual returns (uint256) { - return _balances[id][account]; - } - - function totalSupply(uint256 id) public view virtual returns (uint256) { - return _totalSupply[id]; - } - - /// `DEALERC1155` STDCHEAT - mapping(uint256 => mapping(address => uint256)) private _balances; - mapping(uint256 => uint256) private _totalSupply; -} - -contract BarERC721 { - constructor() payable { - /// `DEALERC721` STDCHEAT - _owners[1] = address(1); - _balances[address(1)] = 1; - _owners[2] = address(this); - _owners[3] = address(this); - _balances[address(this)] = 2; - } - - function balanceOf(address owner) public view virtual returns (uint256) { - return _balances[owner]; - } - - function ownerOf(uint256 tokenId) public view virtual returns (address) { - address owner = _owners[tokenId]; - return owner; - } - - mapping(uint256 => address) private _owners; - mapping(address => uint256) private _balances; -} - -interface USDCLike { - function isBlacklisted(address) external view returns (bool); -} - -interface USDTLike { - function isBlackListed(address) external view returns (bool); -} - -contract RevertingContract { - constructor() { - revert(); - } -} - -contract MockContractWithConstructorArgs { - uint256 public immutable x; - bool public y; - bytes20 public z; - - constructor(uint256 _x, bool _y, bytes20 _z) payable { - x = _x; - y = _y; - z = _z; - } -} - -contract MockContractPayable { - receive() external payable {} -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdError.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdError.t.sol deleted file mode 100644 index a306eaa7..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdError.t.sol +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.0 <0.9.0; - -import "../src/StdError.sol"; -import "../src/Test.sol"; - -contract StdErrorsTest is Test { - ErrorsTest test; - - function setUp() public { - test = new ErrorsTest(); - } - - function test_ExpectAssertion() public { - vm.expectRevert(stdError.assertionError); - test.assertionError(); - } - - function test_ExpectArithmetic() public { - vm.expectRevert(stdError.arithmeticError); - test.arithmeticError(10); - } - - function test_ExpectDiv() public { - vm.expectRevert(stdError.divisionError); - test.divError(0); - } - - function test_ExpectMod() public { - vm.expectRevert(stdError.divisionError); - test.modError(0); - } - - function test_ExpectEnum() public { - vm.expectRevert(stdError.enumConversionError); - test.enumConversion(1); - } - - function test_ExpectEncodeStg() public { - vm.expectRevert(stdError.encodeStorageError); - test.encodeStgError(); - } - - function test_ExpectPop() public { - vm.expectRevert(stdError.popError); - test.pop(); - } - - function test_ExpectOOB() public { - vm.expectRevert(stdError.indexOOBError); - test.indexOOBError(1); - } - - function test_ExpectMem() public { - vm.expectRevert(stdError.memOverflowError); - test.mem(); - } - - function test_ExpectIntern() public { - vm.expectRevert(stdError.zeroVarError); - test.intern(); - } -} - -contract ErrorsTest { - enum T { - T1 - } - - uint256[] public someArr; - bytes someBytes; - - function assertionError() public pure { - assert(false); - } - - function arithmeticError(uint256 a) public pure { - a -= 100; - } - - function divError(uint256 a) public pure { - 100 / a; - } - - function modError(uint256 a) public pure { - 100 % a; - } - - function enumConversion(uint256 a) public pure { - T(a); - } - - function encodeStgError() public { - /// @solidity memory-safe-assembly - assembly { - sstore(someBytes.slot, 1) - } - keccak256(someBytes); - } - - function pop() public { - someArr.pop(); - } - - function indexOOBError(uint256 a) public pure { - uint256[] memory t = new uint256[](0); - t[a]; - } - - function mem() public pure { - uint256 l = 2 ** 256 / 32; - new uint256[](l); - } - - function intern() public returns (uint256) { - function(uint256) internal returns (uint256) x; - x(2); - return 7; - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdJson.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdJson.t.sol deleted file mode 100644 index e32b92ea..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdJson.t.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/Test.sol"; - -contract StdJsonTest is Test { - using stdJson for string; - - string root; - string path; - - function setUp() public { - root = vm.projectRoot(); - path = string.concat(root, "/test/fixtures/test.json"); - } - - struct SimpleJson { - uint256 a; - string b; - } - - struct NestedJson { - uint256 a; - string b; - SimpleJson c; - } - - function test_readJson() public view { - string memory json = vm.readFile(path); - assertEq(json.readUint(".a"), 123); - } - - function test_writeJson() public { - string memory json = "json"; - json.serialize("a", uint256(123)); - string memory semiFinal = json.serialize("b", string("test")); - string memory finalJson = json.serialize("c", semiFinal); - finalJson.write(path); - - string memory json_ = vm.readFile(path); - bytes memory data = json_.parseRaw("$"); - NestedJson memory decodedData = abi.decode(data, (NestedJson)); - - assertEq(decodedData.a, 123); - assertEq(decodedData.b, "test"); - assertEq(decodedData.c.a, 123); - assertEq(decodedData.c.b, "test"); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdMath.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdMath.t.sol deleted file mode 100644 index ed0f9bae..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdMath.t.sol +++ /dev/null @@ -1,212 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.0 <0.9.0; - -import "../src/StdMath.sol"; -import "../src/Test.sol"; - -contract StdMathMock is Test { - function exposed_percentDelta(uint256 a, uint256 b) public pure returns (uint256) { - return stdMath.percentDelta(a, b); - } - - function exposed_percentDelta(int256 a, int256 b) public pure returns (uint256) { - return stdMath.percentDelta(a, b); - } -} - -contract StdMathTest is Test { - function test_GetAbs() external pure { - assertEq(stdMath.abs(-50), 50); - assertEq(stdMath.abs(50), 50); - assertEq(stdMath.abs(-1337), 1337); - assertEq(stdMath.abs(0), 0); - - assertEq(stdMath.abs(type(int256).min), (type(uint256).max >> 1) + 1); - assertEq(stdMath.abs(type(int256).max), (type(uint256).max >> 1)); - } - - function testFuzz_GetAbs(int256 a) external pure { - uint256 manualAbs = getAbs(a); - - uint256 abs = stdMath.abs(a); - - assertEq(abs, manualAbs); - } - - function test_GetDelta_Uint() external pure { - assertEq(stdMath.delta(uint256(0), uint256(0)), 0); - assertEq(stdMath.delta(uint256(0), uint256(1337)), 1337); - assertEq(stdMath.delta(uint256(0), type(uint64).max), type(uint64).max); - assertEq(stdMath.delta(uint256(0), type(uint128).max), type(uint128).max); - assertEq(stdMath.delta(uint256(0), type(uint256).max), type(uint256).max); - - assertEq(stdMath.delta(0, uint256(0)), 0); - assertEq(stdMath.delta(1337, uint256(0)), 1337); - assertEq(stdMath.delta(type(uint64).max, uint256(0)), type(uint64).max); - assertEq(stdMath.delta(type(uint128).max, uint256(0)), type(uint128).max); - assertEq(stdMath.delta(type(uint256).max, uint256(0)), type(uint256).max); - - assertEq(stdMath.delta(1337, uint256(1337)), 0); - assertEq(stdMath.delta(type(uint256).max, type(uint256).max), 0); - assertEq(stdMath.delta(5000, uint256(1250)), 3750); - } - - function testFuzz_GetDelta_Uint(uint256 a, uint256 b) external pure { - uint256 manualDelta; - if (a > b) { - manualDelta = a - b; - } else { - manualDelta = b - a; - } - - uint256 delta = stdMath.delta(a, b); - - assertEq(delta, manualDelta); - } - - function test_GetDelta_Int() external pure { - assertEq(stdMath.delta(int256(0), int256(0)), 0); - assertEq(stdMath.delta(int256(0), int256(1337)), 1337); - assertEq(stdMath.delta(int256(0), type(int64).max), type(uint64).max >> 1); - assertEq(stdMath.delta(int256(0), type(int128).max), type(uint128).max >> 1); - assertEq(stdMath.delta(int256(0), type(int256).max), type(uint256).max >> 1); - - assertEq(stdMath.delta(0, int256(0)), 0); - assertEq(stdMath.delta(1337, int256(0)), 1337); - assertEq(stdMath.delta(type(int64).max, int256(0)), type(uint64).max >> 1); - assertEq(stdMath.delta(type(int128).max, int256(0)), type(uint128).max >> 1); - assertEq(stdMath.delta(type(int256).max, int256(0)), type(uint256).max >> 1); - - assertEq(stdMath.delta(-0, int256(0)), 0); - assertEq(stdMath.delta(-1337, int256(0)), 1337); - assertEq(stdMath.delta(type(int64).min, int256(0)), (type(uint64).max >> 1) + 1); - assertEq(stdMath.delta(type(int128).min, int256(0)), (type(uint128).max >> 1) + 1); - assertEq(stdMath.delta(type(int256).min, int256(0)), (type(uint256).max >> 1) + 1); - - assertEq(stdMath.delta(int256(0), -0), 0); - assertEq(stdMath.delta(int256(0), -1337), 1337); - assertEq(stdMath.delta(int256(0), type(int64).min), (type(uint64).max >> 1) + 1); - assertEq(stdMath.delta(int256(0), type(int128).min), (type(uint128).max >> 1) + 1); - assertEq(stdMath.delta(int256(0), type(int256).min), (type(uint256).max >> 1) + 1); - - assertEq(stdMath.delta(1337, int256(1337)), 0); - assertEq(stdMath.delta(type(int256).max, type(int256).max), 0); - assertEq(stdMath.delta(type(int256).min, type(int256).min), 0); - assertEq(stdMath.delta(type(int256).min, type(int256).max), type(uint256).max); - assertEq(stdMath.delta(5000, int256(1250)), 3750); - } - - function testFuzz_GetDelta_Int(int256 a, int256 b) external pure { - uint256 absA = getAbs(a); - uint256 absB = getAbs(b); - uint256 absDelta = absA > absB ? absA - absB : absB - absA; - - uint256 manualDelta; - if ((a >= 0 && b >= 0) || (a < 0 && b < 0)) { - manualDelta = absDelta; - } - // (a < 0 && b >= 0) || (a >= 0 && b < 0) - else { - manualDelta = absA + absB; - } - - uint256 delta = stdMath.delta(a, b); - - assertEq(delta, manualDelta); - } - - function test_GetPercentDelta_Uint() external { - StdMathMock stdMathMock = new StdMathMock(); - - assertEq(stdMath.percentDelta(uint256(0), uint256(1337)), 1e18); - assertEq(stdMath.percentDelta(uint256(0), type(uint64).max), 1e18); - assertEq(stdMath.percentDelta(uint256(0), type(uint128).max), 1e18); - assertEq(stdMath.percentDelta(uint256(0), type(uint192).max), 1e18); - - assertEq(stdMath.percentDelta(1337, uint256(1337)), 0); - assertEq(stdMath.percentDelta(type(uint192).max, type(uint192).max), 0); - assertEq(stdMath.percentDelta(0, uint256(2500)), 1e18); - assertEq(stdMath.percentDelta(2500, uint256(2500)), 0); - assertEq(stdMath.percentDelta(5000, uint256(2500)), 1e18); - assertEq(stdMath.percentDelta(7500, uint256(2500)), 2e18); - - vm.expectRevert(stdError.divisionError); - stdMathMock.exposed_percentDelta(uint256(1), 0); - } - - function testFuzz_GetPercentDelta_Uint(uint192 a, uint192 b) external pure { - vm.assume(b != 0); - uint256 manualDelta; - if (a > b) { - manualDelta = a - b; - } else { - manualDelta = b - a; - } - - uint256 manualPercentDelta = manualDelta * 1e18 / b; - uint256 percentDelta = stdMath.percentDelta(a, b); - - assertEq(percentDelta, manualPercentDelta); - } - - function test_GetPercentDelta_Int() external { - // We deploy a mock version so we can properly test the revert. - StdMathMock stdMathMock = new StdMathMock(); - - assertEq(stdMath.percentDelta(int256(0), int256(1337)), 1e18); - assertEq(stdMath.percentDelta(int256(0), -1337), 1e18); - assertEq(stdMath.percentDelta(int256(0), type(int64).min), 1e18); - assertEq(stdMath.percentDelta(int256(0), type(int128).min), 1e18); - assertEq(stdMath.percentDelta(int256(0), type(int192).min), 1e18); - assertEq(stdMath.percentDelta(int256(0), type(int64).max), 1e18); - assertEq(stdMath.percentDelta(int256(0), type(int128).max), 1e18); - assertEq(stdMath.percentDelta(int256(0), type(int192).max), 1e18); - - assertEq(stdMath.percentDelta(1337, int256(1337)), 0); - assertEq(stdMath.percentDelta(type(int192).max, type(int192).max), 0); - assertEq(stdMath.percentDelta(type(int192).min, type(int192).min), 0); - - assertEq(stdMath.percentDelta(type(int192).min, type(int192).max), 2e18); // rounds the 1 wei diff down - assertEq(stdMath.percentDelta(type(int192).max, type(int192).min), 2e18 - 1); // rounds the 1 wei diff down - assertEq(stdMath.percentDelta(0, int256(2500)), 1e18); - assertEq(stdMath.percentDelta(2500, int256(2500)), 0); - assertEq(stdMath.percentDelta(5000, int256(2500)), 1e18); - assertEq(stdMath.percentDelta(7500, int256(2500)), 2e18); - - vm.expectRevert(stdError.divisionError); - stdMathMock.exposed_percentDelta(int256(1), 0); - } - - function testFuzz_GetPercentDelta_Int(int192 a, int192 b) external pure { - vm.assume(b != 0); - uint256 absA = getAbs(a); - uint256 absB = getAbs(b); - uint256 absDelta = absA > absB ? absA - absB : absB - absA; - - uint256 manualDelta; - if ((a >= 0 && b >= 0) || (a < 0 && b < 0)) { - manualDelta = absDelta; - } - // (a < 0 && b >= 0) || (a >= 0 && b < 0) - else { - manualDelta = absA + absB; - } - - uint256 manualPercentDelta = manualDelta * 1e18 / absB; - uint256 percentDelta = stdMath.percentDelta(a, b); - - assertEq(percentDelta, manualPercentDelta); - } - - /*////////////////////////////////////////////////////////////////////////// - HELPERS - //////////////////////////////////////////////////////////////////////////*/ - - function getAbs(int256 a) private pure returns (uint256) { - if (a < 0) { - return a == type(int256).min ? uint256(type(int256).max) + 1 : uint256(-a); - } - - return uint256(a); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdStorage.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdStorage.t.sol deleted file mode 100644 index 89984bca..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdStorage.t.sol +++ /dev/null @@ -1,471 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/StdStorage.sol"; -import "../src/Test.sol"; - -contract StdStorageTest is Test { - using stdStorage for StdStorage; - - StorageTest internal test; - - function setUp() public { - test = new StorageTest(); - } - - function test_StorageHidden() public { - assertEq(uint256(keccak256("my.random.var")), stdstore.target(address(test)).sig("hidden()").find()); - } - - function test_StorageObvious() public { - assertEq(uint256(0), stdstore.target(address(test)).sig("exists()").find()); - } - - function test_StorageExtraSload() public { - assertEq(16, stdstore.target(address(test)).sig(test.extra_sload.selector).find()); - } - - function test_StorageCheckedWriteHidden() public { - stdstore.target(address(test)).sig(test.hidden.selector).checked_write(100); - assertEq(uint256(test.hidden()), 100); - } - - function test_StorageCheckedWriteObvious() public { - stdstore.target(address(test)).sig(test.exists.selector).checked_write(100); - assertEq(test.exists(), 100); - } - - function test_StorageCheckedWriteSignedIntegerHidden() public { - stdstore.target(address(test)).sig(test.hidden.selector).checked_write_int(-100); - assertEq(int256(uint256(test.hidden())), -100); - } - - function test_StorageCheckedWriteSignedIntegerObvious() public { - stdstore.target(address(test)).sig(test.tG.selector).checked_write_int(-100); - assertEq(test.tG(), -100); - } - - function test_StorageMapStructA() public { - uint256 slot = - stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(0).find(); - assertEq(uint256(keccak256(abi.encode(address(this), 4))), slot); - } - - function test_StorageMapStructB() public { - uint256 slot = - stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(1).find(); - assertEq(uint256(keccak256(abi.encode(address(this), 4))) + 1, slot); - } - - function test_StorageDeepMap() public { - uint256 slot = stdstore.target(address(test)).sig(test.deep_map.selector).with_key(address(this)).with_key( - address(this) - ).find(); - assertEq(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(5)))))), slot); - } - - function test_StorageCheckedWriteDeepMap() public { - stdstore.target(address(test)).sig(test.deep_map.selector).with_key(address(this)).with_key(address(this)) - .checked_write(100); - assertEq(100, test.deep_map(address(this), address(this))); - } - - function test_StorageDeepMapStructA() public { - uint256 slot = stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)) - .with_key(address(this)).depth(0).find(); - assertEq( - bytes32(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(6)))))) + 0), - bytes32(slot) - ); - } - - function test_StorageDeepMapStructB() public { - uint256 slot = stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)) - .with_key(address(this)).depth(1).find(); - assertEq( - bytes32(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint256(6)))))) + 1), - bytes32(slot) - ); - } - - function test_StorageCheckedWriteDeepMapStructA() public { - stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)).with_key( - address(this) - ).depth(0).checked_write(100); - (uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this)); - assertEq(100, a); - assertEq(0, b); - } - - function test_StorageCheckedWriteDeepMapStructB() public { - stdstore.target(address(test)).sig(test.deep_map_struct.selector).with_key(address(this)).with_key( - address(this) - ).depth(1).checked_write(100); - (uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this)); - assertEq(0, a); - assertEq(100, b); - } - - function test_StorageCheckedWriteMapStructA() public { - stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(0).checked_write(100); - (uint256 a, uint256 b) = test.map_struct(address(this)); - assertEq(a, 100); - assertEq(b, 0); - } - - function test_StorageCheckedWriteMapStructB() public { - stdstore.target(address(test)).sig(test.map_struct.selector).with_key(address(this)).depth(1).checked_write(100); - (uint256 a, uint256 b) = test.map_struct(address(this)); - assertEq(a, 0); - assertEq(b, 100); - } - - function test_StorageStructA() public { - uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(0).find(); - assertEq(uint256(7), slot); - } - - function test_StorageStructB() public { - uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(1).find(); - assertEq(uint256(7) + 1, slot); - } - - function test_StorageCheckedWriteStructA() public { - stdstore.target(address(test)).sig(test.basic.selector).depth(0).checked_write(100); - (uint256 a, uint256 b) = test.basic(); - assertEq(a, 100); - assertEq(b, 1337); - } - - function test_StorageCheckedWriteStructB() public { - stdstore.target(address(test)).sig(test.basic.selector).depth(1).checked_write(100); - (uint256 a, uint256 b) = test.basic(); - assertEq(a, 1337); - assertEq(b, 100); - } - - function test_StorageMapAddrFound() public { - uint256 slot = stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).find(); - assertEq(uint256(keccak256(abi.encode(address(this), uint256(1)))), slot); - } - - function test_StorageMapAddrRoot() public { - (uint256 slot, bytes32 key) = - stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).parent(); - assertEq(address(uint160(uint256(key))), address(this)); - assertEq(uint256(1), slot); - slot = stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).root(); - assertEq(uint256(1), slot); - } - - function test_StorageMapUintFound() public { - uint256 slot = stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).find(); - assertEq(uint256(keccak256(abi.encode(100, uint256(2)))), slot); - } - - function test_StorageCheckedWriteMapUint() public { - stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).checked_write(100); - assertEq(100, test.map_uint(100)); - } - - function test_StorageCheckedWriteMapAddr() public { - stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).checked_write(100); - assertEq(100, test.map_addr(address(this))); - } - - function test_StorageCheckedWriteMapBool() public { - stdstore.target(address(test)).sig(test.map_bool.selector).with_key(address(this)).checked_write(true); - assertTrue(test.map_bool(address(this))); - } - - function testFuzz_StorageCheckedWriteMapPacked(address addr, uint128 value) public { - stdstore.enable_packed_slots().target(address(test)).sig(test.read_struct_lower.selector).with_key(addr) - .checked_write(value); - assertEq(test.read_struct_lower(addr), value); - - stdstore.enable_packed_slots().target(address(test)).sig(test.read_struct_upper.selector).with_key(addr) - .checked_write(value); - assertEq(test.read_struct_upper(addr), value); - } - - function test_StorageCheckedWriteMapPackedFullSuccess() public { - uint256 full = test.map_packed(address(1337)); - // keep upper 128, set lower 128 to 1337 - full = (full & (uint256((1 << 128) - 1) << 128)) | 1337; - stdstore.target(address(test)).sig(test.map_packed.selector).with_key(address(uint160(1337))).checked_write( - full - ); - assertEq(1337, test.read_struct_lower(address(1337))); - } - - function testFail_StorageConst() public { - // vm.expectRevert(abi.encodeWithSignature("NotStorage(bytes4)", bytes4(keccak256("const()")))); - stdstore.target(address(test)).sig("const()").find(); - } - - function testFuzz_StorageNativePack(uint248 val1, uint248 val2, bool boolVal1, bool boolVal2) public { - stdstore.enable_packed_slots().target(address(test)).sig(test.tA.selector).checked_write(val1); - stdstore.enable_packed_slots().target(address(test)).sig(test.tB.selector).checked_write(boolVal1); - stdstore.enable_packed_slots().target(address(test)).sig(test.tC.selector).checked_write(boolVal2); - stdstore.enable_packed_slots().target(address(test)).sig(test.tD.selector).checked_write(val2); - - assertEq(test.tA(), val1); - assertEq(test.tB(), boolVal1); - assertEq(test.tC(), boolVal2); - assertEq(test.tD(), val2); - } - - function test_StorageReadBytes32() public { - bytes32 val = stdstore.target(address(test)).sig(test.tE.selector).read_bytes32(); - assertEq(val, hex"1337"); - } - - function test_StorageReadBool_False() public { - bool val = stdstore.target(address(test)).sig(test.tB.selector).read_bool(); - assertEq(val, false); - } - - function test_StorageReadBool_True() public { - bool val = stdstore.target(address(test)).sig(test.tH.selector).read_bool(); - assertEq(val, true); - } - - function test_StorageReadBool_Revert() public { - vm.expectRevert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool."); - this.readNonBoolValue(); - } - - function readNonBoolValue() public { - stdstore.target(address(test)).sig(test.tE.selector).read_bool(); - } - - function test_StorageReadAddress() public { - address val = stdstore.target(address(test)).sig(test.tF.selector).read_address(); - assertEq(val, address(1337)); - } - - function test_StorageReadUint() public { - uint256 val = stdstore.target(address(test)).sig(test.exists.selector).read_uint(); - assertEq(val, 1); - } - - function test_StorageReadInt() public { - int256 val = stdstore.target(address(test)).sig(test.tG.selector).read_int(); - assertEq(val, type(int256).min); - } - - function testFuzzPacked(uint256 val, uint8 elemToGet) public { - // This function tries an assortment of packed slots, shifts meaning number of elements - // that are packed. Shiftsizes are the size of each element, i.e. 8 means a data type that is 8 bits, 16 == 16 bits, etc. - // Combined, these determine how a slot is packed. Making it random is too hard to avoid global rejection limit - // and make it performant. - - // change the number of shifts - for (uint256 i = 1; i < 5; i++) { - uint256 shifts = i; - - elemToGet = uint8(bound(elemToGet, 0, shifts - 1)); - - uint256[] memory shiftSizes = new uint256[](shifts); - for (uint256 j; j < shifts; j++) { - shiftSizes[j] = 8 * (j + 1); - } - - test.setRandomPacking(val); - - uint256 leftBits; - uint256 rightBits; - for (uint256 j; j < shiftSizes.length; j++) { - if (j < elemToGet) { - leftBits += shiftSizes[j]; - } else if (elemToGet != j) { - rightBits += shiftSizes[j]; - } - } - - // we may have some right bits unaccounted for - leftBits += 256 - (leftBits + shiftSizes[elemToGet] + rightBits); - // clear left bits, then clear right bits and realign - uint256 expectedValToRead = (val << leftBits) >> (leftBits + rightBits); - - uint256 readVal = stdstore.target(address(test)).enable_packed_slots().sig( - "getRandomPacked(uint8,uint8[],uint8)" - ).with_calldata(abi.encode(shifts, shiftSizes, elemToGet)).read_uint(); - - assertEq(readVal, expectedValToRead); - } - } - - function testFuzzPacked2(uint256 nvars, uint256 seed) public { - // Number of random variables to generate. - nvars = bound(nvars, 1, 20); - - // This will decrease as we generate values in the below loop. - uint256 bitsRemaining = 256; - - // Generate a random value and size for each variable. - uint256[] memory vals = new uint256[](nvars); - uint256[] memory sizes = new uint256[](nvars); - uint256[] memory offsets = new uint256[](nvars); - - for (uint256 i = 0; i < nvars; i++) { - // Generate a random value and size. - offsets[i] = i == 0 ? 0 : offsets[i - 1] + sizes[i - 1]; - - uint256 nvarsRemaining = nvars - i; - uint256 maxVarSize = bitsRemaining - nvarsRemaining + 1; - sizes[i] = bound(uint256(keccak256(abi.encodePacked(seed, i + 256))), 1, maxVarSize); - bitsRemaining -= sizes[i]; - - uint256 maxVal; - uint256 varSize = sizes[i]; - assembly { - // mask = (1 << varSize) - 1 - maxVal := sub(shl(varSize, 1), 1) - } - vals[i] = bound(uint256(keccak256(abi.encodePacked(seed, i))), 0, maxVal); - } - - // Pack all values into the slot. - for (uint256 i = 0; i < nvars; i++) { - stdstore.enable_packed_slots().target(address(test)).sig("getRandomPacked(uint256,uint256)").with_key( - sizes[i] - ).with_key(offsets[i]).checked_write(vals[i]); - } - - // Verify the read data matches. - for (uint256 i = 0; i < nvars; i++) { - uint256 readVal = stdstore.enable_packed_slots().target(address(test)).sig( - "getRandomPacked(uint256,uint256)" - ).with_key(sizes[i]).with_key(offsets[i]).read_uint(); - - uint256 retVal = test.getRandomPacked(sizes[i], offsets[i]); - - assertEq(readVal, vals[i]); - assertEq(retVal, vals[i]); - } - } - - function testEdgeCaseArray() public { - stdstore.target(address(test)).sig("edgeCaseArray(uint256)").with_key(uint256(0)).checked_write(1); - assertEq(test.edgeCaseArray(0), 1); - } -} - -contract StorageTest { - uint256 public exists = 1; - mapping(address => uint256) public map_addr; - mapping(uint256 => uint256) public map_uint; - mapping(address => uint256) public map_packed; - mapping(address => UnpackedStruct) public map_struct; - mapping(address => mapping(address => uint256)) public deep_map; - mapping(address => mapping(address => UnpackedStruct)) public deep_map_struct; - UnpackedStruct public basic; - - uint248 public tA; - bool public tB; - - bool public tC = false; - uint248 public tD = 1; - - struct UnpackedStruct { - uint256 a; - uint256 b; - } - - mapping(address => bool) public map_bool; - - bytes32 public tE = hex"1337"; - address public tF = address(1337); - int256 public tG = type(int256).min; - bool public tH = true; - bytes32 private tI = ~bytes32(hex"1337"); - - uint256 randomPacking; - - // Array with length matching values of elements. - uint256[] public edgeCaseArray = [3, 3, 3]; - - constructor() { - basic = UnpackedStruct({a: 1337, b: 1337}); - - uint256 two = (1 << 128) | 1; - map_packed[msg.sender] = two; - map_packed[address(uint160(1337))] = 1 << 128; - } - - function read_struct_upper(address who) public view returns (uint256) { - return map_packed[who] >> 128; - } - - function read_struct_lower(address who) public view returns (uint256) { - return map_packed[who] & ((1 << 128) - 1); - } - - function hidden() public view returns (bytes32 t) { - bytes32 slot = keccak256("my.random.var"); - /// @solidity memory-safe-assembly - assembly { - t := sload(slot) - } - } - - function const() public pure returns (bytes32 t) { - t = bytes32(hex"1337"); - } - - function extra_sload() public view returns (bytes32 t) { - // trigger read on slot `tE`, and make a staticcall to make sure compiler doesn't optimize this SLOAD away - assembly { - pop(staticcall(gas(), sload(tE.slot), 0, 0, 0, 0)) - } - t = tI; - } - - function setRandomPacking(uint256 val) public { - randomPacking = val; - } - - function _getMask(uint256 size) internal pure returns (uint256 mask) { - assembly { - // mask = (1 << size) - 1 - mask := sub(shl(size, 1), 1) - } - } - - function setRandomPacking(uint256 val, uint256 size, uint256 offset) public { - // Generate mask based on the size of the value - uint256 mask = _getMask(size); - // Zero out all bits for the word we're about to set - uint256 cleanedWord = randomPacking & ~(mask << offset); - // Place val in the correct spot of the cleaned word - randomPacking = cleanedWord | val << offset; - } - - function getRandomPacked(uint256 size, uint256 offset) public view returns (uint256) { - // Generate mask based on the size of the value - uint256 mask = _getMask(size); - // Shift to place the bits in the correct position, and use mask to zero out remaining bits - return (randomPacking >> offset) & mask; - } - - function getRandomPacked(uint8 shifts, uint8[] memory shiftSizes, uint8 elem) public view returns (uint256) { - require(elem < shifts, "!elem"); - uint256 leftBits; - uint256 rightBits; - - for (uint256 i; i < shiftSizes.length; i++) { - if (i < elem) { - leftBits += shiftSizes[i]; - } else if (elem != i) { - rightBits += shiftSizes[i]; - } - } - - // we may have some right bits unaccounted for - leftBits += 256 - (leftBits + shiftSizes[elem] + rightBits); - - // clear left bits, then clear right bits and realign - return (randomPacking << leftBits) >> (leftBits + rightBits); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdStyle.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdStyle.t.sol deleted file mode 100644 index e12c005f..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdStyle.t.sol +++ /dev/null @@ -1,110 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/Test.sol"; - -contract StdStyleTest is Test { - function test_StyleColor() public pure { - console2.log(StdStyle.red("StdStyle.red String Test")); - console2.log(StdStyle.red(uint256(10e18))); - console2.log(StdStyle.red(int256(-10e18))); - console2.log(StdStyle.red(true)); - console2.log(StdStyle.red(address(0))); - console2.log(StdStyle.redBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.redBytes32("StdStyle.redBytes32")); - console2.log(StdStyle.green("StdStyle.green String Test")); - console2.log(StdStyle.green(uint256(10e18))); - console2.log(StdStyle.green(int256(-10e18))); - console2.log(StdStyle.green(true)); - console2.log(StdStyle.green(address(0))); - console2.log(StdStyle.greenBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.greenBytes32("StdStyle.greenBytes32")); - console2.log(StdStyle.yellow("StdStyle.yellow String Test")); - console2.log(StdStyle.yellow(uint256(10e18))); - console2.log(StdStyle.yellow(int256(-10e18))); - console2.log(StdStyle.yellow(true)); - console2.log(StdStyle.yellow(address(0))); - console2.log(StdStyle.yellowBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.yellowBytes32("StdStyle.yellowBytes32")); - console2.log(StdStyle.blue("StdStyle.blue String Test")); - console2.log(StdStyle.blue(uint256(10e18))); - console2.log(StdStyle.blue(int256(-10e18))); - console2.log(StdStyle.blue(true)); - console2.log(StdStyle.blue(address(0))); - console2.log(StdStyle.blueBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.blueBytes32("StdStyle.blueBytes32")); - console2.log(StdStyle.magenta("StdStyle.magenta String Test")); - console2.log(StdStyle.magenta(uint256(10e18))); - console2.log(StdStyle.magenta(int256(-10e18))); - console2.log(StdStyle.magenta(true)); - console2.log(StdStyle.magenta(address(0))); - console2.log(StdStyle.magentaBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.magentaBytes32("StdStyle.magentaBytes32")); - console2.log(StdStyle.cyan("StdStyle.cyan String Test")); - console2.log(StdStyle.cyan(uint256(10e18))); - console2.log(StdStyle.cyan(int256(-10e18))); - console2.log(StdStyle.cyan(true)); - console2.log(StdStyle.cyan(address(0))); - console2.log(StdStyle.cyanBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.cyanBytes32("StdStyle.cyanBytes32")); - } - - function test_StyleFontWeight() public pure { - console2.log(StdStyle.bold("StdStyle.bold String Test")); - console2.log(StdStyle.bold(uint256(10e18))); - console2.log(StdStyle.bold(int256(-10e18))); - console2.log(StdStyle.bold(address(0))); - console2.log(StdStyle.bold(true)); - console2.log(StdStyle.boldBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.boldBytes32("StdStyle.boldBytes32")); - console2.log(StdStyle.dim("StdStyle.dim String Test")); - console2.log(StdStyle.dim(uint256(10e18))); - console2.log(StdStyle.dim(int256(-10e18))); - console2.log(StdStyle.dim(address(0))); - console2.log(StdStyle.dim(true)); - console2.log(StdStyle.dimBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.dimBytes32("StdStyle.dimBytes32")); - console2.log(StdStyle.italic("StdStyle.italic String Test")); - console2.log(StdStyle.italic(uint256(10e18))); - console2.log(StdStyle.italic(int256(-10e18))); - console2.log(StdStyle.italic(address(0))); - console2.log(StdStyle.italic(true)); - console2.log(StdStyle.italicBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.italicBytes32("StdStyle.italicBytes32")); - console2.log(StdStyle.underline("StdStyle.underline String Test")); - console2.log(StdStyle.underline(uint256(10e18))); - console2.log(StdStyle.underline(int256(-10e18))); - console2.log(StdStyle.underline(address(0))); - console2.log(StdStyle.underline(true)); - console2.log(StdStyle.underlineBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.underlineBytes32("StdStyle.underlineBytes32")); - console2.log(StdStyle.inverse("StdStyle.inverse String Test")); - console2.log(StdStyle.inverse(uint256(10e18))); - console2.log(StdStyle.inverse(int256(-10e18))); - console2.log(StdStyle.inverse(address(0))); - console2.log(StdStyle.inverse(true)); - console2.log(StdStyle.inverseBytes(hex"7109709ECfa91a80626fF3989D68f67F5b1DD12D")); - console2.log(StdStyle.inverseBytes32("StdStyle.inverseBytes32")); - } - - function test_StyleCombined() public pure { - console2.log(StdStyle.red(StdStyle.bold("Red Bold String Test"))); - console2.log(StdStyle.green(StdStyle.dim(uint256(10e18)))); - console2.log(StdStyle.yellow(StdStyle.italic(int256(-10e18)))); - console2.log(StdStyle.blue(StdStyle.underline(address(0)))); - console2.log(StdStyle.magenta(StdStyle.inverse(true))); - } - - function test_StyleCustom() public pure { - console2.log(h1("Custom Style 1")); - console2.log(h2("Custom Style 2")); - } - - function h1(string memory a) private pure returns (string memory) { - return StdStyle.cyan(StdStyle.inverse(StdStyle.bold(a))); - } - - function h2(string memory a) private pure returns (string memory) { - return StdStyle.magenta(StdStyle.bold(StdStyle.underline(a))); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdToml.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdToml.t.sol deleted file mode 100644 index 631b1b53..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdToml.t.sol +++ /dev/null @@ -1,49 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/Test.sol"; - -contract StdTomlTest is Test { - using stdToml for string; - - string root; - string path; - - function setUp() public { - root = vm.projectRoot(); - path = string.concat(root, "/test/fixtures/test.toml"); - } - - struct SimpleToml { - uint256 a; - string b; - } - - struct NestedToml { - uint256 a; - string b; - SimpleToml c; - } - - function test_readToml() public view { - string memory json = vm.readFile(path); - assertEq(json.readUint(".a"), 123); - } - - function test_writeToml() public { - string memory json = "json"; - json.serialize("a", uint256(123)); - string memory semiFinal = json.serialize("b", string("test")); - string memory finalJson = json.serialize("c", semiFinal); - finalJson.write(path); - - string memory toml = vm.readFile(path); - bytes memory data = toml.parseRaw("$"); - NestedToml memory decodedData = abi.decode(data, (NestedToml)); - - assertEq(decodedData.a, 123); - assertEq(decodedData.b, "test"); - assertEq(decodedData.c.a, 123); - assertEq(decodedData.c.b, "test"); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/StdUtils.t.sol b/examples/thorchain/contracts/lib/forge-std/test/StdUtils.t.sol deleted file mode 100644 index 4994c6cb..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/StdUtils.t.sol +++ /dev/null @@ -1,342 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import "../src/Test.sol"; - -contract StdUtilsMock is StdUtils { - // We deploy a mock version so we can properly test expected reverts. - function exposed_getTokenBalances(address token, address[] memory addresses) - external - returns (uint256[] memory balances) - { - return getTokenBalances(token, addresses); - } - - function exposed_bound(int256 num, int256 min, int256 max) external pure returns (int256) { - return bound(num, min, max); - } - - function exposed_bound(uint256 num, uint256 min, uint256 max) external pure returns (uint256) { - return bound(num, min, max); - } - - function exposed_bytesToUint(bytes memory b) external pure returns (uint256) { - return bytesToUint(b); - } -} - -contract StdUtilsTest is Test { - /*////////////////////////////////////////////////////////////////////////// - BOUND UINT - //////////////////////////////////////////////////////////////////////////*/ - - function test_Bound() public pure { - assertEq(bound(uint256(5), 0, 4), 0); - assertEq(bound(uint256(0), 69, 69), 69); - assertEq(bound(uint256(0), 68, 69), 68); - assertEq(bound(uint256(10), 150, 190), 174); - assertEq(bound(uint256(300), 2800, 3200), 3107); - assertEq(bound(uint256(9999), 1337, 6666), 4669); - } - - function test_Bound_WithinRange() public pure { - assertEq(bound(uint256(51), 50, 150), 51); - assertEq(bound(uint256(51), 50, 150), bound(bound(uint256(51), 50, 150), 50, 150)); - assertEq(bound(uint256(149), 50, 150), 149); - assertEq(bound(uint256(149), 50, 150), bound(bound(uint256(149), 50, 150), 50, 150)); - } - - function test_Bound_EdgeCoverage() public pure { - assertEq(bound(uint256(0), 50, 150), 50); - assertEq(bound(uint256(1), 50, 150), 51); - assertEq(bound(uint256(2), 50, 150), 52); - assertEq(bound(uint256(3), 50, 150), 53); - assertEq(bound(type(uint256).max, 50, 150), 150); - assertEq(bound(type(uint256).max - 1, 50, 150), 149); - assertEq(bound(type(uint256).max - 2, 50, 150), 148); - assertEq(bound(type(uint256).max - 3, 50, 150), 147); - } - - function test_Bound_DistributionIsEven(uint256 min, uint256 size) public pure { - size = size % 100 + 1; - min = bound(min, UINT256_MAX / 2, UINT256_MAX / 2 + size); - uint256 max = min + size - 1; - uint256 result; - - for (uint256 i = 1; i <= size * 4; ++i) { - // x > max - result = bound(max + i, min, max); - assertEq(result, min + (i - 1) % size); - // x < min - result = bound(min - i, min, max); - assertEq(result, max - (i - 1) % size); - } - } - - function test_Bound(uint256 num, uint256 min, uint256 max) public pure { - if (min > max) (min, max) = (max, min); - - uint256 result = bound(num, min, max); - - assertGe(result, min); - assertLe(result, max); - assertEq(result, bound(result, min, max)); - if (num >= min && num <= max) assertEq(result, num); - } - - function test_BoundUint256Max() public pure { - assertEq(bound(0, type(uint256).max - 1, type(uint256).max), type(uint256).max - 1); - assertEq(bound(1, type(uint256).max - 1, type(uint256).max), type(uint256).max); - } - - function test_CannotBoundMaxLessThanMin() public { - // We deploy a mock version so we can properly test the revert. - StdUtilsMock stdUtils = new StdUtilsMock(); - - vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min.")); - stdUtils.exposed_bound(uint256(5), 100, 10); - } - - function test_CannotBoundMaxLessThanMin(uint256 num, uint256 min, uint256 max) public { - // We deploy a mock version so we can properly test the revert. - StdUtilsMock stdUtils = new StdUtilsMock(); - - vm.assume(min > max); - vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min.")); - stdUtils.exposed_bound(num, min, max); - } - - /*////////////////////////////////////////////////////////////////////////// - BOUND INT - //////////////////////////////////////////////////////////////////////////*/ - - function test_BoundInt() public pure { - assertEq(bound(-3, 0, 4), 2); - assertEq(bound(0, -69, -69), -69); - assertEq(bound(0, -69, -68), -68); - assertEq(bound(-10, 150, 190), 154); - assertEq(bound(-300, 2800, 3200), 2908); - assertEq(bound(9999, -1337, 6666), 1995); - } - - function test_BoundInt_WithinRange() public pure { - assertEq(bound(51, -50, 150), 51); - assertEq(bound(51, -50, 150), bound(bound(51, -50, 150), -50, 150)); - assertEq(bound(149, -50, 150), 149); - assertEq(bound(149, -50, 150), bound(bound(149, -50, 150), -50, 150)); - } - - function test_BoundInt_EdgeCoverage() public pure { - assertEq(bound(type(int256).min, -50, 150), -50); - assertEq(bound(type(int256).min + 1, -50, 150), -49); - assertEq(bound(type(int256).min + 2, -50, 150), -48); - assertEq(bound(type(int256).min + 3, -50, 150), -47); - assertEq(bound(type(int256).min, 10, 150), 10); - assertEq(bound(type(int256).min + 1, 10, 150), 11); - assertEq(bound(type(int256).min + 2, 10, 150), 12); - assertEq(bound(type(int256).min + 3, 10, 150), 13); - - assertEq(bound(type(int256).max, -50, 150), 150); - assertEq(bound(type(int256).max - 1, -50, 150), 149); - assertEq(bound(type(int256).max - 2, -50, 150), 148); - assertEq(bound(type(int256).max - 3, -50, 150), 147); - assertEq(bound(type(int256).max, -50, -10), -10); - assertEq(bound(type(int256).max - 1, -50, -10), -11); - assertEq(bound(type(int256).max - 2, -50, -10), -12); - assertEq(bound(type(int256).max - 3, -50, -10), -13); - } - - function test_BoundInt_DistributionIsEven(int256 min, uint256 size) public pure { - size = size % 100 + 1; - min = bound(min, -int256(size / 2), int256(size - size / 2)); - int256 max = min + int256(size) - 1; - int256 result; - - for (uint256 i = 1; i <= size * 4; ++i) { - // x > max - result = bound(max + int256(i), min, max); - assertEq(result, min + int256((i - 1) % size)); - // x < min - result = bound(min - int256(i), min, max); - assertEq(result, max - int256((i - 1) % size)); - } - } - - function test_BoundInt(int256 num, int256 min, int256 max) public pure { - if (min > max) (min, max) = (max, min); - - int256 result = bound(num, min, max); - - assertGe(result, min); - assertLe(result, max); - assertEq(result, bound(result, min, max)); - if (num >= min && num <= max) assertEq(result, num); - } - - function test_BoundIntInt256Max() public pure { - assertEq(bound(0, type(int256).max - 1, type(int256).max), type(int256).max - 1); - assertEq(bound(1, type(int256).max - 1, type(int256).max), type(int256).max); - } - - function test_BoundIntInt256Min() public pure { - assertEq(bound(0, type(int256).min, type(int256).min + 1), type(int256).min); - assertEq(bound(1, type(int256).min, type(int256).min + 1), type(int256).min + 1); - } - - function test_CannotBoundIntMaxLessThanMin() public { - // We deploy a mock version so we can properly test the revert. - StdUtilsMock stdUtils = new StdUtilsMock(); - - vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min.")); - stdUtils.exposed_bound(-5, 100, 10); - } - - function test_CannotBoundIntMaxLessThanMin(int256 num, int256 min, int256 max) public { - // We deploy a mock version so we can properly test the revert. - StdUtilsMock stdUtils = new StdUtilsMock(); - - vm.assume(min > max); - vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min.")); - stdUtils.exposed_bound(num, min, max); - } - - /*////////////////////////////////////////////////////////////////////////// - BOUND PRIVATE KEY - //////////////////////////////////////////////////////////////////////////*/ - - function test_BoundPrivateKey() public pure { - assertEq(boundPrivateKey(0), 1); - assertEq(boundPrivateKey(1), 1); - assertEq(boundPrivateKey(300), 300); - assertEq(boundPrivateKey(9999), 9999); - assertEq(boundPrivateKey(SECP256K1_ORDER - 1), SECP256K1_ORDER - 1); - assertEq(boundPrivateKey(SECP256K1_ORDER), 1); - assertEq(boundPrivateKey(SECP256K1_ORDER + 1), 2); - assertEq(boundPrivateKey(UINT256_MAX), UINT256_MAX & SECP256K1_ORDER - 1); // x&y is equivalent to x-x%y - } - - /*////////////////////////////////////////////////////////////////////////// - BYTES TO UINT - //////////////////////////////////////////////////////////////////////////*/ - - function test_BytesToUint() external pure { - bytes memory maxUint = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; - bytes memory two = hex"02"; - bytes memory millionEther = hex"d3c21bcecceda1000000"; - - assertEq(bytesToUint(maxUint), type(uint256).max); - assertEq(bytesToUint(two), 2); - assertEq(bytesToUint(millionEther), 1_000_000 ether); - } - - function test_CannotConvertGT32Bytes() external { - // We deploy a mock version so we can properly test the revert. - StdUtilsMock stdUtils = new StdUtilsMock(); - - bytes memory thirty3Bytes = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; - vm.expectRevert("StdUtils bytesToUint(bytes): Bytes length exceeds 32."); - stdUtils.exposed_bytesToUint(thirty3Bytes); - } - - /*////////////////////////////////////////////////////////////////////////// - COMPUTE CREATE ADDRESS - //////////////////////////////////////////////////////////////////////////*/ - - function test_ComputeCreateAddress() external pure { - address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9; - uint256 nonce = 14; - address createAddress = computeCreateAddress(deployer, nonce); - assertEq(createAddress, 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45); - } - - /*////////////////////////////////////////////////////////////////////////// - COMPUTE CREATE2 ADDRESS - //////////////////////////////////////////////////////////////////////////*/ - - function test_ComputeCreate2Address() external pure { - bytes32 salt = bytes32(uint256(31415)); - bytes32 initcodeHash = keccak256(abi.encode(0x6080)); - address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9; - address create2Address = computeCreate2Address(salt, initcodeHash, deployer); - assertEq(create2Address, 0xB147a5d25748fda14b463EB04B111027C290f4d3); - } - - function test_ComputeCreate2AddressWithDefaultDeployer() external pure { - bytes32 salt = 0xc290c670fde54e5ef686f9132cbc8711e76a98f0333a438a92daa442c71403c0; - bytes32 initcodeHash = hashInitCode(hex"6080", ""); - assertEq(initcodeHash, 0x1a578b7a4b0b5755db6d121b4118d4bc68fe170dca840c59bc922f14175a76b0); - address create2Address = computeCreate2Address(salt, initcodeHash); - assertEq(create2Address, 0xc0ffEe2198a06235aAbFffe5Db0CacF1717f5Ac6); - } -} - -contract StdUtilsForkTest is Test { - /*////////////////////////////////////////////////////////////////////////// - GET TOKEN BALANCES - //////////////////////////////////////////////////////////////////////////*/ - - address internal SHIB = 0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE; - address internal SHIB_HOLDER_0 = 0x855F5981e831D83e6A4b4EBFCAdAa68D92333170; - address internal SHIB_HOLDER_1 = 0x8F509A90c2e47779cA408Fe00d7A72e359229AdA; - address internal SHIB_HOLDER_2 = 0x0e3bbc0D04fF62211F71f3e4C45d82ad76224385; - - address internal USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; - address internal USDC_HOLDER_0 = 0xDa9CE944a37d218c3302F6B82a094844C6ECEb17; - address internal USDC_HOLDER_1 = 0x3e67F4721E6d1c41a015f645eFa37BEd854fcf52; - - function setUp() public { - // All tests of the `getTokenBalances` method are fork tests using live contracts. - vm.createSelectFork({urlOrAlias: "mainnet", blockNumber: 16_428_900}); - } - - function test_CannotGetTokenBalances_NonTokenContract() external { - // We deploy a mock version so we can properly test the revert. - StdUtilsMock stdUtils = new StdUtilsMock(); - - // The UniswapV2Factory contract has neither a `balanceOf` function nor a fallback function, - // so the `balanceOf` call should revert. - address token = address(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f); - address[] memory addresses = new address[](1); - addresses[0] = USDC_HOLDER_0; - - vm.expectRevert("Multicall3: call failed"); - stdUtils.exposed_getTokenBalances(token, addresses); - } - - function test_CannotGetTokenBalances_EOA() external { - // We deploy a mock version so we can properly test the revert. - StdUtilsMock stdUtils = new StdUtilsMock(); - - address eoa = vm.addr({privateKey: 1}); - address[] memory addresses = new address[](1); - addresses[0] = USDC_HOLDER_0; - vm.expectRevert("StdUtils getTokenBalances(address,address[]): Token address is not a contract."); - stdUtils.exposed_getTokenBalances(eoa, addresses); - } - - function test_GetTokenBalances_Empty() external { - address[] memory addresses = new address[](0); - uint256[] memory balances = getTokenBalances(USDC, addresses); - assertEq(balances.length, 0); - } - - function test_GetTokenBalances_USDC() external { - address[] memory addresses = new address[](2); - addresses[0] = USDC_HOLDER_0; - addresses[1] = USDC_HOLDER_1; - uint256[] memory balances = getTokenBalances(USDC, addresses); - assertEq(balances[0], 159_000_000_000_000); - assertEq(balances[1], 131_350_000_000_000); - } - - function test_GetTokenBalances_SHIB() external { - address[] memory addresses = new address[](3); - addresses[0] = SHIB_HOLDER_0; - addresses[1] = SHIB_HOLDER_1; - addresses[2] = SHIB_HOLDER_2; - uint256[] memory balances = getTokenBalances(SHIB, addresses); - assertEq(balances[0], 3_323_256_285_484.42e18); - assertEq(balances[1], 1_271_702_771_149.99999928e18); - assertEq(balances[2], 606_357_106_247e18); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/Vm.t.sol b/examples/thorchain/contracts/lib/forge-std/test/Vm.t.sol deleted file mode 100644 index 566865c6..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/Vm.t.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.8.0 <0.9.0; - -import {Test} from "../src/Test.sol"; -import {Vm, VmSafe} from "../src/Vm.sol"; - -contract VmTest is Test { - // This test ensures that functions are never accidentally removed from a Vm interface, or - // inadvertently moved between Vm and VmSafe. This test must be updated each time a function is - // added to or removed from Vm or VmSafe. - function test_interfaceId() public pure { - assertEq(type(VmSafe).interfaceId, bytes4(0x6b49caaf), "VmSafe"); - assertEq(type(Vm).interfaceId, bytes4(0x1316b43e), "Vm"); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScript.sol b/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScript.sol deleted file mode 100644 index e205cfff..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScript.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -import "../../src/Script.sol"; - -// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing -// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 -contract CompilationScript is Script {} diff --git a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol b/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol deleted file mode 100644 index ce8e0e95..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -import "../../src/Script.sol"; - -// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing -// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 -contract CompilationScriptBase is ScriptBase {} diff --git a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTest.sol b/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTest.sol deleted file mode 100644 index 9beeafeb..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTest.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -import "../../src/Test.sol"; - -// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing -// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 -contract CompilationTest is Test {} diff --git a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTestBase.sol b/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTestBase.sol deleted file mode 100644 index e993535b..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/compilation/CompilationTestBase.sol +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.2 <0.9.0; - -pragma experimental ABIEncoderV2; - -import "../../src/Test.sol"; - -// The purpose of this contract is to benchmark compilation time to avoid accidentally introducing -// a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 -contract CompilationTestBase is TestBase {} diff --git a/examples/thorchain/contracts/lib/forge-std/test/fixtures/broadcast.log.json b/examples/thorchain/contracts/lib/forge-std/test/fixtures/broadcast.log.json deleted file mode 100644 index 0a0200bc..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/fixtures/broadcast.log.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "transactions": [ - { - "hash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f", - "type": "CALL", - "contractName": "Test", - "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "function": "multiple_arguments(uint256,address,uint256[]):(uint256)", - "arguments": ["1", "0000000000000000000000000000000000001337", "[3,4]"], - "tx": { - "type": "0x02", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "gas": "0x73b9", - "value": "0x0", - "data": "0x23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004", - "nonce": "0x3", - "accessList": [] - } - }, - { - "hash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298", - "type": "CALL", - "contractName": "Test", - "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "function": "inc():(uint256)", - "arguments": [], - "tx": { - "type": "0x02", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "gas": "0xdcb2", - "value": "0x0", - "data": "0x371303c0", - "nonce": "0x4", - "accessList": [] - } - }, - { - "hash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c", - "type": "CALL", - "contractName": "Test", - "contractAddress": "0x7c6b4bbe207d642d98d5c537142d85209e585087", - "function": "t(uint256):(uint256)", - "arguments": ["1"], - "tx": { - "type": "0x02", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087", - "gas": "0x8599", - "value": "0x0", - "data": "0xafe29f710000000000000000000000000000000000000000000000000000000000000001", - "nonce": "0x5", - "accessList": [] - } - } - ], - "receipts": [ - { - "transactionHash": "0x481dc86e40bba90403c76f8e144aa9ff04c1da2164299d0298573835f0991181", - "transactionIndex": "0x0", - "blockHash": "0xef0730448490304e5403be0fa8f8ce64f118e9adcca60c07a2ae1ab921d748af", - "blockNumber": "0x1", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": null, - "cumulativeGasUsed": "0x13f3a", - "gasUsed": "0x13f3a", - "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "logs": [], - "status": "0x1", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "effectiveGasPrice": "0xee6b2800" - }, - { - "transactionHash": "0x6a187183545b8a9e7f1790e847139379bf5622baff2cb43acf3f5c79470af782", - "transactionIndex": "0x0", - "blockHash": "0xf3acb96a90071640c2a8c067ae4e16aad87e634ea8d8bbbb5b352fba86ba0148", - "blockNumber": "0x2", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": null, - "cumulativeGasUsed": "0x45d80", - "gasUsed": "0x45d80", - "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "logs": [], - "status": "0x1", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "effectiveGasPrice": "0xee6b2800" - }, - { - "transactionHash": "0x064ad173b4867bdef2fb60060bbdaf01735fbf10414541ea857772974e74ea9d", - "transactionIndex": "0x0", - "blockHash": "0x8373d02109d3ee06a0225f23da4c161c656ccc48fe0fcee931d325508ae73e58", - "blockNumber": "0x3", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c", - "cumulativeGasUsed": "0x45feb", - "gasUsed": "0x45feb", - "contractAddress": null, - "logs": [], - "status": "0x1", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "effectiveGasPrice": "0xee6b2800" - }, - { - "transactionHash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f", - "transactionIndex": "0x0", - "blockHash": "0x16712fae5c0e18f75045f84363fb6b4d9a9fe25e660c4ce286833a533c97f629", - "blockNumber": "0x4", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "cumulativeGasUsed": "0x5905", - "gasUsed": "0x5905", - "contractAddress": null, - "logs": [], - "status": "0x1", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "effectiveGasPrice": "0xee6b2800" - }, - { - "transactionHash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298", - "transactionIndex": "0x0", - "blockHash": "0x156b88c3eb9a1244ba00a1834f3f70de735b39e3e59006dd03af4fe7d5480c11", - "blockNumber": "0x5", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "cumulativeGasUsed": "0xa9c4", - "gasUsed": "0xa9c4", - "contractAddress": null, - "logs": [], - "status": "0x1", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "effectiveGasPrice": "0xee6b2800" - }, - { - "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c", - "transactionIndex": "0x0", - "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb", - "blockNumber": "0x6", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087", - "cumulativeGasUsed": "0x66c5", - "gasUsed": "0x66c5", - "contractAddress": null, - "logs": [ - { - "address": "0x7c6b4bbe207d642d98d5c537142d85209e585087", - "topics": [ - "0x0b2e13ff20ac7b474198655583edf70dedd2c1dc980e329c4fbb2fc0748b796b" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046865726500000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb", - "blockNumber": "0x6", - "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c", - "transactionIndex": "0x1", - "logIndex": "0x0", - "transactionLogIndex": "0x0", - "removed": false - } - ], - "status": "0x1", - "logsBloom": "0x00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100", - "effectiveGasPrice": "0xee6b2800" - }, - { - "transactionHash": "0x11fbb10230c168ca1e36a7e5c69a6dbcd04fd9e64ede39d10a83e36ee8065c16", - "transactionIndex": "0x0", - "blockHash": "0xf1e0ed2eda4e923626ec74621006ed50b3fc27580dc7b4cf68a07ca77420e29c", - "blockNumber": "0x7", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": "0x0000000000000000000000000000000000001337", - "cumulativeGasUsed": "0x5208", - "gasUsed": "0x5208", - "contractAddress": null, - "logs": [], - "status": "0x1", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "effectiveGasPrice": "0xee6b2800" - } - ], - "libraries": [ - "src/Broadcast.t.sol:F:0x5fbdb2315678afecb367f032d93f642f64180aa3" - ], - "pending": [], - "path": "broadcast/Broadcast.t.sol/31337/run-latest.json", - "returns": {}, - "timestamp": 1655140035 -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/fixtures/test.json b/examples/thorchain/contracts/lib/forge-std/test/fixtures/test.json deleted file mode 100644 index caebf6d9..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/fixtures/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "a": 123, - "b": "test", - "c": { - "a": 123, - "b": "test" - } -} \ No newline at end of file diff --git a/examples/thorchain/contracts/lib/forge-std/test/fixtures/test.toml b/examples/thorchain/contracts/lib/forge-std/test/fixtures/test.toml deleted file mode 100644 index 60692bc7..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/fixtures/test.toml +++ /dev/null @@ -1,6 +0,0 @@ -a = 123 -b = "test" - -[c] -a = 123 -b = "test" diff --git a/examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC20.t.sol b/examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC20.t.sol deleted file mode 100644 index e2468109..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC20.t.sol +++ /dev/null @@ -1,441 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import {MockERC20} from "../../src/mocks/MockERC20.sol"; -import {StdCheats} from "../../src/StdCheats.sol"; -import {Test} from "../../src/Test.sol"; - -contract Token_ERC20 is MockERC20 { - constructor(string memory name, string memory symbol, uint8 decimals) { - initialize(name, symbol, decimals); - } - - function mint(address to, uint256 value) public virtual { - _mint(to, value); - } - - function burn(address from, uint256 value) public virtual { - _burn(from, value); - } -} - -contract MockERC20Test is StdCheats, Test { - Token_ERC20 token; - - bytes32 constant PERMIT_TYPEHASH = - keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); - - function setUp() public { - token = new Token_ERC20("Token", "TKN", 18); - } - - function invariantMetadata() public view { - assertEq(token.name(), "Token"); - assertEq(token.symbol(), "TKN"); - assertEq(token.decimals(), 18); - } - - function testMint() public { - token.mint(address(0xBEEF), 1e18); - - assertEq(token.totalSupply(), 1e18); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testBurn() public { - token.mint(address(0xBEEF), 1e18); - token.burn(address(0xBEEF), 0.9e18); - - assertEq(token.totalSupply(), 1e18 - 0.9e18); - assertEq(token.balanceOf(address(0xBEEF)), 0.1e18); - } - - function testApprove() public { - assertTrue(token.approve(address(0xBEEF), 1e18)); - - assertEq(token.allowance(address(this), address(0xBEEF)), 1e18); - } - - function testTransfer() public { - token.mint(address(this), 1e18); - - assertTrue(token.transfer(address(0xBEEF), 1e18)); - assertEq(token.totalSupply(), 1e18); - - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testTransferFrom() public { - address from = address(0xABCD); - - token.mint(from, 1e18); - - vm.prank(from); - token.approve(address(this), 1e18); - - assertTrue(token.transferFrom(from, address(0xBEEF), 1e18)); - assertEq(token.totalSupply(), 1e18); - - assertEq(token.allowance(from, address(this)), 0); - - assertEq(token.balanceOf(from), 0); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testInfiniteApproveTransferFrom() public { - address from = address(0xABCD); - - token.mint(from, 1e18); - - vm.prank(from); - token.approve(address(this), type(uint256).max); - - assertTrue(token.transferFrom(from, address(0xBEEF), 1e18)); - assertEq(token.totalSupply(), 1e18); - - assertEq(token.allowance(from, address(this)), type(uint256).max); - - assertEq(token.balanceOf(from), 0); - assertEq(token.balanceOf(address(0xBEEF)), 1e18); - } - - function testPermit() public { - uint256 privateKey = 0xBEEF; - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - - assertEq(token.allowance(owner, address(0xCAFE)), 1e18); - assertEq(token.nonces(owner), 1); - } - - function testFailTransferInsufficientBalance() public { - token.mint(address(this), 0.9e18); - token.transfer(address(0xBEEF), 1e18); - } - - function testFailTransferFromInsufficientAllowance() public { - address from = address(0xABCD); - - token.mint(from, 1e18); - - vm.prank(from); - token.approve(address(this), 0.9e18); - - token.transferFrom(from, address(0xBEEF), 1e18); - } - - function testFailTransferFromInsufficientBalance() public { - address from = address(0xABCD); - - token.mint(from, 0.9e18); - - vm.prank(from); - token.approve(address(this), 1e18); - - token.transferFrom(from, address(0xBEEF), 1e18); - } - - function testFailPermitBadNonce() public { - uint256 privateKey = 0xBEEF; - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 1, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - } - - function testFailPermitBadDeadline() public { - uint256 privateKey = 0xBEEF; - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp + 1, v, r, s); - } - - function testFailPermitPastDeadline() public { - uint256 oldTimestamp = block.timestamp; - uint256 privateKey = 0xBEEF; - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, oldTimestamp)) - ) - ) - ); - - vm.warp(block.timestamp + 1); - token.permit(owner, address(0xCAFE), 1e18, oldTimestamp, v, r, s); - } - - function testFailPermitReplay() public { - uint256 privateKey = 0xBEEF; - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, address(0xCAFE), 1e18, 0, block.timestamp)) - ) - ) - ); - - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - token.permit(owner, address(0xCAFE), 1e18, block.timestamp, v, r, s); - } - - function testMetadata(string calldata name, string calldata symbol, uint8 decimals) public { - Token_ERC20 tkn = new Token_ERC20(name, symbol, decimals); - assertEq(tkn.name(), name); - assertEq(tkn.symbol(), symbol); - assertEq(tkn.decimals(), decimals); - } - - function testMint(address from, uint256 amount) public { - token.mint(from, amount); - - assertEq(token.totalSupply(), amount); - assertEq(token.balanceOf(from), amount); - } - - function testBurn(address from, uint256 mintAmount, uint256 burnAmount) public { - burnAmount = bound(burnAmount, 0, mintAmount); - - token.mint(from, mintAmount); - token.burn(from, burnAmount); - - assertEq(token.totalSupply(), mintAmount - burnAmount); - assertEq(token.balanceOf(from), mintAmount - burnAmount); - } - - function testApprove(address to, uint256 amount) public { - assertTrue(token.approve(to, amount)); - - assertEq(token.allowance(address(this), to), amount); - } - - function testTransfer(address from, uint256 amount) public { - token.mint(address(this), amount); - - assertTrue(token.transfer(from, amount)); - assertEq(token.totalSupply(), amount); - - if (address(this) == from) { - assertEq(token.balanceOf(address(this)), amount); - } else { - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.balanceOf(from), amount); - } - } - - function testTransferFrom(address to, uint256 approval, uint256 amount) public { - amount = bound(amount, 0, approval); - - address from = address(0xABCD); - - token.mint(from, amount); - - vm.prank(from); - token.approve(address(this), approval); - - assertTrue(token.transferFrom(from, to, amount)); - assertEq(token.totalSupply(), amount); - - uint256 app = from == address(this) || approval == type(uint256).max ? approval : approval - amount; - assertEq(token.allowance(from, address(this)), app); - - if (from == to) { - assertEq(token.balanceOf(from), amount); - } else { - assertEq(token.balanceOf(from), 0); - assertEq(token.balanceOf(to), amount); - } - } - - function testPermit(uint248 privKey, address to, uint256 amount, uint256 deadline) public { - uint256 privateKey = privKey; - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - - assertEq(token.allowance(owner, to), amount); - assertEq(token.nonces(owner), 1); - } - - function testFailBurnInsufficientBalance(address to, uint256 mintAmount, uint256 burnAmount) public { - burnAmount = bound(burnAmount, mintAmount + 1, type(uint256).max); - - token.mint(to, mintAmount); - token.burn(to, burnAmount); - } - - function testFailTransferInsufficientBalance(address to, uint256 mintAmount, uint256 sendAmount) public { - sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max); - - token.mint(address(this), mintAmount); - token.transfer(to, sendAmount); - } - - function testFailTransferFromInsufficientAllowance(address to, uint256 approval, uint256 amount) public { - amount = bound(amount, approval + 1, type(uint256).max); - - address from = address(0xABCD); - - token.mint(from, amount); - - vm.prank(from); - token.approve(address(this), approval); - - token.transferFrom(from, to, amount); - } - - function testFailTransferFromInsufficientBalance(address to, uint256 mintAmount, uint256 sendAmount) public { - sendAmount = bound(sendAmount, mintAmount + 1, type(uint256).max); - - address from = address(0xABCD); - - token.mint(from, mintAmount); - - vm.prank(from); - token.approve(address(this), sendAmount); - - token.transferFrom(from, to, sendAmount); - } - - function testFailPermitBadNonce(uint256 privateKey, address to, uint256 amount, uint256 deadline, uint256 nonce) - public - { - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - if (nonce == 0) nonce = 1; - - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, nonce, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - } - - function testFailPermitBadDeadline(uint256 privateKey, address to, uint256 amount, uint256 deadline) public { - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline + 1, v, r, s); - } - - function testFailPermitPastDeadline(uint256 privateKey, address to, uint256 amount, uint256 deadline) public { - deadline = bound(deadline, 0, block.timestamp - 1); - if (privateKey == 0) privateKey = 1; - - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - } - - function testFailPermitReplay(uint256 privateKey, address to, uint256 amount, uint256 deadline) public { - if (deadline < block.timestamp) deadline = block.timestamp; - if (privateKey == 0) privateKey = 1; - - address owner = vm.addr(privateKey); - - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - privateKey, - keccak256( - abi.encodePacked( - "\x19\x01", - token.DOMAIN_SEPARATOR(), - keccak256(abi.encode(PERMIT_TYPEHASH, owner, to, amount, 0, deadline)) - ) - ) - ); - - token.permit(owner, to, amount, deadline, v, r, s); - token.permit(owner, to, amount, deadline, v, r, s); - } -} diff --git a/examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC721.t.sol b/examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC721.t.sol deleted file mode 100644 index f986d796..00000000 --- a/examples/thorchain/contracts/lib/forge-std/test/mocks/MockERC721.t.sol +++ /dev/null @@ -1,721 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -import {MockERC721, IERC721TokenReceiver} from "../../src/mocks/MockERC721.sol"; -import {StdCheats} from "../../src/StdCheats.sol"; -import {Test} from "../../src/Test.sol"; - -contract ERC721Recipient is IERC721TokenReceiver { - address public operator; - address public from; - uint256 public id; - bytes public data; - - function onERC721Received(address _operator, address _from, uint256 _id, bytes calldata _data) - public - virtual - override - returns (bytes4) - { - operator = _operator; - from = _from; - id = _id; - data = _data; - - return IERC721TokenReceiver.onERC721Received.selector; - } -} - -contract RevertingERC721Recipient is IERC721TokenReceiver { - function onERC721Received(address, address, uint256, bytes calldata) public virtual override returns (bytes4) { - revert(string(abi.encodePacked(IERC721TokenReceiver.onERC721Received.selector))); - } -} - -contract WrongReturnDataERC721Recipient is IERC721TokenReceiver { - function onERC721Received(address, address, uint256, bytes calldata) public virtual override returns (bytes4) { - return 0xCAFEBEEF; - } -} - -contract NonERC721Recipient {} - -contract Token_ERC721 is MockERC721 { - constructor(string memory _name, string memory _symbol) { - initialize(_name, _symbol); - } - - function tokenURI(uint256) public pure virtual override returns (string memory) {} - - function mint(address to, uint256 tokenId) public virtual { - _mint(to, tokenId); - } - - function burn(uint256 tokenId) public virtual { - _burn(tokenId); - } - - function safeMint(address to, uint256 tokenId) public virtual { - _safeMint(to, tokenId); - } - - function safeMint(address to, uint256 tokenId, bytes memory data) public virtual { - _safeMint(to, tokenId, data); - } -} - -contract MockERC721Test is StdCheats, Test { - Token_ERC721 token; - - function setUp() public { - token = new Token_ERC721("Token", "TKN"); - } - - function invariantMetadata() public view { - assertEq(token.name(), "Token"); - assertEq(token.symbol(), "TKN"); - } - - function testMint() public { - token.mint(address(0xBEEF), 1337); - - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.ownerOf(1337), address(0xBEEF)); - } - - function testBurn() public { - token.mint(address(0xBEEF), 1337); - token.burn(1337); - - assertEq(token.balanceOf(address(0xBEEF)), 0); - - vm.expectRevert("NOT_MINTED"); - token.ownerOf(1337); - } - - function testApprove() public { - token.mint(address(this), 1337); - - token.approve(address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0xBEEF)); - } - - function testApproveBurn() public { - token.mint(address(this), 1337); - - token.approve(address(0xBEEF), 1337); - - token.burn(1337); - - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.getApproved(1337), address(0)); - - vm.expectRevert("NOT_MINTED"); - token.ownerOf(1337); - } - - function testApproveAll() public { - token.setApprovalForAll(address(0xBEEF), true); - - assertTrue(token.isApprovedForAll(address(this), address(0xBEEF))); - } - - function testTransferFrom() public { - address from = address(0xABCD); - - token.mint(from, 1337); - - vm.prank(from); - token.approve(address(this), 1337); - - token.transferFrom(from, address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(from), 0); - } - - function testTransferFromSelf() public { - token.mint(address(this), 1337); - - token.transferFrom(address(this), address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(address(this)), 0); - } - - function testTransferFromApproveAll() public { - address from = address(0xABCD); - - token.mint(from, 1337); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.transferFrom(from, address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToEOA() public { - address from = address(0xABCD); - - token.mint(from, 1337); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(0xBEEF), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(0xBEEF)); - assertEq(token.balanceOf(address(0xBEEF)), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToERC721Recipient() public { - address from = address(0xABCD); - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, 1337); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), 1337); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), 1337); - assertEq(recipient.data(), ""); - } - - function testSafeTransferFromToERC721RecipientWithData() public { - address from = address(0xABCD); - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, 1337); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), 1337, "testing 123"); - - assertEq(token.getApproved(1337), address(0)); - assertEq(token.ownerOf(1337), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), 1337); - assertEq(recipient.data(), "testing 123"); - } - - function testSafeMintToEOA() public { - token.safeMint(address(0xBEEF), 1337); - - assertEq(token.ownerOf(1337), address(address(0xBEEF))); - assertEq(token.balanceOf(address(address(0xBEEF))), 1); - } - - function testSafeMintToERC721Recipient() public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), 1337); - - assertEq(token.ownerOf(1337), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), 1337); - assertEq(to.data(), ""); - } - - function testSafeMintToERC721RecipientWithData() public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), 1337, "testing 123"); - - assertEq(token.ownerOf(1337), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), 1337); - assertEq(to.data(), "testing 123"); - } - - function testFailMintToZero() public { - token.mint(address(0), 1337); - } - - function testFailDoubleMint() public { - token.mint(address(0xBEEF), 1337); - token.mint(address(0xBEEF), 1337); - } - - function testFailBurnUnMinted() public { - token.burn(1337); - } - - function testFailDoubleBurn() public { - token.mint(address(0xBEEF), 1337); - - token.burn(1337); - token.burn(1337); - } - - function testFailApproveUnMinted() public { - token.approve(address(0xBEEF), 1337); - } - - function testFailApproveUnAuthorized() public { - token.mint(address(0xCAFE), 1337); - - token.approve(address(0xBEEF), 1337); - } - - function testFailTransferFromUnOwned() public { - token.transferFrom(address(0xFEED), address(0xBEEF), 1337); - } - - function testFailTransferFromWrongFrom() public { - token.mint(address(0xCAFE), 1337); - - token.transferFrom(address(0xFEED), address(0xBEEF), 1337); - } - - function testFailTransferFromToZero() public { - token.mint(address(this), 1337); - - token.transferFrom(address(this), address(0), 1337); - } - - function testFailTransferFromNotOwner() public { - token.mint(address(0xFEED), 1337); - - token.transferFrom(address(0xFEED), address(0xBEEF), 1337); - } - - function testFailSafeTransferFromToNonERC721Recipient() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337); - } - - function testFailSafeTransferFromToNonERC721RecipientWithData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeTransferFromToRevertingERC721Recipient() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337); - } - - function testFailSafeTransferFromToRevertingERC721RecipientWithData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData() public { - token.mint(address(this), 1337); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeMintToNonERC721Recipient() public { - token.safeMint(address(new NonERC721Recipient()), 1337); - } - - function testFailSafeMintToNonERC721RecipientWithData() public { - token.safeMint(address(new NonERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeMintToRevertingERC721Recipient() public { - token.safeMint(address(new RevertingERC721Recipient()), 1337); - } - - function testFailSafeMintToRevertingERC721RecipientWithData() public { - token.safeMint(address(new RevertingERC721Recipient()), 1337, "testing 123"); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnData() public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData() public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), 1337, "testing 123"); - } - - function testFailBalanceOfZeroAddress() public view { - token.balanceOf(address(0)); - } - - function testFailOwnerOfUnminted() public view { - token.ownerOf(1337); - } - - function testMetadata(string memory name, string memory symbol) public { - MockERC721 tkn = new Token_ERC721(name, symbol); - - assertEq(tkn.name(), name); - assertEq(tkn.symbol(), symbol); - } - - function testMint(address to, uint256 id) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - - assertEq(token.balanceOf(to), 1); - assertEq(token.ownerOf(id), to); - } - - function testBurn(address to, uint256 id) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - token.burn(id); - - assertEq(token.balanceOf(to), 0); - - vm.expectRevert("NOT_MINTED"); - token.ownerOf(id); - } - - function testApprove(address to, uint256 id) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(address(this), id); - - token.approve(to, id); - - assertEq(token.getApproved(id), to); - } - - function testApproveBurn(address to, uint256 id) public { - token.mint(address(this), id); - - token.approve(address(to), id); - - token.burn(id); - - assertEq(token.balanceOf(address(this)), 0); - assertEq(token.getApproved(id), address(0)); - - vm.expectRevert("NOT_MINTED"); - token.ownerOf(id); - } - - function testApproveAll(address to, bool approved) public { - token.setApprovalForAll(to, approved); - - assertEq(token.isApprovedForAll(address(this), to), approved); - } - - function testTransferFrom(uint256 id, address to) public { - address from = address(0xABCD); - - if (to == address(0) || to == from) to = address(0xBEEF); - - token.mint(from, id); - - vm.prank(from); - token.approve(address(this), id); - - token.transferFrom(from, to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(from), 0); - } - - function testTransferFromSelf(uint256 id, address to) public { - if (to == address(0) || to == address(this)) to = address(0xBEEF); - - token.mint(address(this), id); - - token.transferFrom(address(this), to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(address(this)), 0); - } - - function testTransferFromApproveAll(uint256 id, address to) public { - address from = address(0xABCD); - - if (to == address(0) || to == from) to = address(0xBEEF); - - token.mint(from, id); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.transferFrom(from, to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToEOA(uint256 id, address to) public { - address from = address(0xABCD); - - if (to == address(0) || to == from) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - token.mint(from, id); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, to, id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), to); - assertEq(token.balanceOf(to), 1); - assertEq(token.balanceOf(from), 0); - } - - function testSafeTransferFromToERC721Recipient(uint256 id) public { - address from = address(0xABCD); - - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, id); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), id); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), id); - assertEq(recipient.data(), ""); - } - - function testSafeTransferFromToERC721RecipientWithData(uint256 id, bytes calldata data) public { - address from = address(0xABCD); - ERC721Recipient recipient = new ERC721Recipient(); - - token.mint(from, id); - - vm.prank(from); - token.setApprovalForAll(address(this), true); - - token.safeTransferFrom(from, address(recipient), id, data); - - assertEq(token.getApproved(id), address(0)); - assertEq(token.ownerOf(id), address(recipient)); - assertEq(token.balanceOf(address(recipient)), 1); - assertEq(token.balanceOf(from), 0); - - assertEq(recipient.operator(), address(this)); - assertEq(recipient.from(), from); - assertEq(recipient.id(), id); - assertEq(recipient.data(), data); - } - - function testSafeMintToEOA(uint256 id, address to) public { - if (to == address(0)) to = address(0xBEEF); - - if (uint256(uint160(to)) <= 18 || to.code.length > 0) return; - - token.safeMint(to, id); - - assertEq(token.ownerOf(id), address(to)); - assertEq(token.balanceOf(address(to)), 1); - } - - function testSafeMintToERC721Recipient(uint256 id) public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), id); - - assertEq(token.ownerOf(id), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), id); - assertEq(to.data(), ""); - } - - function testSafeMintToERC721RecipientWithData(uint256 id, bytes calldata data) public { - ERC721Recipient to = new ERC721Recipient(); - - token.safeMint(address(to), id, data); - - assertEq(token.ownerOf(id), address(to)); - assertEq(token.balanceOf(address(to)), 1); - - assertEq(to.operator(), address(this)); - assertEq(to.from(), address(0)); - assertEq(to.id(), id); - assertEq(to.data(), data); - } - - function testFailMintToZero(uint256 id) public { - token.mint(address(0), id); - } - - function testFailDoubleMint(uint256 id, address to) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - token.mint(to, id); - } - - function testFailBurnUnMinted(uint256 id) public { - token.burn(id); - } - - function testFailDoubleBurn(uint256 id, address to) public { - if (to == address(0)) to = address(0xBEEF); - - token.mint(to, id); - - token.burn(id); - token.burn(id); - } - - function testFailApproveUnMinted(uint256 id, address to) public { - token.approve(to, id); - } - - function testFailApproveUnAuthorized(address owner, uint256 id, address to) public { - if (owner == address(0) || owner == address(this)) owner = address(0xBEEF); - - token.mint(owner, id); - - token.approve(to, id); - } - - function testFailTransferFromUnOwned(address from, address to, uint256 id) public { - token.transferFrom(from, to, id); - } - - function testFailTransferFromWrongFrom(address owner, address from, address to, uint256 id) public { - if (owner == address(0)) to = address(0xBEEF); - if (from == owner) revert(); - - token.mint(owner, id); - - token.transferFrom(from, to, id); - } - - function testFailTransferFromToZero(uint256 id) public { - token.mint(address(this), id); - - token.transferFrom(address(this), address(0), id); - } - - function testFailTransferFromNotOwner(address from, address to, uint256 id) public { - if (from == address(this)) from = address(0xBEEF); - - token.mint(from, id); - - token.transferFrom(from, to, id); - } - - function testFailSafeTransferFromToNonERC721Recipient(uint256 id) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id); - } - - function testFailSafeTransferFromToNonERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new NonERC721Recipient()), id, data); - } - - function testFailSafeTransferFromToRevertingERC721Recipient(uint256 id) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id); - } - - function testFailSafeTransferFromToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new RevertingERC721Recipient()), id, data); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnData(uint256 id) public { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id); - } - - function testFailSafeTransferFromToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) - public - { - token.mint(address(this), id); - - token.safeTransferFrom(address(this), address(new WrongReturnDataERC721Recipient()), id, data); - } - - function testFailSafeMintToNonERC721Recipient(uint256 id) public { - token.safeMint(address(new NonERC721Recipient()), id); - } - - function testFailSafeMintToNonERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.safeMint(address(new NonERC721Recipient()), id, data); - } - - function testFailSafeMintToRevertingERC721Recipient(uint256 id) public { - token.safeMint(address(new RevertingERC721Recipient()), id); - } - - function testFailSafeMintToRevertingERC721RecipientWithData(uint256 id, bytes calldata data) public { - token.safeMint(address(new RevertingERC721Recipient()), id, data); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnData(uint256 id) public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), id); - } - - function testFailSafeMintToERC721RecipientWithWrongReturnDataWithData(uint256 id, bytes calldata data) public { - token.safeMint(address(new WrongReturnDataERC721Recipient()), id, data); - } - - function testFailOwnerOfUnminted(uint256 id) public view { - token.ownerOf(id); - } -} diff --git a/examples/thorchain/contracts/router-abi.json b/examples/thorchain/contracts/router-abi.json deleted file mode 100644 index 3c638983..00000000 --- a/examples/thorchain/contracts/router-abi.json +++ /dev/null @@ -1,423 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldVault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newVault", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "TransferAllowance", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "TransferOut", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "finalAsset", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "TransferOutAndCall", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldVault", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newVault", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "indexed": false, - "internalType": "struct AvaxRouter.Coin[]", - "name": "coins", - "type": "tuple[]" - }, - { - "indexed": false, - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "VaultTransfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "vault", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "vault", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "memo", - "type": "string" - }, - { - "internalType": "uint256", - "name": "expiration", - "type": "uint256" - } - ], - "name": "depositWithExpiry", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "internalType": "address payable", - "name": "asgard", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "internalType": "struct AvaxRouter.Coin[]", - "name": "coins", - "type": "tuple[]" - }, - { - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "returnVaultAssets", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "router", - "type": "address" - }, - { - "internalType": "address", - "name": "newVault", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "transferAllowance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "to", - "type": "address" - }, - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "transferOut", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "target", - "type": "address" - }, - { - "internalType": "address", - "name": "finalToken", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "string", - "name": "memo", - "type": "string" - } - ], - "name": "transferOutAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "vault", - "type": "address" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "vaultAllowance", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/examples/thorchain/contracts/router-bytecode.txt b/examples/thorchain/contracts/router-bytecode.txt deleted file mode 100644 index c516942b..00000000 --- a/examples/thorchain/contracts/router-bytecode.txt +++ /dev/null @@ -1 +0,0 @@ -0x608060405234801561001057600080fd5b50600180556118ec806100246000396000f3fe6080604052600436106100705760003560e01c80632923e82e1161004e5780632923e82e1461010d5780634039fd4b1461012057806344bc937b14610133578063574da7171461014657600080fd5b806303b6a673146100755780631b738b32146100d85780631fece7b4146100fa575b600080fd5b34801561008157600080fd5b506100c66100903660046111b7565b73ffffffffffffffffffffffffffffffffffffffff91821660009081526020818152604080832093909416825291909152205490565b60405190815260200160405180910390f35b3480156100e457600080fd5b506100f86100f3366004611325565b610159565b005b6100f86101083660046113a4565b61027f565b6100f861011b366004611410565b610488565b6100f861012e366004611325565b61068e565b6100f8610141366004611523565b6108d9565b6100f86101543660046113a4565b610955565b600260015414156101cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260015573ffffffffffffffffffffffffffffffffffffffff8516301415610267576101f9848484610c29565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f05b90458f953d3fcb2d7fb25616a2fddeca749d0c47cc5c9832d0266b5346eea85858560405161025a93929190611611565b60405180910390a3610274565b6102748585858585610cb8565b505060018055505050565b600260015414156102ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101c2565b6002600155600073ffffffffffffffffffffffffffffffffffffffff84166103575750604051349060009073ffffffffffffffffffffffffffffffffffffffff87169083156108fc0290849084818181858888f1935050505090508061035157600080fd5b50610416565b34156103bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f756e65787065637465642061766178000000000000000000000000000000000060448201526064016101c2565b6103c98484610eb1565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526020818152604080832093891683529290529081208054929350839290919061041090849061167e565b90915550505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fef519b7eb82aaf6ac376a6df2d793843ebfd593de5f1a0601d3cc6ab49ebb3958385604051610475929190611696565b60405180910390a3505060018055505050565b600260015414156104f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101c2565b600260015573ffffffffffffffffffffffffffffffffffffffff84163014156105e85760005b825181101561057b576105698484838151811061053a5761053a6116b7565b602002602001015160000151858481518110610558576105586116b7565b602002602001015160200151610c29565b80610573816116e6565b91505061051b565b508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f281daef48d91e5cd3d32db0784f6af69cd8d8d2e8c612a3568dca51ded51e08f84846040516105db92919061171f565b60405180910390a361064f565b60005b825181101561064d5761063b858585848151811061060b5761060b6116b7565b602002602001015160000151868581518110610629576106296116b7565b60200260200101516020015186610cb8565b80610645816116e6565b9150506105eb565b505b60405160009073ffffffffffffffffffffffffffffffffffffffff8516903480156108fc029184818181858888f1935050505090508061027457600080fd5b600260015414156106fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101c2565b600260015560405173ffffffffffffffffffffffffffffffffffffffff858116602483015284811660448301526064820184905234916000918816908390608401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f48c314f400000000000000000000000000000000000000000000000000000000179052516107bd9190611797565b60006040518083038185875af1925050503d80600081146107fa576040519150601f19603f3d011682016040523d82523d6000602084013e6107ff565b606091505b50509050806108745760405160009073ffffffffffffffffffffffffffffffffffffffff87169084156108fc0290859084818181858888f1935050505090508061087257604051339084156108fc029085906000818181858888f19350505050158015610870573d6000803e3d6000fd5b505b505b3373ffffffffffffffffffffffffffffffffffffffff167f8e5841bcd195b858d53b38bcf91b38d47f3bc800469b6812d35451ab619c6f6c8884898989896040516108c4969594939291906117b3565b60405180910390a25050600180555050505050565b804210610942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f54484f52436861696e5f526f757465723a20657870697265640000000000000060448201526064016101c2565b61094e8585858561027f565b5050505050565b600260015414156109c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101c2565b6002600155600073ffffffffffffffffffffffffffffffffffffffff8416610a575750604051349060009073ffffffffffffffffffffffffffffffffffffffff87169083156108fc0290849084818181858888f19350505050905080610a5157604051339083156108fc029084906000818181858888f19350505050158015610a4f573d6000803e3d6000fd5b505b50610bc8565b3360009081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8816845290915281208054859290610a9590849061180c565b909155505060405173ffffffffffffffffffffffffffffffffffffffff8681166024830152604482018590526000918291871690606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905251610b4d9190611797565b6000604051808303816000865af19150503d8060008114610b8a576040519150601f19603f3d011682016040523d82523d6000602084013e610b8f565b606091505b5091509150818015610bb9575080511580610bb9575080806020019051810190610bb99190611823565b610bc257600080fd5b84925050505b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fa9cd03aa3c1b4515114539cd53d22085129d495cb9e9f9af77864526240f1bf786848660405161047593929190611611565b3360009081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8616845290915281208054839290610c6790849061180c565b909155505073ffffffffffffffffffffffffffffffffffffffff80841660009081526020818152604080832093861683529290529081208054839290610cae90849061167e565b9091555050505050565b3360009081526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281208054849290610cf690849061180c565b909155505060405173ffffffffffffffffffffffffffffffffffffffff86811660248301526044820184905260009190851690606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b30000000000000000000000000000000000000000000000000000000017905251610dad9190611797565b6000604051808303816000865af19150503d8060008114610dea576040519150601f19603f3d011682016040523d82523d6000602084013e610def565b606091505b5050905080610dfd57600080fd5b6040517f44bc937b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716906344bc937b90610e779088908890889088907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060040161184c565b600060405180830381600087803b158015610e9157600080fd5b505af1158015610ea5573d6000803e3d6000fd5b50505050505050505050565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8516906370a082319060240160206040518083038186803b158015610f1b57600080fd5b505afa158015610f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f53919061189d565b60405133602482015230604482015260648101859052909150600090819073ffffffffffffffffffffffffffffffffffffffff871690608401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790525161100d9190611797565b6000604051808303816000865af19150503d806000811461104a576040519150601f19603f3d011682016040523d82523d6000602084013e61104f565b606091505b50915091508180156110795750805115806110795750808060200190518101906110799190611823565b6110df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4661696c656420546f205472616e7366657246726f6d0000000000000000000060448201526064016101c2565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152839073ffffffffffffffffffffffffffffffffffffffff8816906370a082319060240160206040518083038186803b15801561114657600080fd5b505afa15801561115a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117e919061189d565b611188919061180c565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff811681146111b457600080fd5b50565b600080604083850312156111ca57600080fd5b82356111d581611192565b915060208301356111e581611192565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611242576112426111f0565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561128f5761128f6111f0565b604052919050565b600082601f8301126112a857600080fd5b813567ffffffffffffffff8111156112c2576112c26111f0565b6112f360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611248565b81815284602083860101111561130857600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561133d57600080fd5b853561134881611192565b9450602086013561135881611192565b9350604086013561136881611192565b925060608601359150608086013567ffffffffffffffff81111561138b57600080fd5b61139788828901611297565b9150509295509295909350565b600080600080608085870312156113ba57600080fd5b84356113c581611192565b935060208501356113d581611192565b925060408501359150606085013567ffffffffffffffff8111156113f857600080fd5b61140487828801611297565b91505092959194509250565b6000806000806080858703121561142657600080fd5b843561143181611192565b935060208581013561144281611192565b935060408681013567ffffffffffffffff8082111561146057600080fd5b818901915089601f83011261147457600080fd5b813581811115611486576114866111f0565b611494858260051b01611248565b81815260069190911b8301850190858101908c8311156114b357600080fd5b938601935b828510156114fc5785858e0312156114d05760008081fd5b6114d861121f565b85356114e381611192565b81528588013588820152825293850193908601906114b8565b97505050606089013593508084111561151457600080fd5b50505061140487828801611297565b600080600080600060a0868803121561153b57600080fd5b853561154681611192565b9450602086013561155681611192565b935060408601359250606086013567ffffffffffffffff81111561157957600080fd5b61158588828901611297565b95989497509295608001359392505050565b60005b838110156115b257818101518382015260200161159a565b838111156115c1576000848401525b50505050565b600081518084526115df816020860160208601611597565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061164660608301846115c7565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156116915761169161164f565b500190565b8281526040602082015260006116af60408301846115c7565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156117185761171861164f565b5060010190565b60408082528351828201819052600091906020906060850190828801855b82811015611778578151805173ffffffffffffffffffffffffffffffffffffffff16855285015185850152928501929084019060010161173d565b5050508481038286015261178c81876115c7565b979650505050505050565b600082516117a9818460208701611597565b9190910192915050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352876020840152808716604084015280861660608401525083608083015260c060a083015261180060c08301846115c7565b98975050505050505050565b60008282101561181e5761181e61164f565b500390565b60006020828403121561183557600080fd5b8151801515811461184557600080fd5b9392505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015260a0606083015261188b60a08301856115c7565b90508260808301529695505050505050565b6000602082840312156118af57600080fd5b505191905056fea2646970667358221220f11847a348f63b399358a3736e1f295761b905637e0cec3e15f85765e2d3dac564736f6c63430008090033 \ No newline at end of file diff --git a/examples/thorchain/contracts/script/Router.s.sol b/examples/thorchain/contracts/script/Router.s.sol deleted file mode 100644 index 964b4630..00000000 --- a/examples/thorchain/contracts/script/Router.s.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Script, console2} from "forge-std/Script.sol"; -import {THORChain_Router} from "../src/THORChain_Router.sol"; - -contract RouterScript is Script { - THORChain_Router public router; - - function setUp() public {} - - function run() public returns (address) { - vm.broadcast(); - router = new THORChain_Router(address(0x3155BA85D5F96b2d030a4966AF206230e46849cb)); - return address(router); - } -} diff --git a/examples/thorchain/contracts/script/Token.s.sol b/examples/thorchain/contracts/script/Token.s.sol deleted file mode 100644 index 38a126d8..00000000 --- a/examples/thorchain/contracts/script/Token.s.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Script, console2} from "forge-std/Script.sol"; -import {ERC20Token} from "../src/Token.sol"; - -contract TokenScript is Script { - ERC20Token public tkn; - - function setUp() public {} - - function run() public returns (address) { - //vm.broadcast(); - vm.startBroadcast(); - - tkn = new ERC20Token(); - //tkn.transfer(vm.envAddress("ETHFAUCET"), uint256(500000e18)); - - vm.stopBroadcast(); - - return address(tkn); - } -} diff --git a/examples/thorchain/contracts/src/THORChain_Router.sol b/examples/thorchain/contracts/src/THORChain_Router.sol deleted file mode 100644 index 5266f552..00000000 --- a/examples/thorchain/contracts/src/THORChain_Router.sol +++ /dev/null @@ -1,187 +0,0 @@ -// SPDX-License-Identifier: MIT -// ------------------- -// Router Version: 4.1 -// ------------------- -pragma solidity ^0.8.13; - -// ERC20 Interface -interface iERC20 { - function balanceOf(address) external view returns (uint256); - function burn(uint) external; -} -// RUNE Interface -interface iRUNE { - function transferTo(address, uint) external returns (bool); -} -// ROUTER Interface -interface iROUTER { - function depositWithExpiry(address, address, uint, string calldata, uint) external; -} - -// THORChain_Router is managed by THORChain Vaults -contract THORChain_Router { - address public RUNE; - - struct Coin { - address asset; - uint amount; - } - - // Vault allowance for each asset - mapping(address => mapping(address => uint)) private _vaultAllowance; - - uint256 private constant _NOT_ENTERED = 1; - uint256 private constant _ENTERED = 2; - uint256 private _status; - - // Emitted for all deposits, the memo distinguishes for swap, add, remove, donate etc - event Deposit(address indexed to, address indexed asset, uint amount, string memo); - - // Emitted for all outgoing transfers, the vault dictates who sent it, memo used to track. - event TransferOut(address indexed vault, address indexed to, address asset, uint amount, string memo); - - // Emitted for all outgoing transferAndCalls, the vault dictates who sent it, memo used to track. - event TransferOutAndCall(address indexed vault, address target, uint amount, address finalAsset, address to, uint256 amountOutMin, string memo); - - // Changes the spend allowance between vaults - event TransferAllowance(address indexed oldVault, address indexed newVault, address asset, uint amount, string memo); - - // Specifically used to batch send the entire vault assets - event VaultTransfer(address indexed oldVault, address indexed newVault, Coin[] coins, string memo); - - modifier nonReentrant() { - require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); - _status = _ENTERED; - _; - _status = _NOT_ENTERED; - } - - constructor(address rune) { - RUNE = rune; - _status = _NOT_ENTERED; - } - - // Deposit with Expiry (preferred) - function depositWithExpiry(address payable vault, address asset, uint amount, string memory memo, uint expiration) external payable { - require(block.timestamp < expiration, "THORChain_Router: expired"); - deposit(vault, asset, amount, memo); - } - - // Deposit an asset with a memo. ETH is forwarded, ERC-20 stays in ROUTER - function deposit(address payable vault, address asset, uint amount, string memory memo) private nonReentrant{ - uint safeAmount; - if(asset == address(0)){ - safeAmount = msg.value; - bool success = vault.send(safeAmount); - require(success); - } else { - require(msg.value == 0, "unexpected eth"); // protect user from accidentally locking up eth - if(asset == RUNE) { - safeAmount = amount; - iRUNE(RUNE).transferTo(address(this), amount); - iERC20(RUNE).burn(amount); - } else { - safeAmount = safeTransferFrom(asset, amount); // Transfer asset - _vaultAllowance[vault][asset] += safeAmount; // Credit to chosen vault - } - } - emit Deposit(vault, asset, safeAmount, memo); - } - - //############################## ALLOWANCE TRANSFERS ############################## - - // Use for "moving" assets between vaults (asgard<>ygg), as well "churning" to a new Asgard - function transferAllowance(address router, address newVault, address asset, uint amount, string memory memo) external nonReentrant { - if (router == address(this)){ - _adjustAllowances(newVault, asset, amount); - emit TransferAllowance(msg.sender, newVault, asset, amount, memo); - } else { - _routerDeposit(router, newVault, asset, amount, memo); - } - } - - //############################## ASSET TRANSFERS ############################## - - // Any vault calls to transfer any asset to any recipient. - // Note: Contract recipients of ETH are only given 2300 Gas to complete execution. - function transferOut(address payable to, address asset, uint amount, string memory memo) public payable nonReentrant { - uint safeAmount; - if(asset == address(0)){ - safeAmount = msg.value; - bool success = to.send(safeAmount); // Send ETH. - if (!success) { - payable(address(msg.sender)).transfer(safeAmount); // For failure, bounce back to Yggdrasil & continue. - } - } else { - _vaultAllowance[msg.sender][asset] -= amount; // Reduce allowance - (bool success, bytes memory data) = asset.call(abi.encodeWithSignature("transfer(address,uint256)" , to, amount)); - require(success && (data.length == 0 || abi.decode(data, (bool)))); - safeAmount = amount; - } - emit TransferOut(msg.sender, to, asset, safeAmount, memo); - } - - // Any vault calls to transferAndCall on a target contract that conforms with "swapOut(address,address,uint256)" - // Example Memo: "~1b3:ETH.0xFinalToken:0xTo:" - // Target is fuzzy-matched to the last three digits of whitelisted aggregators - // FinalToken, To, amountOutMin come from originating memo - // Memo passed in here is the "OUT:HASH" type - function transferOutAndCall(address payable target, address finalToken, address to, uint256 amountOutMin, string memory memo) public payable nonReentrant { - uint256 _safeAmount = msg.value; - (bool erc20Success, ) = target.call{value:_safeAmount}(abi.encodeWithSignature("swapOut(address,address,uint256)", finalToken, to, amountOutMin)); - if (!erc20Success) { - bool ethSuccess = payable(to).send(_safeAmount); // If can't swap, just send the recipient the ETH - if (!ethSuccess) { - payable(address(msg.sender)).transfer(_safeAmount); // For failure, bounce back to Yggdrasil & continue. - } - } - emit TransferOutAndCall(msg.sender, target, _safeAmount, finalToken, to, amountOutMin, memo); - } - - - //############################## VAULT MANAGEMENT ############################## - - // A vault can call to "return" all assets to an asgard, including ETH. - function returnVaultAssets(address router, address payable asgard, Coin[] memory coins, string memory memo) external payable nonReentrant { - if (router == address(this)){ - for(uint i = 0; i < coins.length; i++){ - _adjustAllowances(asgard, coins[i].asset, coins[i].amount); - } - emit VaultTransfer(msg.sender, asgard, coins, memo); // Does not include ETH. - } else { - for(uint i = 0; i < coins.length; i++){ - _routerDeposit(router, asgard, coins[i].asset, coins[i].amount, memo); - } - } - bool success = asgard.send(msg.value); - require(success); - } - - //############################## HELPERS ############################## - - function vaultAllowance(address vault, address token) public view returns(uint amount){ - return _vaultAllowance[vault][token]; - } - - // Safe transferFrom in case asset charges transfer fees - function safeTransferFrom(address _asset, uint _amount) internal returns(uint amount) { - uint _startBal = iERC20(_asset).balanceOf(address(this)); - (bool success, bytes memory data) = _asset.call(abi.encodeWithSignature("transferFrom(address,address,uint256)", msg.sender, address(this), _amount)); - require(success && (data.length == 0 || abi.decode(data, (bool)))); - return (iERC20(_asset).balanceOf(address(this)) - _startBal); - } - - // Decrements and Increments Allowances between two vaults - function _adjustAllowances(address _newVault, address _asset, uint _amount) internal { - _vaultAllowance[msg.sender][_asset] -= _amount; - _vaultAllowance[_newVault][_asset] += _amount; - } - - // Adjust allowance and forwards funds to new router, credits allowance to desired vault - function _routerDeposit(address _router, address _vault, address _asset, uint _amount, string memory _memo) internal { - _vaultAllowance[msg.sender][_asset] -= _amount; - (bool success,) = _asset.call(abi.encodeWithSignature("approve(address,uint256)", _router, _amount)); // Approve to transfer - require(success); - iROUTER(_router).depositWithExpiry(_vault, _asset, _amount, _memo, type(uint).max); // Transfer by depositing - } -} diff --git a/examples/thorchain/contracts/src/Token.sol b/examples/thorchain/contracts/src/Token.sol deleted file mode 100644 index ff8f2f60..00000000 --- a/examples/thorchain/contracts/src/Token.sol +++ /dev/null @@ -1,130 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.13; - -//IERC20 Interface -interface iERC20 { - function totalSupply() external view returns (uint256); - function balanceOf(address account) external view returns (uint256); - function transfer(address, uint) external returns (bool); - function allowance(address owner, address spender) external view returns (uint256); - function approve(address, uint) external returns (bool); - function transferFrom(address, address, uint) external returns (bool); -} - -library SafeMath { - - function add(uint256 a, uint256 b) internal pure returns (uint256) { - uint256 c = a + b; - require(c >= a, "SafeMath: addition overflow"); - return c; - } - - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - return sub(a, b, "SafeMath: subtraction overflow"); - } - - function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - require(b <= a, errorMessage); - uint256 c = a - b; - return c; - } - - function mul(uint256 a, uint256 b) internal pure returns (uint256) { - if (a == 0) { - return 0; - } - uint256 c = a * b; - require(c / a == b, "SafeMath: multiplication overflow"); - return c; - } - - function div(uint256 a, uint256 b) internal pure returns (uint256) { - return div(a, b, "SafeMath: division by zero"); - } - - function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - require(b > 0, errorMessage); - uint256 c = a / b; - return c; - } - - function mod(uint256 a, uint256 b) internal pure returns (uint256) { - return mod(a, b, "SafeMath: modulo by zero"); - } - - function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { - require(b != 0, errorMessage); - return a % b; - } -} - -// Token Contract -contract ERC20Token is iERC20 { - - using SafeMath for uint256; - - // Coin Defaults - string public name; // Name of Coin - string public symbol; // Symbol of Coin - uint256 public decimals = 18; // Decimals - uint256 public override totalSupply = 1*10**6 * (10 ** decimals); // 1,000,000 Total - - // Mapping - mapping(address => uint256) public override balanceOf; // Map balanceOf - mapping(address => mapping(address => uint256)) public override allowance; // Map allowances - - // Events - event Approval(address indexed owner, address indexed spender, uint value); // ERC20 - event Transfer(address indexed from, address indexed to, uint256 value); // ERC20 - - // Minting event - constructor() { - balanceOf[msg.sender] = totalSupply; - name = "Token"; - symbol = "TKN"; - emit Transfer(address(0), msg.sender, totalSupply); - } - - // ERC20 - function transfer(address to, uint256 value) public override returns (bool success) { - _transfer(msg.sender, to, value); - return true; - } - - // ERC20 - function approve(address spender, uint256 value) public override returns (bool success) { - allowance[msg.sender][spender] = value; - emit Approval(msg.sender, spender, value); - return true; - } - - // ERC20 - function transferFrom(address from, address to, uint256 value) public override returns (bool success) { - require(value <= allowance[from][msg.sender], "allowance error"); - allowance[from][msg.sender] = allowance[from][msg.sender].sub(value); - _transfer(from, to, value); - return true; - } - - // Transfer function - function _transfer(address _from, address _to, uint _value) internal { - require(_to != address(0), "address error"); - require(balanceOf[_from] >= _value, "balance error"); - require(balanceOf[_to].add(_value) >= balanceOf[_to], "balance error"); // catch overflow - balanceOf[_from] = balanceOf[_from].sub(_value); // Subtract from sender - balanceOf[_to] = balanceOf[_to].add(_value); // Add to receiver - emit Transfer(_from, _to, _value); // Transaction event - } - - function burn(uint256 amount) public virtual { - _burn(msg.sender, amount); - } - - function _burn(address account, uint256 amount) internal { - require(account != address(0), "ERC20: burn from the zero address"); - balanceOf[account] = balanceOf[account].sub(amount, "ERC20: burn amount exceeds balance"); - totalSupply = totalSupply.sub(amount); - emit Transfer(account, address(0), amount); - } - -} \ No newline at end of file diff --git a/examples/thorchain/contracts/token-abi.json b/examples/thorchain/contracts/token-abi.json deleted file mode 100644 index ba48a0da..00000000 --- a/examples/thorchain/contracts/token-abi.json +++ /dev/null @@ -1,229 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/examples/thorchain/contracts/token-bytecode.txt b/examples/thorchain/contracts/token-bytecode.txt deleted file mode 100644 index 1a7d1308..00000000 --- a/examples/thorchain/contracts/token-bytecode.txt +++ /dev/null @@ -1 +0,0 @@ -0x60806040526012600255600254600a0a620f42400260035534801561002357600080fd5b50600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506040518060400160405280600581526020017f546f6b656e000000000000000000000000000000000000000000000000000000815250600090805190602001906100b592919061016f565b506040518060400160405280600381526020017f544b4e00000000000000000000000000000000000000000000000000000000008152506001908051906020019061010192919061016f565b503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6003546040518082815260200191505060405180910390a3610214565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101b057805160ff19168380011785556101de565b828001600101855582156101de579182015b828111156101dd5782518255916020019190600101906101c2565b5b5090506101eb91906101ef565b5090565b61021191905b8082111561020d5760008160009055506001016101f5565b5090565b90565b610c34806102236000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce5671461022557806370a082311461024357806395d89b411461029b578063a9059cbb1461031e578063dd62ed3e1461038457610093565b806306fdde0314610098578063095ea7b31461011b57806318160ddd1461018157806323b872dd1461019f575b600080fd5b6100a06103fc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100e05780820151818401526020810190506100c5565b50505050905090810190601f16801561010d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101676004803603604081101561013157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061049a565b604051808215151515815260200191505060405180910390f35b61018961058c565b6040518082815260200191505060405180910390f35b61020b600480360360608110156101b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610592565b604051808215151515815260200191505060405180910390f35b61022d6106bd565b6040518082815260200191505060405180910390f35b6102856004803603602081101561025957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106c3565b6040518082815260200191505060405180910390f35b6102a36106db565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102e35780820151818401526020810190506102c8565b50505050905090810190601f1680156103105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61036a6004803603604081101561033457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610779565b604051808215151515815260200191505060405180910390f35b6103e66004803603604081101561039a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610790565b6040518082815260200191505060405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104925780601f1061046757610100808354040283529160200191610492565b820191906000526020600020905b81548152906001019060200180831161047557829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60035481565b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561061d57600080fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506106b28484846107b5565b600190509392505050565b60025481565b60046020528060005260406000206000915090505481565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107715780601f1061074657610100808354040283529160200191610771565b820191906000526020600020905b81548152906001019060200180831161075457829003601f168201915b505050505081565b60006107863384846107b5565b6001905092915050565b6005602052816000526040600020602052806000526040600020600091509150505481565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156107ef57600080fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561083b57600080fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108cd82600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a6c90919063ffffffff16565b10156108d857600080fd5b61092a81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610af490919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109bf81600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a6c90919063ffffffff16565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600080828401905083811015610aea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000610b3683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b3e565b905092915050565b6000838311158290610beb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bb0578082015181840152602081019050610b95565b50505050905090810190601f168015610bdd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fea26469706673582212208621a61a72b5773eedaaccd88413213c489e071f7a4afc9c87236e049e046e9064736f6c63430006050033 \ No newline at end of file diff --git a/examples/thorchain/features/arb.go b/examples/thorchain/features/arb.go deleted file mode 100644 index a97b797f..00000000 --- a/examples/thorchain/features/arb.go +++ /dev/null @@ -1,193 +0,0 @@ -package features - -import ( - "context" - "fmt" - "sort" - "strings" - "testing" - "time" - - "golang.org/x/sync/errgroup" - - sdkmath "cosmossdk.io/math" - - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func Arb( - t *testing.T, - ctx context.Context, - thorchain *tc.Thorchain, - exoChains ...ibc.Chain, -) (users []ibc.Wallet, err error) { - chains := append(exoChains, thorchain) - users, err = GetAndFundTestUsers(t, ctx, "arb", chains...) - if err != nil { - return users, err - } - - err = AddAdminIfNecessary(ctx, thorchain) - if err != nil { - return users, err - } - - mimirs, err := thorchain.APIGetMimirs(ctx) - if err != nil { - return users, err - } - - if mimir, ok := mimirs[strings.ToUpper("TradeAccountsEnabled")]; ok && mimir != int64(1) || !ok { - err := thorchain.SetMimir(ctx, "admin", "TradeAccountsEnabled", "1") - if err != nil { - return users, err - } - } - - thorUser := users[len(users)-1] - - var eg errgroup.Group - for i, exoChain := range exoChains { - eg.Go(func() error { - exoChainType, err := common.NewChain(exoChain.Config().Name) - if err != nil { - return err - } - - exoUser := users[i] - - exoUserBalance, err := exoChain.GetBalance(ctx, exoUser.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - return err - } - - memo := fmt.Sprintf("trade+:%s", thorUser.FormattedAddress()) - exoInboundAddr, _, err := thorchain.APIGetInboundAddress(ctx, exoChainType.String()) - if err != nil { - return err - } - _, err = exoChain.SendFundsWithNote(ctx, exoUser.KeyName(), ibc.WalletAmount{ - Address: exoInboundAddr, - Denom: exoChain.Config().Denom, - Amount: exoUserBalance.QuoRaw(10).MulRaw(9), - }, memo) - - return err - }) - } - if err := eg.Wait(); err != nil { - return users, err - } - - go func() { - type Pool struct { - BalanceRune sdkmath.Uint - BalanceAsset sdkmath.Uint - } - originalPools := make(map[string]Pool) - maxBasisPts := uint64(10_000) - - for { - pools, err := thorchain.APIGetPools(ctx) - if err != nil { - fmt.Println("Error getting arb api pools", err) - time.Sleep(time.Second * 2) - continue - } - - allPoolsSuspended := true - arbPools := []tc.Pool{} - for _, pool := range pools { - if pool.Status != "Suspended" { - allPoolsSuspended = false - } - - // skip unavailable pools and those with no liquidity - if pool.BalanceRune == "0" || pool.BalanceAsset == "0" || pool.Status != "Available" { - continue - } - - // if this is the first time we see the pool, store it to use as the target price - if _, ok := originalPools[pool.Asset]; !ok { - originalPools[pool.Asset] = Pool{ - BalanceRune: sdkmath.NewUintFromString(pool.BalanceRune), - BalanceAsset: sdkmath.NewUintFromString(pool.BalanceAsset), - } - continue - } - - arbPools = append(arbPools, pool) - } - - if allPoolsSuspended { - return - } - - if len(arbPools) < 2 { - time.Sleep(time.Second * 2) - continue - } - - // sort pools by price change - priceChangeBps := func(pool tc.Pool) int64 { - originalPool := originalPools[pool.Asset] - originalPrice := originalPool.BalanceRune.MulUint64(1e8).Quo(originalPool.BalanceAsset) - currentPrice := sdkmath.NewUintFromString(pool.BalanceRune).MulUint64(1e8).Quo(sdkmath.NewUintFromString(pool.BalanceAsset)) - return int64(maxBasisPts) - int64(originalPrice.MulUint64(maxBasisPts).Quo(currentPrice).Uint64()) - } - sort.Slice(arbPools, func(i, j int) bool { - return priceChangeBps(arbPools[i]) > priceChangeBps(arbPools[j]) - }) - - send := arbPools[0] - receive := arbPools[len(arbPools)-1] - - // skip if none have diverged more than 10 basis points - adjustmentBps := Min(Abs(priceChangeBps(send)), Abs(priceChangeBps(receive))) - if adjustmentBps < 10 { - // pools have not diverged enough - time.Sleep(time.Second * 2) - continue - } - - // build the swap - memo := fmt.Sprintf("=:%s", strings.Replace(receive.Asset, ".", "~", 1)) - asset, err := common.NewAsset(strings.Replace(send.Asset, ".", "~", 1)) - if err != nil { - fmt.Println("Error building arb swap asset", err) - time.Sleep(time.Second * 2) - continue - } - amount := sdkmath.NewUint(uint64(adjustmentBps / 2)).Mul(sdkmath.NewUintFromString(send.BalanceAsset)).QuoUint64(maxBasisPts) - - fmt.Println("Arbing:", amount, asset.String(), memo) - err = thorchain.Deposit(ctx, thorUser.KeyName(), sdkmath.Int(amount), asset.String(), memo) - if err != nil { - fmt.Println("Error:", err) - } else { - fmt.Println("No arb error") - } - // require.NoError(t, err) - - time.Sleep(time.Second) // Deposit already wait 2 blocks, ~4 seconds - } - }() - - return users, nil -} - -func Min[T int | uint | int64 | uint64](a, b T) T { - if a < b { - return a - } - return b -} - -func Abs[T int | int64](a T) T { - if a < 0 { - return -a - } - return a -} diff --git a/examples/thorchain/features/dual_lper.go b/examples/thorchain/features/dual_lper.go deleted file mode 100644 index a9d2d1b4..00000000 --- a/examples/thorchain/features/dual_lper.go +++ /dev/null @@ -1,66 +0,0 @@ -package features - -import ( - "context" - "fmt" - "testing" - - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func DualLp( - t *testing.T, - ctx context.Context, - thorchain *tc.Thorchain, - exoChain ibc.Chain, -) (thorUser ibc.Wallet, exoUser ibc.Wallet, err error) { - fmt.Println("#### Dual Lper:", exoChain.Config().Name) - users, err := GetAndFundTestUsers(t, ctx, fmt.Sprintf("%s-DualLper", exoChain.Config().Name), thorchain, exoChain) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, fund users (%s), %w", exoChain.Config().Name, err) - } - thorUser, exoUser = users[0], users[1] - - exoChainType, err := common.NewChain(exoChain.Config().Name) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, chain type (%s), %w", exoChain.Config().Name, err) - } - exoAsset := exoChainType.GetGasAsset() - - thorUserBalance, err := thorchain.GetBalance(ctx, thorUser.FormattedAddress(), thorchain.Config().Denom) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, thor balance (%s), %w", exoChain.Config().Name, err) - } - memo := fmt.Sprintf("+:%s:%s", exoAsset, exoUser.FormattedAddress()) - err = thorchain.Deposit(ctx, thorUser.KeyName(), thorUserBalance.QuoRaw(100).MulRaw(90), thorchain.Config().Denom, memo) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, thor deposit (%s), %w", exoChain.Config().Name, err) - } - - exoUserBalance, err := exoChain.GetBalance(ctx, exoUser.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, exo balance (%s), %w", exoChain.Config().Name, err) - } - memo = fmt.Sprintf("+:%s:%s", exoAsset, thorUser.FormattedAddress()) - exoInboundAddr, _, err := thorchain.APIGetInboundAddress(ctx, exoChainType.String()) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, inbound addr (%s), %w", exoChain.Config().Name, err) - } - _, err = exoChain.SendFundsWithNote(ctx, exoUser.KeyName(), ibc.WalletAmount{ - Address: exoInboundAddr, - Denom: exoChain.Config().Denom, - Amount: exoUserBalance.QuoRaw(100).MulRaw(90), // LP 90% of balance - }, memo) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, exo send funds (%s), %w", exoChain.Config().Name, err) - } - - err = PollForPool(ctx, thorchain, 60, exoAsset) - if err != nil { - return thorUser, exoUser, fmt.Errorf("duallp, poll for pool (%s), %w", exoChain.Config().Name, err) - } - - return thorUser, exoUser, err -} diff --git a/examples/thorchain/features/helpers.go b/examples/thorchain/features/helpers.go deleted file mode 100644 index f477a70d..00000000 --- a/examples/thorchain/features/helpers.go +++ /dev/null @@ -1,246 +0,0 @@ -package features - -import ( - "context" - "fmt" - "math" - "strings" - "testing" - "time" - - "golang.org/x/sync/errgroup" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10" - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/testutil" -) - -func GetAndFundTestUsers( - t *testing.T, - ctx context.Context, - keyNamePrefix string, - chains ...ibc.Chain, -) ([]ibc.Wallet, error) { - users := make([]ibc.Wallet, len(chains)) - eg, egCtx := errgroup.WithContext(ctx) - for i, chain := range chains { - - oneCoin := sdkmath.NewInt(int64(math.Pow10(int(*chain.Config().CoinDecimals)))) - amount := oneCoin.MulRaw(1000) // thor, gaia - switch chain.Config().CoinType { - case "0", "60": // btc, eth - amount = oneCoin.MulRaw(10) - case "2", "145": // ltc, bch - amount = oneCoin.MulRaw(100) - case "3": // doge - amount = oneCoin.MulRaw(10_000) - } - eg.Go(func() error { - user := interchaintest.GetAndFundTestUsers(t, egCtx, keyNamePrefix, amount, chain) - users[i] = user[0] - - userBalance, err := chain.GetBalance(egCtx, user[0].FormattedAddress(), chain.Config().Denom) - if err != nil { - return err - } - if !userBalance.Equal(amount) { - return fmt.Errorf("user (%s) was not properly funded", user[0].KeyName()) - } - - return nil - }) - } - - err := eg.Wait() - - return users, err -} - -// PollForPool polls until the pool is found and funded. -func PollForPool(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, asset common.Asset) error { - h, err := thorchain.Height(ctx) - if err != nil { - return fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (any, error) { - pool, err := thorchain.APIGetPool(ctx, asset) - if err != nil { - time.Sleep(time.Second) // rate limit - return nil, err - } - - if pool.BalanceAsset == "0" { - time.Sleep(time.Second) // rate limit - return nil, fmt.Errorf("pool (%s) exists, but not asset balance in %d blocks", asset, deltaBlocks) - } - return nil, nil - } - time.Sleep(time.Second) // Limit how quickly Height() is called back to back per go routine - bp := testutil.BlockPoller[any]{CurrentHeight: thorchain.Height, PollFunc: doPoll} - _, err = bp.DoPoll(ctx, h, h+deltaBlocks) - return err -} - -// PollForSaver polls until the saver is found. -func PollForSaver(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, asset common.Asset, exoUser ibc.Wallet) (tc.Saver, error) { - h, err := thorchain.Height(ctx) - if err != nil { - return tc.Saver{}, fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (tc.Saver, error) { - savers, err := thorchain.APIGetSavers(ctx, asset) - if err != nil { - time.Sleep(time.Second) // rate limit - return tc.Saver{}, err - } - for _, saver := range savers { - if strings.EqualFold(saver.AssetAddress, exoUser.FormattedAddress()) { - return saver, nil - } - } - time.Sleep(time.Second) // rate limit - return tc.Saver{}, fmt.Errorf("saver took longer than %d blocks to show", deltaBlocks) - } - time.Sleep(time.Second) // Limit how quickly Height() is called back to back per go routine - bp := testutil.BlockPoller[tc.Saver]{CurrentHeight: thorchain.Height, PollFunc: doPoll} - saver, err := bp.DoPoll(ctx, h, h+deltaBlocks) - return saver, err -} - -// PollForEjectedSaver polls until the saver no longer found. -func PollForEjectedSaver(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, asset common.Asset, exoUser ibc.Wallet) (tc.Saver, error) { - h, err := thorchain.Height(ctx) - if err != nil { - return tc.Saver{}, fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (tc.Saver, error) { - savers, err := thorchain.APIGetSavers(ctx, asset) - if err != nil { - time.Sleep(time.Second) // rate limit - return tc.Saver{}, err - } - for _, saver := range savers { - if strings.EqualFold(saver.AssetAddress, exoUser.FormattedAddress()) { - time.Sleep(time.Second) // rate limit - return saver, fmt.Errorf("saver took longer than %d blocks to eject", deltaBlocks) - } - } - return tc.Saver{}, nil - } - time.Sleep(time.Second) // Limit how quickly Height() is called back to back per go routine - bp := testutil.BlockPoller[tc.Saver]{CurrentHeight: thorchain.Height, PollFunc: doPoll} - saver, err := bp.DoPoll(ctx, h, h+deltaBlocks) - return saver, err -} - -// PollSwapCompleted polls until the swap is completed. -func PollSwapCompleted(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, txHash string) (any, error) { - h, err := thorchain.Height(ctx) - if err != nil { - return tc.Saver{}, fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (any, error) { - stages, err := thorchain.APIGetTxStages(ctx, txHash) - if err != nil { - time.Sleep(time.Second) // rate limit - return nil, err - } - if stages.SwapFinalised == nil || !stages.SwapFinalised.Completed { - time.Sleep(time.Second) // rate limit - return nil, fmt.Errorf("swap (tx: %s) didn't complete in %d blocks", txHash, deltaBlocks) - } - return nil, nil - } - time.Sleep(time.Second) // Limit how quickly Height() is called back to back per go routine - bp := testutil.BlockPoller[any]{CurrentHeight: thorchain.Height, PollFunc: doPoll} - saver, err := bp.DoPoll(ctx, h, h+deltaBlocks) - return saver, err -} - -// PollOutboundSigned polls until the swap is completed and outbound has been signed. -func PollOutboundSigned(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, txHash string) (any, error) { - h, err := thorchain.Height(ctx) - if err != nil { - return tc.Saver{}, fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (any, error) { - stages, err := thorchain.APIGetTxStages(ctx, txHash) - if err != nil { - time.Sleep(time.Second) // rate limit - return nil, err - } - if stages.OutboundSigned == nil || !stages.OutboundSigned.Completed { - time.Sleep(time.Second) // rate limit - return nil, fmt.Errorf("swap (tx: %s) didn't outbound sign in %d blocks", txHash, deltaBlocks) - } - return nil, nil - } - time.Sleep(time.Second) // Limit how quickly Height() is called back to back per go routine - bp := testutil.BlockPoller[any]{CurrentHeight: thorchain.Height, PollFunc: doPoll} - saver, err := bp.DoPoll(ctx, h, h+deltaBlocks) - return saver, err -} - -// PollForBalanceChaqnge polls until the balance changes. -func PollForBalanceChange(ctx context.Context, chain ibc.Chain, deltaBlocks int64, balance ibc.WalletAmount) error { - h, err := chain.Height(ctx) - if err != nil { - return fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (any, error) { - bal, err := chain.GetBalance(ctx, balance.Address, balance.Denom) - if err != nil { - time.Sleep(time.Second) // rate limit - return nil, err - } - if balance.Amount.Equal(bal) { - time.Sleep(time.Second) // rate limit - return nil, fmt.Errorf("%s balance (%s) hasn't changed: (%s) in %d blocks", balance.Address, bal.String(), balance.Amount.String(), deltaBlocks) - } - return nil, nil - } - time.Sleep(time.Second) // Limit how quickly Height() is called back to back per go routine - bp := testutil.BlockPoller[any]{CurrentHeight: chain.Height, PollFunc: doPoll} - _, err = bp.DoPoll(ctx, h, h+deltaBlocks) - return err -} - -// PollForPoolSuspended polls until the pool is gone or suspended. -func PollForPoolSuspended(ctx context.Context, thorchain *tc.Thorchain, deltaBlocks int64, exoAsset common.Asset) error { - h, err := thorchain.Height(ctx) - if err != nil { - return fmt.Errorf("failed to get height: %w", err) - } - doPoll := func(ctx context.Context, height int64) (any, error) { - pool, err := thorchain.APIGetPool(ctx, exoAsset) - if err != nil { - time.Sleep(time.Second) // rate limit - return nil, err - } - - if pool.Status == "Suspended" { - return nil, nil - } - - time.Sleep(time.Second) // rate limit - return nil, fmt.Errorf("pool (%s) did not suspend in %d blocks", exoAsset, deltaBlocks) - } - time.Sleep(time.Second) // Limit how quickly Height() is called back to back per go routine - bp := testutil.BlockPoller[any]{CurrentHeight: thorchain.Height, PollFunc: doPoll} - _, err = bp.DoPoll(ctx, h, h+deltaBlocks) - return err -} - -func AddAdminIfNecessary(ctx context.Context, thorchain *tc.Thorchain) error { - _, err := thorchain.GetAddress(ctx, "admin") - if err != nil { - if err := thorchain.RecoverKey(ctx, "admin", strings.Repeat("master ", 23)+"notice"); err != nil { - return err - } - } - return nil -} diff --git a/examples/thorchain/features/ragnarok.go b/examples/thorchain/features/ragnarok.go deleted file mode 100644 index fa598ee6..00000000 --- a/examples/thorchain/features/ragnarok.go +++ /dev/null @@ -1,73 +0,0 @@ -package features - -import ( - "context" - "fmt" - "testing" - - sdkmath "cosmossdk.io/math" - - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func Ragnarok( - t *testing.T, - ctx context.Context, - thorchain *tc.Thorchain, - exoChain ibc.Chain, - exoUsers ...ibc.Wallet, -) error { - fmt.Println("#### Ragnarok:", exoChain.Config().Name) - if err := AddAdminIfNecessary(ctx, thorchain); err != nil { - return err - } - - exoChainType, err := common.NewChain(exoChain.Config().Name) - if err != nil { - return err - } - exoAsset := exoChainType.GetGasAsset() - - _, err = thorchain.APIGetPool(ctx, exoAsset) - if err != nil { - return fmt.Errorf("pool (%s) not found to ragnarok, %w", exoChain.Config().Name, err) - } - - exoUsersPreRagBalance := make([]sdkmath.Int, len(exoUsers)) - for i, exoUser := range exoUsers { - exoUsersPreRagBalance[i], err = exoChain.GetBalance(ctx, exoUser.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - return err - } - } - - if err := thorchain.SetMimir(ctx, "admin", fmt.Sprintf("RAGNAROK-%s", exoAsset.MimirString()), "1"); err != nil { - return err - } - - if err := PollForPoolSuspended(ctx, thorchain, 30, exoAsset); err != nil { - return err - } - - for i, exoUser := range exoUsers { - if err := PollForBalanceChange(ctx, exoChain, 100, ibc.WalletAmount{ - Address: exoUser.FormattedAddress(), - Denom: exoChain.Config().Denom, - Amount: exoUsersPreRagBalance[i], - }); err != nil { - return err - } - exoUserPostRagBalance, err := exoChain.GetBalance(ctx, exoUser.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - return err - } - if exoUserPostRagBalance.LTE(exoUsersPreRagBalance[i]) { - return fmt.Errorf("user (%s) balance did not increase after %s ragnarok", exoUser.KeyName(), exoChainType) - } - fmt.Printf("\nUser (%s), pre: %s, post: %s\n", exoUser.KeyName(), exoUsersPreRagBalance[i], exoUserPostRagBalance) - } - - return nil -} diff --git a/examples/thorchain/features/saver_eject.go b/examples/thorchain/features/saver_eject.go deleted file mode 100644 index 0984aba2..00000000 --- a/examples/thorchain/features/saver_eject.go +++ /dev/null @@ -1,208 +0,0 @@ -package features - -import ( - "context" - "fmt" - "math" - "math/rand" - "strings" - "sync" - "testing" - - sdkmath "cosmossdk.io/math" - - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func SaverEject( - t *testing.T, - ctx context.Context, - mimirLock *sync.Mutex, // Lock must be used across all chains testing saver eject in parallel - thorchain *tc.Thorchain, - exoChain ibc.Chain, - exoSavers ...ibc.Wallet, // Savers that should not be ejected -) (exoUser ibc.Wallet, err error) { - fmt.Println("#### Saver Eject:", exoChain.Config().Name) - if err := AddAdminIfNecessary(ctx, thorchain); err != nil { - return exoUser, err - } - - users, err := GetAndFundTestUsers(t, ctx, fmt.Sprintf("%s-SaverEject", exoChain.Config().Name), exoChain) - if err != nil { - return exoUser, err - } - exoUser = users[0] - - // Reset mimirs - mimirLock.Lock() - mimirs, err := thorchain.APIGetMimirs(ctx) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - - // Set max synth per pool depth to 100% of pool amount - if mimir, ok := mimirs[strings.ToUpper("MaxSynthPerPoolDepth")]; ok && mimir != int64(5000) { - if err = thorchain.SetMimir(ctx, "admin", "MaxSynthPerPoolDepth", "5000"); err != nil { - mimirLock.Unlock() - return exoUser, err - } - } - - // Disable saver ejection - if mimir, ok := mimirs[strings.ToUpper("SaversEjectInterval")]; ok && mimir != int64(0) || !ok { - if err = thorchain.SetMimir(ctx, "admin", "SaversEjectInterval", "0"); err != nil { - mimirLock.Unlock() - return exoUser, err - } - } - - exoChainType, err := common.NewChain(exoChain.Config().Name) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - exoAsset := exoChainType.GetGasAsset() - - pool, err := thorchain.APIGetPool(ctx, exoAsset) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - saveAmount := sdkmath.NewUintFromString(pool.BalanceAsset). - MulUint64(2000).QuoUint64(10_000) - - saverQuote, err := thorchain.APIGetSaverDepositQuote(ctx, exoAsset, saveAmount) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - - // store expected range to fail if received amount is outside 5% tolerance - quoteOut := sdkmath.NewUintFromString(saverQuote.ExpectedAmountDeposit) - tolerance := quoteOut.QuoUint64(20) - if saverQuote.Fees.Outbound != nil { - outboundFee := sdkmath.NewUintFromString(*saverQuote.Fees.Outbound) - quoteOut = quoteOut.Add(outboundFee) - } - minExpectedSaver := quoteOut.Sub(tolerance) - maxExpectedSaver := quoteOut.Add(tolerance) - - // send random half as memoless saver - memo := "" - if rand.Intn(2) == 0 || exoChainType.String() == common.GAIAChain.String() { // if gaia memo is empty, bifrost errors - memo = fmt.Sprintf("+:%s", exoAsset.GetSyntheticAsset()) - } - - exoInboundAddr, _, err := thorchain.APIGetInboundAddress(ctx, exoChainType.String()) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - - wallet := ibc.WalletAmount{ - Address: exoInboundAddr, - Denom: exoChain.Config().Denom, - Amount: sdkmath.Int(saveAmount). - MulRaw(int64(math.Pow10(int(*exoChain.Config().CoinDecimals)))). - QuoRaw(int64(math.Pow10(int(*thorchain.Config().CoinDecimals)))), // save amount is based on 8 dec - } - if memo != "" { - _, err = exoChain.SendFundsWithNote(ctx, exoUser.KeyName(), wallet, memo) - } else { - err = exoChain.SendFunds(ctx, exoUser.KeyName(), wallet) - } - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - - errMsgCommon := fmt.Sprintf("saver (%s - %s) of asset %s", exoUser.KeyName(), exoUser.FormattedAddress(), exoAsset) - saver, err := PollForSaver(ctx, thorchain, 30, exoAsset, exoUser) - if err != nil { - mimirLock.Unlock() - return exoUser, fmt.Errorf("%s not found, %w", errMsgCommon, err) - } - - deposit := sdkmath.NewUintFromString(saver.AssetDepositValue) - if deposit.LT(minExpectedSaver) { - mimirLock.Unlock() - return exoUser, fmt.Errorf("%s deposit: %s, min expected: %s", errMsgCommon, deposit, minExpectedSaver) - } - if deposit.GT(maxExpectedSaver) { - mimirLock.Unlock() - return exoUser, fmt.Errorf("%s deposit: %s, max expected: %s", errMsgCommon, deposit, maxExpectedSaver) - } - - exoUserPreEjectBalance, err := exoChain.GetBalance(ctx, exoUser.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - - exoSaversBalance := make([]sdkmath.Int, len(exoSavers)) - for i, exoSaver := range exoSavers { - exoSaversBalance[i], err = exoChain.GetBalance(ctx, exoSaver.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - } - - mimirs, err = thorchain.APIGetMimirs(ctx) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - - // Set mimirs - if mimir, ok := mimirs[strings.ToUpper("MaxSynthPerPoolDepth")]; ok && mimir != int64(500) || !ok { - if err := thorchain.SetMimir(ctx, "admin", "MaxSynthPerPoolDepth", "500"); err != nil { - mimirLock.Unlock() - return exoUser, err - } - } - - if mimir, ok := mimirs[strings.ToUpper("SaversEjectInterval")]; ok && mimir != int64(1) || !ok { - if err := thorchain.SetMimir(ctx, "admin", "SaversEjectInterval", "1"); err != nil { - mimirLock.Unlock() - return exoUser, err - } - } - - _, err = PollForEjectedSaver(ctx, thorchain, 30, exoAsset, exoUser) - if err != nil { - mimirLock.Unlock() - return exoUser, err - } - mimirLock.Unlock() - - if err = PollForBalanceChange(ctx, exoChain, 15, ibc.WalletAmount{ - Address: exoUser.FormattedAddress(), - Denom: exoChain.Config().Denom, - Amount: exoUserPreEjectBalance, - }); err != nil { - return exoUser, err - } - exoUserPostEjectBalance, err := exoChain.GetBalance(ctx, exoUser.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - return exoUser, err - } - if exoUserPostEjectBalance.LTE(exoUserPreEjectBalance) { - return exoUser, fmt.Errorf("user (%s) balance (%s) must be greater after ejection: %s", exoUser.KeyName(), exoUserPostEjectBalance, exoUserPreEjectBalance) - } - - for i, exoSaver := range exoSavers { - exoSaverPostBalance, err := exoChain.GetBalance(ctx, exoSaver.FormattedAddress(), exoChain.Config().Denom) - if err != nil { - return exoUser, err - } - if !exoSaverPostBalance.Equal(exoSaversBalance[i]) { - return exoUser, fmt.Errorf("saver's (%s) post balance (%s) should be the same as (%s)", exoSaver.KeyName(), exoSaverPostBalance, exoSaversBalance[i]) - } - } - - return exoUser, nil -} diff --git a/examples/thorchain/features/savers.go b/examples/thorchain/features/savers.go deleted file mode 100644 index b3a1c9bf..00000000 --- a/examples/thorchain/features/savers.go +++ /dev/null @@ -1,102 +0,0 @@ -package features - -import ( - "context" - "fmt" - "math" - "math/rand" - "testing" - - sdkmath "cosmossdk.io/math" - - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func Saver( - t *testing.T, - ctx context.Context, - thorchain *tc.Thorchain, - exoChain ibc.Chain, -) (exoUser ibc.Wallet, err error) { - fmt.Println("#### Savers:", exoChain.Config().Name) - users, err := GetAndFundTestUsers(t, ctx, fmt.Sprintf("%s-Saver", exoChain.Config().Name), exoChain) - if err != nil { - return exoUser, err - } - exoUser = users[0] - - exoChainType, err := common.NewChain(exoChain.Config().Name) - if err != nil { - return exoUser, err - } - exoAsset := exoChainType.GetGasAsset() - - pool, err := thorchain.APIGetPool(ctx, exoAsset) - if err != nil { - return exoUser, err - } - saveAmount := sdkmath.NewUintFromString(pool.BalanceAsset). - MulUint64(500).QuoUint64(10_000) - - saverQuote, err := thorchain.APIGetSaverDepositQuote(ctx, exoAsset, saveAmount) - if err != nil { - return exoUser, err - } - - // store expected range to fail if received amount is outside 5% tolerance - quoteOut := sdkmath.NewUintFromString(saverQuote.ExpectedAmountDeposit) - tolerance := quoteOut.QuoUint64(20) - if saverQuote.Fees.Outbound != nil { - outboundFee := sdkmath.NewUintFromString(*saverQuote.Fees.Outbound) - quoteOut = quoteOut.Add(outboundFee) - } - minExpectedSaver := quoteOut.Sub(tolerance) - maxExpectedSaver := quoteOut.Add(tolerance) - - // send random half as memoless saver - memo := "" - if rand.Intn(2) == 0 || exoChainType.String() == common.GAIAChain.String() { // if gaia memo is empty, bifrost errors, maybe benign - memo = fmt.Sprintf("+:%s", exoAsset.GetSyntheticAsset()) - } - - exoInboundAddr, _, err := thorchain.APIGetInboundAddress(ctx, exoChainType.String()) - if err != nil { - return exoUser, err - } - - wallet := ibc.WalletAmount{ - Address: exoInboundAddr, - Denom: exoChain.Config().Denom, - Amount: sdkmath.Int(saveAmount). - MulRaw(int64(math.Pow10(int(*exoChain.Config().CoinDecimals)))). - QuoRaw(int64(math.Pow10(int(*thorchain.Config().CoinDecimals)))), // save amount is based on 8 dec - } - if memo != "" { - _, err = exoChain.SendFundsWithNote(ctx, exoUser.KeyName(), wallet, memo) - if err != nil { - return exoUser, err - } - } else { - if err := exoChain.SendFunds(ctx, exoUser.KeyName(), wallet); err != nil { - return exoUser, err - } - } - - errMsgCommon := fmt.Sprintf("saver (%s - %s) of asset %s", exoUser.KeyName(), exoUser.FormattedAddress(), exoAsset) - saver, err := PollForSaver(ctx, thorchain, 30, exoAsset, exoUser) - if err != nil { - return exoUser, fmt.Errorf("%s not found, %w", errMsgCommon, err) - } - - deposit := sdkmath.NewUintFromString(saver.AssetDepositValue) - if deposit.LT(minExpectedSaver) { - return exoUser, fmt.Errorf("%s deposit: %s, min expected: %s", errMsgCommon, deposit, minExpectedSaver) - } - if deposit.GT(maxExpectedSaver) { - return exoUser, fmt.Errorf("%s deposit: %s, max expected: %s", errMsgCommon, deposit, maxExpectedSaver) - } - - return exoUser, nil -} diff --git a/examples/thorchain/features/swap.go b/examples/thorchain/features/swap.go deleted file mode 100644 index df911656..00000000 --- a/examples/thorchain/features/swap.go +++ /dev/null @@ -1,185 +0,0 @@ -package features - -import ( - "context" - "fmt" - "math" - "testing" - - sdkmath "cosmossdk.io/math" - - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/thorchain/common" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func SingleSwap( - t *testing.T, - ctx context.Context, - thorchain *tc.Thorchain, - srcChain ibc.Chain, - destChain ibc.Chain, -) error { - fmt.Println("#### Single swap:", srcChain.Config().Name, "to", destChain.Config().Name) - users, err := GetAndFundTestUsers(t, ctx, fmt.Sprintf("swap-%s-%s", srcChain.Config().Name, destChain.Config().Name), srcChain, destChain) - if err != nil { - return err - } - srcUser, destUser := users[0], users[1] - - return singleSwap(ctx, thorchain, srcChain, srcUser, destChain, destUser) -} - -func DualSwap( - t *testing.T, - ctx context.Context, - thorchain *tc.Thorchain, - srcChain ibc.Chain, - destChain ibc.Chain, -) error { - fmt.Println("#### Dual swap:", srcChain.Config().Name, "<->", destChain.Config().Name) - users, err := GetAndFundTestUsers(t, ctx, fmt.Sprintf("swap-%s-%s", srcChain.Config().Name, destChain.Config().Name), srcChain, destChain) - if err != nil { - return err - } - srcUser, destUser := users[0], users[1] - - // Perform these swap sequential so the balance checks work properly - if err := singleSwap(ctx, thorchain, srcChain, srcUser, destChain, destUser); err != nil { - return err - } - - return singleSwap(ctx, thorchain, destChain, destUser, srcChain, srcUser) -} - -// swap 0.5% of pool depth. -func singleSwap( - ctx context.Context, - thorchain *tc.Thorchain, - srcChain ibc.Chain, - srcUser ibc.Wallet, - destChain ibc.Chain, - destUser ibc.Wallet, -) error { - srcChainType, err := common.NewChain(srcChain.Config().Name) - if err != nil { - return fmt.Errorf("srcChainType assignment, %w", err) - } - destChainType, err := common.NewChain(destChain.Config().Name) - if err != nil { - return fmt.Errorf("destChainType assignment, %w", err) - } - - srcChainAsset := srcChainType.GetGasAsset() - destChainAsset := destChainType.GetGasAsset() - pool, err := thorchain.APIGetPool(ctx, srcChainAsset) - if err != nil { - return fmt.Errorf("getting srcChain pool, %w", err) - } - - swapAmount := sdkmath.NewUintFromString(pool.BalanceAsset).QuoUint64(200) - swapQuote, err := thorchain.APIGetSwapQuote(ctx, srcChainAsset, destChainAsset, swapAmount) - if err != nil { - return fmt.Errorf("get swap quote, %w", err) - } - - // store expected range to fail if received amount is outside 5% tolerance - quoteOut := sdkmath.NewUintFromString(swapQuote.ExpectedAmountOut) - tolerance := quoteOut.QuoUint64(14) // TODO: was 5%, but got failures, now 7.1% - if swapQuote.Fees.Outbound != nil { - outboundFee := sdkmath.NewUintFromString(*swapQuote.Fees.Outbound) - quoteOut = quoteOut.Add(outboundFee) - - // handle 2x gas rate fluctuation (add 1x outbound fee to tolerance) - tolerance = tolerance.Add(outboundFee) - } - minExpectedSwapAmount := quoteOut.Sub(tolerance). - MulUint64(uint64(math.Pow10(int(*destChain.Config().CoinDecimals)))). - QuoUint64(uint64(math.Pow10(int(*thorchain.Config().CoinDecimals)))) - maxExpectedSwapAmount := quoteOut.Add(tolerance). - MulUint64(uint64(math.Pow10(int(*destChain.Config().CoinDecimals)))). - QuoUint64(uint64(math.Pow10(int(*thorchain.Config().CoinDecimals)))) - - destUserBalancePreSwap, err := destChain.GetBalance(ctx, destUser.FormattedAddress(), destChain.Config().Denom) - if err != nil { - return err - } - - srcChainInboundAddr, _, err := thorchain.APIGetInboundAddress(ctx, srcChainType.String()) - if err != nil { - return fmt.Errorf("get srcChain inbound address: %w", err) - } - memo := fmt.Sprintf("=:%s:%s", destChainAsset, destUser.FormattedAddress()) - txHash, err := srcChain.SendFundsWithNote(ctx, srcUser.KeyName(), ibc.WalletAmount{ - Address: srcChainInboundAddr, - Denom: srcChain.Config().Denom, - Amount: sdkmath.Int(swapAmount). - MulRaw(int64(math.Pow10(int(*srcChain.Config().CoinDecimals)))). - QuoRaw(int64(math.Pow10(int(*thorchain.Config().CoinDecimals)))), // swap amount is based on 8 dec, - }, memo) - if err != nil { - return err - } - - if txHash[0:2] == "0x" { - txHash = txHash[2:] - } - - fmt.Println("Swap tx hash:", txHash) - // ----- VerifyOutbound ----- - if destChainType.String() == common.THORChain.String() { - _, err = PollSwapCompleted(ctx, thorchain, 30, txHash) - if err != nil { - return err - } - } else { - _, err = PollOutboundSigned(ctx, thorchain, 200, txHash) - if err != nil { - return fmt.Errorf("outbound chain: %s, err: %w", destChainType, err) - } - } - - details, err := thorchain.APIGetTxDetails(ctx, txHash) - if err != nil { - return err - } - - if len(details.OutTxs) != 1 { - return fmt.Errorf("expected exactly one out transaction, tx: %s, OutTxs: %d", txHash, len(details.OutTxs)) - } - - if len(details.Actions) != 1 { - return fmt.Errorf("expected exactly one action, tx: %s, actions: %d", txHash, len(details.Actions)) - } - - // verify outbound amount + max gas within expected range - action := details.Actions[0] - out := details.OutTxs[0] - outAmountPlusMaxGas := sdkmath.NewUintFromString(out.Coins[0].Amount) - maxGas := action.MaxGas[0] - if maxGas.Asset == destChainAsset.String() { - outAmountPlusMaxGas = outAmountPlusMaxGas.Add(sdkmath.NewUintFromString(maxGas.Amount)) - } else { // shouldn't enter here for atom -> rune - var maxGasAssetValue sdkmath.Uint - maxGasAssetValue, err = thorchain.ConvertAssetAmount(ctx, maxGas, destChainAsset.String()) - if err != nil { - return fmt.Errorf("failed to convert asset, %w", err) - } - outAmountPlusMaxGas = outAmountPlusMaxGas.Add(maxGasAssetValue) - } - - destUserBalancePostSwap, err := destChain.GetBalance(ctx, destUser.FormattedAddress(), destChain.Config().Denom) - if err != nil { - return err - } - actualSwapAmount := destUserBalancePostSwap.Sub(destUserBalancePreSwap) - if actualSwapAmount.LT(sdkmath.Int(minExpectedSwapAmount)) { - return fmt.Errorf("actual swap amount: %s %s, min expected: %s", actualSwapAmount, destChain.Config().Denom, minExpectedSwapAmount) - } - if actualSwapAmount.GT(sdkmath.Int(maxExpectedSwapAmount)) { - return fmt.Errorf("actual swap amount: %s %s, max expected: %s", actualSwapAmount, destChain.Config().Denom, maxExpectedSwapAmount) - } - // TODO: compare outAmountPlusMaxGas -> actualSwapAmount - fmt.Println("outAmountPlusMaxGas:", outAmountPlusMaxGas, "actualSwapAmount:", actualSwapAmount) - return nil -} diff --git a/examples/thorchain/helper_test.go b/examples/thorchain/helper_test.go deleted file mode 100644 index 639ecf17..00000000 --- a/examples/thorchain/helper_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package thorchain_test - -import ( - "context" - "fmt" - "regexp" - "time" - - "github.com/cosmos/interchaintest/v10/ibc" -) - -func GetEthAddressFromStdout(stdout string) (string, error) { - // Define the regular expression pattern - re := regexp.MustCompile(`"value":"(0x[0-9a-fA-F]+)"`) - - // Find the first match - matches := re.FindStringSubmatch(stdout) - if len(matches) <= 1 { - return "", fmt.Errorf("failed to parse out contract address") - } - // Extract the value - return matches[1], nil -} - -// We are running many nodes, using many resources. This function is similar to -// testutils.WaitForBlocks(), but does not hammer calls as fast as possible. -func NiceWaitForBlocks(ctx context.Context, delta int64, chain ibc.Chain) error { - startingHeight, err := chain.Height(ctx) - if err != nil { - return err - } - - currentHeight := startingHeight - for currentHeight < startingHeight+delta { - time.Sleep(time.Millisecond * 200) - currentHeight, err = chain.Height(ctx) - if err != nil { - return err - } - } - - return nil -} diff --git a/examples/thorchain/setup_test.go b/examples/thorchain/setup_test.go deleted file mode 100644 index fd4973c6..00000000 --- a/examples/thorchain/setup_test.go +++ /dev/null @@ -1,350 +0,0 @@ -package thorchain_test - -import ( - "context" - "fmt" - "strings" - "testing" - "time" - - "github.com/docker/docker/client" - ethcommon "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" - "golang.org/x/sync/errgroup" - - _ "embed" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/hd" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/chain/cosmos" - "github.com/cosmos/interchaintest/v10/chain/ethereum" - "github.com/cosmos/interchaintest/v10/chain/ethereum/foundry" - "github.com/cosmos/interchaintest/v10/chain/ethereum/geth" - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/chain/utxo" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func StartExoChains(t *testing.T, ctx context.Context, client *client.Client, network string) ExoChains { - chainSpecs := []*interchaintest.ChainSpec{ - EthChainSpec("geth"), // only use this chain spec for eth or the one below - // EthChainSpec("anvil"), - GaiaChainSpec(), - BtcChainSpec(), - BchChainSpec(), - LtcChainSpec(), - DogeChainSpec(), - BscChainSpec(), - } - cf0 := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), chainSpecs) - - chains, err := cf0.Chains(t.Name()) - require.NoError(t, err) - - exoChains := make(map[string]*ExoChain, len(chains)) - for _, chain := range chains { - name := chain.Config().Name - exoChains[name] = &ExoChain{ - chain: chain, - } - - if name == "BTC" || name == "BCH" || name == "LTC" { - utxoChain := chain.(*utxo.UtxoChain) - utxoChain.UnloadWalletAfterUse(true) - } - - if name == "GAIA" { - exoChains[name].genWallets = BuildGaiaWallets(t, 5, chain.Config()) - } - } - - ic := interchaintest.NewInterchain() - for _, chain := range chains { - name := chain.Config().Name - var additionalGenesisWallets []ibc.WalletAmount - for _, wallet := range exoChains[name].genWallets { - additionalGenesisWallets = append(additionalGenesisWallets, ibc.WalletAmount{ - Address: wallet.FormattedAddress(), - Amount: sdkmath.NewInt(100_000_000), - Denom: chain.Config().Denom, - }) - } - if name == "GAIA" { - // this wallet just stops bifrost complaining about it not existing - additionalGenesisWallets = append(additionalGenesisWallets, ibc.WalletAmount{ - Address: "cosmos1zf3gsk7edzwl9syyefvfhle37cjtql35427vcp", - Amount: sdkmath.NewInt(1_000_000), - Denom: chain.Config().Denom, - }) - } - ic.AddChain(chain, additionalGenesisWallets...) - } - - require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: true, - })) - t.Cleanup(func() { - _ = ic.Close() - for _, chain := range chains { - utxoChain, ok := chain.(*utxo.UtxoChain) - if ok { - utxoChain.Stop() - } - } - }) - - return exoChains -} - -func StartThorchain(t *testing.T, ctx context.Context, client *client.Client, network string, exoChains ExoChains, ethRouterContractAddress string, bscRouterContractAddress string) *tc.Thorchain { - numThorchainValidators := 1 - numThorchainFullNodes := 0 - - bifrostEnvOverrides := map[string]string{ - "BIFROST_CHAINS_GAIA_BLOCK_SCANNER_START_BLOCK_HEIGHT": "2", - } - for _, exoChain := range exoChains { - name := exoChain.chain.Config().Name - hostKey := fmt.Sprintf("%s_HOST", name) - bifrostEnvOverrides[hostKey] = exoChain.chain.GetRPCAddress() - if name == "GAIA" { - hostGRPCKey := fmt.Sprintf("%s_GRPC_HOST", name) - bifrostEnvOverrides[hostGRPCKey] = exoChain.chain.GetGRPCAddress() - } - disableChainKey := fmt.Sprintf("BIFROST_CHAINS_%s_DISABLED", name) - bifrostEnvOverrides[disableChainKey] = "false" - if name == "BSC" { - hostKey = fmt.Sprintf("BIFROST_CHAINS_%s_RPC_HOST", name) - bifrostEnvOverrides[hostKey] = exoChain.chain.GetRPCAddress() - bsRpcHost := fmt.Sprintf("BIFROST_CHAINS_%s_BLOCK_SCANNER_RPC_HOST", name) - bifrostEnvOverrides[bsRpcHost] = exoChain.chain.GetRPCAddress() - } - } - thorchainChainSpec := ThorchainDefaultChainSpec(t.Name(), numThorchainValidators, numThorchainFullNodes, ethRouterContractAddress, bscRouterContractAddress, nil, bifrostEnvOverrides) - - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - thorchainChainSpec, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - thorchain := chains[0].(*tc.Thorchain) - - ic := interchaintest.NewInterchain(). - AddChain(thorchain) - - require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: true, - })) - t.Cleanup(func() { - _ = ic.Close() - }) - - err = thorchain.StartAllValSidecars(ctx) - require.NoError(t, err, "failed starting validator sidecars") - - // Give some time for bifrost to initialize before any tests start - time.Sleep(time.Second * 15) - require.NoError(t, err) - - return thorchain -} - -func SetupContracts(ctx context.Context, ethExoChain *ExoChain, bscExoChain *ExoChain) (ethContractAddr, bscContractAddr string, err error) { - eg, egCtx := errgroup.WithContext(ctx) - eg.Go(func() error { - var err error - if ethExoChain.chain.Config().Bin == "geth" { - ethContractAddr, err = SetupGethContracts(egCtx, ethExoChain) - } else { - ethContractAddr, err = SetupAnvilContracts(egCtx, ethExoChain) - } - return err - }) - eg.Go(func() error { - var err error - bscContractAddr, err = SetupGethContracts(egCtx, bscExoChain) - return err - }) - - return ethContractAddr, bscContractAddr, eg.Wait() -} - -//go:embed contracts/eth-router-abi.json -var ethRouterAbi []byte - -//go:embed contracts/eth-router-bytecode.txt -var ethRouterByteCode []byte - -//go:embed contracts/router-abi.json -var routerAbi []byte - -//go:embed contracts/router-bytecode.txt -var routerByteCode []byte - -func SetupGethContracts(ctx context.Context, exoChain *ExoChain) (string, error) { - abi := routerAbi - byteCode := routerByteCode - if exoChain.chain.Config().Name == "ETH" { - abi = ethRouterAbi - byteCode = append(ethRouterByteCode, []byte("000000000000000000000000de06987c28d839daaefb6c85816a2cc55277654c")...) // RUNE token (doesn't matter) - } - - ethChain := exoChain.chain.(*geth.GethChain) - - ethUserInitialAmount := ethereum.ETHER.MulRaw(100) - - ethUser, err := interchaintest.GetAndFundTestUserWithMnemonic(ctx, "user", strings.Repeat("dog ", 23)+"fossil", ethUserInitialAmount, ethChain) - if err != nil { - return "", err - } - - ethRouterContractAddress, err := ethChain.DeployContract(ctx, ethUser.KeyName(), abi, byteCode) - if err != nil { - return "", err - } - if ethRouterContractAddress == "" { - return "", fmt.Errorf("router contract address for (%s) chain is empty", ethChain.Config().Name) - } - if !ethcommon.IsHexAddress(ethRouterContractAddress) { - return "", fmt.Errorf("router contract address for (%s) chain is not a hex address", ethChain.Config().Name) - } - - return ethRouterContractAddress, nil -} - -func SetupAnvilContracts(ctx context.Context, exoChain *ExoChain) (string, error) { - ethChain := exoChain.chain.(*foundry.AnvilChain) - - ethUserInitialAmount := ethereum.ETHER.MulRaw(2) - - ethUser, err := interchaintest.GetAndFundTestUserWithMnemonic(ctx, "user", strings.Repeat("dog ", 23)+"fossil", ethUserInitialAmount, ethChain) - if err != nil { - return "", err - } - - stdout, _, err := ethChain.ForgeScript(ctx, ethUser.KeyName(), foundry.ForgeScriptOpts{ - ContractRootDir: "contracts", - SolidityContract: "script/Token.s.sol", - RawOptions: []string{"--sender", ethUser.FormattedAddress(), "--json"}, - }) - if err != nil { - return "", err - } - - tokenContractAddress, err := GetEthAddressFromStdout(string(stdout)) - if err != nil { - return "", err - } - if tokenContractAddress == "" { - return "", fmt.Errorf("token contract address for (%s) chain is empty", ethChain.Config().Name) - } - if !ethcommon.IsHexAddress(tokenContractAddress) { - return "", fmt.Errorf("token contract address for (%s) chain is not a hex address", ethChain.Config().Name) - } - - stdout, _, err = ethChain.ForgeScript(ctx, ethUser.KeyName(), foundry.ForgeScriptOpts{ - ContractRootDir: "contracts", - SolidityContract: "script/Router.s.sol", - RawOptions: []string{"--sender", ethUser.FormattedAddress(), "--json"}, - }) - if err != nil { - return "", err - } - - ethRouterContractAddress, err := GetEthAddressFromStdout(string(stdout)) - if err != nil { - return "", err - } - if ethRouterContractAddress == "" { - return "", fmt.Errorf("router contract address for (%s) chain is empty", ethChain.Config().Name) - } - if !ethcommon.IsHexAddress(ethRouterContractAddress) { - return "", fmt.Errorf("router contract address for (%s) chain is not a hex address", ethChain.Config().Name) - } - - return ethRouterContractAddress, nil -} - -func SetupGaia(t *testing.T, ctx context.Context, exoChain *ExoChain) *errgroup.Group { - gaia := exoChain.chain.(*cosmos.CosmosChain) - eg, egCtx := errgroup.WithContext(ctx) - eg.Go(func() error { - for _, genWallet := range exoChain.genWallets { - err := gaia.RecoverKey(egCtx, genWallet.KeyName(), genWallet.Mnemonic()) - if err != nil { - return err - } - } - - // Send 100 txs on gaia so that bifrost can automatically set the network fee - // Sim testing can directly use bifrost to do this, right now, we can't, but may in the future - val0 := gaia.GetNode() - amount := fmt.Sprintf("%s%s", sdkmath.NewInt(1_000_000).String(), gaia.Config().Denom) - for i := 0; i < 100/len(exoChain.genWallets)+1; i++ { - cmd := "" - for j, genWallet := range exoChain.genWallets { - toUser := exoChain.genWallets[(j+1)%len(exoChain.genWallets)] - bankSend := []string{"bank", "send", genWallet.KeyName(), toUser.FormattedAddress(), amount} - bankSend = val0.TxCommand(genWallet.KeyName(), bankSend...) - if j < len(exoChain.genWallets)-1 { - bankSend = append(bankSend, "&& ") - } - cmd = fmt.Sprintf("%s%s", cmd, strings.Join(bankSend, " ")) - } - _, _, err := val0.Exec(ctx, []string{"sh", "-c", cmd}, val0.Chain.Config().Env) - if err != nil { - fmt.Println("Gaia send funds err:", err) - } - err = NiceWaitForBlocks(ctx, 1, gaia) - if err != nil { - return err - } - } - return nil - }) - - return eg -} - -func BuildGaiaWallets(t *testing.T, numWallets int, cfg ibc.ChainConfig) []ibc.Wallet { - registry := codectypes.NewInterfaceRegistry() - cryptocodec.RegisterInterfaces(registry) - cdc := codec.NewProtoCodec(registry) - kr := keyring.NewInMemory(cdc) - - gaiaWallets := make([]ibc.Wallet, numWallets) - for i := 0; i < numWallets; i++ { - keyName := fmt.Sprintf("tx100_%d", i) - record, mnemonic, err := kr.NewMnemonic( - keyName, - keyring.English, - hd.CreateHDPath(118, 0, 0).String(), - "", // Empty passphrase. - hd.Secp256k1, - ) - require.NoError(t, err) - - addrBytes, err := record.GetAddress() - require.NoError(t, err) - - gaiaWallets[i] = cosmos.NewWallet(keyName, addrBytes, mnemonic, cfg) - } - - return gaiaWallets -} diff --git a/examples/thorchain/thorchain_hardfork_test.go b/examples/thorchain/thorchain_hardfork_test.go deleted file mode 100644 index ba02700f..00000000 --- a/examples/thorchain/thorchain_hardfork_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package thorchain_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" - - _ "embed" - - "github.com/cosmos/interchaintest/v10" - tc "github.com/cosmos/interchaintest/v10/chain/thorchain" - "github.com/cosmos/interchaintest/v10/ibc" - //"github.com/cosmos/interchaintest/v10/ibc". - "github.com/cosmos/interchaintest/v10/testutil" -) - -// //go:embed mainnet-genesis.json. -var genesisBz []byte - -func TestThorchainHardFork(t *testing.T) { - numThorchainValidators := 2 - numThorchainFullNodes := 0 - - if testing.Short() { - t.Skip("skipping in short mode") - } - t.Parallel() - - client, network := interchaintest.DockerSetup(t) - ctx := context.Background() - - // ---------------------------- - // Set up thorchain and others - // ---------------------------- - thorchainChainSpec := ThorchainDefaultChainSpec(t.Name(), numThorchainValidators, numThorchainFullNodes, "", "", nil, nil) - thorchainChainSpec.Bech32Prefix = "thor" - thorchainChainSpec.Images[0].Version = "local-mainnet" - - // Start from mainnet state - thorchainChainSpec.Genesis = &ibc.GenesisConfig{ - Contents: genesisBz, - AllValidators: false, // only top 2/3 VP - MaxVals: 4, // MAKE SURE YOUR MACHINE CAN HANDLE THIS, need 63 to reach consensus - } - - // TODO: add router contracts to thorchain - // Set ethereum RPC - // Move other chains to above for setup too? - - chainSpecs := []*interchaintest.ChainSpec{ - thorchainChainSpec, - } - - log := zaptest.NewLogger(t) - - cf := interchaintest.NewBuiltinChainFactory(log, chainSpecs) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - thorchain := chains[0].(*tc.Thorchain) - - ic := interchaintest.NewInterchain(). - AddChain(thorchain).WithLog(log) - - require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: true, - })) - t.Cleanup(func() { - _ = ic.Close() - }) - - err = testutil.WaitForBlocks(ctx, 10, thorchain) - require.NoError(t, err, "thorchain failed to make blocks") -} diff --git a/examples/thorchain/thorchain_test.go b/examples/thorchain/thorchain_test.go deleted file mode 100644 index 81d5b329..00000000 --- a/examples/thorchain/thorchain_test.go +++ /dev/null @@ -1,125 +0,0 @@ -package thorchain_test - -import ( - "context" - "fmt" - "math/rand" - "sync" - "testing" - - "github.com/stretchr/testify/require" - "golang.org/x/sync/errgroup" - - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/examples/thorchain/features" -) - -// go test -timeout 20m -v -run TestThorchain examples/thorchain/*.go -count 1. -func TestThorchainSim(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - t.Parallel() - - ctx := context.Background() - client, network := interchaintest.DockerSetup(t) - - // Start non-thorchain chains - exoChains := StartExoChains(t, ctx, client, network) - gaiaEg := SetupGaia(t, ctx, exoChains["GAIA"]) - ethRouterContractAddress, bscRouterContractAddress, err := SetupContracts(ctx, exoChains["ETH"], exoChains["BSC"]) - require.NoError(t, err) - - // Start thorchain - thorchain := StartThorchain(t, ctx, client, network, exoChains, ethRouterContractAddress, bscRouterContractAddress) - require.NoError(t, gaiaEg.Wait()) // Wait for 100 transactions before starting tests - - // -------------------------------------------------------- - // Bootstrap pool - // -------------------------------------------------------- - eg, egCtx := errgroup.WithContext(ctx) - for _, exoChain := range exoChains { - eg.Go(func() error { - _, lper, err := features.DualLp(t, egCtx, thorchain, exoChain.chain) - if err != nil { - return err - } - exoChain.lpers = append(exoChain.lpers, lper) - return nil - }) - } - require.NoError(t, eg.Wait()) - - // -------------------------------------------------------- - // Savers - // -------------------------------------------------------- - eg, egCtx = errgroup.WithContext(ctx) - for _, exoChain := range exoChains { - eg.Go(func() error { - saver, err := features.Saver(t, egCtx, thorchain, exoChain.chain) - if err != nil { - return err - } - exoChain.savers = append(exoChain.savers, saver) - return nil - }) - } - require.NoError(t, eg.Wait()) - - // -------------------------------------------------------- - // Arb - // -------------------------------------------------------- - _, err = features.Arb(t, ctx, thorchain, exoChains.GetChains()...) - require.NoError(t, err) - - // -------------------------------------------------------- - // Swap - only swaps non-rune assets for now - // -------------------------------------------------------- - eg, egCtx = errgroup.WithContext(ctx) - exoChainList := exoChains.GetChains() - for i := range exoChainList { - - fmt.Println("Chain:", i, "Name:", exoChainList[i].Config().Name) - randomChain := rand.Intn(len(exoChainList)) - if i == randomChain && i == 0 { - randomChain++ - } else if i == randomChain { - randomChain-- - } - eg.Go(func() error { - return features.DualSwap(t, ctx, thorchain, exoChainList[i], exoChainList[randomChain]) - }) - } - require.NoError(t, eg.Wait()) - - // ------------------------------------------------------------ - // Saver Eject - must be done sequentially due to mimir states - // ------------------------------------------------------------ - mimirLock := sync.Mutex{} - eg, egCtx = errgroup.WithContext(ctx) - for _, exoChain := range exoChains { - eg.Go(func() error { - _, err = features.SaverEject(t, egCtx, &mimirLock, thorchain, exoChain.chain, exoChain.savers...) - if err != nil { - return err - } - return nil - }) - } - require.NoError(t, eg.Wait()) - - // -------------------------------------------------------- - // Ragnarok - // -------------------------------------------------------- - eg, egCtx = errgroup.WithContext(ctx) - for _, exoChain := range exoChains { - eg.Go(func() error { - refundWallets := append(exoChain.lpers, exoChain.savers...) - return features.Ragnarok(t, egCtx, thorchain, exoChain.chain, refundWallets...) - }) - } - require.NoError(t, eg.Wait()) - - // err = testutil.WaitForBlocks(ctx, 300, thorchain) - // require.NoError(t, err, "thorchain failed to make blocks") -} diff --git a/examples/utxo/start_test.go b/examples/utxo/start_test.go deleted file mode 100644 index 52b2615e..00000000 --- a/examples/utxo/start_test.go +++ /dev/null @@ -1,137 +0,0 @@ -package utxo_test - -import ( - "context" - "fmt" - "math" - "strconv" - "testing" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" - "golang.org/x/sync/errgroup" - - sdkmath "cosmossdk.io/math" - - "github.com/cosmos/interchaintest/v10" - "github.com/cosmos/interchaintest/v10/chain/utxo" - "github.com/cosmos/interchaintest/v10/ibc" -) - -func TestUtxo(t *testing.T) { - if testing.Short() { - t.Skip() - } - - t.Parallel() - - client, network := interchaintest.DockerSetup(t) - ctx := context.Background() - - // Get default bitcoin chain config - btcConfig := utxo.DefaultBitcoinChainConfig("btc", "rpcuser", "password") - bchConfig := utxo.DefaultBitcoinCashChainConfig("bch", "rpcuser", "password") - liteConfig := utxo.DefaultLitecoinChainConfig("ltc", "rpcuser", "password") - dogeConfig := utxo.DefaultDogecoinChainConfig("doge", "rpcuser", "password") - - cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - {ChainConfig: btcConfig}, - {ChainConfig: bchConfig}, - {ChainConfig: liteConfig}, - {ChainConfig: dogeConfig}, - }) - - chains, err := cf.Chains(t.Name()) - require.NoError(t, err) - - ic := interchaintest.NewInterchain() - for _, chain := range chains { - ic.AddChain(chain) - } - - require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ - TestName: t.Name(), - Client: client, - NetworkID: network, - SkipPathCreation: true, // Skip path creation, so we can have granular control over the process - })) - t.Cleanup(func() { - _ = ic.Close() - for _, chain := range chains { - utxoChain, ok := chain.(*utxo.UtxoChain) - if ok { - utxoChain.Stop() - } - } - }) - - // Create and fund a user using GetAndFundTestUsers - eg, egCtx := errgroup.WithContext(ctx) - for _, chain := range chains { - eg.Go(func() error { - // Fund 2 coins to user1 and user2 - fundAmount := sdkmath.NewInt(200_000_000) - users := interchaintest.GetAndFundTestUsers(t, egCtx, "user1", fundAmount, chain) - user1 := users[0] - users = interchaintest.GetAndFundTestUsers(t, egCtx, "user2", fundAmount, chain) - user2 := users[0] - - // Verify user1 balance - balanceUser1, err := chain.GetBalance(egCtx, user1.FormattedAddress(), "") - if err != nil { - return err - } - if !balanceUser1.Equal(fundAmount) { - return fmt.Errorf("User (%s) balance (%s) is not expected (%s)", user1.KeyName(), balanceUser1, fundAmount) - } - - // Verify user2 balance - balanceUser2, err := chain.GetBalance(ctx, user2.FormattedAddress(), "") - if err != nil { - return err - } - if !balanceUser2.Equal(fundAmount) { - return fmt.Errorf("User (%s) balance (%s) is not expected (%s)", user2.KeyName(), balanceUser2, fundAmount) - } - - // Send 1 coin from user1 to user2 with a note/memo - memo := fmt.Sprintf("+:%s:%s", "abc.abc", "bech16sg0fxrdd0vgpl4pkcnqwzjlu5lrs6ymcqldel") - transferAmount := sdkmath.NewInt(100_000_000) - _, err = chain.SendFundsWithNote(ctx, user1.KeyName(), ibc.WalletAmount{ - Address: user2.FormattedAddress(), - Amount: transferAmount, - }, memo) - if err != nil { - return err - } - - // Verify user1 balance - balanceUser1, err = chain.GetBalance(egCtx, user1.FormattedAddress(), "") - if err != nil { - return err - } - fees, err := strconv.ParseFloat(chain.Config().GasPrices, 64) - if err != nil { - return err - } - feeScaled := fees * chain.Config().GasAdjustment * math.Pow10(int(*chain.Config().CoinDecimals)) - expectedBalance := fundAmount.Sub(transferAmount).SubRaw(int64(feeScaled)) - if !balanceUser1.Equal(expectedBalance) { - return fmt.Errorf("User (%s) balance (%s) is not expected (%s)", user1.KeyName(), balanceUser1, expectedBalance) - } - - // Verify user2 balance - balanceUser2, err = chain.GetBalance(ctx, user2.FormattedAddress(), "") - if err != nil { - return err - } - expectedBalance = fundAmount.Add(transferAmount) - if !balanceUser2.Equal(expectedBalance) { - return fmt.Errorf("User (%s) balance (%s) is not expected (%s)", user2.KeyName(), balanceUser2, expectedBalance) - } - - return nil - }) - } - require.NoError(t, eg.Wait()) -} diff --git a/ibc/types.go b/ibc/types.go index 5eb30bfe..2bc144f9 100644 --- a/ibc/types.go +++ b/ibc/types.go @@ -361,7 +361,7 @@ func (i DockerImage) Ref() string { func (i DockerImage) PullImage(ctx context.Context, client *client.Client) error { ref := i.Ref() - _, _, err := client.ImageInspectWithRaw(ctx, ref) + _, _, err := client.ImageInspectWithRaw(ctx, ref) // nolint:staticcheck // continue using deprecated if err != nil { rc, err := client.ImagePull(ctx, ref, dockerimage.PullOptions{}) if err != nil { diff --git a/interchain.go b/interchain.go index bd4edaaa..908ed0f3 100644 --- a/interchain.go +++ b/interchain.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "math" - "path/filepath" "github.com/docker/docker/client" "go.uber.org/zap" @@ -13,9 +12,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/cosmos/interchaintest/v10/chain/cosmos" - "github.com/cosmos/interchaintest/v10/chain/namada" "github.com/cosmos/interchaintest/v10/ibc" - "github.com/cosmos/interchaintest/v10/relayer/hermes" "github.com/cosmos/interchaintest/v10/testreporter" ) @@ -348,15 +345,6 @@ func (ic *Interchain) Build(ctx context.Context, rep *testreporter.RelayerExecRe return fmt.Errorf("failed to track blocks: %w", err) } - // If any configured chain is an instance of Penumbra we need to initialize new pclientd instances for the - // newly created faucet account. - for c := range ic.chains { - err = CreatePenumbraClient(ctx, c, FaucetAccountKeyName) - if err != nil { - return err - } - } - if err := ic.configureRelayerKeys(ctx, rep); err != nil { // Error already wrapped with appropriate detail. return err @@ -647,19 +635,6 @@ func (ic *Interchain) configureRelayerKeys(ctx context.Context, rep *testreporte return fmt.Errorf("failed to configure relayer %s for chain %s: %w", ic.relayers[r], chainName, err) } - if c.Config().Type == "namada" { - // Copy Namada wallet to the relayer container - walletPath := filepath.Join("pre-genesis", "wallet.toml") - wallet, err := c.(*namada.NamadaChain).Validators[0].ReadFile(ctx, walletPath) - if err != nil { - return err - } - relativeWalletFilePath := fmt.Sprintf("%s/wallet.toml", c.Config().ChainID) - if err := r.(*hermes.Relayer).WriteFileToHomeDir(ctx, relativeWalletFilePath, wallet); err != nil { - return fmt.Errorf("failed to copy Namada wallet file: %w", err) - } - } - if err := r.RestoreKey(ctx, rep, c.Config(), chainName, diff --git a/penumbra.go b/penumbra.go deleted file mode 100644 index 378894c4..00000000 --- a/penumbra.go +++ /dev/null @@ -1,32 +0,0 @@ -package interchaintest - -import ( - "context" - "fmt" - - "github.com/cosmos/interchaintest/v10/chain/penumbra" - "github.com/cosmos/interchaintest/v10/ibc" -) - -// ErrPclientdInitialization is returned if the CreateClientNode call fails while initializing a new instance of -// pclientd for a newly created user account on Penumbra. -var ErrPclientdInitialization = fmt.Errorf("failed to initialize new pclientd instance") - -// CreatePenumbraClient should be called after a new test user account has been created on Penumbra. -// This function initializes a new instance of pclientd which allows private user state to be tracked and managed -// via a client daemon i.e. it is used to sign and broadcast txs as well as querying private user state on chain. -// -// Note: this function cannot be called until the chain is started as pclientd attempts to dial the running pd instance, -// so that it can sync with the current chain tip. It also should be noted that this function should ONLY be called -// after a new test user has been generated via one of the GetAndFundTestUser helper functions or a call to the -// chain.CreateKey or chain.RecoverKey methods. -func CreatePenumbraClient(ctx context.Context, c ibc.Chain, keyName string) error { - if pen, ok := c.(*penumbra.PenumbraChain); ok { - err := pen.CreateClientNode(ctx, keyName) - if err != nil { - return fmt.Errorf("%w for keyname %s: %w", ErrPclientdInitialization, keyName, err) - } - } - - return nil -} diff --git a/relayerfactory.go b/relayerfactory.go index 256b3099..05d8f08f 100644 --- a/relayerfactory.go +++ b/relayerfactory.go @@ -68,6 +68,8 @@ func (f *builtinRelayerFactory) Build( r := hermes.NewHermesRelayer(f.log, t.Name(), cli, networkID, f.options...) f.setRelayerVersion(r.ContainerImage()) return r + case ibc.Hyperspace: + panic("not implemented") default: panic(fmt.Errorf("RelayerImplementation %v unknown", f.impl)) } @@ -89,6 +91,8 @@ func (f *builtinRelayerFactory) Name() string { return "hermes@" + f.version } return "hermes@" + hermes.DefaultContainerVersion + case ibc.Hyperspace: + panic("not implemented") default: panic(fmt.Errorf("RelayerImplementation %v unknown", f.impl)) } diff --git a/test_user.go b/test_user.go index 00f44f41..13821ec2 100644 --- a/test_user.go +++ b/test_user.go @@ -40,13 +40,6 @@ func GetAndFundTestUserWithMnemonic( return nil, fmt.Errorf("failed to get funds from faucet: %w", err) } - // If this chain is an instance of Penumbra we need to initialize a new pclientd instance for the - // newly created test user account. - err = CreatePenumbraClient(ctx, chain, keyName) - if err != nil { - return nil, err - } - return user, nil } From 7b3ddffe84a81d20fb0323ff5b83f22a6a7d9501 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 13 Jun 2025 10:53:45 -0400 Subject: [PATCH 4/7] wf --- .github/workflows/lint.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2bb29042..4b934116 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ permissions: contents: read env: - GO_VERSION: 1.22 + GO_VERSION: 1.24 jobs: clippy-lint: @@ -47,8 +47,7 @@ jobs: - uses: actions/checkout@v4 - - name: golangci-lint - uses: golangci/golangci-lint-action@v6.1.0 - with: - version: v1.61.0 - args: --timeout 15m \ No newline at end of file + - name: run linting + id: lint + run: | + make lint \ No newline at end of file From dc525103f0869e3233428e68431258662e44435d Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 13 Jun 2025 11:10:27 -0400 Subject: [PATCH 5/7] v4 --- .github/workflows/local-interchain.yaml | 2 +- docs/ciTests.md | 4 ++-- local-interchain/rust/README.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/local-interchain.yaml b/.github/workflows/local-interchain.yaml index f674b336..f044eb30 100644 --- a/.github/workflows/local-interchain.yaml +++ b/.github/workflows/local-interchain.yaml @@ -32,7 +32,7 @@ jobs: run: go mod tidy && make install - name: Upload localic artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: local-ic path: ~/go/bin/local-ic diff --git a/docs/ciTests.md b/docs/ciTests.md index 765fcb60..6c4a4d92 100644 --- a/docs/ciTests.md +++ b/docs/ciTests.md @@ -104,7 +104,7 @@ jobs: - /go/bin/nobled - name: Publish Tarball as Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: noble-docker-image path: ${{ env.TAR_PATH }} @@ -202,7 +202,7 @@ jobs: ... ... - name: Publish Tarball as Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: chain-docker-image path: ${{ env.TAR_PATH }} diff --git a/local-interchain/rust/README.md b/local-interchain/rust/README.md index b1b93704..07911dea 100644 --- a/local-interchain/rust/README.md +++ b/local-interchain/rust/README.md @@ -138,7 +138,7 @@ jobs: run: cd interchaintest/local-interchain && go mod tidy && make install - name: Upload localic artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: local-ic path: ~/go/bin/local-ic From cc922dd0847705e0d00420b200026af65d1c591f Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 13 Jun 2025 12:04:16 -0400 Subject: [PATCH 6/7] fix --- blockdb/chain_test.go | 8 -------- blockdb/migrate_test.go | 2 -- blockdb/query_test.go | 2 -- blockdb/sql_test.go | 2 -- blockdb/test_case_test.go | 12 ------------ blockdb/tui/presenter/cosmos_message_test.go | 6 ------ blockdb/views_test.go | 2 -- examples/cosmos/chain_core_test.go | 6 ------ examples/cosmos/chain_upgrade_ibc_test.go | 2 -- examples/ibc/client_creation_test.go | 2 -- examples/ibc/learn_ibc_test.go | 2 -- interchain_test.go | 4 ---- testutil/wait_test.go | 8 -------- 13 files changed, 58 deletions(-) diff --git a/blockdb/chain_test.go b/blockdb/chain_test.go index 56679710..bb12b487 100644 --- a/blockdb/chain_test.go +++ b/blockdb/chain_test.go @@ -21,8 +21,6 @@ func validChain(t *testing.T, db *sql.DB) *Chain { } func TestChain_SaveBlock(t *testing.T) { - t.Parallel() - var ( ctx = context.Background() tx1 = Tx{Data: []byte(`{"test":0}`)} @@ -47,8 +45,6 @@ func TestChain_SaveBlock(t *testing.T) { ) t.Run("happy path", func(t *testing.T) { - t.Parallel() - db := migratedDB() defer db.Close() @@ -121,8 +117,6 @@ ORDER BY tendermint_event_attr.id`) }) t.Run("idempotent", func(t *testing.T) { - t.Parallel() - db := migratedDB() defer db.Close() @@ -156,8 +150,6 @@ ORDER BY tendermint_event_attr.id`) }) t.Run("zero state", func(t *testing.T) { - t.Parallel() - db := migratedDB() defer db.Close() diff --git a/blockdb/migrate_test.go b/blockdb/migrate_test.go index 67ee2876..1f8bc06b 100644 --- a/blockdb/migrate_test.go +++ b/blockdb/migrate_test.go @@ -7,8 +7,6 @@ import ( ) func TestMigrate(t *testing.T) { - t.Parallel() - db := emptyDB() defer db.Close() diff --git a/blockdb/query_test.go b/blockdb/query_test.go index 82a3d4e3..9df600be 100644 --- a/blockdb/query_test.go +++ b/blockdb/query_test.go @@ -16,8 +16,6 @@ import ( var txsFixture []byte func TestQuery_CurrentSchemaVersion(t *testing.T) { - t.Parallel() - db := emptyDB() defer db.Close() diff --git a/blockdb/sql_test.go b/blockdb/sql_test.go index 06bd1c59..17313793 100644 --- a/blockdb/sql_test.go +++ b/blockdb/sql_test.go @@ -44,8 +44,6 @@ func TestDB_Concurrency(t *testing.T) { t.Skip("skipping due to short mode") } - t.Parallel() - ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/blockdb/test_case_test.go b/blockdb/test_case_test.go index 51334b57..b3fdd3a9 100644 --- a/blockdb/test_case_test.go +++ b/blockdb/test_case_test.go @@ -9,13 +9,9 @@ import ( ) func TestCreateTestCase(t *testing.T) { - t.Parallel() - ctx := context.Background() t.Run("happy path", func(t *testing.T) { - t.Parallel() - db := migratedDB() defer db.Close() @@ -41,8 +37,6 @@ func TestCreateTestCase(t *testing.T) { }) t.Run("errors", func(t *testing.T) { - t.Parallel() - db := emptyDB() _, err := CreateTestCase(ctx, db, "fail", "") require.Error(t, err) @@ -50,13 +44,9 @@ func TestCreateTestCase(t *testing.T) { } func TestTestCase_AddChain(t *testing.T) { - t.Parallel() - ctx := context.Background() t.Run("happy path", func(t *testing.T) { - t.Parallel() - db := migratedDB() defer db.Close() @@ -86,8 +76,6 @@ func TestTestCase_AddChain(t *testing.T) { }) t.Run("errors", func(t *testing.T) { - t.Parallel() - db := migratedDB() defer db.Close() diff --git a/blockdb/tui/presenter/cosmos_message_test.go b/blockdb/tui/presenter/cosmos_message_test.go index 442d701a..934755f9 100644 --- a/blockdb/tui/presenter/cosmos_message_test.go +++ b/blockdb/tui/presenter/cosmos_message_test.go @@ -10,11 +10,7 @@ import ( ) func TestCosmosMessage(t *testing.T) { - t.Parallel() - t.Run("non-variable fields", func(t *testing.T) { - t.Parallel() - res := blockdb.CosmosMessageResult{ Height: 55, Index: 13, @@ -33,8 +29,6 @@ func TestCosmosMessage(t *testing.T) { }) t.Run("ibc details", func(t *testing.T) { - t.Parallel() - for _, tt := range []struct { Result blockdb.CosmosMessageResult WantClients string diff --git a/blockdb/views_test.go b/blockdb/views_test.go index 2c84ad41..d2a55d43 100644 --- a/blockdb/views_test.go +++ b/blockdb/views_test.go @@ -9,8 +9,6 @@ import ( ) func TestTxFlattenedView(t *testing.T) { - t.Parallel() - db := migratedDB() defer db.Close() diff --git a/examples/cosmos/chain_core_test.go b/examples/cosmos/chain_core_test.go index 61afc912..68044449 100644 --- a/examples/cosmos/chain_core_test.go +++ b/examples/cosmos/chain_core_test.go @@ -59,13 +59,9 @@ var ( ) func TestCoreSDKCommands(t *testing.T) { - t.Parallel() - if testing.Short() { t.Skip("skipping in short mode") } - t.Parallel() - cosmos.SetSDKConfig(baseBech32) sdk47Genesis := []cosmos.GenesisKV{ @@ -719,8 +715,6 @@ func testStaking(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, u func testVesting(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, admin ibc.Wallet) { t.Helper() - t.Parallel() - var err error var acc string node := chain.GetNode() diff --git a/examples/cosmos/chain_upgrade_ibc_test.go b/examples/cosmos/chain_upgrade_ibc_test.go index e0e29d4c..4e9b34b9 100644 --- a/examples/cosmos/chain_upgrade_ibc_test.go +++ b/examples/cosmos/chain_upgrade_ibc_test.go @@ -44,8 +44,6 @@ func CosmosChainUpgradeIBCTest(t *testing.T, chainName, initialVersion, upgradeC t.Skip("skipping in short mode") } - t.Parallel() - var shortVoteGenesis []cosmos.GenesisKV if chainName == "juno" { // SDK v45 params for Juno genesis diff --git a/examples/ibc/client_creation_test.go b/examples/ibc/client_creation_test.go index 9462837a..12905dac 100644 --- a/examples/ibc/client_creation_test.go +++ b/examples/ibc/client_creation_test.go @@ -30,8 +30,6 @@ func TestCreatClient(t *testing.T) { t.Skip("skipping in short mode") } - t.Parallel() - tests := []relayerImp{ { name: "Cosmos Relayer", diff --git a/examples/ibc/learn_ibc_test.go b/examples/ibc/learn_ibc_test.go index ea2d805f..3abe1c7a 100644 --- a/examples/ibc/learn_ibc_test.go +++ b/examples/ibc/learn_ibc_test.go @@ -27,8 +27,6 @@ func TestLearn(t *testing.T) { t.Skip("skipping in short mode") } - t.Parallel() - ctx := context.Background() // Chain Factory diff --git a/interchain_test.go b/interchain_test.go index 5cc052df..c2289d98 100644 --- a/interchain_test.go +++ b/interchain_test.go @@ -50,8 +50,6 @@ func duplicateChainTest(t *testing.T, relayerImpl ibc.RelayerImplementation) { t.Skip("skipping in short mode") } - t.Parallel() - client, network := interchaintest.DockerSetup(t) cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ @@ -187,8 +185,6 @@ func TestInterchain_CreateUser(t *testing.T) { t.Skip("skipping in short mode") } - t.Parallel() - client, network := interchaintest.DockerSetup(t) cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ diff --git a/testutil/wait_test.go b/testutil/wait_test.go index 7d7aa0db..da8c2ca0 100644 --- a/testutil/wait_test.go +++ b/testutil/wait_test.go @@ -126,11 +126,7 @@ func TestWaitForBlocksUtil(t *testing.T) { } func TestWaitForInSync(t *testing.T) { - t.Parallel() - t.Run("happy path", func(t *testing.T) { - t.Parallel() - var ( startHeightChain int64 = 10 chain = mockChainHeighterFixed{CurHeight: startHeightChain} @@ -148,8 +144,6 @@ func TestWaitForInSync(t *testing.T) { }) t.Run("no nodes", func(t *testing.T) { - t.Parallel() - var ( startHeightChain int64 = 10 chain = mockChainHeighterFixed{CurHeight: startHeightChain} @@ -160,8 +154,6 @@ func TestWaitForInSync(t *testing.T) { }) t.Run("timeout", func(t *testing.T) { - t.Parallel() - var ( startHeightChain int64 = 10 chain = mockChainHeighterFixed{CurHeight: startHeightChain} From 0bdff896d8fe2e0d5986680f8d28f0d1f8a085ac Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 13 Jun 2025 12:06:21 -0400 Subject: [PATCH 7/7] fix --- .github/workflows/local-interchain.yaml | 8 ++++---- docs/ciTests.md | 4 ++-- local-interchain/rust/README.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/local-interchain.yaml b/.github/workflows/local-interchain.yaml index f044eb30..20a6a433 100644 --- a/.github/workflows/local-interchain.yaml +++ b/.github/workflows/local-interchain.yaml @@ -52,7 +52,7 @@ jobs: uses: actions/checkout@v4 - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-ic path: /tmp @@ -94,7 +94,7 @@ jobs: override: true - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-ic path: /tmp @@ -137,7 +137,7 @@ jobs: - run: pip install -r python/requirements.txt --break-system-packages - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-ic path: /tmp @@ -175,7 +175,7 @@ jobs: run: cd ts && npm ci - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-ic path: /tmp diff --git a/docs/ciTests.md b/docs/ciTests.md index 6c4a4d92..e4c5a053 100644 --- a/docs/ciTests.md +++ b/docs/ciTests.md @@ -137,7 +137,7 @@ jobs: uses: actions/checkout@v3 - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: noble-docker-image @@ -246,7 +246,7 @@ The example below will spin up 9 runners, one for each test. uses: actions/checkout@v3 - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: chain-docker-image diff --git a/local-interchain/rust/README.md b/local-interchain/rust/README.md index 07911dea..0281922b 100644 --- a/local-interchain/rust/README.md +++ b/local-interchain/rust/README.md @@ -166,7 +166,7 @@ jobs: override: true - name: Download Tarball Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-ic path: /tmp