From d0e819843395abcb26a9c115e67d67541ac34770 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Mon, 23 Sep 2024 17:16:45 -0500 Subject: [PATCH 1/6] add bitcoin Testnet4 static chain info --- docs/openapi/openapi.swagger.yaml | 1 + pkg/chains/chains.go | 15 +++ pkg/chains/chains.pb.go | 104 +++++++++--------- pkg/chains/chains_test.go | 5 + .../zetacore/pkg/chains/chains.proto | 1 + .../zetacore/pkg/chains/chains_pb.d.ts | 5 + zetaclient/config/types.go | 2 +- 7 files changed, 82 insertions(+), 51 deletions(-) diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 43ec9bc0e1..2c942abb29 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -56987,6 +56987,7 @@ definitions: - solana_devnet - solana_localnet - btc_signet_testnet + - btc_testnet4 default: empty title: |- ChainName represents the name of the chain diff --git a/pkg/chains/chains.go b/pkg/chains/chains.go index 38c9252291..dbbb5dd084 100644 --- a/pkg/chains/chains.go +++ b/pkg/chains/chains.go @@ -169,6 +169,7 @@ var ( Name: "btc_testnet", } + // BitcoinSignetTestnet is Bitcoin Signet testnet BitcoinSignetTestnet = Chain{ ChainName: ChainName_btc_signet_testnet, ChainId: 18333, @@ -181,6 +182,19 @@ var ( Name: "btc_signet_testnet", } + // BitcoinTestnet4 is Bitcoin testnet4 + BitcoinTestnet4 = Chain{ + ChainName: ChainName_btc_testnet4, + ChainId: 18334, + Network: Network_btc, + NetworkType: NetworkType_testnet, + Vm: Vm_no_vm, + Consensus: Consensus_bitcoin, + IsExternal: true, + CctxGateway: CCTXGateway_observers, + Name: "btc_testnet4", + } + // Amoy is Polygon amoy testnet Amoy = Chain{ ChainName: ChainName_amoy_testnet, @@ -360,6 +374,7 @@ func DefaultChainsList() []Chain { Ethereum, BitcoinTestnet, BitcoinSignetTestnet, + BitcoinTestnet4, Mumbai, Amoy, BscTestnet, diff --git a/pkg/chains/chains.pb.go b/pkg/chains/chains.pb.go index 885f0acbbd..2b0afa5e4f 100644 --- a/pkg/chains/chains.pb.go +++ b/pkg/chains/chains.pb.go @@ -83,6 +83,7 @@ const ( ChainName_solana_devnet ChainName = 22 ChainName_solana_localnet ChainName = 23 ChainName_btc_signet_testnet ChainName = 24 + ChainName_btc_testnet4 ChainName = 25 ) var ChainName_name = map[int32]string{ @@ -109,6 +110,7 @@ var ChainName_name = map[int32]string{ 22: "solana_devnet", 23: "solana_localnet", 24: "btc_signet_testnet", + 25: "btc_testnet4", } var ChainName_value = map[string]int32{ @@ -135,6 +137,7 @@ var ChainName_value = map[string]int32{ "solana_devnet": 22, "solana_localnet": 23, "btc_signet_testnet": 24, + "btc_testnet4": 25, } func (x ChainName) String() string { @@ -458,56 +461,57 @@ func init() { } var fileDescriptor_236b85e7bff6130d = []byte{ - // 781 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x8e, 0xe4, 0x34, - 0x10, 0xee, 0x24, 0xfd, 0x5b, 0x3d, 0x3f, 0x5e, 0xef, 0xb0, 0x84, 0x95, 0x68, 0x06, 0x24, 0xa0, - 0x35, 0x82, 0x1e, 0x01, 0x47, 0x0e, 0xa0, 0x1d, 0xb1, 0x08, 0x21, 0xf6, 0x10, 0x56, 0x2b, 0xc4, - 0xa5, 0x71, 0xbb, 0x8b, 0xb4, 0xd5, 0xb1, 0x1d, 0xc5, 0xee, 0xec, 0x36, 0x4f, 0xc1, 0x43, 0x70, - 0xe0, 0x3d, 0xb8, 0x70, 0xdc, 0x23, 0x47, 0x34, 0xf3, 0x20, 0x20, 0x3b, 0x4e, 0x7a, 0xb8, 0x30, - 0x73, 0x8a, 0xfd, 0xe5, 0xfb, 0xaa, 0xbe, 0xb2, 0xab, 0x0c, 0x17, 0xbf, 0xa0, 0x65, 0x7c, 0xc3, - 0x84, 0xba, 0xf4, 0x2b, 0x5d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0x71, 0x06, 0xc2, 0x7c, 0x15, - 0x10, 0x57, 0x2a, 0xe7, 0xf6, 0xd5, 0x32, 0x67, 0x16, 0x5f, 0xb2, 0x7d, 0x3a, 0xbe, 0x57, 0xa9, - 0x57, 0x57, 0xcf, 0x7f, 0xf8, 0xba, 0x51, 0x64, 0x53, 0xa7, 0x0f, 0x1b, 0x4a, 0xa1, 0xef, 0xaf, - 0x70, 0x72, 0x1e, 0xcd, 0x27, 0x99, 0x5f, 0x5f, 0x7c, 0x0e, 0xc7, 0x19, 0x72, 0x14, 0x35, 0x7e, - 0x6f, 0x99, 0xdd, 0x19, 0x3a, 0x85, 0x11, 0xaf, 0x90, 0x59, 0x5c, 0x93, 0x9e, 0xdb, 0x98, 0x1d, - 0xe7, 0x68, 0x0c, 0x89, 0x28, 0xc0, 0xf0, 0x67, 0x26, 0x0a, 0x5c, 0x93, 0xf8, 0x71, 0xff, 0xf7, - 0xdf, 0x66, 0xd1, 0xc5, 0x1f, 0x09, 0x4c, 0xba, 0x9b, 0xa6, 0x13, 0x18, 0xa0, 0x2c, 0xed, 0x9e, - 0xf4, 0xe8, 0x29, 0x4c, 0xd1, 0x6e, 0x96, 0x92, 0x09, 0xa5, 0xd0, 0x92, 0x88, 0x12, 0x38, 0x72, - 0x56, 0x3b, 0x24, 0x76, 0x94, 0x95, 0xe5, 0x1d, 0x90, 0xd0, 0x87, 0x70, 0x5a, 0xea, 0x62, 0x9f, - 0x6b, 0xd5, 0x81, 0x7d, 0xcf, 0x32, 0x07, 0xd6, 0x80, 0x52, 0x38, 0xc9, 0x35, 0x56, 0x85, 0x58, - 0x5a, 0x34, 0xd6, 0x61, 0x43, 0x87, 0xc9, 0x9d, 0x5c, 0xb1, 0x03, 0x36, 0x6a, 0x85, 0x2d, 0x00, - 0x9d, 0x83, 0x16, 0x99, 0xb6, 0x0e, 0x5a, 0xe0, 0xc8, 0x39, 0x30, 0x58, 0xea, 0x42, 0x1c, 0x58, - 0xc7, 0x0e, 0x0c, 0x09, 0x0b, 0xcd, 0x59, 0xe1, 0xc0, 0x93, 0x56, 0x5a, 0x61, 0xee, 0x88, 0xe4, - 0xd4, 0x45, 0x67, 0x52, 0xef, 0x3b, 0x1d, 0xa1, 0x67, 0x40, 0x74, 0x69, 0x85, 0x14, 0x46, 0x76, - 0xf6, 0x1f, 0xfc, 0x07, 0x0d, 0xb9, 0x08, 0x75, 0xea, 0x15, 0x33, 0xd8, 0xf1, 0x1e, 0x76, 0x48, - 0xcb, 0x39, 0x73, 0x45, 0x1a, 0x5d, 0x30, 0x75, 0x38, 0xc3, 0x37, 0xe8, 0x03, 0x38, 0x0e, 0xd8, - 0x1a, 0x6b, 0x07, 0x3d, 0xf2, 0x35, 0x34, 0x50, 0x67, 0xf7, 0x4d, 0xfa, 0x08, 0xa8, 0xb3, 0x6b, - 0x44, 0xae, 0xd0, 0x76, 0x1e, 0xd3, 0x70, 0x8b, 0x08, 0xa3, 0x30, 0x1d, 0x74, 0x04, 0x09, 0xda, - 0x0d, 0xe9, 0xd1, 0x31, 0xf4, 0xdd, 0x69, 0x91, 0xc8, 0x41, 0x2b, 0xcb, 0x49, 0xec, 0x7a, 0x21, - 0xdc, 0x0f, 0x49, 0x3c, 0x6a, 0x38, 0xe9, 0xd3, 0x23, 0x18, 0xb7, 0x05, 0x91, 0x81, 0x93, 0x39, - 0xdb, 0x64, 0xe8, 0x9a, 0xa5, 0xf1, 0x41, 0x46, 0x21, 0xcd, 0x53, 0x98, 0xde, 0x1a, 0x42, 0x17, - 0xae, 0x2d, 0xc4, 0xf7, 0x59, 0xeb, 0x2a, 0xf2, 0x89, 0x2a, 0x51, 0x37, 0x6d, 0x02, 0x30, 0x0c, - 0xb5, 0x25, 0x21, 0xce, 0x87, 0x10, 0xbf, 0x90, 0xae, 0xd9, 0x94, 0x5e, 0xd6, 0x92, 0xf4, 0xbc, - 0xe9, 0x5a, 0x36, 0x56, 0x4d, 0x2d, 0xbb, 0xee, 0xfc, 0x09, 0x26, 0xdd, 0xd8, 0x39, 0x9f, 0x68, - 0x37, 0x58, 0xe1, 0xce, 0x49, 0x4e, 0x00, 0x2c, 0xaa, 0x35, 0x56, 0x52, 0xa8, 0x90, 0x72, 0x25, - 0x2c, 0xd7, 0x42, 0x91, 0xb8, 0x29, 0x69, 0x69, 0x2c, 0xe3, 0x5b, 0x92, 0xb8, 0x1b, 0x0b, 0x07, - 0xda, 0x0d, 0x2e, 0xe9, 0x87, 0x0c, 0x1f, 0xc1, 0xf4, 0xd6, 0xb0, 0x35, 0x87, 0xe6, 0x2d, 0x1d, - 0xc3, 0x44, 0xaf, 0x0c, 0x56, 0x35, 0x56, 0x86, 0x44, 0x0d, 0xfb, 0xc9, 0x17, 0x7f, 0x5e, 0xcf, - 0xa2, 0xd7, 0xd7, 0xb3, 0xe8, 0xef, 0xeb, 0x59, 0xf4, 0xeb, 0xcd, 0xac, 0xf7, 0xfa, 0x66, 0xd6, - 0xfb, 0xeb, 0x66, 0xd6, 0xfb, 0xf1, 0xfd, 0x5c, 0xd8, 0xcd, 0x6e, 0xb5, 0xe0, 0x5a, 0xfa, 0x87, - 0xfe, 0xe3, 0xe6, 0xcd, 0x57, 0x7a, 0x7d, 0xfb, 0xbd, 0x5f, 0x0d, 0xfd, 0xa3, 0xfd, 0xd9, 0xbf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x84, 0x13, 0xff, 0x06, 0x17, 0x06, 0x00, 0x00, + // 790 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcd, 0x8e, 0x23, 0x35, + 0x10, 0x4e, 0x77, 0xe7, 0xb7, 0x32, 0x3f, 0x5e, 0xef, 0xb0, 0xf4, 0xae, 0x44, 0x18, 0x90, 0x80, + 0x68, 0x04, 0x19, 0xf1, 0x73, 0xe3, 0x00, 0xda, 0x11, 0x8b, 0x10, 0x62, 0x0f, 0xcd, 0x6a, 0x85, + 0xb8, 0x04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xef, 0xc3, 0x69, 0xa9, 0x8b, + 0x7d, 0xae, 0x55, 0x07, 0xf6, 0x3d, 0xcb, 0x1c, 0x58, 0x03, 0x4a, 0xe1, 0x24, 0xd7, 0x58, 0x15, + 0x62, 0x69, 0xd1, 0x58, 0x87, 0x0d, 0x1d, 0x26, 0x77, 0x72, 0xc5, 0x0e, 0xd8, 0xa8, 0x15, 0xb6, + 0x00, 0x74, 0x0e, 0x5a, 0x64, 0xda, 0x3a, 0x68, 0x81, 0x23, 0xe7, 0xc0, 0x60, 0xa9, 0x0b, 0x71, + 0x60, 0x1d, 0x3b, 0x30, 0x24, 0x2c, 0x34, 0x67, 0x85, 0x03, 0x4f, 0x5a, 0x69, 0x85, 0xb9, 0x23, + 0x92, 0x53, 0x17, 0x9d, 0x49, 0xbd, 0xef, 0x74, 0x84, 0x9e, 0x01, 0xd1, 0xa5, 0x15, 0x52, 0x18, + 0xd9, 0xd9, 0xbf, 0xf7, 0x1f, 0x34, 0xe4, 0x22, 0xd4, 0xa9, 0x57, 0xcc, 0x60, 0xc7, 0xbb, 0xdf, + 0x21, 0x2d, 0xe7, 0xcc, 0x15, 0x69, 0x74, 0xc1, 0xd4, 0xa1, 0x87, 0x6f, 0xd0, 0x7b, 0x70, 0x1c, + 0xb0, 0x35, 0xd6, 0x0e, 0x7a, 0xe0, 0x6b, 0x68, 0xa0, 0xce, 0xee, 0x9b, 0xf4, 0x01, 0x50, 0x67, + 0xd7, 0x88, 0x5c, 0xa1, 0xed, 0x3c, 0xa6, 0x3e, 0xcb, 0xa1, 0x03, 0x9f, 0x91, 0x87, 0xe1, 0x5c, + 0x11, 0x46, 0xe1, 0xbe, 0xd0, 0x11, 0x24, 0x68, 0x37, 0xa4, 0x47, 0xc7, 0xd0, 0x77, 0xfd, 0x23, + 0x91, 0x83, 0x56, 0x96, 0x93, 0xd8, 0x4d, 0x47, 0x38, 0x31, 0x92, 0x78, 0xd4, 0x70, 0xd2, 0xa7, + 0x47, 0x30, 0x6e, 0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x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x93, + 0x6a, 0x22, 0x29, 0x06, 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 5b5caf77cb..ca23229c2a 100644 --- a/pkg/chains/chains_test.go +++ b/pkg/chains/chains_test.go @@ -43,6 +43,7 @@ func TestChainListByNetworkType(t *testing.T) { chains.ZetaChainTestnet, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, @@ -95,6 +96,7 @@ func TestChainListByNetwork(t *testing.T) { chains.BitcoinMainnet, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.BitcoinRegtest, }, }, @@ -144,6 +146,7 @@ func TestDefaultChainList(t *testing.T) { chains.Ethereum, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, @@ -181,6 +184,7 @@ func TestChainListByGateway(t *testing.T) { chains.Ethereum, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, @@ -224,6 +228,7 @@ func TestExternalChainList(t *testing.T) { chains.Ethereum, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, diff --git a/proto/zetachain/zetacore/pkg/chains/chains.proto b/proto/zetachain/zetacore/pkg/chains/chains.proto index 40a420e007..90efceeda0 100644 --- a/proto/zetachain/zetacore/pkg/chains/chains.proto +++ b/proto/zetachain/zetacore/pkg/chains/chains.proto @@ -50,6 +50,7 @@ enum ChainName { solana_localnet = 23; btc_signet_testnet = 24; + btc_testnet4 = 25; } // Network represents the network of the chain diff --git a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts index 6aaa826636..5c4583a7cd 100644 --- a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts +++ b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts @@ -153,6 +153,11 @@ export declare enum ChainName { * @generated from enum value: btc_signet_testnet = 24; */ btc_signet_testnet = 24, + + /** + * @generated from enum value: btc_testnet4 = 25; + */ + btc_testnet4 = 25, } /** diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index b9a889272a..bf225b97f4 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -50,7 +50,7 @@ type BTCConfig struct { RPCUsername string `mask:"filled"` RPCPassword string `mask:"filled"` RPCHost string `mask:"filled"` - RPCParams string // "regtest", "mainnet", "testnet3" , "signet" + RPCParams string // "regtest", "mainnet", "testnet3" , "signet", "testnet4" RPCAlertLatency int64 } From e81946584f4f26245bf458bc7dbe1695fd044ac6 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Mon, 23 Sep 2024 17:27:10 -0500 Subject: [PATCH 2/6] add changelog entry --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index fcdee60f57..1be60f018a 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ * [2861](https://github.com/zeta-chain/node/pull/2861) - emit events from staking precompile * [2870](https://github.com/zeta-chain/node/pull/2870) - support for multiple Bitcoin chains in the zetaclient * [2883](https://github.com/zeta-chain/node/pull/2883) - add chain static information for btc signet testnet +* [2911](https://github.com/zeta-chain/node/pull/2911) - add chain static information for btc testnet4 ### Refactor From 69a9eb875eff3371cdcd7af410fa409774175c07 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 24 Sep 2024 10:28:17 -0500 Subject: [PATCH 3/6] remove integer based Signet and Testnet4 chain names as they're deprecated --- proto/zetachain/zetacore/pkg/chains/chains.proto | 3 --- 1 file changed, 3 deletions(-) diff --git a/proto/zetachain/zetacore/pkg/chains/chains.proto b/proto/zetachain/zetacore/pkg/chains/chains.proto index 90efceeda0..63b146cf42 100644 --- a/proto/zetachain/zetacore/pkg/chains/chains.proto +++ b/proto/zetachain/zetacore/pkg/chains/chains.proto @@ -48,9 +48,6 @@ enum ChainName { solana_mainnet = 21; solana_devnet = 22; solana_localnet = 23; - - btc_signet_testnet = 24; - btc_testnet4 = 25; } // Network represents the network of the chain From 3722c87f0d08c91dbcb2a41ffd58a43615cad843 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 24 Sep 2024 14:32:13 -0500 Subject: [PATCH 4/6] fix generated files --- docs/openapi/openapi.swagger.yaml | 2 - pkg/chains/chains.pb.go | 195 +++++++++--------- .../zetacore/pkg/chains/chains_pb.d.ts | 10 - 3 files changed, 94 insertions(+), 113 deletions(-) diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 2c942abb29..26c2c2cb9d 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -56986,8 +56986,6 @@ definitions: - solana_mainnet - solana_devnet - solana_localnet - - btc_signet_testnet - - btc_testnet4 default: empty title: |- ChainName represents the name of the chain diff --git a/pkg/chains/chains.pb.go b/pkg/chains/chains.pb.go index 2b0afa5e4f..217ad55328 100644 --- a/pkg/chains/chains.pb.go +++ b/pkg/chains/chains.pb.go @@ -60,30 +60,28 @@ func (ReceiveStatus) EnumDescriptor() ([]byte, []int) { type ChainName int32 const ( - ChainName_empty ChainName = 0 - ChainName_eth_mainnet ChainName = 1 - ChainName_zeta_mainnet ChainName = 2 - ChainName_btc_mainnet ChainName = 3 - ChainName_polygon_mainnet ChainName = 4 - ChainName_bsc_mainnet ChainName = 5 - ChainName_goerli_testnet ChainName = 6 - ChainName_mumbai_testnet ChainName = 7 - ChainName_bsc_testnet ChainName = 10 - ChainName_zeta_testnet ChainName = 11 - ChainName_btc_testnet ChainName = 12 - ChainName_sepolia_testnet ChainName = 13 - ChainName_goerli_localnet ChainName = 14 - ChainName_btc_regtest ChainName = 15 - ChainName_amoy_testnet ChainName = 16 - ChainName_optimism_mainnet ChainName = 17 - 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 - ChainName_btc_signet_testnet ChainName = 24 - ChainName_btc_testnet4 ChainName = 25 + ChainName_empty ChainName = 0 + ChainName_eth_mainnet ChainName = 1 + ChainName_zeta_mainnet ChainName = 2 + ChainName_btc_mainnet ChainName = 3 + ChainName_polygon_mainnet ChainName = 4 + ChainName_bsc_mainnet ChainName = 5 + ChainName_goerli_testnet ChainName = 6 + ChainName_mumbai_testnet ChainName = 7 + ChainName_bsc_testnet ChainName = 10 + ChainName_zeta_testnet ChainName = 11 + ChainName_btc_testnet ChainName = 12 + ChainName_sepolia_testnet ChainName = 13 + ChainName_goerli_localnet ChainName = 14 + ChainName_btc_regtest ChainName = 15 + ChainName_amoy_testnet ChainName = 16 + ChainName_optimism_mainnet ChainName = 17 + 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{ @@ -109,35 +107,31 @@ var ChainName_name = map[int32]string{ 21: "solana_mainnet", 22: "solana_devnet", 23: "solana_localnet", - 24: "btc_signet_testnet", - 25: "btc_testnet4", } var ChainName_value = map[string]int32{ - "empty": 0, - "eth_mainnet": 1, - "zeta_mainnet": 2, - "btc_mainnet": 3, - "polygon_mainnet": 4, - "bsc_mainnet": 5, - "goerli_testnet": 6, - "mumbai_testnet": 7, - "bsc_testnet": 10, - "zeta_testnet": 11, - "btc_testnet": 12, - "sepolia_testnet": 13, - "goerli_localnet": 14, - "btc_regtest": 15, - "amoy_testnet": 16, - "optimism_mainnet": 17, - "optimism_sepolia": 18, - "base_mainnet": 19, - "base_sepolia": 20, - "solana_mainnet": 21, - "solana_devnet": 22, - "solana_localnet": 23, - "btc_signet_testnet": 24, - "btc_testnet4": 25, + "empty": 0, + "eth_mainnet": 1, + "zeta_mainnet": 2, + "btc_mainnet": 3, + "polygon_mainnet": 4, + "bsc_mainnet": 5, + "goerli_testnet": 6, + "mumbai_testnet": 7, + "bsc_testnet": 10, + "zeta_testnet": 11, + "btc_testnet": 12, + "sepolia_testnet": 13, + "goerli_localnet": 14, + "btc_regtest": 15, + "amoy_testnet": 16, + "optimism_mainnet": 17, + "optimism_sepolia": 18, + "base_mainnet": 19, + "base_sepolia": 20, + "solana_mainnet": 21, + "solana_devnet": 22, + "solana_localnet": 23, } func (x ChainName) String() string { @@ -461,57 +455,56 @@ func init() { } var fileDescriptor_236b85e7bff6130d = []byte{ - // 790 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcd, 0x8e, 0x23, 0x35, - 0x10, 0x4e, 0x77, 0xe7, 0xb7, 0x32, 0x3f, 0x5e, 0xef, 0xb0, 0xf4, 0xae, 0x44, 0x18, 0x90, 0x80, - 0x68, 0x04, 0x19, 0xf1, 0x73, 0xe3, 0x00, 0xda, 0x11, 0x8b, 0x10, 0x62, 0x0f, 0xcd, 0x6a, 0x85, - 0xb8, 0x04, 0xc7, 0x29, 0x3a, 0x56, 0xda, 0x76, 0xab, 0xed, 0xf4, 0x6e, 0x78, 0x0a, 0x1e, 0x82, - 0x03, 0x8f, 0xc2, 0x71, 0x2f, 0x48, 0x1c, 0xd1, 0xcc, 0x83, 0x80, 0xec, 0x76, 0x77, 0x86, 0x0b, - 0x3b, 0xa7, 0xd8, 0x5f, 0xbe, 0xaf, 0xea, 0xab, 0x72, 0xb9, 0x0d, 0x17, 0xbf, 0xa0, 0x65, 0x7c, - 0xc3, 0x84, 0xba, 0xf4, 0x2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0b, 0x71, - 0x60, 0x1d, 0x3b, 0x30, 0x24, 0x2c, 0x34, 0x67, 0x85, 0x03, 0x4f, 0x5a, 0x69, 0x85, 0xb9, 0x23, - 0x92, 0x53, 0x17, 0x9d, 0x49, 0xbd, 0xef, 0x74, 0x84, 0x9e, 0x01, 0xd1, 0xa5, 0x15, 0x52, 0x18, - 0xd9, 0xd9, 0xbf, 0xf7, 0x1f, 0x34, 0xe4, 0x22, 0xd4, 0xa9, 0x57, 0xcc, 0x60, 0xc7, 0xbb, 0xdf, - 0x21, 0x2d, 0xe7, 0xcc, 0x15, 0x69, 0x74, 0xc1, 0xd4, 0xa1, 0x87, 0x6f, 0xd0, 0x7b, 0x70, 0x1c, - 0xb0, 0x35, 0xd6, 0x0e, 0x7a, 0xe0, 0x6b, 0x68, 0xa0, 0xce, 0xee, 0x9b, 0xf4, 0x01, 0x50, 0x67, - 0xd7, 0x88, 0x5c, 0xa1, 0xed, 0x3c, 0xa6, 0x3e, 0xcb, 0xa1, 0x03, 0x9f, 0x91, 0x87, 0xe1, 0x5c, - 0x11, 0x46, 0xe1, 0xbe, 0xd0, 0x11, 0x24, 0x68, 0x37, 0xa4, 0x47, 0xc7, 0xd0, 0x77, 0xfd, 0x23, - 0x91, 0x83, 0x56, 0x96, 0x93, 0xd8, 0x4d, 0x47, 0x38, 0x31, 0x92, 0x78, 0xd4, 0x70, 0xd2, 0xa7, - 0x47, 0x30, 0x6e, 0x4b, 0x24, 0x03, 0x27, 0x73, 0x85, 0x90, 0xa1, 0x1b, 0x9f, 0xc6, 0x19, 0x19, - 0x85, 0x34, 0x4f, 0x60, 0x7a, 0xeb, 0x5a, 0xba, 0x70, 0x6d, 0x69, 0x7e, 0xf2, 0x5a, 0x9f, 0x91, - 0x4f, 0x54, 0x89, 0xba, 0x19, 0x1c, 0x80, 0x61, 0xa8, 0x36, 0x09, 0x71, 0x3e, 0x80, 0xf8, 0xb9, - 0x74, 0xe3, 0xa7, 0xf4, 0xb2, 0x96, 0xa4, 0xe7, 0x4d, 0xd7, 0xb2, 0xb1, 0x6a, 0x6a, 0xd9, 0xcd, - 0xeb, 0x4f, 0x30, 0xe9, 0x2e, 0xa2, 0xf3, 0x89, 0x76, 0x83, 0x15, 0xee, 0x9c, 0xe4, 0x04, 0xc0, - 0xa2, 0x5a, 0x63, 0x25, 0x85, 0x0a, 0x29, 0x57, 0xc2, 0x72, 0x2d, 0x14, 0x89, 0x9b, 0x92, 0x96, - 0xc6, 0x32, 0xbe, 0x25, 0x89, 0x3b, 0xc3, 0xd0, 0xe2, 0xee, 0x2a, 0x93, 0x7e, 0xc8, 0xf0, 0x21, - 0x4c, 0x6f, 0x5d, 0xbf, 0xa6, 0x69, 0xde, 0xd2, 0x31, 0x4c, 0xf4, 0xca, 0x60, 0x55, 0x63, 0x65, - 0x48, 0xd4, 0xb0, 0x1f, 0x7f, 0xf1, 0xc7, 0xf5, 0x2c, 0x7a, 0x75, 0x3d, 0x8b, 0xfe, 0xbe, 0x9e, - 0x45, 0xbf, 0xde, 0xcc, 0x7a, 0xaf, 0x6e, 0x66, 0xbd, 0xbf, 0x6e, 0x66, 0xbd, 0x1f, 0xdf, 0xcb, - 0x85, 0xdd, 0xec, 0x56, 0x0b, 0xae, 0xa5, 0xff, 0xf4, 0x7f, 0xd4, 0xbc, 0x02, 0x4a, 0xaf, 0x6f, - 0xbf, 0x00, 0xab, 0xa1, 0xff, 0x8c, 0x7f, 0xfa, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x93, - 0x6a, 0x22, 0x29, 0x06, 0x00, 0x00, + // 770 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x8e, 0xe4, 0x34, + 0x10, 0xee, 0x24, 0xfd, 0x5b, 0x3d, 0x3f, 0x5e, 0xef, 0x00, 0x61, 0x25, 0x9a, 0x01, 0x09, 0x68, + 0x8d, 0xa0, 0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0xff, 0x86, 0x0b, 0xc3, 0x03, 0xff, 0x05, + 0x00, 0x00, } func (m *Chain) Marshal() (dAtA []byte, err error) { diff --git a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts index 5c4583a7cd..af161efd7b 100644 --- a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts +++ b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts @@ -148,16 +148,6 @@ export declare enum ChainName { * @generated from enum value: solana_localnet = 23; */ solana_localnet = 23, - - /** - * @generated from enum value: btc_signet_testnet = 24; - */ - btc_signet_testnet = 24, - - /** - * @generated from enum value: btc_testnet4 = 25; - */ - btc_testnet4 = 25, } /** From fe5731e99522d9469500b0fa704ba20ff98ec49e Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 24 Sep 2024 15:43:51 -0500 Subject: [PATCH 5/6] fix compile error --- pkg/chains/chains.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/chains/chains.go b/pkg/chains/chains.go index dbbb5dd084..addd6a14df 100644 --- a/pkg/chains/chains.go +++ b/pkg/chains/chains.go @@ -171,7 +171,6 @@ var ( // BitcoinSignetTestnet is Bitcoin Signet testnet BitcoinSignetTestnet = Chain{ - ChainName: ChainName_btc_signet_testnet, ChainId: 18333, Network: Network_btc, NetworkType: NetworkType_testnet, @@ -184,7 +183,6 @@ var ( // BitcoinTestnet4 is Bitcoin testnet4 BitcoinTestnet4 = Chain{ - ChainName: ChainName_btc_testnet4, ChainId: 18334, Network: Network_btc, NetworkType: NetworkType_testnet, From 7340658706ae3615d8ff2f1f4d81d4737c10d3f2 Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Tue, 24 Sep 2024 16:10:14 -0500 Subject: [PATCH 6/6] fix unit test --- pkg/chains/chains_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/chains/chains_test.go b/pkg/chains/chains_test.go index ca23229c2a..90545bee1c 100644 --- a/pkg/chains/chains_test.go +++ b/pkg/chains/chains_test.go @@ -11,7 +11,9 @@ import ( func TestChain_Name(t *testing.T) { t.Run("new Name field is compatible with ChainName enum", func(t *testing.T) { for _, chain := range chains.DefaultChainsList() { - require.EqualValues(t, chain.Name, chain.ChainName.String()) + if chain.ChainName != chains.ChainName_empty { + require.EqualValues(t, chain.Name, chain.ChainName.String()) + } } }) }