Skip to content

Commit b884c7d

Browse files
Merge pull request #156 from SocketDotTech/stage-deployments
fix: stage constants
2 parents dc173ae + 8334d59 commit b884c7d

File tree

13 files changed

+276
-77
lines changed

13 files changed

+276
-77
lines changed

contracts/evmx/base/AppGatewayBase.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ abstract contract AppGatewayBase is AddressResolverUtil, IAppGateway {
166166
return address(0);
167167
}
168168

169-
onChainAddress = IForwarder(forwarderAddresses[contractId_][chainSlug_]).getOnChainAddress();
169+
onChainAddress = IForwarder(forwarderAddresses[contractId_][chainSlug_])
170+
.getOnChainAddress();
170171
}
171172

172173
////////////////////////////////////////////////////////////////////////////////////////////////

deployments/stage_addresses.json

Lines changed: 63 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,73 @@
11
{
2+
"10": {
3+
"ContractFactoryPlug": "0xee1Aef0b06f63Aa1c881838794Dd0876462c2B0d",
4+
"FastSwitchboard": "0xbDE0D2da12F703Ccd275d721214745BccDCAD124",
5+
"FeesPlug": "0x5F77550E3072c913A20B2fbdAb14026fe0E8B450",
6+
"Socket": "0x5e1641B190B71ECCc85b1ECe934F31cD9b3dcF7a",
7+
"SocketBatcher": "0xaC61f5696e0E2636dA7bD69827380f2Ab41A3C38",
8+
"startBlock": 136685079
9+
},
210
"43": {
3-
"AddressResolver": "0x21a9AFDfbEb0399D4a12f3AA1324042Be2B57F8e",
4-
"AddressResolverImpl": "0x794b92C2Ade7D33Fb34d138B13014C63aB27CBC0",
5-
"AuctionManager": "0x87E15a6f9Cbe482f67683Ec3f7294f12d221C8bA",
6-
"AuctionManagerImpl": "0xfddb38811a0774E66ABD5F3Ae960bFB7E7415029",
7-
"DeliveryHelper": "0xb399b60C22A32512a24F01C4401f43BfF979A49F",
8-
"DeliveryHelperImpl": "0xa07e38cAB46eAA358C3653C63219f1009e8F7789",
9-
"ERC1967Factory": "0x98ea7A5601f203DE56d86BDCA69fC3019377D6B1",
10-
"FeesManager": "0x30e07016eB24570629Bc8765CA307394Af90B27C",
11-
"FeesManagerImpl": "0x9F10A0c71178dbD4d049f2C04fD0e34966134b9e",
12-
"startBlock": 5480301,
13-
"WatcherPrecompile": "0x426509517074E0fBf15F8aAB2472711FB456C58C",
14-
"WatcherPrecompileConfig": "0x49094ECAF26d8295BcBD73b0Ff17215348E7b253",
15-
"WatcherPrecompileConfigImpl": "0xd69E17Ce715f49Cd2B16C64cf75201A56Ce0E90d",
16-
"WatcherPrecompileImpl": "0xB423eE3bffc3604F96B59cF419C48AE05b8E9d0b",
17-
"WatcherPrecompileLimits": "0x54B315eC6c7059b19164BC0e5335643d5bBAad4f",
18-
"WatcherPrecompileLimitsImpl": "0x0e26C8CFCABC04c642696A625664553e2C183bbe"
11+
"AddressResolver": "0x935b06902cA5C8bb4C76e18738561c294D377A93",
12+
"AddressResolverImpl": "0xD1586EaaA0d473E6655c11A927cE4FbED648F3BF",
13+
"AsyncDeployer": "0xECa623A443F21B705714D4A0f810d0A5D135FF6F",
14+
"AsyncDeployerImpl": "0x1B0ea1b79B526dD3d5889Bb33Dbd24f790C23102",
15+
"AuctionManager": "0xD044f27A9c5EE4f92EF0e38685276adFDF13E90E",
16+
"AuctionManagerImpl": "0xC72BE9e639DA23570fa1eF2fF2cb7901a081916F",
17+
"Configurations": "0x72f4C225B4B4f0F9608a50aEe17dA9e11dcb94b2",
18+
"ConfigurationsImpl": "0x351De7e4275dA7f49F75363e4E7ea86Dfe050501",
19+
"DeployForwarder": "0x5E9d1072B60D6c752B1593F5937393413372E5eF",
20+
"DeployForwarderImpl": "0x1b7752F0039E80Aa38f7CF8b5d18798dD2ac1597",
21+
"ERC1967Factory": "0x526796AC60e45CBB9b17c654C9447Baf160C084d",
22+
"FeesManager": "0xA07208F9e7aE243F922317ab6604DC9F86822406",
23+
"FeesManagerImpl": "0xbD22EDD6559B28614f44D1c768EC26491CDE1cDD",
24+
"FeesPool": "0xe2054B575664dfDBD7a7FbAf2B12420ae88DE0FF",
25+
"PromiseResolver": "0x38e24A2F157817b830F36A35b862F24B1494d1aD",
26+
"ReadPrecompile": "0x39b5D3FBBa1BC28438e25955aaB412C7576eCd61",
27+
"RequestHandler": "0x2E928C000bdC1f90716B05cE2D7182C9FA081d31",
28+
"RequestHandlerImpl": "0xD38ae1a6C410c7681ac464bd60009198406035Ed",
29+
"SchedulePrecompile": "0xb14a7763f09eCbd47bC5230D6170547a22834a82",
30+
"startBlock": 8240883,
31+
"Watcher": "0x4C846eCa55ad8cF19B9D5d906225da7b565174C1",
32+
"WatcherImpl": "0x2920F4FB50343EF2b33096650cE234E8aF9E8556",
33+
"WritePrecompile": "0x393007B660a00970b25E34FEd6506CE96120f8e2",
34+
"WritePrecompileImpl": "0x0026c4736E57fE2817b53f6df1E0808c3a61984d"
35+
},
36+
"8453": {
37+
"ContractFactoryPlug": "0x3aac37DC85C522c09A3DDdA44D181E6aCCD2f9F0",
38+
"FastSwitchboard": "0xa33ACE59E4b0d9a45Cd4a3F0DBAB86D87BDd67e2",
39+
"FeesPlug": "0xfE34ACE07836F7F05f485EAc7122D0CD58BAC047",
40+
"Socket": "0xee1Aef0b06f63Aa1c881838794Dd0876462c2B0d",
41+
"SocketBatcher": "0x9EDfb162b725CF6d628D68af200cAe8b624111eD",
42+
"startBlock": 31089766
43+
},
44+
"42161": {
45+
"ContractFactoryPlug": "0x5F77550E3072c913A20B2fbdAb14026fe0E8B450",
46+
"FastSwitchboard": "0xbDE0D2da12F703Ccd275d721214745BccDCAD124",
47+
"FeesPlug": "0xee1Aef0b06f63Aa1c881838794Dd0876462c2B0d",
48+
"Socket": "0x5e1641B190B71ECCc85b1ECe934F31cD9b3dcF7a",
49+
"SocketBatcher": "0xaC61f5696e0E2636dA7bD69827380f2Ab41A3C38",
50+
"startBlock": 343531414
1951
},
2052
"84532": {
21-
"ContractFactoryPlug": "0x8e51D99Bf353Ebba50080D0452546fd2EBAd86A4",
22-
"FastSwitchboard": "0x4C114115755c39dB81a06fBfEb4b08302Abe7beE",
23-
"FeesPlug": "0x9161a99deD597fe519E03D319053CA1669118dDA",
24-
"Socket": "0x36Ae239a92faee6aFF4df9749d592dA7c00717Be",
25-
"SocketBatcher": "0x8fa361816874a11a66D02EC84b28E1A931B4035e",
26-
"startBlock": 25218634
53+
"ContractFactoryPlug": "0x87cC19AedD434ebD3B74FfdC073CAeC7dC1E92EA",
54+
"FastSwitchboard": "0x5aA84ffE5eCCB5263d1AE6aEd5682EAb39Bc7036",
55+
"Socket": "0xa09217Cfc47F399C382E982778f6128685e13aD4",
56+
"SocketBatcher": "0x80568677f2B092bd974657FE47Fc8531bfE5DBDC",
57+
"startBlock": 26600215
2758
},
2859
"421614": {
29-
"ContractFactoryPlug": "0x65C066BE05CB4622393fADc1Bf3dE8eEdEcB3817",
30-
"FastSwitchboard": "0xF121f4B97F7C902eeD4b188B08052Da9A1FD5aBe",
31-
"FeesPlug": "0xDfE94B9b14de382Ed13C8A7F387884808D0f7E0b",
32-
"Socket": "0xDAB25fB82cc1b1611Fb9016FB50222dBFcD1BCf5",
33-
"SocketBatcher": "0x4e7163Ce9F7F335138fB32827d6f99f174060897",
34-
"startBlock": 148801970
35-
},
36-
"11155111": {
37-
"FastSwitchboard": "0x1eFD3AF2317B9E6E7492718878f69De747C9e7c3",
38-
"FeesPlug": "0xfE555AD869ac24305471F0755976c556425E8D23",
39-
"Socket": "0xae59BA0Bd0D92232B3B6304185448C9Fe5445f4d",
40-
"SocketBatcher": "0xdaE4538FbbEf41B2Feb5c79DD2fFC9720AF13d7b"
60+
"ContractFactoryPlug": "0xe2904171afCeC319236cc051c81202677F7Aac1B",
61+
"FastSwitchboard": "0x82833e5ac997F8f9c426949595d49702E3b08414",
62+
"Socket": "0x468cA4bB968FD86eD752A7bD453c6869E27204f0",
63+
"SocketBatcher": "0x977B8aB88A7159130457adA4b7078208Ab4fB111",
64+
"startBlock": 159757112
4165
},
4266
"11155420": {
43-
"ContractFactoryPlug": "0x469B536c5Df15948c8759FEEE5DB1c17790d4152",
44-
"FastSwitchboard": "0xd8bCd4b4Bc4b0f5cb279B6FAdCEd733614f34F51",
45-
"FeesPlug": "0x6734a30B8f2d210faefa5aeD4E11b674C59641F1",
46-
"Socket": "0x11fbd3a7031b28607973fc44d4d24B26DEfac886",
47-
"SocketBatcher": "0x2c2060f5586751676fC2Af96cc8bE9BF0c7A8770",
48-
"startBlock": 27201458
67+
"ContractFactoryPlug": "0x705A4DD80D7203BF78AcAf3BA1851D1A80fA3d89",
68+
"FastSwitchboard": "0x74388051BcCfA2D28690a98242A259aD94f2B1f3",
69+
"Socket": "0x790E894C59d6275503e2Ff4ba95A42E38c071195",
70+
"SocketBatcher": "0xa13B9b5e797e13316B23EfC01E506c8c0c2BFeF2",
71+
"startBlock": 28583052
4972
}
5073
}

