Skip to content

Commit

Permalink
Deploy SeiEVM Testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley committed Jan 2, 2025
1 parent b01e880 commit eb737c4
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 9 deletions.
1 change: 1 addition & 0 deletions deployments/testnet/tokenBridgeVAAs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Blast (36) Testnet Token Bridge,0100000000010052b4615add1ca354feb81a7f90b70a0d78
XLayer (37) Testnet Token Bridge,01000000000100c983babda02e84e346e49f823aa201d65c82e19c51cdfb555cc9aa2fa6809f4500f6344d86722b1a8023906d185c96bc9b4e332402ae2e05ec69d0d95c39ea81000000000100000001000100000000000000000000000000000000000000000000000000000000000000040000000005b1293100000000000000000000000000000000000000000000546f6b656e4272696467650100000025000000000000000000000000da91a06299bbf302091b053c6b9ef86eff0f930d
Linea (38) Testnet Token Bridge,01000000000100411f65a20405ad0d85d6718a91bc16cf645a7eb7dbd29d4b2d0b9cc2d872dc01112cf96dc40c07ddf648325a5dcdba42c70612179126178e7fb9e9bcfef1cb4a01000000010000000100010000000000000000000000000000000000000000000000000000000000000004000000000183785600000000000000000000000000000000000000000000546f6b656e4272696467650100000026000000000000000000000000c7a204bdbfe983fcd8d8e61d02b475d4073ff97e
Berachain (39) Testnet Token Bridge,01000000000100c19d35faa10139fef5b3244f120efb67ad22d2d9ece7d777bcb6e957506ba9f15e2e6fd91a18dcdd6bf434d96d624fd725f957437f2e86dfdcbb6d0e97f3eeb100000000010000000100010000000000000000000000000000000000000000000000000000000000000004000000000404250300000000000000000000000000000000000000000000546f6b656e4272696467650100000027000000000000000000000000a10f2ef61de1f19f586ab8b6f2eba89bace63f7a
SeiEVM (40) Testnet Token Bridge,0100000000010041e411c483dcf8a1dcd9ec21ca63a0265904418577f894089d4d4931b728369f1a7e088f72ff725184d0be107ef8d42069ee1b37257b98a7b276c09e03cb47e501000000010000000100010000000000000000000000000000000000000000000000000000000000000004000000000260150f00000000000000000000000000000000000000000000546f6b656e427269646765010000002800000000000000000000000023908a62110e21c04f3a4e011d24f901f911744a
Snaxchain (43) Testnet Token Bridge,010000000001008ed60dec76f13f6da695fc5f134c8cf3527f264712e7bb98d2e54a5f457759e0491e3f1cb42eed9b84edc60a96836df98a3752c8a4e10977801e6c35a39f211b000000000100000001000100000000000000000000000000000000000000000000000000000000000000040000000005ba971e00000000000000000000000000000000000000000000546f6b656e427269646765010000002b000000000000000000000000a10f2ef61de1f19f586ab8b6f2eba89bace63f7a
Unichain (44) Testnet Token Bridge,010000000001004f9c7be0694bcabbf1fec2300004b9d82f6a122c459fababcfdc897e894769290c9a9655015909b5c17667d63f8edcec9ad9ee2d05e7cdb24a7a64136a4312c70100000001000000010001000000000000000000000000000000000000000000000000000000000000000400000000008006e100000000000000000000000000000000000000000000546f6b656e427269646765010000002c000000000000000000000000a10f2ef61de1f19f586ab8b6f2eba89bace63f7a
Worldchain (45) Testnet Token Bridge,01000000000100f1ae141e77e67110aecade87c6a5f9b34545638aba1a3a7dbf6a311fe58c99fd351650c8593a8161a03cc7f94b76cdc0a5978fa3e0ffbfb3738085a070172cc5010000000100000001000100000000000000000000000000000000000000000000000000000000000000040000000004f3500a00000000000000000000000000000000000000000000546f6b656e427269646765010000002d000000000000000000000000430855b4d43b8aeb9d2b9869b74d58dda79c0db2
Expand Down
4 changes: 4 additions & 0 deletions devnet/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ spec:
command:
- /guardiand
- node
- --seiEvmRPC
- wss://evm-ws-testnet.sei-apis.com
- --seiEvmContract
- 0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd
# - --ethRPC
# - ws://eth-devnet:8545
# - --wormchainURL
Expand Down
13 changes: 13 additions & 0 deletions ethereum/env/.env.seievm.devnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Sei EVM testnet read only env. Use to deploy the core contract with forge.

