Skip to content

Commit

Permalink
Node: Deploy Worldchain mainnet (#4156)
Browse files Browse the repository at this point in the history
* Node: Deploy Worldchain mainnet

* Code review rework

* node: Governor setup for Worldchain

---------

Co-authored-by: Dirk Brink <[email protected]>
  • Loading branch information
bruce-riley and djb15 authored Nov 12, 2024
1 parent 7177e49 commit 6e93914
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 60 deletions.
2 changes: 1 addition & 1 deletion node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,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)
*worldchainContract = checkEvmArgs(logger, *worldchainRPC, *worldchainContract, "worldchain", true)

// These chains will only ever be testnet / devnet.
*sepoliaContract = checkEvmArgs(logger, *sepoliaRPC, *sepoliaContract, "sepolia", false)
Expand Down
58 changes: 30 additions & 28 deletions node/hack/repair_eth/repair_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,39 @@ var etherscanAPIMap = map[vaa.ChainID]string{
vaa.ChainIDKarura: "https://blockscout.karura.network/api",
vaa.ChainIDAcala: "https://blockscout.acala.network/api",
// NOTE: Not sure what should be here for Klaytn, since they use: https://scope.klaytn.com/
vaa.ChainIDCelo: "https://celoscan.xyz/api",
vaa.ChainIDMoonbeam: "https://api-moonbeam.moonscan.io",
vaa.ChainIDArbitrum: "https://api.arbiscan.io",
vaa.ChainIDOptimism: "https://api-optimistic.etherscan.io",
vaa.ChainIDBase: "https://api.basescan.org",
vaa.ChainIDScroll: "https://api.scrollscan.com",
vaa.ChainIDMantle: "", // TODO: Does Mantle have an etherscan equivalent API endpoint?
vaa.ChainIDBlast: "https://api.blastscan.io",
vaa.ChainIDXLayer: "", // TODO: Does X Layer have an etherscan API endpoint?
vaa.ChainIDCelo: "https://celoscan.xyz/api",
vaa.ChainIDMoonbeam: "https://api-moonbeam.moonscan.io",
vaa.ChainIDArbitrum: "https://api.arbiscan.io",
vaa.ChainIDOptimism: "https://api-optimistic.etherscan.io",
vaa.ChainIDBase: "https://api.basescan.org",
vaa.ChainIDScroll: "https://api.scrollscan.com",
vaa.ChainIDMantle: "", // TODO: Does Mantle have an etherscan equivalent API endpoint?
vaa.ChainIDBlast: "https://api.blastscan.io",
vaa.ChainIDXLayer: "", // TODO: Does X Layer have an etherscan API endpoint?
vaa.ChainIDWorldchain: "https://api.worldscan.org",
}

