From 60f362fc14dd6690270b23af222fa0306bded096 Mon Sep 17 00:00:00 2001 From: arthcp Date: Sat, 29 Jun 2024 17:03:14 +0530 Subject: [PATCH] fix: mantle simulators --- deployments/prod_addresses.json | 3 ++- scripts/deploy/config/config.ts | 20 +++++++++++++------- scripts/deploy/scripts/deploySocket.ts | 6 ++++-- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/deployments/prod_addresses.json b/deployments/prod_addresses.json index c021774e..2d6e13b3 100644 --- a/deployments/prod_addresses.json +++ b/deployments/prod_addresses.json @@ -1844,7 +1844,8 @@ }, "SocketSimulator": "0xf4B9Cddc9d326F6e01A1A61b8eF3Df44F1E08449", "SimulatorUtils": "0xb07F38FD7e8703100294c257f0A403cEb569bBdD", - "SwitchboardSimulator": "0x8145cDEf14Eb07613BC0e6f689A093B41d34FEEf" + "SwitchboardSimulator": "0x8145cDEf14Eb07613BC0e6f689A093B41d34FEEf", + "CapacitorSimulator": "0x7a7F0B8B738FaA8f0630a92a3652DEbB0eB457E7" }, "7887": { "SignatureVerifier": "0x56Ac0e336f0c3620dCaF8d361E8E14eA73C31f5d", diff --git a/scripts/deploy/config/config.ts b/scripts/deploy/config/config.ts index 1804a4a3..1cd70195 100644 --- a/scripts/deploy/config/config.ts +++ b/scripts/deploy/config/config.ts @@ -138,9 +138,9 @@ export const overrides = ( }; } else if (chain == ChainSlug.ARBITRUM_SEPOLIA) { return { - // type: 1, - // gasLimit: 50_000_000, - // gasPrice: 1_867_830_000, + type: 1, + gasLimit: 50_000_000, + gasPrice: 200_000_000, }; } else if (chain == ChainSlug.OPTIMISM) { return { @@ -163,14 +163,14 @@ export const overrides = ( } else if (chain == ChainSlug.BSC) { return { type, - gasLimit: 3000000, + gasLimit: 6_000_000, gasPrice, }; } else if (chain == ChainSlug.MAINNET) { return { // type: 1, - gasLimit: 4_000_000, - gasPrice: 30_000_000_000, + gasLimit: 6_000_000, + gasPrice: 5_000_000_000, }; } else if (chain == ChainSlug.POLYGON_MAINNET) { return { @@ -235,7 +235,7 @@ export const overrides = ( } else if (chain == ChainSlug.HOOK) { return { // type: 1, - gasLimit: 3_000_000, + gasLimit: 7_000_000, // gasPrice: 100000000, }; } else if (chain == ChainSlug.REYA_CRONOS) { @@ -292,6 +292,12 @@ export const overrides = ( // gasLimit, // gasPrice, }; + } else if (chain == ChainSlug.MANTLE) { + return { + type: 1, + gasLimit: 10_000_000_000, + gasPrice: 30_000_000, + }; } else if (chainConfig[chain] && chainConfig[chain].overrides) { return chainConfig[chain].overrides!; } else return { type, gasLimit, gasPrice }; diff --git a/scripts/deploy/scripts/deploySocket.ts b/scripts/deploy/scripts/deploySocket.ts index a9bc442a..2d457d3e 100644 --- a/scripts/deploy/scripts/deploySocket.ts +++ b/scripts/deploy/scripts/deploySocket.ts @@ -171,7 +171,9 @@ export const deploySocket = async ( const simulatorContract = ( await getInstance("SocketSimulator", socketSimulator.address) ).connect(deployUtils.signer); - let capacitor = await simulatorContract.capacitor(); + let capacitor = await simulatorContract.capacitor({ + ...overrides(chainSlug), + }); if (capacitor == constants.AddressZero) { const tx = await simulatorContract.setup( switchboardSimulator.address, @@ -185,7 +187,7 @@ export const deploySocket = async ( } deployUtils.addresses["CapacitorSimulator"] = - await simulatorContract.capacitor(); + await simulatorContract.capacitor({ ...overrides(chainSlug) }); deployUtils.addresses.startBlock = deployUtils.addresses.startBlock ? deployUtils.addresses.startBlock : await socketSigner.provider?.getBlockNumber();