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 Polygon Sepolia Testnet #3723

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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 devnet/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ spec:
- ws://eth-devnet:8545
- --optimismSepoliaRPC
- ws://eth-devnet:8545
- --polygonSepoliaRPC
- ws://eth-devnet:8545
# - --wormchainURL
# - wormchain:9090
# - --accountantKeyPath
Expand Down
17 changes: 17 additions & 0 deletions ethereum/.env.polygon.sepolia
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Polygon on Sepolia testnet
# Rename to .env to use with truffle migrations

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

# Bridge Migrations
BRIDGE_INIT_CHAIN_ID=10007
BRIDGE_INIT_GOV_CHAIN_ID=0x1
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
# Can't find a WETH as of 1/18/2024.
BRIDGE_INIT_WETH=0x0000000000000000000000000000000000000000
BRIDGE_INIT_FINALITY=1
9 changes: 9 additions & 0 deletions ethereum/truffle-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ module.exports = {
},
network_id: "80001",
},
polygon_sepolia_testnet: {
provider: () => {
return new HDWalletProvider(
process.env.MNEMONIC,
"https://rpc-amoy.polygon.technology/"
);
},
network_id: "80002",
},
avalanche: {
provider: () => {
return new HDWalletProvider(
Expand Down
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) {
{"ArbitrumSepolia", vaa.ChainIDArbitrumSepolia},
{"BaseSepolia", vaa.ChainIDBaseSepolia},
{"OptimismSepolia", vaa.ChainIDOptimismSepolia},
{"PolygonSepolia", vaa.ChainIDPolygonSepolia},
}

if len(only) > 0 {
Expand Down
25 changes: 25 additions & 0 deletions node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ var (
optimismSepoliaRPC *string
optimismSepoliaContract *string

polygonSepoliaRPC *string
polygonSepoliaContract *string

logLevel *string
publicRpcLogDetailStr *string
publicRpcLogToTelemetry *bool
Expand Down Expand Up @@ -371,6 +374,9 @@ func init() {
optimismSepoliaRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "optimismSepoliaRPC", "Optimism on Sepolia RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
optimismSepoliaContract = NodeCmd.Flags().String("optimismSepoliaContract", "", "Optimism on Sepolia contract address")

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

logLevel = NodeCmd.Flags().String("logLevel", "info", "Logging level (debug, info, warn, error, dpanic, panic, fatal)")
publicRpcLogDetailStr = NodeCmd.Flags().String("publicRpcLogDetail", "full", "The detail with which public RPC requests shall be logged (none=no logging, minimal=only log gRPC methods, full=log gRPC method, payload (up to 200 bytes) and user agent (up to 200 bytes))")
publicRpcLogToTelemetry = NodeCmd.Flags().Bool("logPublicRpcToTelemetry", true, "whether or not to include publicRpc request logs in telemetry")
Expand Down Expand Up @@ -543,6 +549,7 @@ func runNode(cmd *cobra.Command, args []string) {
*arbitrumSepoliaContract = unsafeDevModeEvmContractAddress(*arbitrumSepoliaContract)
*baseSepoliaContract = unsafeDevModeEvmContractAddress(*baseSepoliaContract)
*optimismSepoliaContract = unsafeDevModeEvmContractAddress(*optimismSepoliaContract)
*polygonSepoliaContract = unsafeDevModeEvmContractAddress(*polygonSepoliaContract)
}

// Verify flags
Expand Down Expand Up @@ -720,6 +727,9 @@ func runNode(cmd *cobra.Command, args []string) {
if (*optimismSepoliaRPC == "") != (*optimismSepoliaContract == "") {
logger.Fatal("Both --optimismSepoliaRPC and --optimismSepoliaContract must be set together or both unset")
}
if (*polygonSepoliaRPC == "") != (*polygonSepoliaContract == "") {
logger.Fatal("Both --polygonSepoliaRPC and --polygonSepoliaContract must be set together or both unset")
}
} else {
if *sepoliaRPC != "" || *sepoliaContract != "" {
logger.Fatal("Please do not specify --sepoliaRPC or --sepoliaContract")
Expand All @@ -736,6 +746,9 @@ func runNode(cmd *cobra.Command, args []string) {
if *optimismSepoliaRPC != "" || *optimismSepoliaContract != "" {
logger.Fatal("Please do not specify --optimismSepoliaRPC or --optimismSepoliaContract")
}
if *polygonSepoliaRPC != "" || *polygonSepoliaContract != "" {
logger.Fatal("Please do not specify --polygonSepoliaRPC or --polygonSepoliaContract")
}
}

var publicRpcLogDetail common.GrpcLogDetail
Expand Down Expand Up @@ -944,6 +957,7 @@ func runNode(cmd *cobra.Command, args []string) {
rpcMap["arbitrumSepoliaRPC"] = *arbitrumSepoliaRPC
rpcMap["baseSepoliaRPC"] = *baseSepoliaRPC
rpcMap["optimismSepoliaRPC"] = *optimismSepoliaRPC
rpcMap["polygonSepoliaRPC"] = *polygonSepoliaRPC
}
rpcMap["scrollRPC"] = *scrollRPC
rpcMap["solanaRPC"] = *solanaRPC
Expand Down Expand Up @@ -1552,6 +1566,17 @@ func runNode(cmd *cobra.Command, args []string) {

watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(polygonSepoliaRPC) {
wc := &evm.WatcherConfig{
NetworkID: "polygon_sepolia",
ChainID: vaa.ChainIDPolygonSepolia,
Rpc: *polygonSepoliaRPC,
Contract: *polygonSepoliaContract,
}

watcherConfigs = append(watcherConfigs, wc)
}
}

var ibcWatcherConfig *node.IbcWatcherConfig = nil
Expand Down
Loading
Loading