From e6d8c490782db62689441065734342a6fb263b37 Mon Sep 17 00:00:00 2001 From: Lucas Bertrand Date: Tue, 2 Jul 2024 18:46:51 +0200 Subject: [PATCH] feat: add Solana chain information (#2416) * proto * add new chains * add gateway address to chain params * changelog * comments --- changelog.md | 1 + docs/openapi/openapi.swagger.yaml | 8 ++ pkg/chains/chain_test.go | 8 +- pkg/chains/chains.go | 47 ++++++ pkg/chains/chains.pb.go | 127 ++++++++++------- pkg/chains/chains_test.go | 14 ++ .../zetachain/zetacore/observer/params.proto | 1 + .../zetacore/pkg/chains/chains.proto | 7 + .../zetacore/observer/params_pb.d.ts | 5 + .../zetacore/pkg/chains/chains_pb.d.ts | 30 ++++ x/observer/types/params.pb.go | 134 ++++++++++++------ 11 files changed, 285 insertions(+), 97 deletions(-) diff --git a/changelog.md b/changelog.md index 9f40d4b256..7b679fb678 100644 --- a/changelog.md +++ b/changelog.md @@ -30,6 +30,7 @@ * [2339](https://github.com/zeta-chain/node/pull/2339) - add binaries related question to syncing issue form * [2366](https://github.com/zeta-chain/node/pull/2366) - add migration script for adding authorizations table * [2372](https://github.com/zeta-chain/node/pull/2372) - add queries for tss fund migration info +* [2416g](https://github.com/zeta-chain/node/pull/2416) - add Solana chain information ### Refactor diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 987feb13d4..a6ee4a79f3 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -56965,6 +56965,9 @@ definitions: - optimism_sepolia - base_mainnet - base_sepolia + - solana_mainnet + - solana_devnet + - solana_localnet default: empty title: ChainName represents the name of the chain chainsConsensus: @@ -56974,6 +56977,7 @@ definitions: - tendermint - bitcoin - op_stack + - solana_consensus default: ethereum title: |- Consensus represents the consensus algorithm used by the chain @@ -56989,6 +56993,7 @@ definitions: - bsc - optimism - base + - solana default: eth title: |- Network represents the network of the chain @@ -57022,6 +57027,7 @@ definitions: enum: - no_vm - evm + - svm default: no_vm title: |- Vm represents the virtual machine type of the chain to support smart @@ -57832,6 +57838,8 @@ definitions: type: string is_supported: type: boolean + gateway_address: + type: string observerChainParamsList: type: object properties: diff --git a/pkg/chains/chain_test.go b/pkg/chains/chain_test.go index f495ba0c85..e9551d35c7 100644 --- a/pkg/chains/chain_test.go +++ b/pkg/chains/chain_test.go @@ -58,7 +58,7 @@ func TestChain_Validate(t *testing.T) { name: "should error if chain name invalid", chain: chains.Chain{ ChainId: 42, - ChainName: chains.ChainName_base_sepolia + 1, + ChainName: chains.ChainName_solana_localnet + 1, Network: chains.Network_optimism, NetworkType: chains.NetworkType_testnet, Vm: chains.Vm_evm, @@ -72,7 +72,7 @@ func TestChain_Validate(t *testing.T) { chain: chains.Chain{ ChainId: 42, ChainName: chains.ChainName_empty, - Network: chains.Network_base + 1, + Network: chains.Network_solana + 1, NetworkType: chains.NetworkType_testnet, Vm: chains.Vm_evm, Consensus: chains.Consensus_op_stack, @@ -100,7 +100,7 @@ func TestChain_Validate(t *testing.T) { ChainName: chains.ChainName_empty, Network: chains.Network_base, NetworkType: chains.NetworkType_devnet, - Vm: chains.Vm_evm + 1, + Vm: chains.Vm_svm + 1, Consensus: chains.Consensus_op_stack, IsExternal: true, }, @@ -114,7 +114,7 @@ func TestChain_Validate(t *testing.T) { Network: chains.Network_base, NetworkType: chains.NetworkType_devnet, Vm: chains.Vm_evm, - Consensus: chains.Consensus_op_stack + 1, + Consensus: chains.Consensus_solana_consensus + 1, IsExternal: true, }, errStr: "invalid consensus", diff --git a/pkg/chains/chains.go b/pkg/chains/chains.go index 333aa22001..2dcd0377ea 100644 --- a/pkg/chains/chains.go +++ b/pkg/chains/chains.go @@ -91,6 +91,20 @@ var ( CctxGateway: CCTXGateway_observers, } + // SolanaMainnet is Solana mainnet + // TODO: define final chain ID + // https://github.com/zeta-chain/node/issues/2421 + SolanaMainnet = Chain{ + ChainName: ChainName_solana_mainnet, + ChainId: 900, + Network: Network_solana, + NetworkType: NetworkType_mainnet, + Vm: Vm_svm, + Consensus: Consensus_solana_consensus, + IsExternal: true, + CctxGateway: CCTXGateway_observers, + } + /** * Testnet chains */ @@ -179,6 +193,22 @@ var ( CctxGateway: CCTXGateway_observers, } + // SolanaDevnet is Solana devnet + // NOTE: Solana devnet refers to Solana testnet in our terminology + // Solana uses devnet denomitation for network for development + // TODO: define final chain ID + // https://github.com/zeta-chain/node/issues/2421 + SolanaDevnet = Chain{ + ChainName: ChainName_solana_devnet, + ChainId: 901, + Network: Network_solana, + NetworkType: NetworkType_testnet, + Vm: Vm_svm, + Consensus: Consensus_solana_consensus, + IsExternal: true, + CctxGateway: CCTXGateway_observers, + } + /** * Devnet chains */ @@ -236,6 +266,20 @@ var ( CctxGateway: CCTXGateway_observers, } + // SolanaLocalnet is Solana localnet + // TODO: define final chain ID + // https://github.com/zeta-chain/node/issues/2421 + SolanaLocalnet = Chain{ + ChainName: ChainName_solana_localnet, + ChainId: 902, + Network: Network_solana, + NetworkType: NetworkType_privnet, + Vm: Vm_svm, + Consensus: Consensus_solana_consensus, + IsExternal: true, + CctxGateway: CCTXGateway_observers, + } + /** * Deprecated chains */ @@ -296,6 +340,9 @@ func DefaultChainsList() []Chain { OptimismSepolia, BaseMainnet, BaseSepolia, + SolanaMainnet, + SolanaDevnet, + SolanaLocalnet, } } diff --git a/pkg/chains/chains.pb.go b/pkg/chains/chains.pb.go index 848a7e1bc0..b49c3b0c96 100644 --- a/pkg/chains/chains.pb.go +++ b/pkg/chains/chains.pb.go @@ -78,6 +78,9 @@ const ( ChainName_optimism_sepolia ChainName = 18 ChainName_base_mainnet ChainName = 19 ChainName_base_sepolia ChainName = 20 + ChainName_solana_mainnet ChainName = 21 + ChainName_solana_devnet ChainName = 22 + ChainName_solana_localnet ChainName = 23 ) var ChainName_name = map[int32]string{ @@ -100,6 +103,9 @@ var ChainName_name = map[int32]string{ 18: "optimism_sepolia", 19: "base_mainnet", 20: "base_sepolia", + 21: "solana_mainnet", + 22: "solana_devnet", + 23: "solana_localnet", } var ChainName_value = map[string]int32{ @@ -122,6 +128,9 @@ var ChainName_value = map[string]int32{ "optimism_sepolia": 18, "base_mainnet": 19, "base_sepolia": 20, + "solana_mainnet": 21, + "solana_devnet": 22, + "solana_localnet": 23, } func (x ChainName) String() string { @@ -145,6 +154,7 @@ const ( Network_bsc Network = 4 Network_optimism Network = 5 Network_base Network = 6 + Network_solana Network = 7 ) var Network_name = map[int32]string{ @@ -155,6 +165,7 @@ var Network_name = map[int32]string{ 4: "bsc", 5: "optimism", 6: "base", + 7: "solana", } var Network_value = map[string]int32{ @@ -165,6 +176,7 @@ var Network_value = map[string]int32{ "bsc": 4, "optimism": 5, "base": 6, + "solana": 7, } func (x Network) String() string { @@ -215,16 +227,19 @@ type Vm int32 const ( Vm_no_vm Vm = 0 Vm_evm Vm = 1 + Vm_svm Vm = 2 ) var Vm_name = map[int32]string{ 0: "no_vm", 1: "evm", + 2: "svm", } var Vm_value = map[string]int32{ "no_vm": 0, "evm": 1, + "svm": 2, } func (x Vm) String() string { @@ -241,10 +256,11 @@ func (Vm) EnumDescriptor() ([]byte, []int) { type Consensus int32 const ( - Consensus_ethereum Consensus = 0 - Consensus_tendermint Consensus = 1 - Consensus_bitcoin Consensus = 2 - Consensus_op_stack Consensus = 3 + Consensus_ethereum Consensus = 0 + Consensus_tendermint Consensus = 1 + Consensus_bitcoin Consensus = 2 + Consensus_op_stack Consensus = 3 + Consensus_solana_consensus Consensus = 4 ) var Consensus_name = map[int32]string{ @@ -252,13 +268,15 @@ var Consensus_name = map[int32]string{ 1: "tendermint", 2: "bitcoin", 3: "op_stack", + 4: "solana_consensus", } var Consensus_value = map[string]int32{ - "ethereum": 0, - "tendermint": 1, - "bitcoin": 2, - "op_stack": 3, + "ethereum": 0, + "tendermint": 1, + "bitcoin": 2, + "op_stack": 3, + "solana_consensus": 4, } func (x Consensus) String() string { @@ -425,51 +443,54 @@ func init() { } var fileDescriptor_236b85e7bff6130d = []byte{ - // 704 bytes of a gzipped FileDescriptorProto - 0x1f, 0x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f, 0xfe, 0x10, 0xd6, 0xa2, 0x89, 0xe3, 0xe6, 0xa0, 0xd9, 0x99, 0xe7, 0xcc, 0x4b, - 0x71, 0xa8, 0xae, 0x11, 0x60, 0xb0, 0x46, 0x57, 0x77, 0x6b, 0x9f, 0x08, 0xfc, 0x6b, 0x69, 0x87, - 0x21, 0x57, 0xc9, 0x41, 0x92, 0x8e, 0x0b, 0x7a, 0x90, 0xc4, 0xab, 0xbf, 0x7f, 0x03, 0xe3, 0x76, - 0xf2, 0x6d, 0x24, 0x34, 0x1b, 0x2c, 0x71, 0x6f, 0x99, 0x53, 0x00, 0x83, 0xf9, 0x1a, 0x4b, 0x29, - 0xf2, 0xba, 0x53, 0x2a, 0x0c, 0x57, 0x22, 0x27, 0x7e, 0x95, 0x3e, 0xd1, 0x86, 0xf1, 0x6d, 0xdb, - 0xeb, 0x23, 0x08, 0x1e, 0x4d, 0x76, 0x75, 0x12, 0xae, 0xe7, 0x19, 0x8c, 0x55, 0xaa, 0xb1, 0x3c, - 0x60, 0xa9, 0x9b, 0xce, 0x5f, 0xae, 0x7e, 0xbf, 0x8f, 0xbc, 0xbb, 0xfb, 0xc8, 0xfb, 0xf3, 0x3e, - 0xf2, 0x7e, 0x79, 0x88, 0x3a, 0x77, 0x0f, 0x51, 0xe7, 0x8f, 0x87, 0xa8, 0xf3, 0xe3, 0x87, 0x99, - 0x30, 0x9b, 0x7d, 0xba, 0xe0, 0x4a, 0xba, 0x17, 0xf5, 0xe3, 0xff, 0x7c, 0x5c, 0xd3, 0x81, 0x7b, - 0x21, 0x3f, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0x05, 0xa7, 0x7f, 0x40, 0x84, 0x05, 0x00, 0x00, + // 751 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x8f, 0xe3, 0x34, + 0x18, 0x6e, 0x9a, 0xb6, 0x69, 0xdf, 0xcc, 0x87, 0xd7, 0x3b, 0x40, 0x58, 0x89, 0x32, 0x70, 0x80, + 0x61, 0x04, 0x1d, 0x01, 0x47, 0x2e, 0x88, 0x11, 0xbb, 0xe2, 0xc0, 0x1e, 0xc2, 0x6a, 0x85, 0xb8, + 0x04, 0xc7, 0x7d, 0x49, 0xad, 0xc6, 0x71, 0x14, 0xbb, 0xd9, 0x2d, 0xbf, 0x82, 0x1f, 0xc1, 0x01, + 0x89, 0x3f, 0xc2, 0x71, 0x8f, 0x1c, 0xd1, 0xcc, 0x81, 0xbf, 0x81, 0xec, 0x38, 0xe9, 0x72, 0x80, + 0x99, 0x53, 0xed, 0xa7, 0xcf, 0xf3, 0xbe, 0xcf, 0xfb, 0xe1, 0xc0, 0xe5, 0xcf, 0x68, 0x18, 0xdf, + 0x30, 0x51, 0x5d, 0xb9, 0x93, 0x6a, 0xf0, 0xaa, 0xde, 0x16, 0x57, 0x0e, 0xd2, 0xfe, 0x67, 0x55, + 0x37, 0xca, 0x28, 0xfa, 0xce, 0xc0, 0x5d, 0xf5, 0xdc, 0x55, 0xbd, 0x2d, 0x56, 0x1d, 0xe9, 0xd1, + 0x59, 0xa1, 0x0a, 0xe5, 0x98, 0x57, 0xf6, 0xd4, 0x89, 0xde, 0xff, 0x3b, 0x84, 0xe9, 0xb5, 0x25, + 0xd0, 0xb7, 0x61, 0xee, 0x98, 0x99, 0x58, 0x27, 0xe3, 0xf3, 0xe0, 0x22, 0x4c, 0x23, 0x77, 0xff, + 0x66, 0x4d, 0x9f, 0x00, 0x74, 0x7f, 0x55, 0x4c, 0x62, 0x12, 0x9c, 0x07, 0x17, 0x27, 0x9f, 0x5d, + 0xac, 0xfe, 0x37, 0xdd, 0xca, 0x05, 0x7d, 0xca, 0x24, 0xa6, 0x0b, 0xde, 0x1f, 0xe9, 0x97, 0x10, + 0x55, 0x68, 0x5e, 0xa8, 0x66, 0x9b, 0x84, 0x2e, 0xca, 0x07, 0x77, 0x44, 0x79, 0xda, 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 0xe5, 0x23, 0x91, 0x4f, 0xf3, + 0x18, 0xe2, 0xd7, 0x1e, 0x96, 0x0d, 0xd7, 0x1b, 0x76, 0xfb, 0xd4, 0x77, 0x28, 0x70, 0x89, 0x1a, + 0xd1, 0x76, 0xeb, 0x00, 0x30, 0xf3, 0x35, 0x84, 0x3e, 0xce, 0x87, 0x30, 0x7e, 0x2e, 0xed, 0x52, + 0x55, 0x2a, 0x6b, 0x25, 0x19, 0x39, 0xd3, 0xad, 0xec, 0xac, 0xea, 0x56, 0x0e, 0x5b, 0xf8, 0x23, + 0x2c, 0x86, 0xa7, 0x64, 0x7d, 0xa2, 0xd9, 0x60, 0x83, 0x3b, 0x2b, 0x39, 0x01, 0x30, 0x58, 0xad, + 0xb1, 0x91, 0xa2, 0xf2, 0x29, 0x73, 0x61, 0xb8, 0x12, 0x15, 0x19, 0x77, 0x25, 0x65, 0xda, 0x30, + 0xbe, 0x25, 0xa1, 0x9d, 0x8c, 0x6f, 0xdc, 0xf0, 0x18, 0xc9, 0xc4, 0x67, 0xf8, 0x18, 0xe2, 0xd7, + 0x1e, 0x50, 0xd7, 0x34, 0x67, 0xe9, 0x18, 0x16, 0x2a, 0xd7, 0xd8, 0xb4, 0xd8, 0x68, 0x12, 0x74, + 0xec, 0xaf, 0xae, 0xff, 0xb8, 0x59, 0x06, 0xaf, 0x6e, 0x96, 0xc1, 0x5f, 0x37, 0xcb, 0xe0, 0x97, + 0xdb, 0xe5, 0xe8, 0xd5, 0xed, 0x72, 0xf4, 0xe7, 0xed, 0x72, 0xf4, 0xc3, 0x47, 0x85, 0x30, 0x9b, + 0x5d, 0xbe, 0xe2, 0x4a, 0xba, 0x0f, 0xf7, 0x27, 0xff, 0xf9, 0x0d, 0xcf, 0x67, 0xee, 0x43, 0xfc, + 0xf9, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x26, 0xaa, 0x81, 0xba, 0xeb, 0x05, 0x00, 0x00, } func (m *Chain) Marshal() (dAtA []byte, err error) { diff --git a/pkg/chains/chains_test.go b/pkg/chains/chains_test.go index 5b85f39f22..fe947b11be 100644 --- a/pkg/chains/chains_test.go +++ b/pkg/chains/chains_test.go @@ -25,6 +25,7 @@ func TestChainListByNetworkType(t *testing.T) { chains.Polygon, chains.OptimismMainnet, chains.BaseMainnet, + chains.SolanaMainnet, }, }, { @@ -40,6 +41,7 @@ func TestChainListByNetworkType(t *testing.T) { chains.Sepolia, chains.OptimismSepolia, chains.BaseSepolia, + chains.SolanaDevnet, }, }, { @@ -49,6 +51,7 @@ func TestChainListByNetworkType(t *testing.T) { chains.ZetaChainPrivnet, chains.BitcoinRegtest, chains.GoerliLocalnet, + chains.SolanaLocalnet, }, }, } @@ -106,6 +109,11 @@ func TestChainListByNetwork(t *testing.T) { chains.Network_base, []chains.Chain{chains.BaseMainnet, chains.BaseSepolia}, }, + { + "Solana", + chains.Network_solana, + []chains.Chain{chains.SolanaMainnet, chains.SolanaDevnet, chains.SolanaLocalnet}, + }, } for _, lt := range listTests { @@ -137,6 +145,9 @@ func TestDefaultChainList(t *testing.T) { chains.OptimismSepolia, chains.BaseMainnet, chains.BaseSepolia, + chains.SolanaMainnet, + chains.SolanaDevnet, + chains.SolanaLocalnet, }, chains.DefaultChainsList()) } @@ -158,6 +169,9 @@ func TestExternalChainList(t *testing.T) { chains.OptimismSepolia, chains.BaseMainnet, chains.BaseSepolia, + chains.SolanaMainnet, + chains.SolanaDevnet, + chains.SolanaLocalnet, }, chains.ExternalChainList([]chains.Chain{})) } diff --git a/proto/zetachain/zetacore/observer/params.proto b/proto/zetachain/zetacore/observer/params.proto index 92d00763dd..c0c732b705 100644 --- a/proto/zetachain/zetacore/observer/params.proto +++ b/proto/zetachain/zetacore/observer/params.proto @@ -29,6 +29,7 @@ message ChainParams { (gogoproto.nullable) = false ]; bool is_supported = 16; + string gateway_address = 17; } // Deprecated(v17) diff --git a/proto/zetachain/zetacore/pkg/chains/chains.proto b/proto/zetachain/zetacore/pkg/chains/chains.proto index 8075822471..137d056713 100644 --- a/proto/zetachain/zetacore/pkg/chains/chains.proto +++ b/proto/zetachain/zetacore/pkg/chains/chains.proto @@ -43,6 +43,10 @@ enum ChainName { optimism_sepolia = 18; base_mainnet = 19; base_sepolia = 20; + + solana_mainnet = 21; + solana_devnet = 22; + solana_localnet = 23; } // Network represents the network of the chain @@ -57,6 +61,7 @@ enum Network { bsc = 4; optimism = 5; base = 6; + solana = 7; } // NetworkType represents the network type of the chain @@ -75,6 +80,7 @@ enum Vm { option (gogoproto.goproto_enum_stringer) = true; no_vm = 0; evm = 1; + svm = 2; } // Consensus represents the consensus algorithm used by the chain @@ -86,6 +92,7 @@ enum Consensus { tendermint = 1; bitcoin = 2; op_stack = 3; + solana_consensus = 4; } // CCTXGateway describes for the chain the gateway used to handle CCTX outbounds diff --git a/typescript/zetachain/zetacore/observer/params_pb.d.ts b/typescript/zetachain/zetacore/observer/params_pb.d.ts index 252793f418..9155826e05 100644 --- a/typescript/zetachain/zetacore/observer/params_pb.d.ts +++ b/typescript/zetachain/zetacore/observer/params_pb.d.ts @@ -104,6 +104,11 @@ export declare class ChainParams extends Message { */ isSupported: boolean; + /** + * @generated from field: string gateway_address = 17; + */ + gatewayAddress: string; + constructor(data?: PartialMessage); static readonly runtime: typeof proto3; diff --git a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts index 782e669d43..ecaf732ec5 100644 --- a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts +++ b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts @@ -132,6 +132,21 @@ export declare enum ChainName { * @generated from enum value: base_sepolia = 20; */ base_sepolia = 20, + + /** + * @generated from enum value: solana_mainnet = 21; + */ + solana_mainnet = 21, + + /** + * @generated from enum value: solana_devnet = 22; + */ + solana_devnet = 22, + + /** + * @generated from enum value: solana_localnet = 23; + */ + solana_localnet = 23, } /** @@ -176,6 +191,11 @@ export declare enum Network { * @generated from enum value: base = 6; */ base = 6, + + /** + * @generated from enum value: solana = 7; + */ + solana = 7, } /** @@ -222,6 +242,11 @@ export declare enum Vm { * @generated from enum value: evm = 1; */ evm = 1, + + /** + * @generated from enum value: svm = 2; + */ + svm = 2, } /** @@ -251,6 +276,11 @@ export declare enum Consensus { * @generated from enum value: op_stack = 3; */ op_stack = 3, + + /** + * @generated from enum value: solana_consensus = 4; + */ + solana_consensus = 4, } /** diff --git a/x/observer/types/params.pb.go b/x/observer/types/params.pb.go index 358881c06c..98b425f77e 100644 --- a/x/observer/types/params.pb.go +++ b/x/observer/types/params.pb.go @@ -83,6 +83,7 @@ type ChainParams struct { BallotThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,14,opt,name=ballot_threshold,json=ballotThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"ballot_threshold"` MinObserverDelegation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,15,opt,name=min_observer_delegation,json=minObserverDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_observer_delegation"` IsSupported bool `protobuf:"varint,16,opt,name=is_supported,json=isSupported,proto3" json:"is_supported,omitempty"` + GatewayAddress string `protobuf:"bytes,17,opt,name=gateway_address,json=gatewayAddress,proto3" json:"gateway_address,omitempty"` } func (m *ChainParams) Reset() { *m = ChainParams{} } @@ -202,6 +203,13 @@ func (m *ChainParams) GetIsSupported() bool { return false } +func (m *ChainParams) GetGatewayAddress() string { + if m != nil { + return m.GatewayAddress + } + return "" +} + // Deprecated(v17) type Params struct { // Deprecated(v17):Moved into the emissions module @@ -259,46 +267,47 @@ func init() { } var fileDescriptor_e7fa4666eddf88e5 = []byte{ - // 617 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x4e, 0xd4, 0x40, - 0x18, 0xc7, 0xb7, 0x2e, 0x22, 0xcc, 0x02, 0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e9, 0x3b, 0xdf, 0xaf, 0xfc, 0xc6, 0xf9, - 0x95, 0xdf, 0xf8, 0x79, 0xe5, 0x37, 0x3e, 0x47, 0x63, 0xbd, 0x97, 0x53, 0xb6, 0x71, 0xe3, 0x5e, - 0x38, 0xb9, 0xbe, 0x19, 0xcc, 0x46, 0x7a, 0x93, 0xe6, 0x5e, 0x78, 0xf9, 0x27, 0x00, 0x00, 0xff, - 0xff, 0xed, 0x67, 0xea, 0xcb, 0xa2, 0x04, 0x00, 0x00, + // 636 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x41, 0x4f, 0xd4, 0x4e, + 0x18, 0xc6, 0xb7, 0xff, 0xe5, 0x8f, 0x30, 0x0b, 0xbb, 0xd0, 0xa0, 0x16, 0x48, 0xca, 0x4a, 0xa2, + 0x36, 0x24, 0xb4, 0x06, 0x3d, 0x2a, 0x89, 0x2c, 0x17, 0x22, 0x46, 0x52, 0xf0, 0xa0, 0x07, 0x27, + 0xb3, 0xd3, 0xa1, 0x9d, 0x6c, 0xdb, 0x77, 0x33, 0x33, 0x05, 0xd6, 0x4f, 0xe1, 0xc7, 0xe2, 0xe0, + 0x81, 0xa3, 0xf1, 0x40, 0x0c, 0x7c, 0x11, 0xd3, 0xe9, 0x74, 0x59, 0xc1, 0x70, 0xf0, 0xb4, 0xd3, + 0xf7, 0xf9, 0x3d, 0x4f, 0x67, 0xfa, 0xbe, 0x3b, 0xc8, 0xfb, 0xca, 0x14, 0xa1, 0x09, 0xe1, 0x79, + 0xa0, 0x57, 0x20, 0x58, 0x00, 0x7d, 0xc9, 0xc4, 0x09, 0x13, 0xc1, 0x90, 0x08, 0x92, 0x49, 0x7f, + 0x28, 0x40, 0x81, 0xbd, 0x3a, 0x26, 0xfd, 0x9a, 0xf4, 0x6b, 0x72, 0x65, 0x29, 0x86, 0x18, 0x34, + 0x17, 0x94, 0xab, 0xca, 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f, 0x33, 0x9e, 0x7f, 0x30, 0x69, 0xbb, 0xe3, 0x30, 0xfb, 0x09, 0x9a, 0xe3, 0x12, 0xcb, 0x62, + 0x38, 0x04, 0xa1, 0x58, 0xe4, 0x2c, 0x74, 0x2d, 0x6f, 0x26, 0x6c, 0x71, 0x79, 0x58, 0x97, 0xca, + 0xd1, 0x8b, 0x89, 0x62, 0xa7, 0x64, 0x34, 0xee, 0xcc, 0xa2, 0xee, 0x4c, 0xdb, 0x94, 0x4d, 0x33, + 0xd6, 0xb7, 0xd1, 0xb4, 0xf9, 0x23, 0xbd, 0x42, 0x8f, 0xcc, 0x87, 0xc9, 0x88, 0x2a, 0x04, 0x57, + 0x23, 0xdc, 0x4f, 0x81, 0x0e, 0xa4, 0x1e, 0xee, 0x66, 0xb8, 0x54, 0xa9, 0xef, 0x8d, 0xb8, 0xa3, + 0xb5, 0x9d, 0xbd, 0xf3, 0x2b, 0xd7, 0xba, 0xb8, 0x72, 0xad, 0x5f, 0x57, 0xae, 0xf5, 0xed, 0xda, + 0x6d, 0x5c, 0x5c, 0xbb, 0x8d, 0x1f, 0xd7, 0x6e, 0xe3, 0x73, 0x30, 0x71, 0xc8, 0x72, 0x1c, 0x37, + 0x6f, 0x5d, 0x20, 0x67, 0x37, 0x57, 0x88, 0x3e, 0x71, 0x7f, 0x5a, 0x5f, 0x20, 0x2f, 0x7f, 0x07, + 0x00, 0x00, 0xff, 0xff, 0xf4, 0x06, 0xb1, 0x0a, 0xcb, 0x04, 0x00, 0x00, } func (m *ChainParamsList) Marshal() (dAtA []byte, err error) { @@ -358,6 +367,15 @@ func (m *ChainParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.GatewayAddress) > 0 { + i -= len(m.GatewayAddress) + copy(dAtA[i:], m.GatewayAddress) + i = encodeVarintParams(dAtA, i, uint64(len(m.GatewayAddress))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } if m.IsSupported { i-- if m.IsSupported { @@ -557,6 +575,10 @@ func (m *ChainParams) Size() (n int) { if m.IsSupported { n += 3 } + l = len(m.GatewayAddress) + if l > 0 { + n += 2 + l + sovParams(uint64(l)) + } return n } @@ -1027,6 +1049,38 @@ func (m *ChainParams) Unmarshal(dAtA []byte) error { } } m.IsSupported = bool(v != 0) + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GatewayAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:])