@metamask/smart-accounts-kit 0.1.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/CHANGELOG.md +17 -0
- package/LICENSE.APACHE2 +201 -0
- package/LICENSE.MIT0 +16 -0
- package/README.md +77 -0
- package/dist/actions/index.cjs +39 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.d.cts +8 -0
- package/dist/actions/index.d.ts +8 -0
- package/dist/actions/index.mjs +39 -0
- package/dist/actions/index.mjs.map +1 -0
- package/dist/chunk-2EIX7ZYT.cjs +1325 -0
- package/dist/chunk-2EIX7ZYT.cjs.map +1 -0
- package/dist/chunk-662KDAAG.cjs +831 -0
- package/dist/chunk-662KDAAG.cjs.map +1 -0
- package/dist/chunk-6RN5RBOR.mjs +1325 -0
- package/dist/chunk-6RN5RBOR.mjs.map +1 -0
- package/dist/chunk-7MRTROLV.mjs +274 -0
- package/dist/chunk-7MRTROLV.mjs.map +1 -0
- package/dist/chunk-BFDBNFIP.cjs +336 -0
- package/dist/chunk-BFDBNFIP.cjs.map +1 -0
- package/dist/chunk-CPLIK3VF.mjs +77 -0
- package/dist/chunk-CPLIK3VF.mjs.map +1 -0
- package/dist/chunk-D4ILRL6Z.cjs +299 -0
- package/dist/chunk-D4ILRL6Z.cjs.map +1 -0
- package/dist/chunk-HD4O6IVC.cjs +274 -0
- package/dist/chunk-HD4O6IVC.cjs.map +1 -0
- package/dist/chunk-HLCOMYYU.cjs +1472 -0
- package/dist/chunk-HLCOMYYU.cjs.map +1 -0
- package/dist/chunk-KUEXI4ME.mjs +299 -0
- package/dist/chunk-KUEXI4ME.mjs.map +1 -0
- package/dist/chunk-MVKT5CLQ.mjs +336 -0
- package/dist/chunk-MVKT5CLQ.mjs.map +1 -0
- package/dist/chunk-RB4SOJM3.mjs +729 -0
- package/dist/chunk-RB4SOJM3.mjs.map +1 -0
- package/dist/chunk-T6PSFUOZ.cjs +77 -0
- package/dist/chunk-T6PSFUOZ.cjs.map +1 -0
- package/dist/chunk-TEI2NRPU.mjs +831 -0
- package/dist/chunk-TEI2NRPU.mjs.map +1 -0
- package/dist/chunk-UUDQWENY.mjs +1472 -0
- package/dist/chunk-UUDQWENY.mjs.map +1 -0
- package/dist/chunk-WA2O2K3K.cjs +729 -0
- package/dist/chunk-WA2O2K3K.cjs.map +1 -0
- package/dist/contracts/index.cjs +57 -0
- package/dist/contracts/index.cjs.map +1 -0
- package/dist/contracts/index.d.cts +8 -0
- package/dist/contracts/index.d.ts +8 -0
- package/dist/contracts/index.mjs +57 -0
- package/dist/contracts/index.mjs.map +1 -0
- package/dist/delegation-7PtFix8Y.d.ts +376 -0
- package/dist/delegation-d52Owevd.d.cts +376 -0
- package/dist/experimental/index.cjs +143 -0
- package/dist/experimental/index.cjs.map +1 -0
- package/dist/experimental/index.d.cts +29 -0
- package/dist/experimental/index.d.ts +29 -0
- package/dist/experimental/index.mjs +143 -0
- package/dist/experimental/index.mjs.map +1 -0
- package/dist/index-0-B0YlEP.d.cts +21935 -0
- package/dist/index-18Alar1P.d.ts +1174 -0
- package/dist/index-CLkk7zr4.d.cts +1174 -0
- package/dist/index-D1WbhKCc.d.ts +21935 -0
- package/dist/index.cjs +424 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +56 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.mjs +424 -0
- package/dist/index.mjs.map +1 -0
- package/dist/smartAccountsEnvironment-BOhrxEnt.d.ts +12 -0
- package/dist/smartAccountsEnvironment-SVknZ_3f.d.cts +12 -0
- package/dist/types-Bwksz_U6.d.cts +136 -0
- package/dist/types-Bwksz_U6.d.ts +136 -0
- package/dist/userOp-CFv4wNkl.d.cts +33 -0
- package/dist/userOp-CFv4wNkl.d.ts +33 -0
- package/dist/utils/index.cjs +60 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +47 -0
- package/dist/utils/index.d.ts +47 -0
- package/dist/utils/index.mjs +60 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +151 -0
|
@@ -0,0 +1,831 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkT6PSFUOZcjs = require('./chunk-T6PSFUOZ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkHLCOMYYUcjs = require('./chunk-HLCOMYYU.cjs');
|
|
8
|
+
|
|
9
|
+
// src/DelegationFramework/utils.ts
|
|
10
|
+
var _delegationabis = require('@metamask/delegation-abis');
|
|
11
|
+
var _viem = require('viem');
|
|
12
|
+
var _actions = require('viem/actions');
|
|
13
|
+
|
|
14
|
+
// src/DelegationFramework/DeleGatorCore/read.ts
|
|
15
|
+
var read_exports = {};
|
|
16
|
+
_chunkHLCOMYYUcjs.__export.call(void 0, read_exports, {
|
|
17
|
+
getDelegationManager: () => read,
|
|
18
|
+
getDeposit: () => read2,
|
|
19
|
+
getEntryPoint: () => read3,
|
|
20
|
+
getNonce: () => read4,
|
|
21
|
+
getProxyImplementation: () => read5,
|
|
22
|
+
getProxyVersion: () => read6,
|
|
23
|
+
isValidSignature: () => read7
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// src/DelegationFramework/DeleGatorCore/methods/getDelegationManager.ts
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var read = async ({
|
|
30
|
+
client,
|
|
31
|
+
contractAddress
|
|
32
|
+
}) => await _actions.readContract.call(void 0, client, {
|
|
33
|
+
address: contractAddress,
|
|
34
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
35
|
+
functionName: "delegationManager"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// src/DelegationFramework/DeleGatorCore/methods/getDeposit.ts
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
var read2 = async ({
|
|
42
|
+
client,
|
|
43
|
+
contractAddress
|
|
44
|
+
}) => await _actions.readContract.call(void 0, client, {
|
|
45
|
+
address: contractAddress,
|
|
46
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
47
|
+
functionName: "getDeposit"
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// src/DelegationFramework/DeleGatorCore/methods/getEntryPoint.ts
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
var read3 = async ({
|
|
54
|
+
client,
|
|
55
|
+
contractAddress
|
|
56
|
+
}) => await _actions.readContract.call(void 0, client, {
|
|
57
|
+
address: contractAddress,
|
|
58
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
59
|
+
functionName: "entryPoint"
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// src/DelegationFramework/DeleGatorCore/methods/getNonce.ts
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
var read4 = async ({
|
|
66
|
+
client,
|
|
67
|
+
contractAddress,
|
|
68
|
+
key
|
|
69
|
+
}) => await _actions.readContract.call(void 0, client, {
|
|
70
|
+
address: contractAddress,
|
|
71
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
72
|
+
functionName: "getNonce",
|
|
73
|
+
args: key ? [key] : void 0
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// src/DelegationFramework/DeleGatorCore/methods/getProxyImplementation.ts
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
var read5 = async ({
|
|
80
|
+
client,
|
|
81
|
+
contractAddress
|
|
82
|
+
}) => await _actions.readContract.call(void 0, client, {
|
|
83
|
+
address: contractAddress,
|
|
84
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
85
|
+
functionName: "getImplementation"
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// src/DelegationFramework/DeleGatorCore/methods/getProxyVersion.ts
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
var read6 = async ({
|
|
92
|
+
client,
|
|
93
|
+
contractAddress
|
|
94
|
+
}) => await _actions.readContract.call(void 0, client, {
|
|
95
|
+
address: contractAddress,
|
|
96
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
97
|
+
functionName: "getInitializedVersion"
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// src/DelegationFramework/DeleGatorCore/methods/isValidSignature.ts
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
var read7 = async ({
|
|
105
|
+
client,
|
|
106
|
+
contractAddress,
|
|
107
|
+
hash,
|
|
108
|
+
signature
|
|
109
|
+
}) => await _actions.readContract.call(void 0, client, {
|
|
110
|
+
address: contractAddress,
|
|
111
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
112
|
+
functionName: "isValidSignature",
|
|
113
|
+
args: [hash, signature]
|
|
114
|
+
});
|
|
115
|
+
var encode = ({
|
|
116
|
+
hash,
|
|
117
|
+
signature
|
|
118
|
+
}) => {
|
|
119
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
120
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
121
|
+
functionName: "isValidSignature",
|
|
122
|
+
args: [hash, signature]
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// src/DelegationFramework/utils.ts
|
|
127
|
+
async function isContractDeployed({
|
|
128
|
+
client,
|
|
129
|
+
contractAddress
|
|
130
|
+
}) {
|
|
131
|
+
const code = await _actions.getCode.call(void 0, client, {
|
|
132
|
+
address: contractAddress
|
|
133
|
+
});
|
|
134
|
+
return Boolean(code) && code !== "0x";
|
|
135
|
+
}
|
|
136
|
+
async function isImplementationExpected({
|
|
137
|
+
client,
|
|
138
|
+
contractAddress,
|
|
139
|
+
expectedImplementationAddress
|
|
140
|
+
}) {
|
|
141
|
+
if (!await isContractDeployed({ client, contractAddress })) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
const implementationAddress = await read5({
|
|
145
|
+
client,
|
|
146
|
+
contractAddress
|
|
147
|
+
});
|
|
148
|
+
return implementationAddress === expectedImplementationAddress;
|
|
149
|
+
}
|
|
150
|
+
var encodeProxyCreationCode = ({
|
|
151
|
+
implementationAddress,
|
|
152
|
+
initcode
|
|
153
|
+
}) => _viem.encodeDeployData.call(void 0, {
|
|
154
|
+
abi: _delegationabis.ERC1967Proxy.abi,
|
|
155
|
+
args: [implementationAddress, initcode],
|
|
156
|
+
bytecode: _delegationabis.ERC1967Proxy.bytecode
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// src/DelegationFramework/HybridDeleGator/methods/initialize.ts
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
var simulate = async ({
|
|
164
|
+
client,
|
|
165
|
+
hybridDeleGatorAddress,
|
|
166
|
+
eoaOwner,
|
|
167
|
+
p256Owners
|
|
168
|
+
}) => {
|
|
169
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
170
|
+
address: hybridDeleGatorAddress,
|
|
171
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
172
|
+
functionName: "initialize",
|
|
173
|
+
args: [
|
|
174
|
+
eoaOwner,
|
|
175
|
+
p256Owners.map((p256Owner) => p256Owner.keyId),
|
|
176
|
+
p256Owners.map((p256Owner) => p256Owner.x),
|
|
177
|
+
p256Owners.map((p256Owner) => p256Owner.y)
|
|
178
|
+
]
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
var encode2 = ({
|
|
182
|
+
eoaOwner,
|
|
183
|
+
p256Owners
|
|
184
|
+
}) => {
|
|
185
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
186
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
187
|
+
functionName: "initialize",
|
|
188
|
+
args: [
|
|
189
|
+
eoaOwner,
|
|
190
|
+
p256Owners.map((p256Owner) => p256Owner.keyId),
|
|
191
|
+
p256Owners.map((p256Owner) => p256Owner.x),
|
|
192
|
+
p256Owners.map((p256Owner) => p256Owner.y)
|
|
193
|
+
]
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
// src/DelegationFramework/HybridDeleGator/encode.ts
|
|
198
|
+
var encode_exports = {};
|
|
199
|
+
_chunkHLCOMYYUcjs.__export.call(void 0, encode_exports, {
|
|
200
|
+
addKey: () => encode3,
|
|
201
|
+
initializeHybridDeleGator: () => encode2,
|
|
202
|
+
reinitializeHybridDeleGator: () => encode4,
|
|
203
|
+
removeKey: () => encode5,
|
|
204
|
+
updateSigners: () => encode6
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// src/DelegationFramework/HybridDeleGator/methods/addKey.ts
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
var simulate2 = async ({
|
|
212
|
+
client,
|
|
213
|
+
hybridDeleGatorAddress,
|
|
214
|
+
p256Owner
|
|
215
|
+
}) => {
|
|
216
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
217
|
+
address: hybridDeleGatorAddress,
|
|
218
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
219
|
+
functionName: "addKey",
|
|
220
|
+
args: [p256Owner.keyId, p256Owner.x, p256Owner.y]
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
var encode3 = ({ p256Owner }) => {
|
|
224
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
225
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
226
|
+
functionName: "addKey",
|
|
227
|
+
args: [p256Owner.keyId, p256Owner.x, p256Owner.y]
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// src/DelegationFramework/HybridDeleGator/methods/reinitialize.ts
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
var simulate3 = async ({
|
|
236
|
+
client,
|
|
237
|
+
hybridDeleGatorAddress,
|
|
238
|
+
version,
|
|
239
|
+
eoaOwner,
|
|
240
|
+
p256Owners,
|
|
241
|
+
removeExistingP256Owners
|
|
242
|
+
}) => {
|
|
243
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
244
|
+
address: hybridDeleGatorAddress,
|
|
245
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
246
|
+
functionName: "reinitialize",
|
|
247
|
+
args: [
|
|
248
|
+
version,
|
|
249
|
+
eoaOwner,
|
|
250
|
+
p256Owners.map((p256Owner) => p256Owner.keyId),
|
|
251
|
+
p256Owners.map((p256Owner) => p256Owner.x),
|
|
252
|
+
p256Owners.map((p256Owner) => p256Owner.y),
|
|
253
|
+
removeExistingP256Owners
|
|
254
|
+
]
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
var encode4 = ({
|
|
258
|
+
version,
|
|
259
|
+
eoaOwner,
|
|
260
|
+
p256Owners,
|
|
261
|
+
removeExistingP256Owners
|
|
262
|
+
}) => {
|
|
263
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
264
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
265
|
+
functionName: "reinitialize",
|
|
266
|
+
args: [
|
|
267
|
+
version,
|
|
268
|
+
eoaOwner,
|
|
269
|
+
p256Owners.map((p256Owner) => p256Owner.keyId),
|
|
270
|
+
p256Owners.map((p256Owner) => p256Owner.x),
|
|
271
|
+
p256Owners.map((p256Owner) => p256Owner.y),
|
|
272
|
+
removeExistingP256Owners
|
|
273
|
+
]
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
// src/DelegationFramework/HybridDeleGator/methods/removeKey.ts
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
var simulate4 = async ({
|
|
282
|
+
client,
|
|
283
|
+
hybridDeleGatorAddress,
|
|
284
|
+
keyId
|
|
285
|
+
}) => {
|
|
286
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
287
|
+
address: hybridDeleGatorAddress,
|
|
288
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
289
|
+
functionName: "removeKey",
|
|
290
|
+
args: [keyId]
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
var encode5 = ({ keyId }) => {
|
|
294
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
295
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
296
|
+
functionName: "removeKey",
|
|
297
|
+
args: [keyId]
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// src/DelegationFramework/HybridDeleGator/methods/updateSigners.ts
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
var simulate5 = async ({
|
|
306
|
+
client,
|
|
307
|
+
hybridDeleGatorAddress,
|
|
308
|
+
eoaOwner,
|
|
309
|
+
p256Owners
|
|
310
|
+
}) => {
|
|
311
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
312
|
+
address: hybridDeleGatorAddress,
|
|
313
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
314
|
+
functionName: "updateSigners",
|
|
315
|
+
args: [
|
|
316
|
+
eoaOwner,
|
|
317
|
+
p256Owners.map((p256Owner) => p256Owner.keyId),
|
|
318
|
+
p256Owners.map((p256Owner) => p256Owner.x),
|
|
319
|
+
p256Owners.map((p256Owner) => p256Owner.y)
|
|
320
|
+
]
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
var encode6 = ({
|
|
324
|
+
eoaOwner,
|
|
325
|
+
p256Owners
|
|
326
|
+
}) => {
|
|
327
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
328
|
+
abi: _delegationabis.HybridDeleGator.abi,
|
|
329
|
+
functionName: "updateSigners",
|
|
330
|
+
args: [
|
|
331
|
+
eoaOwner,
|
|
332
|
+
p256Owners.map((p256Owner) => p256Owner.keyId),
|
|
333
|
+
p256Owners.map((p256Owner) => p256Owner.x),
|
|
334
|
+
p256Owners.map((p256Owner) => p256Owner.y)
|
|
335
|
+
]
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
// src/DelegationFramework/MultiSigDeleGator/methods/initialize.ts
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
var simulate6 = async ({
|
|
344
|
+
client,
|
|
345
|
+
multiSigDeleGatorAddress,
|
|
346
|
+
owners,
|
|
347
|
+
threshold
|
|
348
|
+
}) => {
|
|
349
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
350
|
+
address: multiSigDeleGatorAddress,
|
|
351
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
352
|
+
functionName: "initialize",
|
|
353
|
+
args: [owners, threshold]
|
|
354
|
+
});
|
|
355
|
+
};
|
|
356
|
+
var encode7 = ({ owners, threshold }) => {
|
|
357
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
358
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
359
|
+
functionName: "initialize",
|
|
360
|
+
args: [owners, threshold]
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
// src/DelegationFramework/MultiSigDeleGator/encode.ts
|
|
365
|
+
var encode_exports2 = {};
|
|
366
|
+
_chunkHLCOMYYUcjs.__export.call(void 0, encode_exports2, {
|
|
367
|
+
addSigner: () => encode8,
|
|
368
|
+
initializeMultiSigDeleGator: () => encode7,
|
|
369
|
+
reinitializeMultiSigDeleGator: () => encode9,
|
|
370
|
+
removeSigner: () => encode10,
|
|
371
|
+
replaceSigner: () => encode11,
|
|
372
|
+
updateMultiSigParameters: () => encode12,
|
|
373
|
+
updateThreshold: () => encode13
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
// src/DelegationFramework/MultiSigDeleGator/methods/addSigner.ts
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
var simulate7 = async ({
|
|
381
|
+
client,
|
|
382
|
+
multiSigDeleGatorAddress,
|
|
383
|
+
signer
|
|
384
|
+
}) => {
|
|
385
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
386
|
+
address: multiSigDeleGatorAddress,
|
|
387
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
388
|
+
functionName: "addSigner",
|
|
389
|
+
args: [signer]
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
var encode8 = ({ signer }) => {
|
|
393
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
394
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
395
|
+
functionName: "addSigner",
|
|
396
|
+
args: [signer]
|
|
397
|
+
});
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
// src/DelegationFramework/MultiSigDeleGator/methods/reinitialize.ts
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
var simulate8 = async ({
|
|
405
|
+
client,
|
|
406
|
+
multiSigDeleGatorAddress,
|
|
407
|
+
version,
|
|
408
|
+
owners,
|
|
409
|
+
threshold,
|
|
410
|
+
removeExistingOwners
|
|
411
|
+
}) => {
|
|
412
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
413
|
+
address: multiSigDeleGatorAddress,
|
|
414
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
415
|
+
functionName: "reinitialize",
|
|
416
|
+
args: [version, owners, threshold, removeExistingOwners]
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
var encode9 = ({
|
|
420
|
+
version,
|
|
421
|
+
owners,
|
|
422
|
+
threshold,
|
|
423
|
+
removeExistingOwners
|
|
424
|
+
}) => {
|
|
425
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
426
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
427
|
+
functionName: "reinitialize",
|
|
428
|
+
args: [version, owners, threshold, removeExistingOwners]
|
|
429
|
+
});
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
// src/DelegationFramework/MultiSigDeleGator/methods/removeSigner.ts
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
var simulate9 = async ({
|
|
437
|
+
client,
|
|
438
|
+
multiSigDeleGatorAddress,
|
|
439
|
+
signer
|
|
440
|
+
}) => {
|
|
441
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
442
|
+
address: multiSigDeleGatorAddress,
|
|
443
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
444
|
+
functionName: "removeSigner",
|
|
445
|
+
args: [signer]
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
var encode10 = ({ signer }) => {
|
|
449
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
450
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
451
|
+
functionName: "removeSigner",
|
|
452
|
+
args: [signer]
|
|
453
|
+
});
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
// src/DelegationFramework/MultiSigDeleGator/methods/replaceSigner.ts
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
var simulate10 = async ({
|
|
461
|
+
client,
|
|
462
|
+
multiSigDeleGatorAddress,
|
|
463
|
+
oldSigner,
|
|
464
|
+
newSigner
|
|
465
|
+
}) => {
|
|
466
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
467
|
+
address: multiSigDeleGatorAddress,
|
|
468
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
469
|
+
functionName: "replaceSigner",
|
|
470
|
+
args: [oldSigner, newSigner]
|
|
471
|
+
});
|
|
472
|
+
};
|
|
473
|
+
var encode11 = ({
|
|
474
|
+
oldSigner,
|
|
475
|
+
newSigner
|
|
476
|
+
}) => {
|
|
477
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
478
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
479
|
+
functionName: "replaceSigner",
|
|
480
|
+
args: [oldSigner, newSigner]
|
|
481
|
+
});
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// src/DelegationFramework/MultiSigDeleGator/methods/updateMultiSigParameters.ts
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
var simulate11 = async ({
|
|
489
|
+
client,
|
|
490
|
+
multiSigDeleGatorAddress,
|
|
491
|
+
owners,
|
|
492
|
+
threshold,
|
|
493
|
+
removeExistingOwners
|
|
494
|
+
}) => {
|
|
495
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
496
|
+
address: multiSigDeleGatorAddress,
|
|
497
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
498
|
+
functionName: "updateMultiSigParameters",
|
|
499
|
+
args: [owners, threshold, removeExistingOwners]
|
|
500
|
+
});
|
|
501
|
+
};
|
|
502
|
+
var encode12 = ({
|
|
503
|
+
owners,
|
|
504
|
+
threshold,
|
|
505
|
+
removeExistingOwners
|
|
506
|
+
}) => {
|
|
507
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
508
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
509
|
+
functionName: "updateMultiSigParameters",
|
|
510
|
+
args: [owners, threshold, removeExistingOwners]
|
|
511
|
+
});
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
// src/DelegationFramework/MultiSigDeleGator/methods/updateThreshold.ts
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
var simulate12 = async ({
|
|
519
|
+
client,
|
|
520
|
+
multiSigDeleGatorAddress,
|
|
521
|
+
threshold
|
|
522
|
+
}) => {
|
|
523
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
524
|
+
address: multiSigDeleGatorAddress,
|
|
525
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
526
|
+
functionName: "updateThreshold",
|
|
527
|
+
args: [threshold]
|
|
528
|
+
});
|
|
529
|
+
};
|
|
530
|
+
var encode13 = ({ threshold }) => {
|
|
531
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
532
|
+
abi: _delegationabis.MultiSigDeleGator.abi,
|
|
533
|
+
functionName: "updateThreshold",
|
|
534
|
+
args: [threshold]
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
// src/DelegationFramework/SimpleFactory/methods/create2Deploy.ts
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
var simulate13 = async ({
|
|
543
|
+
client,
|
|
544
|
+
factoryAddress,
|
|
545
|
+
creationCode,
|
|
546
|
+
salt
|
|
547
|
+
}) => {
|
|
548
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
549
|
+
address: factoryAddress,
|
|
550
|
+
abi: _delegationabis.SimpleFactory.abi,
|
|
551
|
+
functionName: "deploy",
|
|
552
|
+
args: [creationCode, salt]
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
var encode14 = (creationCode, salt) => {
|
|
556
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
557
|
+
abi: _delegationabis.SimpleFactory.abi,
|
|
558
|
+
functionName: "deploy",
|
|
559
|
+
args: [creationCode, salt]
|
|
560
|
+
});
|
|
561
|
+
};
|
|
562
|
+
var execute = async ({
|
|
563
|
+
client,
|
|
564
|
+
factoryAddress,
|
|
565
|
+
creationCode,
|
|
566
|
+
salt
|
|
567
|
+
}) => {
|
|
568
|
+
const { request } = await simulate13({
|
|
569
|
+
client,
|
|
570
|
+
factoryAddress,
|
|
571
|
+
creationCode,
|
|
572
|
+
salt
|
|
573
|
+
});
|
|
574
|
+
return _actions.writeContract.call(void 0, client, request);
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
// src/DelegationFramework/SimpleFactory/encode.ts
|
|
578
|
+
var encode_exports3 = {};
|
|
579
|
+
_chunkHLCOMYYUcjs.__export.call(void 0, encode_exports3, {
|
|
580
|
+
create2Deploy: () => encode14
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
// src/DelegationFramework/DeleGatorCore/methods/execute.ts
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
var simulate14 = async ({
|
|
588
|
+
client,
|
|
589
|
+
contractAddress,
|
|
590
|
+
execution
|
|
591
|
+
}) => {
|
|
592
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
593
|
+
address: contractAddress,
|
|
594
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
595
|
+
functionName: "execute",
|
|
596
|
+
args: [execution]
|
|
597
|
+
});
|
|
598
|
+
};
|
|
599
|
+
var execute2 = async ({
|
|
600
|
+
client,
|
|
601
|
+
contractAddress,
|
|
602
|
+
execution
|
|
603
|
+
}) => {
|
|
604
|
+
const { request } = await simulate14({
|
|
605
|
+
client,
|
|
606
|
+
contractAddress,
|
|
607
|
+
execution
|
|
608
|
+
});
|
|
609
|
+
return _actions.writeContract.call(void 0, client, request);
|
|
610
|
+
};
|
|
611
|
+
var encode15 = ({ execution }) => {
|
|
612
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
613
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
614
|
+
functionName: "execute",
|
|
615
|
+
args: [execution]
|
|
616
|
+
});
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
// src/DelegationFramework/DeleGatorCore/methods/executeWithMode.ts
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
var simulate15 = async ({
|
|
624
|
+
client,
|
|
625
|
+
contractAddress,
|
|
626
|
+
mode,
|
|
627
|
+
executions
|
|
628
|
+
}) => {
|
|
629
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
630
|
+
address: contractAddress,
|
|
631
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
632
|
+
functionName: "execute",
|
|
633
|
+
args: [mode, _chunkT6PSFUOZcjs.encodeExecutionCalldata.call(void 0, executions)]
|
|
634
|
+
});
|
|
635
|
+
};
|
|
636
|
+
var execute3 = async ({
|
|
637
|
+
client,
|
|
638
|
+
contractAddress,
|
|
639
|
+
mode,
|
|
640
|
+
executions
|
|
641
|
+
}) => {
|
|
642
|
+
const { request } = await simulate15({
|
|
643
|
+
client,
|
|
644
|
+
contractAddress,
|
|
645
|
+
mode,
|
|
646
|
+
executions
|
|
647
|
+
});
|
|
648
|
+
return _actions.writeContract.call(void 0, client, request);
|
|
649
|
+
};
|
|
650
|
+
var encode16 = ({
|
|
651
|
+
mode,
|
|
652
|
+
executions
|
|
653
|
+
}) => {
|
|
654
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
655
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
656
|
+
functionName: "execute",
|
|
657
|
+
args: [mode, _chunkT6PSFUOZcjs.encodeExecutionCalldata.call(void 0, executions)]
|
|
658
|
+
});
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
// src/DelegationFramework/DeleGatorCore/encode.ts
|
|
662
|
+
var encode_exports4 = {};
|
|
663
|
+
_chunkHLCOMYYUcjs.__export.call(void 0, encode_exports4, {
|
|
664
|
+
disableDelegation: () => encode17,
|
|
665
|
+
enableDelegation: () => encode18,
|
|
666
|
+
execute: () => encode15,
|
|
667
|
+
executeWithMode: () => encode16,
|
|
668
|
+
isValidSignature: () => encode,
|
|
669
|
+
upgradeToAndCall: () => encode19
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
// src/DelegationFramework/DeleGatorCore/methods/disableDelegation.ts
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
var simulate16 = async ({
|
|
677
|
+
client,
|
|
678
|
+
delegationManagerAddress,
|
|
679
|
+
delegation
|
|
680
|
+
}) => {
|
|
681
|
+
const abi = _delegationabis.DeleGatorCore.abi;
|
|
682
|
+
const delegationStruct = _chunkHLCOMYYUcjs.toDelegationStruct.call(void 0, delegation);
|
|
683
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
684
|
+
address: delegationManagerAddress,
|
|
685
|
+
abi,
|
|
686
|
+
functionName: "disableDelegation",
|
|
687
|
+
args: [delegationStruct]
|
|
688
|
+
});
|
|
689
|
+
};
|
|
690
|
+
var execute4 = async ({
|
|
691
|
+
client,
|
|
692
|
+
delegationManagerAddress,
|
|
693
|
+
delegation
|
|
694
|
+
}) => {
|
|
695
|
+
const { request } = await simulate16({
|
|
696
|
+
client,
|
|
697
|
+
delegationManagerAddress,
|
|
698
|
+
delegation
|
|
699
|
+
});
|
|
700
|
+
return _actions.writeContract.call(void 0, client, request);
|
|
701
|
+
};
|
|
702
|
+
var encode17 = ({ delegation }) => {
|
|
703
|
+
const delegationStruct = _chunkHLCOMYYUcjs.toDelegationStruct.call(void 0, delegation);
|
|
704
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
705
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
706
|
+
functionName: "disableDelegation",
|
|
707
|
+
args: [delegationStruct]
|
|
708
|
+
});
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
// src/DelegationFramework/DeleGatorCore/methods/enableDelegation.ts
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
var simulate17 = async ({
|
|
716
|
+
client,
|
|
717
|
+
delegationManagerAddress,
|
|
718
|
+
delegation
|
|
719
|
+
}) => {
|
|
720
|
+
const abi = _delegationabis.DeleGatorCore.abi;
|
|
721
|
+
const delegationStruct = _chunkHLCOMYYUcjs.toDelegationStruct.call(void 0, delegation);
|
|
722
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
723
|
+
address: delegationManagerAddress,
|
|
724
|
+
abi,
|
|
725
|
+
functionName: "enableDelegation",
|
|
726
|
+
args: [delegationStruct]
|
|
727
|
+
});
|
|
728
|
+
};
|
|
729
|
+
var execute5 = async ({
|
|
730
|
+
client,
|
|
731
|
+
delegationManagerAddress,
|
|
732
|
+
delegation
|
|
733
|
+
}) => {
|
|
734
|
+
const { request } = await simulate17({
|
|
735
|
+
client,
|
|
736
|
+
delegationManagerAddress,
|
|
737
|
+
delegation
|
|
738
|
+
});
|
|
739
|
+
return _actions.writeContract.call(void 0, client, request);
|
|
740
|
+
};
|
|
741
|
+
var encode18 = ({ delegation }) => {
|
|
742
|
+
const delegationStruct = _chunkHLCOMYYUcjs.toDelegationStruct.call(void 0, delegation);
|
|
743
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
744
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
745
|
+
functionName: "enableDelegation",
|
|
746
|
+
args: [delegationStruct]
|
|
747
|
+
});
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
// src/DelegationFramework/DeleGatorCore/methods/upgradeToAndCall.ts
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
var simulate18 = async ({
|
|
755
|
+
client,
|
|
756
|
+
contractAddress,
|
|
757
|
+
implementation,
|
|
758
|
+
data
|
|
759
|
+
}) => {
|
|
760
|
+
return _actions.simulateContract.call(void 0, client, {
|
|
761
|
+
address: contractAddress,
|
|
762
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
763
|
+
functionName: "upgradeToAndCall",
|
|
764
|
+
args: [implementation, data]
|
|
765
|
+
});
|
|
766
|
+
};
|
|
767
|
+
var execute6 = async ({
|
|
768
|
+
client,
|
|
769
|
+
contractAddress,
|
|
770
|
+
implementation,
|
|
771
|
+
data
|
|
772
|
+
}) => {
|
|
773
|
+
const { request } = await simulate18({
|
|
774
|
+
client,
|
|
775
|
+
contractAddress,
|
|
776
|
+
implementation,
|
|
777
|
+
data
|
|
778
|
+
});
|
|
779
|
+
return _actions.writeContract.call(void 0, client, request);
|
|
780
|
+
};
|
|
781
|
+
var encode19 = ({
|
|
782
|
+
implementation,
|
|
783
|
+
data
|
|
784
|
+
}) => {
|
|
785
|
+
return _viem.encodeFunctionData.call(void 0, {
|
|
786
|
+
abi: _delegationabis.DeleGatorCore.abi,
|
|
787
|
+
functionName: "upgradeToAndCall",
|
|
788
|
+
args: [implementation, data]
|
|
789
|
+
});
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
exports.simulate = simulate2; exports.simulate2 = simulate; exports.encode = encode2; exports.simulate3 = simulate3; exports.simulate4 = simulate4; exports.simulate5 = simulate5; exports.encode_exports = encode_exports; exports.simulate6 = simulate7; exports.simulate7 = simulate6; exports.encode2 = encode7; exports.simulate8 = simulate8; exports.simulate9 = simulate9; exports.simulate10 = simulate10; exports.simulate11 = simulate11; exports.simulate12 = simulate12; exports.encode_exports2 = encode_exports2; exports.simulate13 = simulate13; exports.encode3 = encode14; exports.execute = execute; exports.encode_exports3 = encode_exports3; exports.read_exports = read_exports; exports.isContractDeployed = isContractDeployed; exports.isImplementationExpected = isImplementationExpected; exports.encodeProxyCreationCode = encodeProxyCreationCode; exports.simulate14 = simulate16; exports.execute2 = execute4; exports.simulate15 = simulate17; exports.execute3 = execute5; exports.simulate16 = simulate14; exports.execute4 = execute2; exports.encode4 = encode15; exports.simulate17 = simulate15; exports.execute5 = execute3; exports.encode5 = encode16; exports.simulate18 = simulate18; exports.execute6 = execute6; exports.encode_exports4 = encode_exports4;
|
|
831
|
+
//# sourceMappingURL=chunk-662KDAAG.cjs.map
|