# ethereum$ ln -s env/.env.seievm.testnet .env

RPC_URL="https://evm-rpc-arctic-1.sei-apis.com/"
FORGE_ARGS="--legacy --with-gas-price 3000000000" # 3 gwei

# Wormhole Core
INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"]
INIT_CHAIN_ID=40
INIT_GOV_CHAIN_ID=0x1
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
INIT_EVM_CHAIN_ID=713715
22 changes: 14 additions & 8 deletions ethereum/env/.env.seievm.testnet
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Sei EVM testnet read only env. Use to deploy the core contract with forge.
# SeiEVM testnet (atlantic-2) env
# Rename to .env

# ethereum$ ln -s env/.env.seievm.testnet .env
# Common config for forge deployment
RPC_URL="https://evm-rpc-testnet.sei-apis.com/"

RPC_URL="https://evm-rpc-arctic-1.sei-apis.com/"
FORGE_ARGS="--legacy --with-gas-price 3000000000" # 3 gwei

# Wormhole Core
INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"]
# Wormhole Core Migrations
INIT_SIGNERS=["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"]
INIT_CHAIN_ID=40
INIT_GOV_CHAIN_ID=0x1
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
INIT_EVM_CHAIN_ID=713715
INIT_EVM_CHAIN_ID=1328

