Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Worldchain testnet #4140

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cspell-custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ vphash
wasmhooks
wasms
WORKDIR
worldchain
WorldChain
wormchain
Wormchain
wormchaind
Expand Down
21 changes: 21 additions & 0 deletions ethereum/env/.env.worldchain.testnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Worldchain testnet env
# Rename to .env

# Common config for forge deployment
RPC_URL=https://worldchain-sepolia.g.alchemy.com/public
# FORGE_ARGS="--legacy"

# Wormhole Core Migrations
INIT_SIGNERS=["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"]
INIT_CHAIN_ID=45
INIT_GOV_CHAIN_ID=0x1
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
INIT_EVM_CHAIN_ID=4801

# Bridge Migrations
BRIDGE_INIT_CHAIN_ID=45
BRIDGE_INIT_GOV_CHAIN_ID=0x1
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
BRIDGE_INIT_FINALITY=1
# I'm assuming this is right. . .
BRIDGE_INIT_WETH=0x211Db8FbDc34982654e39b1B3a8Ca3EF5c7826EA
bruce-riley marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions node/cmd/guardiand/adminnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func runListNodes(cmd *cobra.Command, args []string) {
{"Berachain", vaa.ChainIDBerachain},
{"Snaxchain", vaa.ChainIDSnaxchain},
{"Unichain", vaa.ChainIDUnichain},
{"Worldchain", vaa.ChainIDWorldchain},
{"Wormchain", vaa.ChainIDWormchain},
{"Sepolia", vaa.ChainIDSepolia},
{"Holesky", vaa.ChainIDHolesky},
Expand Down
20 changes: 20 additions & 0 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ var (
unichainRPC *string
unichainContract *string

worldchainRPC *string
worldchainContract *string

sepoliaRPC *string
sepoliaContract *string

Expand Down Expand Up @@ -403,6 +406,9 @@ func init() {
unichainRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "unichainRPC", "Unichain RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
unichainContract = NodeCmd.Flags().String("unichainContract", "", "Unichain contract address")

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

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

Expand Down Expand Up @@ -786,6 +792,7 @@ func runNode(cmd *cobra.Command, args []string) {
*berachainContract = checkEvmArgs(logger, *berachainRPC, *berachainContract, "berachain", false)
*snaxchainContract = checkEvmArgs(logger, *snaxchainRPC, *snaxchainContract, "snaxchain", true)
*unichainContract = checkEvmArgs(logger, *unichainRPC, *unichainContract, "unichain", false)
*worldchainContract = checkEvmArgs(logger, *worldchainRPC, *worldchainContract, "worldchain", false)

// These chains will only ever be testnet / devnet.
*sepoliaContract = checkEvmArgs(logger, *sepoliaRPC, *sepoliaContract, "sepolia", false)
Expand Down Expand Up @@ -930,6 +937,7 @@ func runNode(cmd *cobra.Command, args []string) {
rpcMap["terra2WS"] = *terra2WS
rpcMap["terra2LCD"] = *terra2LCD
rpcMap["unichainRPC"] = *unichainRPC
rpcMap["worldchainRPC"] = *worldchainRPC
rpcMap["gatewayWS"] = *gatewayWS
rpcMap["gatewayLCD"] = *gatewayLCD
rpcMap["wormchainURL"] = *wormchainURL
Expand Down Expand Up @@ -1375,6 +1383,18 @@ func runNode(cmd *cobra.Command, args []string) {
watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(worldchainRPC) {
wc := &evm.WatcherConfig{
NetworkID: "worldchain",
ChainID: vaa.ChainIDWorldchain,
Rpc: *worldchainRPC,
Contract: *worldchainContract,
CcqBackfillCache: *ccqBackfillCache,
}

watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(terraWS) {
wc := &cosmwasm.WatcherConfig{
NetworkID: "terra",
Expand Down
213 changes: 109 additions & 104 deletions node/pkg/proto/publicrpc/v1/publicrpc.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions node/pkg/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ var perChainConfig = map[vaa.ChainID]PerChainConfig{
vaa.ChainIDBerachain: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDSnaxchain: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDUnichain: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDWorldchain: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDSepolia: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDHolesky: {NumWorkers: 1, TimestampCacheSupported: true},
vaa.ChainIDArbitrumSepolia: {NumWorkers: 1, TimestampCacheSupported: true},
Expand Down
1 change: 1 addition & 0 deletions node/pkg/watchers/evm/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) {
w.chainID == vaa.ChainIDSepolia ||
w.chainID == vaa.ChainIDSnaxchain ||
w.chainID == vaa.ChainIDUnichain ||
w.chainID == vaa.ChainIDWorldchain ||
w.chainID == vaa.ChainIDXLayer {
finalized = true
safe = true
Expand Down
1 change: 1 addition & 0 deletions proto/publicrpc/v1/publicrpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ enum ChainID {
CHAIN_ID_SEIEVM = 40;
CHAIN_ID_SNAXCHAIN = 43;
CHAIN_ID_UNICHAIN = 44;
CHAIN_ID_WORLDCHAIN = 45;
CHAIN_ID_WORMCHAIN = 3104;
CHAIN_ID_COSMOSHUB = 4000;
CHAIN_ID_EVMOS = 4001;
Expand Down
1 change: 1 addition & 0 deletions sdk/testnet_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ var knownTestnetTokenbridgeEmitters = map[vaa.ChainID]string{
vaa.ChainIDBerachain: "000000000000000000000000a10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a",
vaa.ChainIDSnaxchain: "000000000000000000000000a10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a",
vaa.ChainIDUnichain: "000000000000000000000000a10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a",
vaa.ChainIDWorldchain: "000000000000000000000000376428e7f26D5867e69201b275553C45B09EE090",
vaa.ChainIDSepolia: "000000000000000000000000DB5492265f6038831E89f495670FF909aDe94bd9",
vaa.ChainIDHolesky: "00000000000000000000000076d093BbaE4529a342080546cAFEec4AcbA59EC6",
vaa.ChainIDArbitrumSepolia: "000000000000000000000000C7A204bDBFe983FCD8d8E61D02b475D4073fF97e",
Expand Down
7 changes: 7 additions & 0 deletions sdk/vaa/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ func (c ChainID) String() string {
return "snaxchain"
case ChainIDUnichain:
return "unichain"
case ChainIDWorldchain:
return "worldchain"
case ChainIDCosmoshub:
return "cosmoshub"
case ChainIDEvmos:
Expand Down Expand Up @@ -330,6 +332,8 @@ func ChainIDFromString(s string) (ChainID, error) {
return ChainIDSnaxchain, nil
case "unichain":
return ChainIDUnichain, nil
case "worldchain":
return ChainIDWorldchain, nil
case "cosmoshub":
return ChainIDCosmoshub, nil
case "seievm":
Expand Down Expand Up @@ -407,6 +411,7 @@ func GetAllNetworkIDs() []ChainID {
ChainIDBerachain,
ChainIDSnaxchain,
ChainIDUnichain,
ChainIDWorldchain,
ChainIDWormchain,
ChainIDCosmoshub,
ChainIDEvmos,
Expand Down Expand Up @@ -507,6 +512,8 @@ const (
ChainIDSnaxchain ChainID = 43
// ChainIDUnichain is the ChainID of Unichain
ChainIDUnichain ChainID = 44
// ChainIDWorldchain is the ChainID of Worldchain
ChainIDWorldchain ChainID = 45
//ChainIDWormchain is the ChainID of Wormchain
ChainIDWormchain ChainID = 3104
// ChainIDCosmoshub is the ChainID of Cosmoshub
Expand Down
3 changes: 3 additions & 0 deletions sdk/vaa/structs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestChainIDFromString(t *testing.T) {
{input: "berachain", output: ChainIDBerachain},
{input: "snaxchain", output: ChainIDSnaxchain},
{input: "unichain", output: ChainIDUnichain},
{input: "worldchain", output: ChainIDWorldchain},
{input: "seievm", output: ChainIDSeiEVM},
{input: "wormchain", output: ChainIDWormchain},
{input: "cosmoshub", output: ChainIDCosmoshub},
Expand Down Expand Up @@ -123,6 +124,7 @@ func TestChainIDFromString(t *testing.T) {
{input: "Berachain", output: ChainIDBerachain},
{input: "Snaxchain", output: ChainIDSnaxchain},
{input: "Unichain", output: ChainIDUnichain},
{input: "Worldchain", output: ChainIDWorldchain},
{input: "SeiEVM", output: ChainIDSeiEVM},
{input: "Wormchain", output: ChainIDWormchain},
{input: "Cosmoshub", output: ChainIDCosmoshub},
Expand Down Expand Up @@ -320,6 +322,7 @@ func TestChainId_String(t *testing.T) {
{input: 40, output: "seievm"},
{input: 43, output: "snaxchain"},
{input: 44, output: "unichain"},
{input: 45, output: "worldchain"},
{input: 3104, output: "wormchain"},
{input: 4000, output: "cosmoshub"},
{input: 4001, output: "evmos"},
Expand Down
Loading