deployments/stage_verification.json

Lines changed: 162 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,165 @@
11
{
2+
"10": [],
23
"43": [
4+
[
5+
"0x0026c4736E57fE2817b53f6df1E0808c3a61984d",
6+
"WritePrecompile",
7+
"contracts/evmx/watcher/precompiles/WritePrecompile.sol",
8+
[]
9+
],
10+
[
11+
"0x38e24A2F157817b830F36A35b862F24B1494d1aD",
12+
"PromiseResolver",
13+
"contracts/evmx/watcher/PromiseResolver.sol",
14+
[
15+
"0x4C846eCa55ad8cF19B9D5d906225da7b565174C1"
16+
]
17+
],
18+
[
19+
"0xD38ae1a6C410c7681ac464bd60009198406035Ed",
20+
"RequestHandler",
21+
"contracts/evmx/watcher/RequestHandler.sol",
22+
[]
23+
],
24+
[
25+
"0x351De7e4275dA7f49F75363e4E7ea86Dfe050501",
26+
"Configurations",
27+
"contracts/evmx/watcher/Configurations.sol",
28+
[]
29+
],
30+
[
31+
"0x1b7752F0039E80Aa38f7CF8b5d18798dD2ac1597",
32+
"DeployForwarder",
33+
"contracts/evmx/helpers/DeployForwarder.sol",
34+
[]
35+
],
36+
[
37+
"0xC72BE9e639DA23570fa1eF2fF2cb7901a081916F",
38+
"AuctionManager",
39+
"contracts/evmx/AuctionManager.sol",
40+
[]
41+
],
42+
[
43+
"0x2920F4FB50343EF2b33096650cE234E8aF9E8556",
44+
"Watcher",
45+
"contracts/evmx/watcher/Watcher.sol",
46+
[]
47+
],
48+
[
49+
"0x1B0ea1b79B526dD3d5889Bb33Dbd24f790C23102",
50+
"AsyncDeployer",
51+
"contracts/evmx/helpers/AsyncDeployer.sol",
52+
[]
53+
],
54+
[
55+
"0xbD22EDD6559B28614f44D1c768EC26491CDE1cDD",
56+
"FeesManager",
57+
"contracts/evmx/fees/FeesManager.sol",
58+
[]
59+
],
60+
[
61+
"0xD1586EaaA0d473E6655c11A927cE4FbED648F3BF",
62+
"AddressResolver",
63+
"contracts/evmx/helpers/AddressResolver.sol",
64+
[]
65+
],
66+
[
67+
"0xe2054B575664dfDBD7a7FbAf2B12420ae88DE0FF",
68+
"FeesPool",
69+
"contracts/evmx/fees/FeesPool.sol",
70+
[
71+
"0xb62505feacC486e809392c65614Ce4d7b051923b"
72+
]
73+
],
74+
[
75+
"0x526796AC60e45CBB9b17c654C9447Baf160C084d",
76+
"ERC1967Factory",
77+
"lib/solady/src/utils/ERC1967Factory.sol",
78+
[]
79+
],
80+
[
81+
"0xFaa00117ED72CAE3399669a1E3FEedaF93020853",
82+
"SchedulePrecompile",
83+
"contracts/evmx/watcher/precompiles/SchedulePrecompile.sol",
84+
[
85+
"0x03Aa399188E2741f89cc4265493DC5b544C52134",
86+
86400,
87+
{
88+
"type": "BigNumber",
89+
"hex": "0x02540be400"
90+
},
91+
{
92+
"type": "BigNumber",
93+
"hex": "0xe8d4a51000"
94+
},
95+
300
96+
]
97+
],
98+
[
99+
"0xD38d0Dfd8e7d61B45Cce6Ec58E1Ec4c514c00e7F",
100+
"ReadPrecompile",
101+
"contracts/evmx/watcher/precompiles/ReadPrecompile.sol",
102+
[
103+
"0x03Aa399188E2741f89cc4265493DC5b544C52134",
104+
{
105+
"type": "BigNumber",
106+
"hex": "0xe8d4a51000"
107+
},
108+
300
109+
]
110+
],
111+
[
112+
"0x702EfE1DfABc3963114E2356aFaF36c8b67CA961",
113+
"WritePrecompile",
114+
"contracts/evmx/watcher/precompiles/WritePrecompile.sol",
115+
[]
116+
],
117+
[
118+
"0xd0bd7837E66eEd7Be04C88354e75F5bA3cd19959",
119+
"PromiseResolver",
120+
"contracts/evmx/watcher/PromiseResolver.sol",
121+
[
122+
"0x03Aa399188E2741f89cc4265493DC5b544C52134"
123+
]
124+
],
125+
[
126+
"0x446C6B4086d1888cB15cF62735Bf57A4647E31A4",
127+
"RequestHandler",
128+
"contracts/evmx/watcher/RequestHandler.sol",
129+
[]
130+
],
131+
[
132+
"0x2dc671B87d1A9dc7C1cf06C74C2db06673b31FFf",
133+
"Configurations",
134+
"contracts/evmx/watcher/Configurations.sol",
135+
[]
136+
],
137+
[
138+
"0x4ab75b62c0E2A09E428Ce73043C36d54c78C8CFd",
139+
"DeployForwarder",
140+
"contracts/evmx/helpers/DeployForwarder.sol",
141+
[]
142+
],
143+
[
144+
"0xed8255097DFB0BB2135870bb342335dCC0C30e21",
145+
"Watcher",
146+
"contracts/evmx/watcher/Watcher.sol",
147+
[]
148+
],
149+
[
150+
"0xF946503b3bF14b39468AEce46E7Ce1A08404D109",
151+
"AsyncDeployer",
152+
"contracts/evmx/helpers/AsyncDeployer.sol",
153+
[]
154+
],
155+
[
156+
"0x69DD00B8a250e0A1bFF1b59db2EA99792faAbC66",
157+
"FeesPool",
158+
"contracts/evmx/fees/FeesPool.sol",
159+
[
160+
"0xb62505feacC486e809392c65614Ce4d7b051923b"
161+
]
162+
],
3163
[
4164
"0xfddb38811a0774E66ABD5F3Ae960bFB7E7415029",
5165
"AuctionManager",
@@ -49,8 +209,9 @@
49209
[]
50210
]
51211
],
212+
"8453": [],
213+
"42161": [],
52214
"84532": [],
53215
"421614": [],
54-
"11155111": [],
55216
"11155420": []
56217
}