var coreContractMap = map[vaa.ChainID]string{
vaa.ChainIDEthereum: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",
vaa.ChainIDBSC: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",
vaa.ChainIDAvalanche: "0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c",
vaa.ChainIDPolygon: "0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7",
vaa.ChainIDOasis: "0xfe8cd454b4a1ca468b57d79c0cc77ef5b6f64585", // <- converted to all lower case for easy compares
vaa.ChainIDAurora: "0xa321448d90d4e5b0a732867c18ea198e75cac48e",
vaa.ChainIDFantom: strings.ToLower("0x126783A6Cb203a3E35344528B26ca3a0489a1485"),
vaa.ChainIDKarura: strings.ToLower("0xa321448d90d4e5b0A732867c18eA198e75CAC48E"),
vaa.ChainIDAcala: strings.ToLower("0xa321448d90d4e5b0A732867c18eA198e75CAC48E"),
vaa.ChainIDKlaytn: strings.ToLower("0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7"),
vaa.ChainIDCelo: strings.ToLower("0xa321448d90d4e5b0A732867c18eA198e75CAC48E"),
vaa.ChainIDMoonbeam: strings.ToLower("0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3"),
vaa.ChainIDArbitrum: strings.ToLower("0xa5f208e072434bC67592E4C49C1B991BA79BCA46"),
vaa.ChainIDOptimism: strings.ToLower("0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"),
vaa.ChainIDBase: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDScroll: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDMantle: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDBlast: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDXLayer: strings.ToLower("0x194B123c5E96B9b2E49763619985790Dc241CAC0"),
vaa.ChainIDEthereum: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",
vaa.ChainIDBSC: "0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B",
vaa.ChainIDAvalanche: "0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c",
vaa.ChainIDPolygon: "0x7A4B5a56256163F07b2C80A7cA55aBE66c4ec4d7",
vaa.ChainIDOasis: "0xfe8cd454b4a1ca468b57d79c0cc77ef5b6f64585", // <- converted to all lower case for easy compares
vaa.ChainIDAurora: "0xa321448d90d4e5b0a732867c18ea198e75cac48e",
vaa.ChainIDFantom: strings.ToLower("0x126783A6Cb203a3E35344528B26ca3a0489a1485"),
vaa.ChainIDKarura: strings.ToLower("0xa321448d90d4e5b0A732867c18eA198e75CAC48E"),
vaa.ChainIDAcala: strings.ToLower("0xa321448d90d4e5b0A732867c18eA198e75CAC48E"),
vaa.ChainIDKlaytn: strings.ToLower("0x0C21603c4f3a6387e241c0091A7EA39E43E90bb7"),
vaa.ChainIDCelo: strings.ToLower("0xa321448d90d4e5b0A732867c18eA198e75CAC48E"),
vaa.ChainIDMoonbeam: strings.ToLower("0xC8e2b0cD52Cf01b0Ce87d389Daa3d414d4cE29f3"),
vaa.ChainIDArbitrum: strings.ToLower("0xa5f208e072434bC67592E4C49C1B991BA79BCA46"),
vaa.ChainIDOptimism: strings.ToLower("0xEe91C335eab126dF5fDB3797EA9d6aD93aeC9722"),
vaa.ChainIDBase: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDScroll: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDMantle: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDBlast: strings.ToLower("0xbebdb6C8ddC678FfA9f8748f85C815C556Dd8ac6"),
vaa.ChainIDXLayer: strings.ToLower("0x194B123c5E96B9b2E49763619985790Dc241CAC0"),
vaa.ChainIDWorldchain: strings.ToLower("0xcbcEe4e081464A15d8Ad5f58BB493954421eB506"),
}

