diff --git a/contracts/evmx/base/AppGatewayBase.sol b/contracts/evmx/base/AppGatewayBase.sol index a9702d5c..3e60dce0 100644 --- a/contracts/evmx/base/AppGatewayBase.sol +++ b/contracts/evmx/base/AppGatewayBase.sol @@ -166,7 +166,8 @@ abstract contract AppGatewayBase is AddressResolverUtil, IAppGateway { return address(0); } - onChainAddress = IForwarder(forwarderAddresses[contractId_][chainSlug_]).getOnChainAddress(); + onChainAddress = IForwarder(forwarderAddresses[contractId_][chainSlug_]) + .getOnChainAddress(); } //////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/deployments/stage_addresses.json b/deployments/stage_addresses.json index 4987a330..10006872 100644 --- a/deployments/stage_addresses.json +++ b/deployments/stage_addresses.json @@ -1,50 +1,73 @@ { + "10": { + "ContractFactoryPlug": "0xee1Aef0b06f63Aa1c881838794Dd0876462c2B0d", + "FastSwitchboard": "0xbDE0D2da12F703Ccd275d721214745BccDCAD124", + "FeesPlug": "0x5F77550E3072c913A20B2fbdAb14026fe0E8B450", + "Socket": "0x5e1641B190B71ECCc85b1ECe934F31cD9b3dcF7a", + "SocketBatcher": "0xaC61f5696e0E2636dA7bD69827380f2Ab41A3C38", + "startBlock": 136685079 + }, "43": { - "AddressResolver": "0x21a9AFDfbEb0399D4a12f3AA1324042Be2B57F8e", - "AddressResolverImpl": "0x794b92C2Ade7D33Fb34d138B13014C63aB27CBC0", - "AuctionManager": "0x87E15a6f9Cbe482f67683Ec3f7294f12d221C8bA", - "AuctionManagerImpl": "0xfddb38811a0774E66ABD5F3Ae960bFB7E7415029", - "DeliveryHelper": "0xb399b60C22A32512a24F01C4401f43BfF979A49F", - "DeliveryHelperImpl": "0xa07e38cAB46eAA358C3653C63219f1009e8F7789", - "ERC1967Factory": "0x98ea7A5601f203DE56d86BDCA69fC3019377D6B1", - "FeesManager": "0x30e07016eB24570629Bc8765CA307394Af90B27C", - "FeesManagerImpl": "0x9F10A0c71178dbD4d049f2C04fD0e34966134b9e", - "startBlock": 5480301, - "WatcherPrecompile": "0x426509517074E0fBf15F8aAB2472711FB456C58C", - "WatcherPrecompileConfig": "0x49094ECAF26d8295BcBD73b0Ff17215348E7b253", - "WatcherPrecompileConfigImpl": "0xd69E17Ce715f49Cd2B16C64cf75201A56Ce0E90d", - "WatcherPrecompileImpl": "0xB423eE3bffc3604F96B59cF419C48AE05b8E9d0b", - "WatcherPrecompileLimits": "0x54B315eC6c7059b19164BC0e5335643d5bBAad4f", - "WatcherPrecompileLimitsImpl": "0x0e26C8CFCABC04c642696A625664553e2C183bbe" + "AddressResolver": "0x935b06902cA5C8bb4C76e18738561c294D377A93", + "AddressResolverImpl": "0xD1586EaaA0d473E6655c11A927cE4FbED648F3BF", + "AsyncDeployer": "0xECa623A443F21B705714D4A0f810d0A5D135FF6F", + "AsyncDeployerImpl": "0x1B0ea1b79B526dD3d5889Bb33Dbd24f790C23102", + "AuctionManager": "0xD044f27A9c5EE4f92EF0e38685276adFDF13E90E", + "AuctionManagerImpl": "0xC72BE9e639DA23570fa1eF2fF2cb7901a081916F", + "Configurations": "0x72f4C225B4B4f0F9608a50aEe17dA9e11dcb94b2", + "ConfigurationsImpl": "0x351De7e4275dA7f49F75363e4E7ea86Dfe050501", + "DeployForwarder": "0x5E9d1072B60D6c752B1593F5937393413372E5eF", + "DeployForwarderImpl": "0x1b7752F0039E80Aa38f7CF8b5d18798dD2ac1597", + "ERC1967Factory": "0x526796AC60e45CBB9b17c654C9447Baf160C084d", + "FeesManager": "0xA07208F9e7aE243F922317ab6604DC9F86822406", + "FeesManagerImpl": "0xbD22EDD6559B28614f44D1c768EC26491CDE1cDD", + "FeesPool": "0xe2054B575664dfDBD7a7FbAf2B12420ae88DE0FF", + "PromiseResolver": "0x38e24A2F157817b830F36A35b862F24B1494d1aD", + "ReadPrecompile": "0x39b5D3FBBa1BC28438e25955aaB412C7576eCd61", + "RequestHandler": "0x2E928C000bdC1f90716B05cE2D7182C9FA081d31", + "RequestHandlerImpl": "0xD38ae1a6C410c7681ac464bd60009198406035Ed", + "SchedulePrecompile": "0xb14a7763f09eCbd47bC5230D6170547a22834a82", + "startBlock": 8240883, + "Watcher": "0x4C846eCa55ad8cF19B9D5d906225da7b565174C1", + "WatcherImpl": "0x2920F4FB50343EF2b33096650cE234E8aF9E8556", + "WritePrecompile": "0x393007B660a00970b25E34FEd6506CE96120f8e2", + "WritePrecompileImpl": "0x0026c4736E57fE2817b53f6df1E0808c3a61984d" + }, + "8453": { + "ContractFactoryPlug": "0x3aac37DC85C522c09A3DDdA44D181E6aCCD2f9F0", + "FastSwitchboard": "0xa33ACE59E4b0d9a45Cd4a3F0DBAB86D87BDd67e2", + "FeesPlug": "0xfE34ACE07836F7F05f485EAc7122D0CD58BAC047", + "Socket": "0xee1Aef0b06f63Aa1c881838794Dd0876462c2B0d", + "SocketBatcher": "0x9EDfb162b725CF6d628D68af200cAe8b624111eD", + "startBlock": 31089766 + }, + "42161": { + "ContractFactoryPlug": "0x5F77550E3072c913A20B2fbdAb14026fe0E8B450", + "FastSwitchboard": "0xbDE0D2da12F703Ccd275d721214745BccDCAD124", + "FeesPlug": "0xee1Aef0b06f63Aa1c881838794Dd0876462c2B0d", + "Socket": "0x5e1641B190B71ECCc85b1ECe934F31cD9b3dcF7a", + "SocketBatcher": "0xaC61f5696e0E2636dA7bD69827380f2Ab41A3C38", + "startBlock": 343531414 }, "84532": { - "ContractFactoryPlug": "0x8e51D99Bf353Ebba50080D0452546fd2EBAd86A4", - "FastSwitchboard": "0x4C114115755c39dB81a06fBfEb4b08302Abe7beE", - "FeesPlug": "0x9161a99deD597fe519E03D319053CA1669118dDA", - "Socket": "0x36Ae239a92faee6aFF4df9749d592dA7c00717Be", - "SocketBatcher": "0x8fa361816874a11a66D02EC84b28E1A931B4035e", - "startBlock": 25218634 + "ContractFactoryPlug": "0x87cC19AedD434ebD3B74FfdC073CAeC7dC1E92EA", + "FastSwitchboard": "0x5aA84ffE5eCCB5263d1AE6aEd5682EAb39Bc7036", + "Socket": "0xa09217Cfc47F399C382E982778f6128685e13aD4", + "SocketBatcher": "0x80568677f2B092bd974657FE47Fc8531bfE5DBDC", + "startBlock": 26600215 }, "421614": { - "ContractFactoryPlug": "0x65C066BE05CB4622393fADc1Bf3dE8eEdEcB3817", - "FastSwitchboard": "0xF121f4B97F7C902eeD4b188B08052Da9A1FD5aBe", - "FeesPlug": "0xDfE94B9b14de382Ed13C8A7F387884808D0f7E0b", - "Socket": "0xDAB25fB82cc1b1611Fb9016FB50222dBFcD1BCf5", - "SocketBatcher": "0x4e7163Ce9F7F335138fB32827d6f99f174060897", - "startBlock": 148801970 - }, - "11155111": { - "FastSwitchboard": "0x1eFD3AF2317B9E6E7492718878f69De747C9e7c3", - "FeesPlug": "0xfE555AD869ac24305471F0755976c556425E8D23", - "Socket": "0xae59BA0Bd0D92232B3B6304185448C9Fe5445f4d", - "SocketBatcher": "0xdaE4538FbbEf41B2Feb5c79DD2fFC9720AF13d7b" + "ContractFactoryPlug": "0xe2904171afCeC319236cc051c81202677F7Aac1B", + "FastSwitchboard": "0x82833e5ac997F8f9c426949595d49702E3b08414", + "Socket": "0x468cA4bB968FD86eD752A7bD453c6869E27204f0", + "SocketBatcher": "0x977B8aB88A7159130457adA4b7078208Ab4fB111", + "startBlock": 159757112 }, "11155420": { - "ContractFactoryPlug": "0x469B536c5Df15948c8759FEEE5DB1c17790d4152", - "FastSwitchboard": "0xd8bCd4b4Bc4b0f5cb279B6FAdCEd733614f34F51", - "FeesPlug": "0x6734a30B8f2d210faefa5aeD4E11b674C59641F1", - "Socket": "0x11fbd3a7031b28607973fc44d4d24B26DEfac886", - "SocketBatcher": "0x2c2060f5586751676fC2Af96cc8bE9BF0c7A8770", - "startBlock": 27201458 + "ContractFactoryPlug": "0x705A4DD80D7203BF78AcAf3BA1851D1A80fA3d89", + "FastSwitchboard": "0x74388051BcCfA2D28690a98242A259aD94f2B1f3", + "Socket": "0x790E894C59d6275503e2Ff4ba95A42E38c071195", + "SocketBatcher": "0xa13B9b5e797e13316B23EfC01E506c8c0c2BFeF2", + "startBlock": 28583052 } } diff --git a/deployments/stage_verification.json b/deployments/stage_verification.json index 88f93e4b..2b0fd6f8 100644 --- a/deployments/stage_verification.json +++ b/deployments/stage_verification.json @@ -1,5 +1,165 @@ { + "10": [], "43": [ + [ + "0x0026c4736E57fE2817b53f6df1E0808c3a61984d", + "WritePrecompile", + "contracts/evmx/watcher/precompiles/WritePrecompile.sol", + [] + ], + [ + "0x38e24A2F157817b830F36A35b862F24B1494d1aD", + "PromiseResolver", + "contracts/evmx/watcher/PromiseResolver.sol", + [ + "0x4C846eCa55ad8cF19B9D5d906225da7b565174C1" + ] + ], + [ + "0xD38ae1a6C410c7681ac464bd60009198406035Ed", + "RequestHandler", + "contracts/evmx/watcher/RequestHandler.sol", + [] + ], + [ + "0x351De7e4275dA7f49F75363e4E7ea86Dfe050501", + "Configurations", + "contracts/evmx/watcher/Configurations.sol", + [] + ], + [ + "0x1b7752F0039E80Aa38f7CF8b5d18798dD2ac1597", + "DeployForwarder", + "contracts/evmx/helpers/DeployForwarder.sol", + [] + ], + [ + "0xC72BE9e639DA23570fa1eF2fF2cb7901a081916F", + "AuctionManager", + "contracts/evmx/AuctionManager.sol", + [] + ], + [ + "0x2920F4FB50343EF2b33096650cE234E8aF9E8556", + "Watcher", + "contracts/evmx/watcher/Watcher.sol", + [] + ], + [ + "0x1B0ea1b79B526dD3d5889Bb33Dbd24f790C23102", + "AsyncDeployer", + "contracts/evmx/helpers/AsyncDeployer.sol", + [] + ], + [ + "0xbD22EDD6559B28614f44D1c768EC26491CDE1cDD", + "FeesManager", + "contracts/evmx/fees/FeesManager.sol", + [] + ], + [ + "0xD1586EaaA0d473E6655c11A927cE4FbED648F3BF", + "AddressResolver", + "contracts/evmx/helpers/AddressResolver.sol", + [] + ], + [ + "0xe2054B575664dfDBD7a7FbAf2B12420ae88DE0FF", + "FeesPool", + "contracts/evmx/fees/FeesPool.sol", + [ + "0xb62505feacC486e809392c65614Ce4d7b051923b" + ] + ], + [ + "0x526796AC60e45CBB9b17c654C9447Baf160C084d", + "ERC1967Factory", + "lib/solady/src/utils/ERC1967Factory.sol", + [] + ], + [ + "0xFaa00117ED72CAE3399669a1E3FEedaF93020853", + "SchedulePrecompile", + "contracts/evmx/watcher/precompiles/SchedulePrecompile.sol", + [ + "0x03Aa399188E2741f89cc4265493DC5b544C52134", + 86400, + { + "type": "BigNumber", + "hex": "0x02540be400" + }, + { + "type": "BigNumber", + "hex": "0xe8d4a51000" + }, + 300 + ] + ], + [ + "0xD38d0Dfd8e7d61B45Cce6Ec58E1Ec4c514c00e7F", + "ReadPrecompile", + "contracts/evmx/watcher/precompiles/ReadPrecompile.sol", + [ + "0x03Aa399188E2741f89cc4265493DC5b544C52134", + { + "type": "BigNumber", + "hex": "0xe8d4a51000" + }, + 300 + ] + ], + [ + "0x702EfE1DfABc3963114E2356aFaF36c8b67CA961", + "WritePrecompile", + "contracts/evmx/watcher/precompiles/WritePrecompile.sol", + [] + ], + [ + "0xd0bd7837E66eEd7Be04C88354e75F5bA3cd19959", + "PromiseResolver", + "contracts/evmx/watcher/PromiseResolver.sol", + [ + "0x03Aa399188E2741f89cc4265493DC5b544C52134" + ] + ], + [ + "0x446C6B4086d1888cB15cF62735Bf57A4647E31A4", + "RequestHandler", + "contracts/evmx/watcher/RequestHandler.sol", + [] + ], + [ + "0x2dc671B87d1A9dc7C1cf06C74C2db06673b31FFf", + "Configurations", + "contracts/evmx/watcher/Configurations.sol", + [] + ], + [ + "0x4ab75b62c0E2A09E428Ce73043C36d54c78C8CFd", + "DeployForwarder", + "contracts/evmx/helpers/DeployForwarder.sol", + [] + ], + [ + "0xed8255097DFB0BB2135870bb342335dCC0C30e21", + "Watcher", + "contracts/evmx/watcher/Watcher.sol", + [] + ], + [ + "0xF946503b3bF14b39468AEce46E7Ce1A08404D109", + "AsyncDeployer", + "contracts/evmx/helpers/AsyncDeployer.sol", + [] + ], + [ + "0x69DD00B8a250e0A1bFF1b59db2EA99792faAbC66", + "FeesPool", + "contracts/evmx/fees/FeesPool.sol", + [ + "0xb62505feacC486e809392c65614Ce4d7b051923b" + ] + ], [ "0xfddb38811a0774E66ABD5F3Ae960bFB7E7415029", "AuctionManager", @@ -49,8 +209,9 @@ [] ] ], + "8453": [], + "42161": [], "84532": [], "421614": [], - "11155111": [], "11155420": [] } diff --git a/hardhat-scripts/config/config.ts b/hardhat-scripts/config/config.ts index 8eb7dfcd..7ba92e79 100644 --- a/hardhat-scripts/config/config.ts +++ b/hardhat-scripts/config/config.ts @@ -31,12 +31,12 @@ export const getChains = () => { return [ChainSlug.ARBITRUM_SEPOLIA, ChainSlug.OPTIMISM_SEPOLIA]; case DeploymentMode.STAGE: return [ - ChainSlug.OPTIMISM_SEPOLIA, - ChainSlug.ARBITRUM_SEPOLIA, - ChainSlug.BASE_SEPOLIA, ChainSlug.BASE, ChainSlug.ARBITRUM, ChainSlug.OPTIMISM, + ChainSlug.OPTIMISM_SEPOLIA, + ChainSlug.ARBITRUM_SEPOLIA, + ChainSlug.BASE_SEPOLIA, ]; case DeploymentMode.PROD: return [ @@ -57,7 +57,7 @@ export const getFeesPlugChains = (): Array => { case DeploymentMode.DEV: return getChains(); case DeploymentMode.STAGE: - return getChains(); + return [ChainSlug.OPTIMISM, ChainSlug.ARBITRUM, ChainSlug.BASE]; case DeploymentMode.PROD: return getChains(); default: @@ -83,13 +83,13 @@ export const EVM_CHAIN_ID_MAP: Record = { [DeploymentMode.STAGE]: 43, [DeploymentMode.PROD]: 3605, }; + // Addresses export const watcher = "0xb62505feacC486e809392c65614Ce4d7b051923b"; export const transmitter = "0x138e9840861C983DC0BB9b3e941FB7C0e9Ade320"; // Chain config export const EVMX_CHAIN_ID = EVM_CHAIN_ID_MAP[mode]; -export const MAX_FEES = ethers.utils.parseEther("0.001"); export const MAX_MSG_VALUE_LIMIT = ethers.utils.parseEther("0.001"); // Auction parameters @@ -97,13 +97,6 @@ export const AUCTION_END_DELAY_SECONDS = 0; export const BID_TIMEOUT = 600; // 10 minutes export const EXPIRY_TIME = 300; // 5 minutes export const MAX_RE_AUCTION_COUNT = 5; -// TestUSDC -export const TEST_USDC_NAME = "testUSDC"; -export const TEST_USDC_SYMBOL = "testUSDC"; -export const TEST_USDC_INITIAL_SUPPLY = ethers.utils.parseEther( - "1000000000000000000000000" -); -export const TEST_USDC_DECIMALS = 6; // Fees Pool Funding Amount export const FEES_POOL_FUNDING_AMOUNT_THRESHOLD = @@ -113,12 +106,11 @@ export const FEES_POOL_FUNDING_AMOUNT_THRESHOLD = export const READ_FEES = utils.parseEther("0.000001"); export const TRIGGER_FEES = utils.parseEther("0.000001"); export const WRITE_FEES = utils.parseEther("0.000001"); -export const SCHEDULE_FEES_PER_SECOND = utils.parseEther("0.000001"); +export const SCHEDULE_FEES_PER_SECOND = utils.parseEther("0.00000001"); export const SCHEDULE_CALLBACK_FEES = utils.parseEther("0.000001"); export const MAX_SCHEDULE_DELAY_SECONDS = 60 * 60 * 24; // Other constants -export const DEFAULT_MAX_LIMIT = 100; export const UPGRADE_VERSION = 1; // Transmitter constants diff --git a/hardhat-scripts/constants/feeConstants.ts b/hardhat-scripts/constants/feeConstants.ts index 1f85aaec..0c610e3e 100644 --- a/hardhat-scripts/constants/feeConstants.ts +++ b/hardhat-scripts/constants/feeConstants.ts @@ -7,16 +7,15 @@ const tokens: TokenMap = { 11155420: ["0x15dbE4B96306Cc9Eba15D834d6c1a895cF4e1697"], }, [DeploymentMode.STAGE]: { - 84532: ["0xfD51918C0572512901fFA79F822c99A475d22BB4"], - 421614: ["0xa03Cbf13f331aF7c0fD7F2E28E6Cbc13F879E3F3"], - 11155420: ["0xa0E1738a9Fc0698789866e09d7A335d30128C5C5"], - 11155111: ["0xbcaDE56f86a819994d0F66b98e921C484bE6FE4e"], + 8453: ["0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"], + 42161: ["0xaf88d065e77c8cc2239327c5edb3a432268e5831"], + 10: ["0x0b2c639c533813f4aa9d7837caf62653d097ff85"], }, }; const feePools: { [key: string]: string } = { [DeploymentMode.DEV]: "0xc20Be67ef742202dc93A78aa741E7C3715eA1DFd", - [DeploymentMode.STAGE]: "", + [DeploymentMode.STAGE]: "0xe2054B575664dfDBD7a7FbAf2B12420ae88DE0FF", }; export const getFeeTokens = ( diff --git a/hardhat-scripts/deploy/2.roles.ts b/hardhat-scripts/deploy/2.roles.ts index 53ece239..79723cec 100644 --- a/hardhat-scripts/deploy/2.roles.ts +++ b/hardhat-scripts/deploy/2.roles.ts @@ -49,7 +49,7 @@ async function setRoleForContract( if (!hasRole) { let tx = await contract.grantRole(roleHash, targetAddress, { - ...overrides(chain), + ...(await overrides(chain as ChainSlug)), }); console.log( `granting ${roleName} role to ${targetAddress} for ${contractName}`, diff --git a/hardhat-scripts/deploy/3.configureChains.ts b/hardhat-scripts/deploy/3.configureChains.ts index 6bda0941..54a3cb11 100644 --- a/hardhat-scripts/deploy/3.configureChains.ts +++ b/hardhat-scripts/deploy/3.configureChains.ts @@ -14,6 +14,7 @@ import { getInstance, getSocketSigner, getWatcherSigner, + overrides, updateContractSettings, } from "../utils"; @@ -41,6 +42,7 @@ export const configureChains = async (addresses: DeploymentAddresses) => { ).connect(signer); await registerSb( + chain, chainAddresses[Contracts.FastSwitchboard], signer, socketContract @@ -125,6 +127,7 @@ async function setOnchainContracts( } const registerSb = async ( + chain: number, sbAddress: string, signer: Wallet, socket: Contract @@ -144,7 +147,9 @@ const registerSb = async ( }); if (Number(sb) == 0) { - const registerTx = await switchboard.registerSwitchboard(); + const registerTx = await switchboard.registerSwitchboard({ + ...(await overrides(chain)), + }); console.log(`Registering Switchboard ${sbAddress}: ${registerTx.hash}`); await registerTx.wait(); } @@ -171,7 +176,9 @@ export const whitelistToken = async ( const isWhitelisted = await feesPlugContract.whitelistedTokens(token); if (!isWhitelisted) { - const tx = await feesPlugContract.whitelistToken(token); + const tx = await feesPlugContract.whitelistToken(token, { + ...(await overrides(chain)), + }); console.log( `Whitelisting token ${token} for ${feesPlugContract.address}`, tx.hash diff --git a/hardhat-scripts/deploy/4.configureEVMx.ts b/hardhat-scripts/deploy/4.configureEVMx.ts index d4ee1f57..1b05f542 100644 --- a/hardhat-scripts/deploy/4.configureEVMx.ts +++ b/hardhat-scripts/deploy/4.configureEVMx.ts @@ -9,6 +9,7 @@ import { getAddresses, getInstance, getWatcherSigner, + overrides, updateContractSettings, } from "../utils"; @@ -142,7 +143,8 @@ export const setWatcherCoreContracts = async ( const tx = await watcherContract.setCoreContracts( evmxAddresses[Contracts.RequestHandler], evmxAddresses[Contracts.Configurations], - evmxAddresses[Contracts.PromiseResolver] + evmxAddresses[Contracts.PromiseResolver], + { ...(await overrides(EVMX_CHAIN_ID)) } ); console.log("Watcher core contracts set tx: ", tx.hash); await tx.wait(); diff --git a/hardhat-scripts/deploy/6.connect.ts b/hardhat-scripts/deploy/6.connect.ts index 82d54e8f..cd9fcf62 100644 --- a/hardhat-scripts/deploy/6.connect.ts +++ b/hardhat-scripts/deploy/6.connect.ts @@ -9,6 +9,7 @@ import { getAppGatewayId, getInstance, getSocketSigner, + overrides, } from "../utils"; import { getWatcherSigner, sendWatcherMultiCallWithNonce } from "../utils/sign"; @@ -71,7 +72,8 @@ async function connectPlug( const tx = await plug.functions["connectSocket"]( appGatewayId, socket.address, - switchboard + switchboard, + { ...(await overrides(chain)) } ); console.log( `Connecting ${plugContract} on ${chain} to ${appGatewayId} tx hash: ${tx.hash}` diff --git a/hardhat-scripts/utils/overrides.ts b/hardhat-scripts/utils/overrides.ts index 94a25c12..b81f365b 100644 --- a/hardhat-scripts/utils/overrides.ts +++ b/hardhat-scripts/utils/overrides.ts @@ -27,6 +27,9 @@ export const chainOverrides: { // gasLimit: 1_000_000, // gasPrice: 212_000_000_000, }, + [ChainSlug.BASE]: { + gasLimit: 2_000_000, + }, [EVMX_CHAIN_ID as ChainSlug]: { type: 0, // gasLimit: 1_000_000_000, @@ -41,7 +44,10 @@ export const overrides = async ( gasLimit?: BigNumberish | undefined; gasPrice?: BigNumberish | undefined; }> => { - return await getOverrides(chain, getProviderFromChainSlug(chain)); + return await getOverrides( + chain as ChainSlug, + getProviderFromChainSlug(chain) + ); }; export const getOverrides = async ( diff --git a/hardhat-scripts/utils/sign.ts b/hardhat-scripts/utils/sign.ts index 6f569ff0..00afdcb4 100644 --- a/hardhat-scripts/utils/sign.ts +++ b/hardhat-scripts/utils/sign.ts @@ -4,7 +4,7 @@ import { EVMX_CHAIN_ID, mode } from "../config/config"; import { getProviderFromChainSlug } from "./networks"; import { signWatcherMultiCallMessage } from "../../src/signer"; import { getAddresses } from "./address"; -import { getOverrides, overrides } from "./overrides"; +import { overrides } from "./overrides"; import { getInstance } from "./deployUtils"; import { WatcherMultiCallParams } from "../constants/types"; diff --git a/hardhat-scripts/verify/verify.ts b/hardhat-scripts/verify/verify.ts index 2835a150..38140e02 100644 --- a/hardhat-scripts/verify/verify.ts +++ b/hardhat-scripts/verify/verify.ts @@ -43,7 +43,6 @@ export const main = async () => { for (let chainIndex = 0; chainIndex < chains.length; chainIndex++) { const chain = parseInt(chains[chainIndex]) as ChainSlug; let chainName: string; - console.log({ chain }); if (chain == (EVMX_CHAIN_ID as ChainSlug)) { chainName = "EVMX"; } else { @@ -51,10 +50,10 @@ export const main = async () => { } console.log({ chainName }); hre.changeNetwork(chainName); - console.log(chainName); const chainParams: VerifyArgs[] = verificationParams[chain]; const unverifiedChainParams: VerifyArgs[] = []; + if (chainParams.length) { const len = chainParams.length; for (let index = 0; index < len!; index++) { diff --git a/hardhat.config.ts b/hardhat.config.ts index ada0e153..74627321 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -61,6 +61,9 @@ let liveNetworks = { ), [HardhatChainName.SEPOLIA]: getChainConfig(ChainSlug.SEPOLIA), [HardhatChainName.BASE_SEPOLIA]: getChainConfig(ChainSlug.BASE_SEPOLIA), + [HardhatChainName.BASE]: getChainConfig(ChainSlug.BASE), + [HardhatChainName.ARBITRUM]: getChainConfig(ChainSlug.ARBITRUM), + [HardhatChainName.OPTIMISM]: getChainConfig(ChainSlug.OPTIMISM), EVMX: { accounts: [`0x${privateKey}`], chainId: EVMX_CHAIN_ID, @@ -90,6 +93,7 @@ const config: HardhatUserConfig = { arbitrumOne: process.env.ARBISCAN_API_KEY || "", arbitrumTestnet: process.env.ARBISCAN_API_KEY || "", baseTestnet: process.env.BASESCAN_API_KEY || "", + base: process.env.BASESCAN_API_KEY || "", bsc: process.env.BSCSCAN_API_KEY || "", bscTestnet: process.env.BSCSCAN_API_KEY || "", goerli: process.env.ETHERSCAN_API_KEY || "", @@ -97,7 +101,7 @@ const config: HardhatUserConfig = { sepolia: process.env.ETHERSCAN_API_KEY || "", optimisticEthereum: process.env.OPTIMISM_API_KEY || "", optimisticTestnet: process.env.OPTIMISM_API_KEY || "", - evmx: "none", + EVMX: "none", }, customChains: [ { @@ -125,7 +129,15 @@ const config: HardhatUserConfig = { }, }, { - network: "evmx", + network: "base", + chainId: ChainId.BASE, + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org/", + }, + }, + { + network: "EVMX", chainId: EVMX_CHAIN_ID, urls: { apiURL: "https://evmx.cloud.blockscout.com/api", @@ -134,11 +146,6 @@ const config: HardhatUserConfig = { }, ], }, - sourcify: { - // Disabled by default - // Doesn't need an API key - enabled: true, - }, // This fully resolves paths for imports in the ./lib directory for Hardhat preprocess: { eachLine: (hre) => ({