hardhat-scripts/config/config.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ export const getChains = () => {
3131
return [ChainSlug.ARBITRUM_SEPOLIA, ChainSlug.OPTIMISM_SEPOLIA];
3232
case DeploymentMode.STAGE:
3333
return [
34-
ChainSlug.OPTIMISM_SEPOLIA,
35-
ChainSlug.ARBITRUM_SEPOLIA,
36-
ChainSlug.BASE_SEPOLIA,
3734
ChainSlug.BASE,
3835
ChainSlug.ARBITRUM,
3936
ChainSlug.OPTIMISM,
37+
ChainSlug.OPTIMISM_SEPOLIA,
38+
ChainSlug.ARBITRUM_SEPOLIA,
39+
ChainSlug.BASE_SEPOLIA,
4040
];
4141
case DeploymentMode.PROD:
4242
return [
@@ -57,7 +57,7 @@ export const getFeesPlugChains = (): Array<ChainSlug> => {
5757
case DeploymentMode.DEV:
5858
return getChains();
5959
case DeploymentMode.STAGE:
60-
return getChains();
60+
return [ChainSlug.OPTIMISM, ChainSlug.ARBITRUM, ChainSlug.BASE];
6161
case DeploymentMode.PROD:
6262
return getChains();
6363
default:
@@ -83,27 +83,20 @@ export const EVM_CHAIN_ID_MAP: Record<DeploymentMode, number> = {
8383
[DeploymentMode.STAGE]: 43,
8484
[DeploymentMode.PROD]: 3605,
8585
};
86+
8687
// Addresses
8788
export const watcher = "0xb62505feacC486e809392c65614Ce4d7b051923b";
8889
export const transmitter = "0x138e9840861C983DC0BB9b3e941FB7C0e9Ade320";
8990

9091
// Chain config
9192
export const EVMX_CHAIN_ID = EVM_CHAIN_ID_MAP[mode];
92-
export const MAX_FEES = ethers.utils.parseEther("0.001");
9393
export const MAX_MSG_VALUE_LIMIT = ethers.utils.parseEther("0.001");
9494

9595
// Auction parameters
9696
export const AUCTION_END_DELAY_SECONDS = 0;
9797
export const BID_TIMEOUT = 600; // 10 minutes
9898
export const EXPIRY_TIME = 300; // 5 minutes
9999
export const MAX_RE_AUCTION_COUNT = 5;
100-
// TestUSDC
101-
export const TEST_USDC_NAME = "testUSDC";
102-
export const TEST_USDC_SYMBOL = "testUSDC";
103-
export const TEST_USDC_INITIAL_SUPPLY = ethers.utils.parseEther(
104-
"1000000000000000000000000"
105-
);
106-
export const TEST_USDC_DECIMALS = 6;
107100

108101
// Fees Pool Funding Amount
109102
export const FEES_POOL_FUNDING_AMOUNT_THRESHOLD =
@@ -113,12 +106,11 @@ export const FEES_POOL_FUNDING_AMOUNT_THRESHOLD =
113106
export const READ_FEES = utils.parseEther("0.000001");
114107
export const TRIGGER_FEES = utils.parseEther("0.000001");
115108
export const WRITE_FEES = utils.parseEther("0.000001");
116-
export const SCHEDULE_FEES_PER_SECOND = utils.parseEther("0.000001");
109+
export const SCHEDULE_FEES_PER_SECOND = utils.parseEther("0.00000001");
117110
export const SCHEDULE_CALLBACK_FEES = utils.parseEther("0.000001");
118111
export const MAX_SCHEDULE_DELAY_SECONDS = 60 * 60 * 24;
119112

120113
// Other constants
121-
export const DEFAULT_MAX_LIMIT = 100;
122114
export const UPGRADE_VERSION = 1;
123115

124116
// Transmitter constants

hardhat-scripts/constants/feeConstants.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ const tokens: TokenMap = {
77
11155420: ["0x15dbE4B96306Cc9Eba15D834d6c1a895cF4e1697"],
88
},
99
[DeploymentMode.STAGE]: {
10-
84532: ["0xfD51918C0572512901fFA79F822c99A475d22BB4"],
11-
421614: ["0xa03Cbf13f331aF7c0fD7F2E28E6Cbc13F879E3F3"],
12-
11155420: ["0xa0E1738a9Fc0698789866e09d7A335d30128C5C5"],
13-
11155111: ["0xbcaDE56f86a819994d0F66b98e921C484bE6FE4e"],
10+
8453: ["0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"],
11+
42161: ["0xaf88d065e77c8cc2239327c5edb3a432268e5831"],
12+
10: ["0x0b2c639c533813f4aa9d7837caf62653d097ff85"],
1413
},
1514
};
1615

1716
const feePools: { [key: string]: string } = {
1817
[DeploymentMode.DEV]: "0xc20Be67ef742202dc93A78aa741E7C3715eA1DFd",
19-
[DeploymentMode.STAGE]: "",
18+
[DeploymentMode.STAGE]: "0xe2054B575664dfDBD7a7FbAf2B12420ae88DE0FF",
2019
};
2120

2221
export const getFeeTokens = (

hardhat-scripts/deploy/2.roles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function setRoleForContract(
4949

5050
if (!hasRole) {
5151
let tx = await contract.grantRole(roleHash, targetAddress, {
52-
...overrides(chain),
52+
...(await overrides(chain as ChainSlug)),
5353
});
5454
console.log(
5555
`granting ${roleName} role to ${targetAddress} for ${contractName}`,

0 commit comments

Comments
 (0)