var (
Expand Down
1 change: 1 addition & 0 deletions node/pkg/governor/mainnet_chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ func chainList() []chainConfigEntry {
{emitterChainID: vaa.ChainIDXLayer, dailyLimit: 100_000, bigTransactionSize: 10_000},
{emitterChainID: vaa.ChainIDWormchain, dailyLimit: 500_000, bigTransactionSize: 50_000},
{emitterChainID: vaa.ChainIDSnaxchain, dailyLimit: 500_000, bigTransactionSize: 50_000},
{emitterChainID: vaa.ChainIDWorldchain, dailyLimit: 500_000, bigTransactionSize: 50_000},
}
}
5 changes: 5 additions & 0 deletions node/pkg/governor/manual_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,10 @@ func manualTokenList() []tokenConfigEntry {
{chain: 35, addr: "000000000000000000000000cDA86A272531e8640cD7F1a92c01839911B90bb0", symbol: "METH", coinGeckoId: "mantle-staked-ether", decimals: 18, price: 3934.06},
{chain: 35, addr: "000000000000000000000000deaddeaddeaddeaddeaddeaddeaddeaddead1111", symbol: "WETH", coinGeckoId: "wrapped-ether-mantle-bridge", decimals: 18, price: 3825.65},
{chain: 35, addr: "000000000000000000000000371c7ec6d8039ff7933a2aa28eb827ffe1f52f07", symbol: "JOE", coinGeckoId: "joe", decimals: 18, price: 0.4911},
// WORLDCHAIN (tokens over $50,000 24h volume)
{chain: 45, addr: "0000000000000000000000002cFc85d8E48F8EAB294be644d9E25C3030863003", symbol: "WLD", coinGeckoId: "worldcoin-wld", decimals: 18, price: 2.47},
{chain: 45, addr: "00000000000000000000000003C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3", symbol: "WBTC", coinGeckoId: "bridged-wrapped-bitcoin-worldchain", decimals: 8, price: 86683.84},
{chain: 45, addr: "0000000000000000000000004200000000000000000000000000000000000006", symbol: "WETH", coinGeckoId: "wrapped-eth-world-chain", decimals: 18, price: 3311.13},
{chain: 45, addr: "00000000000000000000000079A02482A880bCE3F13e09Da970dC34db4CD24d1", symbol: "USDC.e", coinGeckoId: "bridged-usdc-world-chain", decimals: 6, price: 1.00},
}
}
63 changes: 32 additions & 31 deletions sdk/mainnet_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,37 +94,38 @@ func buildEmitterMap(hexmap map[vaa.ChainID]string) map[vaa.ChainID][]byte {
// KnownTokenbridgeEmitters is a list of well-known mainnet emitters for the tokenbridge.
var KnownTokenbridgeEmitters = buildEmitterMap(knownTokenbridgeEmitters)
var knownTokenbridgeEmitters = map[vaa.ChainID]string{
vaa.ChainIDSolana: "ec7372995d5cc8732397fb0ad35c0121e0eaa90d26f828a534cab54391b3a4f5",
vaa.ChainIDEthereum: "0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585",
vaa.ChainIDTerra: "0000000000000000000000007cf7b764e38a0a5e967972c1df77d432510564e2",
vaa.ChainIDTerra2: "a463ad028fb79679cfc8ce1efba35ac0e77b35080a1abe9bebe83461f176b0a3",
vaa.ChainIDBSC: "000000000000000000000000b6f6d86a8f9879a9c87f643768d9efc38c1da6e7",
vaa.ChainIDPolygon: "0000000000000000000000005a58505a96d1dbf8df91cb21b54419fc36e93fde",
vaa.ChainIDAvalanche: "0000000000000000000000000e082f06ff657d94310cb8ce8b0d9a04541d8052",
vaa.ChainIDOasis: "0000000000000000000000005848c791e09901b40a9ef749f2a6735b418d7564",
vaa.ChainIDAlgorand: "67e93fa6c8ac5c819990aa7340c0c16b508abb1178be9b30d024b8ac25193d45",
vaa.ChainIDAptos: "0000000000000000000000000000000000000000000000000000000000000001",
vaa.ChainIDAurora: "00000000000000000000000051b5123a7b0F9b2bA265f9c4C8de7D78D52f510F",
vaa.ChainIDFantom: "0000000000000000000000007C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2",
vaa.ChainIDKarura: "000000000000000000000000ae9d7fe007b3327AA64A32824Aaac52C42a6E624",
vaa.ChainIDAcala: "000000000000000000000000ae9d7fe007b3327AA64A32824Aaac52C42a6E624",
vaa.ChainIDKlaytn: "0000000000000000000000005b08ac39EAED75c0439FC750d9FE7E1F9dD0193F",
vaa.ChainIDCelo: "000000000000000000000000796Dff6D74F3E27060B71255Fe517BFb23C93eed",
vaa.ChainIDNear: "148410499d3fcda4dcfd68a1ebfcdddda16ab28326448d4aae4d2f0465cdfcb7",
vaa.ChainIDMoonbeam: "000000000000000000000000B1731c586ca89a23809861c6103F0b96B3F57D92",
vaa.ChainIDArbitrum: "0000000000000000000000000b2402144Bb366A632D14B83F244D2e0e21bD39c",
vaa.ChainIDOptimism: "0000000000000000000000001D68124e65faFC907325e3EDbF8c4d84499DAa8b",
vaa.ChainIDBase: "0000000000000000000000008d2de8d2f73F1F4cAB472AC9A881C9b123C79627",
vaa.ChainIDXpla: "8f9cf727175353b17a5f574270e370776123d90fd74956ae4277962b4fdee24c",
vaa.ChainIDScroll: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d",
vaa.ChainIDMantle: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d",
vaa.ChainIDBlast: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d",
vaa.ChainIDXLayer: "0000000000000000000000005537857664B0f9eFe38C9f320F75fEf23234D904",
vaa.ChainIDSnaxchain: "0000000000000000000000008B94bfE456B48a6025b92E11Be393BAa86e68410",
vaa.ChainIDInjective: "00000000000000000000000045dbea4617971d93188eda21530bc6503d153313",
vaa.ChainIDSui: "ccceeb29348f71bdd22ffef43a2a19c1f5b5e17c5cca5411529120182672ade5",
vaa.ChainIDSei: "86c5fd957e2db8389553e1728f9c27964b22a8154091ccba54d75f4b10c61f5e",
vaa.ChainIDWormchain: "aeb534c45c3049d380b9d9b966f9895f53abd4301bfaff407fa09dea8ae7a924",
vaa.ChainIDSolana: "ec7372995d5cc8732397fb0ad35c0121e0eaa90d26f828a534cab54391b3a4f5",
vaa.ChainIDEthereum: "0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585",
vaa.ChainIDTerra: "0000000000000000000000007cf7b764e38a0a5e967972c1df77d432510564e2",
vaa.ChainIDTerra2: "a463ad028fb79679cfc8ce1efba35ac0e77b35080a1abe9bebe83461f176b0a3",
vaa.ChainIDBSC: "000000000000000000000000b6f6d86a8f9879a9c87f643768d9efc38c1da6e7",
vaa.ChainIDPolygon: "0000000000000000000000005a58505a96d1dbf8df91cb21b54419fc36e93fde",
vaa.ChainIDAvalanche: "0000000000000000000000000e082f06ff657d94310cb8ce8b0d9a04541d8052",
vaa.ChainIDOasis: "0000000000000000000000005848c791e09901b40a9ef749f2a6735b418d7564",
vaa.ChainIDAlgorand: "67e93fa6c8ac5c819990aa7340c0c16b508abb1178be9b30d024b8ac25193d45",
vaa.ChainIDAptos: "0000000000000000000000000000000000000000000000000000000000000001",
vaa.ChainIDAurora: "00000000000000000000000051b5123a7b0F9b2bA265f9c4C8de7D78D52f510F",
vaa.ChainIDFantom: "0000000000000000000000007C9Fc5741288cDFdD83CeB07f3ea7e22618D79D2",
vaa.ChainIDKarura: "000000000000000000000000ae9d7fe007b3327AA64A32824Aaac52C42a6E624",
vaa.ChainIDAcala: "000000000000000000000000ae9d7fe007b3327AA64A32824Aaac52C42a6E624",
vaa.ChainIDKlaytn: "0000000000000000000000005b08ac39EAED75c0439FC750d9FE7E1F9dD0193F",
vaa.ChainIDCelo: "000000000000000000000000796Dff6D74F3E27060B71255Fe517BFb23C93eed",
vaa.ChainIDNear: "148410499d3fcda4dcfd68a1ebfcdddda16ab28326448d4aae4d2f0465cdfcb7",
vaa.ChainIDMoonbeam: "000000000000000000000000B1731c586ca89a23809861c6103F0b96B3F57D92",
vaa.ChainIDArbitrum: "0000000000000000000000000b2402144Bb366A632D14B83F244D2e0e21bD39c",
vaa.ChainIDOptimism: "0000000000000000000000001D68124e65faFC907325e3EDbF8c4d84499DAa8b",
vaa.ChainIDBase: "0000000000000000000000008d2de8d2f73F1F4cAB472AC9A881C9b123C79627",
vaa.ChainIDXpla: "8f9cf727175353b17a5f574270e370776123d90fd74956ae4277962b4fdee24c",
vaa.ChainIDScroll: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d",
vaa.ChainIDMantle: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d",
vaa.ChainIDBlast: "00000000000000000000000024850c6f61C438823F01B7A3BF2B89B72174Fa9d",
vaa.ChainIDXLayer: "0000000000000000000000005537857664B0f9eFe38C9f320F75fEf23234D904",
vaa.ChainIDSnaxchain: "0000000000000000000000008B94bfE456B48a6025b92E11Be393BAa86e68410",
vaa.ChainIDInjective: "00000000000000000000000045dbea4617971d93188eda21530bc6503d153313",
vaa.ChainIDSui: "ccceeb29348f71bdd22ffef43a2a19c1f5b5e17c5cca5411529120182672ade5",
vaa.ChainIDSei: "86c5fd957e2db8389553e1728f9c27964b22a8154091ccba54d75f4b10c61f5e",
vaa.ChainIDWormchain: "aeb534c45c3049d380b9d9b966f9895f53abd4301bfaff407fa09dea8ae7a924",
vaa.ChainIDWorldchain: "000000000000000000000000c309275443519adca74c9136b02A38eF96E3a1f6",
}

// KnownNFTBridgeEmitters is a list of well-known mainnet emitters for the NFT bridge.
Expand Down

0 comments on commit 6e93914

Please sign in to comment.