@cartesi/devnet 1.7.0 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/anvil_state.json +1 -1
- package/deployments/localhost/ApplicationFactory.json +227 -0
- package/deployments/localhost/AuthorityFactory.json +55 -44
- package/deployments/localhost/ERC1155BatchPortal.json +26 -26
- package/deployments/localhost/ERC1155SinglePortal.json +25 -25
- package/deployments/localhost/ERC20Portal.json +35 -23
- package/deployments/localhost/ERC721Portal.json +23 -23
- package/deployments/localhost/EtherPortal.json +21 -21
- package/deployments/localhost/InputBox.json +64 -58
- package/deployments/localhost/QuorumFactory.json +188 -0
- package/deployments/localhost/SafeERC20Transfer.json +118 -0
- package/deployments/localhost/SelfHostedApplicationFactory.json +71 -70
- package/deployments/localhost/TestMultiToken.json +7 -7
- package/deployments/localhost/TestNFT.json +7 -7
- package/deployments/localhost/TestToken.json +10 -10
- package/dist/deploy/04_4337.js +342 -0
- package/dist/src/aa/constants.d.ts +31 -0
- package/dist/src/aa/constants.d.ts.map +1 -0
- package/dist/src/aa/constants.js +65 -0
- package/dist/src/tasks/deploy-anvil.js +5 -3
- package/export/abi/localhost.json +231 -599
- package/package.json +9 -8
- package/build/anvil_state copy.json +0 -229
- package/deployments/localhost/AuthorityHistoryPairFactory.json +0 -276
- package/deployments/localhost/Bitmask.json +0 -44
- package/deployments/localhost/CartesiDAppFactory.json +0 -231
- package/deployments/localhost/CartesiMathV2.json +0 -213
- package/deployments/localhost/DAppAddressRelay.json +0 -102
- package/deployments/localhost/HistoryFactory.json +0 -177
- package/deployments/localhost/MerkleV2.json +0 -217
- package/deployments/localhost/UnrolledCordic.json +0 -54
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const viem_1 = require("viem");
|
|
4
|
+
const constants_1 = require("../src/aa/constants");
|
|
5
|
+
const setupDeterministicDeployer = async (hre, info) => {
|
|
6
|
+
const { getNamedAccounts, viem } = hre;
|
|
7
|
+
const namedAccounts = await getNamedAccounts();
|
|
8
|
+
const deployer = namedAccounts.deployer;
|
|
9
|
+
const client = await viem.getPublicClient();
|
|
10
|
+
const walletClient = await viem.getWalletClient(deployer);
|
|
11
|
+
const code = await client.getCode({ address: (0, viem_1.getAddress)(info.factory) });
|
|
12
|
+
if (!code) {
|
|
13
|
+
// fund account
|
|
14
|
+
const fundTx = await walletClient.sendTransaction({
|
|
15
|
+
to: (0, viem_1.getAddress)(info.deployer),
|
|
16
|
+
value: BigInt(info.funding),
|
|
17
|
+
});
|
|
18
|
+
console.log(`sending eth to create2 contract deployer address (${info.deployer}) (tx: ${fundTx})...`);
|
|
19
|
+
// deploy deterministic deployer
|
|
20
|
+
const hash = await walletClient.sendRawTransaction({
|
|
21
|
+
serializedTransaction: info.signedTx,
|
|
22
|
+
});
|
|
23
|
+
console.log(`deploying create2 deployer contract (at ${info.factory}) using deterministic deployment (https://github.com/Arachnid/deterministic-deployment-proxy) (tx: ${hash})...`);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const verifyDeployed = async (hre, addresses) => {
|
|
27
|
+
const { viem } = hre;
|
|
28
|
+
const client = await viem.getPublicClient();
|
|
29
|
+
for (const address of addresses) {
|
|
30
|
+
const bytecode = await client.getCode({
|
|
31
|
+
address,
|
|
32
|
+
});
|
|
33
|
+
if (bytecode === undefined) {
|
|
34
|
+
throw new Error(`CONTRACT ${address} NOT DEPLOYED!`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const func = async (hre) => {
|
|
39
|
+
const { deployments, getNamedAccounts, viem } = hre;
|
|
40
|
+
const { rawTx } = deployments;
|
|
41
|
+
const client = await viem.getPublicClient();
|
|
42
|
+
const testClient = await viem.getTestClient();
|
|
43
|
+
const namedAccounts = await getNamedAccounts();
|
|
44
|
+
const DETERMINISTIC_DEPLOYER = "0x4e59b44847b379578588920cA78FbF26c0B4956C";
|
|
45
|
+
const SAFE_SINGLETON_FACTORY = "0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7";
|
|
46
|
+
const BICONOMY_SINGLETON_FACTORY = "0x988C135a1049Ce61730724afD342fb7C56CD2776";
|
|
47
|
+
// we need the deterministic deployer below to have the same expected addresses
|
|
48
|
+
// https://github.com/Arachnid/deterministic-deployment-proxy
|
|
49
|
+
await setupDeterministicDeployer(hre, {
|
|
50
|
+
deployer: "0x3fab184622dc19b6109349b94811493bf2a45362",
|
|
51
|
+
factory: DETERMINISTIC_DEPLOYER,
|
|
52
|
+
funding: "10000000000000000",
|
|
53
|
+
signedTx: "0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222",
|
|
54
|
+
});
|
|
55
|
+
// deploy biconomy singleton factory
|
|
56
|
+
await testClient.setCode({
|
|
57
|
+
address: BICONOMY_SINGLETON_FACTORY,
|
|
58
|
+
bytecode: constants_1.BICONOMY_SINGLETON_FACTORY_BYTECODE,
|
|
59
|
+
});
|
|
60
|
+
// verify that deployers are deployed
|
|
61
|
+
await verifyDeployed(hre, [
|
|
62
|
+
"0x4e59b44847b379578588920ca78fbf26c0b4956c", // Deterministic deployer
|
|
63
|
+
"0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7", // Safe Singleton Factory
|
|
64
|
+
"0x988C135a1049Ce61730724afD342fb7C56CD2776", // Biconomy Singleton Factory
|
|
65
|
+
]);
|
|
66
|
+
const contracts = [
|
|
67
|
+
{
|
|
68
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
69
|
+
signedTx: constants_1.ENTRY_POINT_V07_CREATECALL,
|
|
70
|
+
address: "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
|
|
71
|
+
name: "EntryPoint",
|
|
72
|
+
description: "EntryPoint v0.7",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
76
|
+
signedTx: constants_1.SIMPLE_ACCOUNT_FACTORY_V07_CREATECALL,
|
|
77
|
+
address: "0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985",
|
|
78
|
+
name: "SimpleAccountFactory",
|
|
79
|
+
description: "Simple Account Factory V0.7",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
83
|
+
signedTx: constants_1.ENTRY_POINT_SIMULATIONS_CREATECALL,
|
|
84
|
+
address: "0x74Cb5e4eE81b86e70f9045036a1C5477de69eE87",
|
|
85
|
+
name: "PimlicoEntryPointSimulations",
|
|
86
|
+
description: "EntryPoint Simulations (Needed for v0.7)",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
90
|
+
signedTx: constants_1.ENTRY_POINT_V06_CREATECALL,
|
|
91
|
+
address: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
|
|
92
|
+
name: "EntryPoint",
|
|
93
|
+
description: "EntryPoint V0.6",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
97
|
+
signedTx: constants_1.SIMPLE_ACCOUNT_FACTORY_V06_CREATECALL,
|
|
98
|
+
address: "0x9406Cc6185a346906296840746125a0E44976454",
|
|
99
|
+
name: "SimpleAccountFactory",
|
|
100
|
+
description: "Simple Account Factory V0.6",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
104
|
+
signedTx: constants_1.SAFE_V06_MODULE_SETUP_CREATECALL,
|
|
105
|
+
address: "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb",
|
|
106
|
+
name: "AddModulesLib",
|
|
107
|
+
description: "Safe V0.6 Module Setup",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
111
|
+
signedTx: constants_1.SAFE_V06_MODULE_CREATECALL,
|
|
112
|
+
address: "0xa581c4A4DB7175302464fF3C06380BC3270b4037",
|
|
113
|
+
name: "Safe4337Module",
|
|
114
|
+
description: "Safe V0.6 4337 Module",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
118
|
+
signedTx: constants_1.SAFE_V07_MODULE_SETUP_CREATECALL,
|
|
119
|
+
address: "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
120
|
+
name: "SafeModuleSetup",
|
|
121
|
+
description: "Safe V0.7 Module Setup",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
125
|
+
signedTx: constants_1.SAFE_V07_MODULE_CREATECALL,
|
|
126
|
+
address: "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
127
|
+
name: "Safe4337Module",
|
|
128
|
+
description: "Safe V0.7 4337 Module",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
deployer: SAFE_SINGLETON_FACTORY,
|
|
132
|
+
signedTx: constants_1.SAFE_PROXY_FACTORY_CREATECALL,
|
|
133
|
+
address: "0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67",
|
|
134
|
+
name: "SafeProxyFactory",
|
|
135
|
+
description: "Safe Proxy Factory",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
deployer: SAFE_SINGLETON_FACTORY,
|
|
139
|
+
signedTx: constants_1.SAFE_SINGLETON_CREATECALL,
|
|
140
|
+
address: "0x41675C099F32341bf84BFc5382aF534df5C7461a",
|
|
141
|
+
name: "Safe",
|
|
142
|
+
description: "Safe Singleton",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
deployer: SAFE_SINGLETON_FACTORY,
|
|
146
|
+
signedTx: constants_1.SAFE_MULTI_SEND_CREATECALL,
|
|
147
|
+
address: "0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526",
|
|
148
|
+
name: "MultiSend",
|
|
149
|
+
description: "Safe Multi Send",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
deployer: SAFE_SINGLETON_FACTORY,
|
|
153
|
+
signedTx: constants_1.SAFE_MULTI_SEND_CALL_ONLY_CREATECALL,
|
|
154
|
+
address: "0x9641d764fc13c8B624c04430C7356C1C7C8102e2",
|
|
155
|
+
name: "MultiSendCallOnly",
|
|
156
|
+
description: "Safe Multi Send Call Only",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
deployer: BICONOMY_SINGLETON_FACTORY,
|
|
160
|
+
signedTx: constants_1.BICONOMY_ECDSA_OWNERSHIP_REGISTRY_MOUDULE_CREATECALL,
|
|
161
|
+
address: "0x0000001c5b32F37F5beA87BDD5374eB2aC54eA8e",
|
|
162
|
+
name: "EcdsaOwnershipRegistryModule",
|
|
163
|
+
description: "Biconomy ECDSA Ownership Registry Module",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
deployer: BICONOMY_SINGLETON_FACTORY,
|
|
167
|
+
signedTx: constants_1.BICONOMY_ACCOUNT_V2_LOGIC_CREATECALL,
|
|
168
|
+
address: "0x0000002512019Dafb59528B82CB92D3c5D2423ac",
|
|
169
|
+
name: "SmartAccount",
|
|
170
|
+
description: "Biconomy Account Logic V0.2",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
deployer: BICONOMY_SINGLETON_FACTORY,
|
|
174
|
+
signedTx: constants_1.BICONOMY_FACTORY_CREATECALL,
|
|
175
|
+
address: "0x000000a56Aaca3e9a4C479ea6b6CD0DbcB6634F5",
|
|
176
|
+
name: "SmartAccountFactory",
|
|
177
|
+
description: "Biconomy Factory",
|
|
178
|
+
},
|
|
179
|
+
/*{
|
|
180
|
+
deployer: BICONOMY_SINGLETON_FACTORY,
|
|
181
|
+
signedTx: BICONOMY_DEFAULT_FALLBACK_HANDLER_CREATECALL,
|
|
182
|
+
address: "0x0bBa6d96BD616BedC6BFaa341742FD43c60b83C1",
|
|
183
|
+
name: "BiconomyDefaultFallbackHandler",
|
|
184
|
+
description: "Biconomy Default Fallback Handler",
|
|
185
|
+
},*/
|
|
186
|
+
{
|
|
187
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
188
|
+
signedTx: constants_1.KERNEL_V06_ECDSA_VALIDATOR_V2_2_CREATECALL,
|
|
189
|
+
address: "0xd9AB5096a832b9ce79914329DAEE236f8Eea0390",
|
|
190
|
+
name: "ECDSAValidator",
|
|
191
|
+
description: "Kernel v0.2.2 ECDSA Valdiator",
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
195
|
+
signedTx: constants_1.KERNEL_V06_ACCOUNT_V2_2_LOGIC_CREATECALL,
|
|
196
|
+
address: "0x0DA6a956B9488eD4dd761E59f52FDc6c8068E6B5",
|
|
197
|
+
name: "Kernel",
|
|
198
|
+
description: "Kernel v0.2.2 Account Logic",
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
202
|
+
signedTx: constants_1.KERNEL_V06_FACTORY_CREATECALL,
|
|
203
|
+
address: "0x5de4839a76cf55d0c90e2061ef4386d962E15ae3",
|
|
204
|
+
name: "KernelFactory",
|
|
205
|
+
description: "Kernel v0.2.2 Factory",
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
209
|
+
signedTx: constants_1.KERNEL_V07_FACTORY_V3_CREATECALL,
|
|
210
|
+
address: "0x6723b44Abeec4E71eBE3232BD5B455805baDD22f",
|
|
211
|
+
name: "KernelFactory",
|
|
212
|
+
description: "Kernel v0.3.0 Factory",
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
216
|
+
signedTx: constants_1.KERNEL_V07_ECDSA_VALIDATOR_V3_CREATECALL,
|
|
217
|
+
address: "0x8104e3Ad430EA6d354d013A6789fDFc71E671c43",
|
|
218
|
+
name: "ECDSAValidator",
|
|
219
|
+
description: "Kernel v0.3.0 ECDSA Validator",
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
223
|
+
signedTx: constants_1.KERNEL_V07_ACCOUNT_V3_LOGIC_CREATECALL,
|
|
224
|
+
address: "0x94F097E1ebEB4ecA3AAE54cabb08905B239A7D27",
|
|
225
|
+
name: "Kernel",
|
|
226
|
+
description: "Kernel v0.3.0 Account Logic",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
230
|
+
signedTx: constants_1.KERNEL_V07_META_FACTORY_CREATECALL,
|
|
231
|
+
address: "0xd703aaE79538628d27099B8c4f621bE4CCd142d5",
|
|
232
|
+
name: "FactoryStaker",
|
|
233
|
+
description: "Kernel Meta Factory",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
237
|
+
signedTx: constants_1.KERNEL_V07_ACCOUNT_V3_1_LOGIC_CREATECALL,
|
|
238
|
+
address: "0xBAC849bB641841b44E965fB01A4Bf5F074f84b4D",
|
|
239
|
+
name: "Kernel",
|
|
240
|
+
description: "Kernel v0.3.1 Account Logic",
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
244
|
+
signedTx: constants_1.KERNEL_V07_FACTORY_V3_1_CREATECALL,
|
|
245
|
+
address: "0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419",
|
|
246
|
+
name: "KernelFactory",
|
|
247
|
+
description: "Kernel v0.3.1 Factory",
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
deployer: DETERMINISTIC_DEPLOYER,
|
|
251
|
+
signedTx: constants_1.LIGHT_ACCOUNT_FACTORY_V110_CREATECALL,
|
|
252
|
+
address: "0x00004EC70002a32400f8ae005A26081065620D20",
|
|
253
|
+
name: "LightAccountFactory",
|
|
254
|
+
description: "LightAccountFactory v1.1.0",
|
|
255
|
+
},
|
|
256
|
+
];
|
|
257
|
+
for (const contract of contracts) {
|
|
258
|
+
const { deployer, signedTx, address, name, description } = contract;
|
|
259
|
+
// verify it's not already deployed
|
|
260
|
+
let code = await client.getCode({ address });
|
|
261
|
+
if (code) {
|
|
262
|
+
throw new Error(`contract ${name} (${description}) already deployed at ${address}!`);
|
|
263
|
+
}
|
|
264
|
+
// deploy
|
|
265
|
+
const receipt = await rawTx({
|
|
266
|
+
from: namedAccounts.deployer,
|
|
267
|
+
to: deployer,
|
|
268
|
+
log: true,
|
|
269
|
+
data: signedTx,
|
|
270
|
+
});
|
|
271
|
+
const { gasUsed, transactionHash } = receipt;
|
|
272
|
+
console.log(`deploying "${name}" (tx: ${transactionHash})...: deployed at ${address} with ${gasUsed} gas`);
|
|
273
|
+
// verify if address match
|
|
274
|
+
code = await client.getCode({ address });
|
|
275
|
+
if (!code) {
|
|
276
|
+
throw new Error(`contract ${name} (${description}) not deployed at ${address}!`);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
// ==== SETUP KERNEL V0.6 CONTRACTS ==== //
|
|
280
|
+
console.log(`setting up Kernel...`);
|
|
281
|
+
const kernelFactoryOwner = "0x9775137314fE595c943712B0b336327dfa80aE8A";
|
|
282
|
+
await testClient.setBalance({
|
|
283
|
+
address: kernelFactoryOwner,
|
|
284
|
+
value: (0, viem_1.parseEther)("100"),
|
|
285
|
+
});
|
|
286
|
+
await testClient.impersonateAccount({
|
|
287
|
+
address: kernelFactoryOwner,
|
|
288
|
+
});
|
|
289
|
+
let walletClient = await viem.getWalletClient(kernelFactoryOwner);
|
|
290
|
+
await walletClient.sendTransaction({
|
|
291
|
+
to: "0x5de4839a76cf55d0c90e2061ef4386d962E15ae3" /* kernel factory v0.6 */,
|
|
292
|
+
data: "0xbb30a9740000000000000000000000000da6a956b9488ed4dd761e59f52fdc6c8068e6b50000000000000000000000000000000000000000000000000000000000000001" /* setImplementation(address _implementation,bool _allow) */,
|
|
293
|
+
});
|
|
294
|
+
// register 0x0DA6a956B9488eD4dd761E59f52FDc6c8068E6B5
|
|
295
|
+
await walletClient.sendTransaction({
|
|
296
|
+
to: "0x5de4839a76cf55d0c90e2061ef4386d962E15ae3" /* kernel factory v0.6 */,
|
|
297
|
+
data: "0xbb30a9740000000000000000000000000da6a956b9488ed4dd761e59f52fdc6c8068e6b50000000000000000000000000000000000000000000000000000000000000001" /* setImplementation(address _implementation,bool _allow) */,
|
|
298
|
+
});
|
|
299
|
+
// register 0x6723b44Abeec4E71eBE3232BD5B455805baDD22f
|
|
300
|
+
await walletClient.sendTransaction({
|
|
301
|
+
to: "0xd703aaE79538628d27099B8c4f621bE4CCd142d5" /* kernel factory v0.7 v3*/,
|
|
302
|
+
data: "0x6e7dbabb0000000000000000000000006723b44abeec4e71ebe3232bd5b455805badd22f0000000000000000000000000000000000000000000000000000000000000001",
|
|
303
|
+
});
|
|
304
|
+
await walletClient.sendTransaction({
|
|
305
|
+
to: "0xd703aaE79538628d27099B8c4f621bE4CCd142d5" /* Stake 0.1 eth in the entry point */,
|
|
306
|
+
data: "0xc7e55f3e0000000000000000000000000000000071727de22e5e9d8baf0edac6f37da0320000000000000000000000000000000000000000000000000000000000015180",
|
|
307
|
+
value: (0, viem_1.parseEther)("0.1"),
|
|
308
|
+
});
|
|
309
|
+
// register 0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419
|
|
310
|
+
await walletClient.sendTransaction({
|
|
311
|
+
to: "0xd703aaE79538628d27099B8c4f621bE4CCd142d5" /* kernel factory v0.7 v3.1 */,
|
|
312
|
+
data: "0x6e7dbabb000000000000000000000000aac5d4240af87249b3f71bc8e4a2cae074a3e4190000000000000000000000000000000000000000000000000000000000000001",
|
|
313
|
+
});
|
|
314
|
+
await testClient.stopImpersonatingAccount({
|
|
315
|
+
address: kernelFactoryOwner,
|
|
316
|
+
});
|
|
317
|
+
// ==== SETUP ALCHEMY LIGHT ACCOUNT CONTRACTS ==== //
|
|
318
|
+
console.log(`setting up Alchemy Light Account...`);
|
|
319
|
+
const alchemyLightClientOwner = "0xDdF32240B4ca3184De7EC8f0D5Aba27dEc8B7A5C";
|
|
320
|
+
await testClient.setBalance({
|
|
321
|
+
address: alchemyLightClientOwner,
|
|
322
|
+
value: (0, viem_1.parseEther)("100"),
|
|
323
|
+
});
|
|
324
|
+
await testClient.impersonateAccount({
|
|
325
|
+
address: alchemyLightClientOwner,
|
|
326
|
+
});
|
|
327
|
+
walletClient = await viem.getWalletClient(alchemyLightClientOwner);
|
|
328
|
+
await walletClient.sendTransaction({
|
|
329
|
+
to: "0x0000000000400CdFef5E2714E63d8040b700BC24" /* light account v2.0.0 factory */,
|
|
330
|
+
data: "0xfbb1c3d40000000000000000000000000000000000000000000000000000000000015180000000000000000000000000000000000000000000000000016345785d8a0000",
|
|
331
|
+
value: (0, viem_1.parseEther)("0.1"),
|
|
332
|
+
});
|
|
333
|
+
await testClient.stopImpersonatingAccount({
|
|
334
|
+
address: alchemyLightClientOwner,
|
|
335
|
+
});
|
|
336
|
+
// verify if LightAccount is created
|
|
337
|
+
await verifyDeployed(hre, [
|
|
338
|
+
"0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba", // LightAccount v1.1.0 implementation
|
|
339
|
+
]);
|
|
340
|
+
};
|
|
341
|
+
func.tags = ["4337"];
|
|
342
|
+
exports.default = func;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Hex } from "viem";
|
|
2
|
+
export declare const ENTRY_POINT_V07_CREATECALL: Hex;
|
|
3
|
+
export declare const SIMPLE_ACCOUNT_FACTORY_V07_CREATECALL: Hex;
|
|
4
|
+
export declare const ENTRY_POINT_SIMULATIONS_CREATECALL: Hex;
|
|
5
|
+
export declare const SAFE_SINGLETON_FACTORY_BYTECODE: Hex;
|
|
6
|
+
export declare const SAFE_V07_MODULE_SETUP_CREATECALL: Hex;
|
|
7
|
+
export declare const SAFE_V07_MODULE_CREATECALL: Hex;
|
|
8
|
+
export declare const SAFE_V06_MODULE_SETUP_CREATECALL: Hex;
|
|
9
|
+
export declare const SAFE_V06_MODULE_CREATECALL: Hex;
|
|
10
|
+
export declare const SAFE_PROXY_FACTORY_CREATECALL: Hex;
|
|
11
|
+
export declare const SAFE_SINGLETON_CREATECALL: Hex;
|
|
12
|
+
export declare const SAFE_MULTI_SEND_CREATECALL: Hex;
|
|
13
|
+
export declare const SAFE_MULTI_SEND_CALL_ONLY_CREATECALL: Hex;
|
|
14
|
+
export declare const ENTRY_POINT_V06_CREATECALL: Hex;
|
|
15
|
+
export declare const SIMPLE_ACCOUNT_FACTORY_V06_CREATECALL: Hex;
|
|
16
|
+
export declare const BICONOMY_SINGLETON_FACTORY_BYTECODE: Hex;
|
|
17
|
+
export declare const BICONOMY_ECDSA_OWNERSHIP_REGISTRY_MOUDULE_CREATECALL: Hex;
|
|
18
|
+
export declare const BICONOMY_ACCOUNT_V2_LOGIC_CREATECALL: Hex;
|
|
19
|
+
export declare const BICONOMY_FACTORY_CREATECALL: Hex;
|
|
20
|
+
export declare const BICONOMY_DEFAULT_FALLBACK_HANDLER_CREATECALL: Hex;
|
|
21
|
+
export declare const KERNEL_V06_ECDSA_VALIDATOR_V2_2_CREATECALL: Hex;
|
|
22
|
+
export declare const KERNEL_V06_ACCOUNT_V2_2_LOGIC_CREATECALL: Hex;
|
|
23
|
+
export declare const KERNEL_V06_FACTORY_CREATECALL: Hex;
|
|
24
|
+
export declare const KERNEL_V07_ECDSA_VALIDATOR_V3_CREATECALL: Hex;
|
|
25
|
+
export declare const KERNEL_V07_ACCOUNT_V3_LOGIC_CREATECALL: Hex;
|
|
26
|
+
export declare const KERNEL_V07_FACTORY_V3_CREATECALL: Hex;
|
|
27
|
+
export declare const KERNEL_V07_META_FACTORY_CREATECALL: Hex;
|
|
28
|
+
export declare const KERNEL_V07_ACCOUNT_V3_1_LOGIC_CREATECALL: Hex;
|
|
29
|
+
export declare const KERNEL_V07_FACTORY_V3_1_CREATECALL: Hex;
|
|
30
|
+
export declare const LIGHT_ACCOUNT_FACTORY_V110_CREATECALL: Hex;
|
|
31
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/aa/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAKhC,eAAO,MAAM,0BAA0B,EAAE,GACmjhC,CAAC;AAG7lhC,eAAO,MAAM,qCAAqC,EAAE,GACshqB,CAAC;AAG3kqB,eAAO,MAAM,kCAAkC,EAAE,GACuoiC,CAAC;AAIzriC,eAAO,MAAM,+BAA+B,EAAE,GACoG,CAAC;AAGnJ,eAAO,MAAM,gCAAgC,EAAE,GAC+pC,CAAC;AAG/sC,eAAO,MAAM,0BAA0B,EAAE,GACu4hB,CAAC;AAGj7hB,eAAO,MAAM,gCAAgC,EAAE,GACq7C,CAAC;AAGr+C,eAAO,MAAM,0BAA0B,EAAE,GACqtiB,CAAC;AAG/viB,eAAO,MAAM,6BAA6B,EAAE,GACwjM,CAAC;AAGrmM,eAAO,MAAM,yBAAyB,EAAE,GACwq8C,CAAC;AAGjt8C,eAAO,MAAM,0BAA0B,EAAE,GACi9C,CAAC;AAG3/C,eAAO,MAAM,oCAAoC,EAAE,GACy4B,CAAC;AAK77B,eAAO,MAAM,0BAA0B,EAAE,GACuq/C,CAAC;AAGjt/C,eAAO,MAAM,qCAAqC,EAAE,GACwxzB,CAAC;AAI70zB,eAAO,MAAM,mCAAmC,EAAE,GACwkE,CAAC;AAG3nE,eAAO,MAAM,oDAAoD,EAAE,GAC6sJ,CAAC;AAGjxJ,eAAO,MAAM,oCAAoC,EAAE,GAC61hB,CAAC;AAGj5hB,eAAO,MAAM,2BAA2B,EAAE,GACs2X,CAAC;AAGj5X,eAAO,MAAM,4CAA4C,EAAE,GACq1X,CAAC;AAKj5X,eAAO,MAAM,0CAA0C,EAAE,GACmiF,CAAC;AAG7lF,eAAO,MAAM,wCAAwC,EAAE,GACqhiB,CAAC;AAG7kiB,eAAO,MAAM,6BAA6B,EAAE,GACsvL,CAAC;AAGnyL,eAAO,MAAM,wCAAwC,EAAE,GACysH,CAAC;AAGjwH,eAAO,MAAM,sCAAsC,EAAE,GAC2myC,CAAC;AAGjqyC,eAAO,MAAM,gCAAgC,EAAE,GACyzE,CAAC;AAGz2E,eAAO,MAAM,kCAAkC,EAAE,GACumI,CAAC;AAGzpI,eAAO,MAAM,wCAAwC,EAAE,GACus7C,CAAC;AAG/v7C,eAAO,MAAM,kCAAkC,EAAE,GAC+yE,CAAC;AAIj2E,eAAO,MAAM,qCAAqC,EAAE,GAC0+wB,CAAC"}
|