# Bridge Migrations
BRIDGE_INIT_CHAIN_ID=40
BRIDGE_INIT_GOV_CHAIN_ID=0x1
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
BRIDGE_INIT_WETH=0x3921eA6Cf927BE80211Bb57f19830700285b0AdA
BRIDGE_INIT_FINALITY=1
20 changes: 20 additions & 0 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ var (
hyperEvmRPC *string
hyperEvmContract *string

seiEvmRPC *string
seiEvmContract *string

sepoliaRPC *string
sepoliaContract *string

Expand Down Expand Up @@ -428,6 +431,9 @@ func init() {
hyperEvmRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "hyperEvmRPC", "HyperEVM RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
hyperEvmContract = NodeCmd.Flags().String("hyperEvmContract", "", "HyperEVM contract address")

seiEvmRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "seiEvmRPC", "SeiEVM RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
seiEvmContract = NodeCmd.Flags().String("seiEvmContract", "", "SeiEVM contract address")

arbitrumSepoliaRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "arbitrumSepoliaRPC", "Arbitrum on Sepolia RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
arbitrumSepoliaContract = NodeCmd.Flags().String("arbitrumSepoliaContract", "", "Arbitrum on Sepolia contract address")

Expand Down Expand Up @@ -819,6 +825,7 @@ func runNode(cmd *cobra.Command, args []string) {
*worldchainContract = checkEvmArgs(logger, *worldchainRPC, *worldchainContract, "worldchain", true)
*inkContract = checkEvmArgs(logger, *inkRPC, *inkContract, "ink", false)
*hyperEvmContract = checkEvmArgs(logger, *hyperEvmRPC, *hyperEvmContract, "hyperEvm", false)
*seiEvmContract = checkEvmArgs(logger, *seiEvmRPC, *seiEvmContract, "seiEvm", false)

// These chains will only ever be testnet / devnet.
*sepoliaContract = checkEvmArgs(logger, *sepoliaRPC, *sepoliaContract, "sepolia", false)
Expand Down Expand Up @@ -963,6 +970,7 @@ func runNode(cmd *cobra.Command, args []string) {
rpcMap["monadDevnetRPC"] = *monadDevnetRPC
}
rpcMap["scrollRPC"] = *scrollRPC
rpcMap["seiEvmRPC"] = *seiEvmRPC
rpcMap["solanaRPC"] = *solanaRPC
rpcMap["snaxchainRPC"] = *snaxchainRPC
rpcMap["suiRPC"] = *suiRPC
Expand Down Expand Up @@ -1449,6 +1457,18 @@ func runNode(cmd *cobra.Command, args []string) {
watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(seiEvmRPC) {
wc := &evm.WatcherConfig{
NetworkID: "seievm",
ChainID: vaa.ChainIDSeiEVM,
Rpc: *seiEvmRPC,
Contract: *seiEvmContract,
CcqBackfillCache: *ccqBackfillCache,
}

watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(terraWS) {
wc := &cosmwasm.WatcherConfig{
NetworkID: "terra",
Expand Down
1 change: 1 addition & 0 deletions node/pkg/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ var perChainConfig = map[vaa.ChainID]PerChainConfig{
vaa.ChainIDPolygonSepolia: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDMonadDevnet: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDHyperEVM: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDSeiEVM: {NumWorkers: 1, TimestampCacheSupported: true},
}

// GetPerChainConfig returns the config for the specified chain. If the chain is not configured it returns an empty struct,
Expand Down
5 changes: 4 additions & 1 deletion node/pkg/watchers/evm/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ func (w *Watcher) Run(parentCtx context.Context) error {
p2p.DefaultRegistry.AddErrorCount(w.chainID, 1)
return nil
case ev := <-messageC:
logger.Info("BOINK: calling getBlockTime")
blockTime, err := w.getBlockTime(ctx, ev.Raw.BlockHash)
logger.Info("BOINK: back from getBlockTime", zap.Uint64("blockTime", blockTime))
if err != nil {
ethConnectionErrors.WithLabelValues(w.networkName, "block_by_number_error").Inc()
if canRetryGetBlockTime(err) {
Expand Down Expand Up @@ -478,7 +480,7 @@ func (w *Watcher) Run(parentCtx context.Context) error {

start := time.Now()
currentHash := ev.Hash
logger.Debug("processing new header",
logger.Info("processing new header",
zap.Stringer("current_block", ev.Number),
zap.Uint64("block_time", ev.Time),
zap.Stringer("current_blockhash", currentHash),
Expand Down Expand Up @@ -728,6 +730,7 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) {
w.chainID == vaa.ChainIDMoonbeam ||
w.chainID == vaa.ChainIDOptimism ||
w.chainID == vaa.ChainIDOptimismSepolia ||
w.chainID == vaa.ChainIDSeiEVM ||
w.chainID == vaa.ChainIDSepolia ||
w.chainID == vaa.ChainIDSnaxchain ||
w.chainID == vaa.ChainIDUnichain ||
Expand Down
1 change: 1 addition & 0 deletions sdk/testnet_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var knownTestnetTokenbridgeEmitters = map[vaa.ChainID]string{
vaa.ChainIDXLayer: "000000000000000000000000dA91a06299BBF302091B053c6B9EF86Eff0f930D",
vaa.ChainIDLinea: "000000000000000000000000C7A204bDBFe983FCD8d8E61D02b475D4073fF97e",
vaa.ChainIDBerachain: "000000000000000000000000a10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a",
vaa.ChainIDSeiEVM: "00000000000000000000000023908A62110e21C04F3A4e011d24F901F911744A",
vaa.ChainIDSnaxchain: "000000000000000000000000a10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a",
vaa.ChainIDUnichain: "000000000000000000000000a10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a",
vaa.ChainIDWorldchain: "000000000000000000000000430855B4D43b8AEB9D2B9869B74d58dda79C0dB2",
Expand Down

0 comments on commit eb737c4

Please sign in to comment.