Skip to content

Commit 7443d48

Browse files
bmzigpxrl
andauthored
feat: lens mainnet (#927)
* feat: lens mainnet Signed-off-by: bennett <[email protected]> * deploy spoke pool and multicall handler Signed-off-by: bennett <[email protected]> * bump constants Signed-off-by: bennett <[email protected]> * deploy verifier Signed-off-by: bennett <[email protected]> --------- Signed-off-by: bennett <[email protected]> Co-authored-by: Paul <[email protected]>
1 parent f8e3f8b commit 7443d48

18 files changed

+10357
-10
lines changed

.upgradable/lens.json

Lines changed: 348 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,348 @@
1+
{
2+
"manifestVersion": "3.2",
3+
"proxies": [
4+
{
5+
"address": "0xe7cb3e167e7475dE1331Cf6E0CEb187654619E12",
6+
"txHash": "0x1c4a4cb801332c5322bb1d6774749e8fe60b2d9addde25f801f65652a09da414",
7+
"kind": "uups"
8+
}
9+
],
10+
"impls": {
11+
"bc55a92b5074236accb62fed2e28a1b33247234cde2e644e6e443f64f546ac0b": {
12+
"address": "0x02D2B95F631E0CF6c203E77f827381B0885F7822",
13+
"txHash": "0xb659b2dff1eaa09d93c94da7633a74cb5a84f31e72ed0f8238c9392262e06108",
14+
"layout": {
15+
"solcVersion": "0.8.23",
16+
"storage": [
17+
{
18+
"label": "_initialized",
19+
"offset": 0,
20+
"slot": "0",
21+
"type": "t_uint8",
22+
"contract": "Initializable",
23+
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
24+
"retypedFrom": "bool"
25+
},
26+
{
27+
"label": "_initializing",
28+
"offset": 1,
29+
"slot": "0",
30+
"type": "t_bool",
31+
"contract": "Initializable",
32+
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
33+
},
34+
{
35+
"label": "__gap",
36+
"offset": 0,
37+
"slot": "1",
38+
"type": "t_array(t_uint256)50_storage",
39+
"contract": "ERC1967UpgradeUpgradeable",
40+
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169"
41+
},
42+
{
43+
"label": "__gap",
44+
"offset": 0,
45+
"slot": "51",
46+
"type": "t_array(t_uint256)50_storage",
47+
"contract": "UUPSUpgradeable",
48+
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111"
49+
},
50+
{
51+
"label": "_status",
52+
"offset": 0,
53+
"slot": "101",
54+
"type": "t_uint256",
55+
"contract": "ReentrancyGuardUpgradeable",
56+
"src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38"
57+
},
58+
{
59+
"label": "__gap",
60+
"offset": 0,
61+
"slot": "102",
62+
"type": "t_array(t_uint256)49_storage",
63+
"contract": "ReentrancyGuardUpgradeable",
64+
"src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:88"
65+
},
66+
{
67+
"label": "__gap",
68+
"offset": 0,
69+
"slot": "151",
70+
"type": "t_array(t_uint256)1000_storage",
71+
"contract": "MultiCallerUpgradeable",
72+
"src": "contracts/upgradeable/MultiCallerUpgradeable.sol:77"
73+
},
74+
{
75+
"label": "_HASHED_NAME",
76+
"offset": 0,
77+
"slot": "1151",
78+
"type": "t_bytes32",
79+
"contract": "EIP712CrossChainUpgradeable",
80+
"src": "contracts/upgradeable/EIP712CrossChainUpgradeable.sol:21"
81+
},
82+
{
83+
"label": "_HASHED_VERSION",
84+
"offset": 0,
85+
"slot": "1152",
86+
"type": "t_bytes32",
87+
"contract": "EIP712CrossChainUpgradeable",
88+
"src": "contracts/upgradeable/EIP712CrossChainUpgradeable.sol:22"
89+
},
90+
{
91+
"label": "__gap",
92+
"offset": 0,
93+
"slot": "1153",
94+
"type": "t_array(t_uint256)1000_storage",
95+
"contract": "EIP712CrossChainUpgradeable",
96+
"src": "contracts/upgradeable/EIP712CrossChainUpgradeable.sol:85"
97+
},
98+
{
99+
"label": "crossDomainAdmin",
100+
"offset": 0,
101+
"slot": "2153",
102+
"type": "t_address",
103+
"contract": "SpokePool",
104+
"src": "contracts/SpokePool.sol:49"
105+
},
106+
{
107+
"label": "withdrawalRecipient",
108+
"offset": 0,
109+
"slot": "2154",
110+
"type": "t_address",
111+
"contract": "SpokePool",
112+
"src": "contracts/SpokePool.sol:53"
113+
},
114+
{
115+
"label": "DEPRECATED_wrappedNativeToken",
116+
"offset": 0,
117+
"slot": "2155",
118+
"type": "t_contract(WETH9Interface)32484",
119+
"contract": "SpokePool",
120+
"src": "contracts/SpokePool.sol:60"
121+
},
122+
{
123+
"label": "DEPRECATED_depositQuoteTimeBuffer",
124+
"offset": 20,
125+
"slot": "2155",
126+
"type": "t_uint32",
127+
"contract": "SpokePool",
128+
"src": "contracts/SpokePool.sol:61"
129+
},
130+
{
131+
"label": "numberOfDeposits",
132+
"offset": 24,
133+
"slot": "2155",
134+
"type": "t_uint32",
135+
"contract": "SpokePool",
136+
"src": "contracts/SpokePool.sol:68"
137+
},
138+
{
139+
"label": "pausedFills",
140+
"offset": 28,
141+
"slot": "2155",
142+
"type": "t_bool",
143+
"contract": "SpokePool",
144+
"src": "contracts/SpokePool.sol:71"
145+
},
146+
{
147+
"label": "pausedDeposits",
148+
"offset": 29,
149+
"slot": "2155",
150+
"type": "t_bool",
151+
"contract": "SpokePool",
152+
"src": "contracts/SpokePool.sol:72"
153+
},
154+
{
155+
"label": "rootBundles",
156+
"offset": 0,
157+
"slot": "2156",
158+
"type": "t_array(t_struct(RootBundle)33256_storage)dyn_storage",
159+
"contract": "SpokePool",
160+
"src": "contracts/SpokePool.sol:75"
161+
},
162+
{
163+
"label": "enabledDepositRoutes",
164+
"offset": 0,
165+
"slot": "2157",
166+
"type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))",
167+
"contract": "SpokePool",
168+
"src": "contracts/SpokePool.sol:78"
169+
},
170+
{
171+
"label": "DEPRECATED_relayFills",
172+
"offset": 0,
173+
"slot": "2158",
174+
"type": "t_mapping(t_bytes32,t_uint256)",
175+
"contract": "SpokePool",
176+
"src": "contracts/SpokePool.sol:83"
177+
},
178+
{
179+
"label": "DEPRECATED_fillCounter",
180+
"offset": 0,
181+
"slot": "2159",
182+
"type": "t_mapping(t_address,t_uint256)",
183+
"contract": "SpokePool",
184+
"src": "contracts/SpokePool.sol:95"
185+
},
186+
{
187+
"label": "DEPRECATED_depositCounter",
188+
"offset": 0,
189+
"slot": "2160",
190+
"type": "t_mapping(t_address,t_uint256)",
191+
"contract": "SpokePool",
192+
"src": "contracts/SpokePool.sol:99"
193+
},
194+
{
195+
"label": "DEPRECATED_refundsRequested",
196+
"offset": 0,
197+
"slot": "2161",
198+
"type": "t_mapping(t_bytes32,t_uint256)",
199+
"contract": "SpokePool",
200+
"src": "contracts/SpokePool.sol:104"
201+
},
202+
{
203+
"label": "fillStatuses",
204+
"offset": 0,
205+
"slot": "2162",
206+
"type": "t_mapping(t_bytes32,t_uint256)",
207+
"contract": "SpokePool",
208+
"src": "contracts/SpokePool.sol:108"
209+
},
210+
{
211+
"label": "relayerRefund",
212+
"offset": 0,
213+
"slot": "2163",
214+
"type": "t_mapping(t_address,t_mapping(t_address,t_uint256))",
215+
"contract": "SpokePool",
216+
"src": "contracts/SpokePool.sol:112"
217+
},
218+
{
219+
"label": "__gap",
220+
"offset": 0,
221+
"slot": "2164",
222+
"type": "t_array(t_uint256)998_storage",
223+
"contract": "SpokePool",
224+
"src": "contracts/SpokePool.sol:1753"
225+
},
226+
{
227+
"label": "l2Eth",
228+
"offset": 0,
229+
"slot": "3162",
230+
"type": "t_address",
231+
"contract": "ZkSync_SpokePool",
232+
"src": "contracts/ZkSync_SpokePool.sol:32"
233+
},
234+
{
235+
"label": "zkErc20Bridge",
236+
"offset": 0,
237+
"slot": "3163",
238+
"type": "t_contract(ZkBridgeLike)22546",
239+
"contract": "ZkSync_SpokePool",
240+
"src": "contracts/ZkSync_SpokePool.sol:35"
241+
}
242+
],
243+
"types": {
244+
"t_address": {
245+
"label": "address",
246+
"numberOfBytes": "20"
247+
},
248+
"t_array(t_struct(RootBundle)33256_storage)dyn_storage": {
249+
"label": "struct SpokePoolInterface.RootBundle[]",
250+
"numberOfBytes": "32"
251+
},
252+
"t_array(t_uint256)1000_storage": {
253+
"label": "uint256[1000]",
254+
"numberOfBytes": "32000"
255+
},
256+
"t_array(t_uint256)49_storage": {
257+
"label": "uint256[49]",
258+
"numberOfBytes": "1568"
259+
},
260+
"t_array(t_uint256)50_storage": {
261+
"label": "uint256[50]",
262+
"numberOfBytes": "1600"
263+
},
264+
"t_array(t_uint256)998_storage": {
265+
"label": "uint256[998]",
266+
"numberOfBytes": "31936"
267+
},
268+
"t_bool": {
269+
"label": "bool",
270+
"numberOfBytes": "1"
271+
},
272+
"t_bytes32": {
273+
"label": "bytes32",
274+
"numberOfBytes": "32"
275+
},
276+
"t_contract(WETH9Interface)32484": {
277+
"label": "contract WETH9Interface",
278+
"numberOfBytes": "20"
279+
},
280+
"t_contract(ZkBridgeLike)22546": {
281+
"label": "contract ZkBridgeLike",
282+
"numberOfBytes": "20"
283+
},
284+
"t_mapping(t_address,t_mapping(t_address,t_uint256))": {
285+
"label": "mapping(address => mapping(address => uint256))",
286+
"numberOfBytes": "32"
287+
},
288+
"t_mapping(t_address,t_mapping(t_uint256,t_bool))": {
289+
"label": "mapping(address => mapping(uint256 => bool))",
290+
"numberOfBytes": "32"
291+
},
292+
"t_mapping(t_address,t_uint256)": {
293+
"label": "mapping(address => uint256)",
294+
"numberOfBytes": "32"
295+
},
296+
"t_mapping(t_bytes32,t_uint256)": {
297+
"label": "mapping(bytes32 => uint256)",
298+
"numberOfBytes": "32"
299+
},
300+
"t_mapping(t_uint256,t_bool)": {
301+
"label": "mapping(uint256 => bool)",
302+
"numberOfBytes": "32"
303+
},
304+
"t_mapping(t_uint256,t_uint256)": {
305+
"label": "mapping(uint256 => uint256)",
306+
"numberOfBytes": "32"
307+
},
308+
"t_struct(RootBundle)33256_storage": {
309+
"label": "struct SpokePoolInterface.RootBundle",
310+
"members": [
311+
{
312+
"label": "slowRelayRoot",
313+
"type": "t_bytes32",
314+
"offset": 0,
315+
"slot": "0"
316+
},
317+
{
318+
"label": "relayerRefundRoot",
319+
"type": "t_bytes32",
320+
"offset": 0,
321+
"slot": "1"
322+
},
323+
{
324+
"label": "claimedBitmap",
325+
"type": "t_mapping(t_uint256,t_uint256)",
326+
"offset": 0,
327+
"slot": "2"
328+
}
329+
],
330+
"numberOfBytes": "96"
331+
},
332+
"t_uint256": {
333+
"label": "uint256",
334+
"numberOfBytes": "32"
335+
},
336+
"t_uint32": {
337+
"label": "uint32",
338+
"numberOfBytes": "4"
339+
},
340+
"t_uint8": {
341+
"label": "uint8",
342+
"numberOfBytes": "1"
343+
}
344+
}
345+
}
346+
}
347+
}
348+
}

deploy/058_deploy_zkstack_customgas_adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
3333

3434
const constructorArguments = [
3535
SPOKE_CHAIN_ID,
36-
L1_ADDRESS_MAP[chainId].zkBridgeHub,
36+
L1_ADDRESS_MAP[chainId][`zkBridgeHub_${SPOKE_CHAIN_ID}`],
3737
WETH[chainId],
3838
L2_REFUND_ADDRESS,
3939
L1_ADDRESS_MAP[chainId].donationBox,

deploy/059_deploy_lens_spokepool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types";
44
import { DeployFunction, DeploymentSubmission } from "hardhat-deploy/types";
55
import { getDeployedAddress } from "../src/DeploymentUtils";
66
import { getSpokePoolDeploymentInfo } from "../utils/utils.hre";
7-
import { FILL_DEADLINE_BUFFER, L2_ADDRESS_MAP, QUOTE_TIME_BUFFER, WGRASS } from "./consts";
7+
import { FILL_DEADLINE_BUFFER, L2_ADDRESS_MAP, QUOTE_TIME_BUFFER, WGRASS, WGHO } from "./consts";
88

99
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
1010
const contractName = "Lens_SpokePool";
@@ -24,7 +24,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
2424
hubPool.address,
2525
hubPool.address,
2626
];
27-
const constructorArgs = [WGRASS[spokeChainId], QUOTE_TIME_BUFFER, FILL_DEADLINE_BUFFER];
27+
const constructorArgs = [WGHO[spokeChainId], QUOTE_TIME_BUFFER, FILL_DEADLINE_BUFFER];
2828

2929
let newAddress: string;
3030
// On production, we'll rarely want to deploy a new proxy contract so we'll default to deploying a new implementation

0 commit comments

Comments
 (0)