Skip to content

Commit

Permalink
fix: mantle simulators
Browse files Browse the repository at this point in the history
  • Loading branch information
arthcp committed Jun 29, 2024
1 parent 68ee04d commit 60f362f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
3 changes: 2 additions & 1 deletion deployments/prod_addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,8 @@
},
"SocketSimulator": "0xf4B9Cddc9d326F6e01A1A61b8eF3Df44F1E08449",
"SimulatorUtils": "0xb07F38FD7e8703100294c257f0A403cEb569bBdD",
"SwitchboardSimulator": "0x8145cDEf14Eb07613BC0e6f689A093B41d34FEEf"
"SwitchboardSimulator": "0x8145cDEf14Eb07613BC0e6f689A093B41d34FEEf",
"CapacitorSimulator": "0x7a7F0B8B738FaA8f0630a92a3652DEbB0eB457E7"
},
"7887": {
"SignatureVerifier": "0x56Ac0e336f0c3620dCaF8d361E8E14eA73C31f5d",
Expand Down
20 changes: 13 additions & 7 deletions scripts/deploy/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 };
Expand Down
6 changes: 4 additions & 2 deletions scripts/deploy/scripts/deploySocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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();
Expand Down

0 comments on commit 60f362f

Please sign in to comment.