Skip to content
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
3 changes: 2 additions & 1 deletion contracts/evmx/base/AppGatewayBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
103 changes: 63 additions & 40 deletions deployments/stage_addresses.json
Original file line number Diff line number Diff line change
@@ -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
}
}
163 changes: 162 additions & 1 deletion deployments/stage_verification.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -49,8 +209,9 @@
[]
]
],
"8453": [],
"42161": [],
"84532": [],
"421614": [],
"11155111": [],
"11155420": []
}
20 changes: 6 additions & 14 deletions hardhat-scripts/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand All @@ -57,7 +57,7 @@ export const getFeesPlugChains = (): Array<ChainSlug> => {
case DeploymentMode.DEV:
return getChains();
case DeploymentMode.STAGE:
return getChains();
return [ChainSlug.OPTIMISM, ChainSlug.ARBITRUM, ChainSlug.BASE];
case DeploymentMode.PROD:
return getChains();
default:
Expand All @@ -83,27 +83,20 @@ export const EVM_CHAIN_ID_MAP: Record<DeploymentMode, number> = {
[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
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 =
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions hardhat-scripts/constants/feeConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down
2 changes: 1 addition & 1 deletion hardhat-scripts/deploy/2.roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand Down
Loading