@metamask/smart-accounts-kit 1.4.0 → 1.6.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 +57 -24
- package/dist/actions/index.cjs +9 -6
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.d.cts +5 -3
- package/dist/actions/index.d.ts +5 -3
- package/dist/actions/index.mjs +8 -5
- package/dist/{caveats-BhjGBVHX.d.ts → caveats-B2OssjV4.d.ts} +1 -2
- package/dist/{caveats-CeHBbmt_.d.cts → caveats-gqMBZKkI.d.cts} +1 -2
- package/dist/{chunk-SOFB2MXG.cjs → chunk-2OS36DVV.cjs} +8 -1
- package/dist/chunk-2OS36DVV.cjs.map +1 -0
- package/dist/{chunk-6CEOFJY5.cjs → chunk-2ZOWIAP3.cjs} +266 -114
- package/dist/chunk-2ZOWIAP3.cjs.map +1 -0
- package/dist/{chunk-R2WT54GZ.mjs → chunk-AZYTTGON.mjs} +214 -62
- package/dist/chunk-AZYTTGON.mjs.map +1 -0
- package/dist/{chunk-MVBU3LRV.cjs → chunk-DCI2AN4N.cjs} +15 -17
- package/dist/chunk-DCI2AN4N.cjs.map +1 -0
- package/dist/{chunk-RR2AMG4A.cjs → chunk-EPU4O7FY.cjs} +158 -151
- package/dist/chunk-EPU4O7FY.cjs.map +1 -0
- package/dist/{chunk-QCULIK3O.mjs → chunk-GMGJRC3D.mjs} +8 -1
- package/dist/chunk-GMGJRC3D.mjs.map +1 -0
- package/dist/chunk-IMO6XNDJ.mjs +14 -0
- package/dist/chunk-IMO6XNDJ.mjs.map +1 -0
- package/dist/chunk-IQT6XFDT.cjs +14 -0
- package/dist/chunk-IQT6XFDT.cjs.map +1 -0
- package/dist/{chunk-SO5JAXGD.cjs → chunk-JKVSTPEC.cjs} +200 -18
- package/dist/chunk-JKVSTPEC.cjs.map +1 -0
- package/dist/{chunk-DVJX76J3.mjs → chunk-K7GTZGKJ.mjs} +2 -2
- package/dist/{chunk-HQHXGWNJ.mjs → chunk-L3EZCIY6.mjs} +67 -60
- package/dist/chunk-L3EZCIY6.mjs.map +1 -0
- package/dist/{chunk-XZ7UMCG3.cjs → chunk-PQPAEHJZ.cjs} +12 -12
- package/dist/{chunk-XZ7UMCG3.cjs.map → chunk-PQPAEHJZ.cjs.map} +1 -1
- package/dist/{chunk-EEIIVBNV.mjs → chunk-TNGQTVSY.mjs} +225 -53
- package/dist/chunk-TNGQTVSY.mjs.map +1 -0
- package/dist/{chunk-FG2CQGSE.mjs → chunk-UJQ3JN3U.mjs} +4 -6
- package/dist/{chunk-FG2CQGSE.mjs.map → chunk-UJQ3JN3U.mjs.map} +1 -1
- package/dist/{chunk-TMO23YRP.cjs → chunk-W6HPAK4M.cjs} +262 -90
- package/dist/chunk-W6HPAK4M.cjs.map +1 -0
- package/dist/{chunk-ZGBFPD4O.mjs → chunk-YVU66KSH.mjs} +188 -6
- package/dist/chunk-YVU66KSH.mjs.map +1 -0
- package/dist/contracts/index.cjs +5 -6
- package/dist/contracts/index.cjs.map +1 -1
- package/dist/contracts/index.d.cts +4 -3
- package/dist/contracts/index.d.ts +4 -3
- package/dist/contracts/index.mjs +4 -5
- package/dist/decodeRevertReason-CmmCpmZ_.d.cts +72 -0
- package/dist/decodeRevertReason-dOTpJx2h.d.ts +72 -0
- package/dist/experimental/index.cjs +364 -9
- package/dist/experimental/index.cjs.map +1 -1
- package/dist/experimental/index.d.cts +39 -3
- package/dist/experimental/index.d.ts +39 -3
- package/dist/experimental/index.mjs +357 -2
- package/dist/experimental/index.mjs.map +1 -1
- package/dist/index-B1Cmezvh.d.cts +61 -0
- package/dist/{index-DRKgDSZW.d.ts → index-BkgdU4LI.d.ts} +99 -92
- package/dist/{index-Cg-JakqA.d.ts → index-DUJmm8Wz.d.ts} +46 -5
- package/dist/{index-DzL9ccjU.d.cts → index-Dv4jPzhe.d.cts} +99 -92
- package/dist/index-LqiEgBjV.d.ts +61 -0
- package/dist/{index-BToRQKyJ.d.cts → index-X7Qn3JTg.d.cts} +46 -5
- package/dist/index.cjs +22 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.mjs +9 -11
- package/dist/index.mjs.map +1 -1
- package/dist/{delegation-CR99q1-n.d.ts → resolveCaveats-A9xC29l8.d.cts} +160 -111
- package/dist/{delegation-DoVULGYE.d.cts → resolveCaveats-A9xC29l8.d.ts} +160 -111
- package/dist/utils/index.cjs +13 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +8 -4
- package/dist/utils/index.d.ts +8 -4
- package/dist/utils/index.mjs +16 -9
- package/package.json +7 -6
- package/dist/chunk-4QXIOE7F.mjs +0 -79
- package/dist/chunk-4QXIOE7F.mjs.map +0 -1
- package/dist/chunk-6CEOFJY5.cjs.map +0 -1
- package/dist/chunk-EEIIVBNV.mjs.map +0 -1
- package/dist/chunk-HQHXGWNJ.mjs.map +0 -1
- package/dist/chunk-MOHCTPYQ.cjs +0 -79
- package/dist/chunk-MOHCTPYQ.cjs.map +0 -1
- package/dist/chunk-MVBU3LRV.cjs.map +0 -1
- package/dist/chunk-QCULIK3O.mjs.map +0 -1
- package/dist/chunk-R2WT54GZ.mjs.map +0 -1
- package/dist/chunk-RR2AMG4A.cjs.map +0 -1
- package/dist/chunk-SO5JAXGD.cjs.map +0 -1
- package/dist/chunk-SOFB2MXG.cjs.map +0 -1
- package/dist/chunk-TMO23YRP.cjs.map +0 -1
- package/dist/chunk-ZGBFPD4O.mjs.map +0 -1
- package/dist/types-BWaH4KH1.d.cts +0 -155
- package/dist/types-BWaH4KH1.d.ts +0 -155
- /package/dist/{chunk-DVJX76J3.mjs.map → chunk-K7GTZGKJ.mjs.map} +0 -0
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var _chunkMOHCTPYQcjs = require('./chunk-MOHCTPYQ.cjs');
|
|
4
3
|
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
var _chunkTMO23YRPcjs = require('./chunk-TMO23YRP.cjs');
|
|
5
|
+
var _chunkW6HPAK4Mcjs = require('./chunk-W6HPAK4M.cjs');
|
|
8
6
|
|
|
9
7
|
// src/DelegationFramework/utils.ts
|
|
10
|
-
var _delegationabis = require('@metamask/delegation-abis');
|
|
8
|
+
var _delegationabis = require('@metamask/delegation-abis'); var delegationAbis = _interopRequireWildcard(_delegationabis);
|
|
11
9
|
var _bytecode = require('@metamask/delegation-abis/bytecode');
|
|
12
10
|
var _viem = require('viem');
|
|
13
11
|
var _actions = require('viem/actions');
|
|
14
12
|
|
|
15
13
|
// src/DelegationFramework/DeleGatorCore/read.ts
|
|
16
14
|
var read_exports = {};
|
|
17
|
-
|
|
15
|
+
_chunkW6HPAK4Mcjs.__export.call(void 0, read_exports, {
|
|
18
16
|
getDelegationManager: () => read,
|
|
19
17
|
getDeposit: () => read2,
|
|
20
18
|
getEntryPoint: () => read3,
|
|
@@ -157,6 +155,188 @@ var encodeProxyCreationCode = ({
|
|
|
157
155
|
bytecode: _bytecode.ERC1967Proxy
|
|
158
156
|
});
|
|
159
157
|
|
|
158
|
+
// src/decodeRevertReason.ts
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
var _utils = require('viem/utils');
|
|
162
|
+
var knownRevertAbis = Object.values(delegationAbis).filter(
|
|
163
|
+
(abi) => abi.length > 0
|
|
164
|
+
);
|
|
165
|
+
var standardSolidityErrorAbi = [];
|
|
166
|
+
var revertReasonAbis = [
|
|
167
|
+
standardSolidityErrorAbi,
|
|
168
|
+
...knownRevertAbis
|
|
169
|
+
];
|
|
170
|
+
var MAX_ERROR_TRAVERSAL_DEPTH = 8;
|
|
171
|
+
var panicReasons = {
|
|
172
|
+
"1": "An `assert` condition failed.",
|
|
173
|
+
"17": "Arithmetic operation resulted in underflow or overflow.",
|
|
174
|
+
"18": "Division or modulo by zero.",
|
|
175
|
+
"33": "Attempted to convert to an invalid type.",
|
|
176
|
+
"34": "Attempted to access a storage byte array that is incorrectly encoded.",
|
|
177
|
+
"49": "Performed `.pop()` on an empty array.",
|
|
178
|
+
"50": "Array index is out of bounds.",
|
|
179
|
+
"65": "Allocated too much memory or created an array which is too large.",
|
|
180
|
+
"81": "Attempted to call a zero-initialized variable of internal function type."
|
|
181
|
+
};
|
|
182
|
+
function decodeRevertReason(error) {
|
|
183
|
+
const decodedViemError = decodeViemContractRevert(error);
|
|
184
|
+
if (decodedViemError) {
|
|
185
|
+
return decodedViemError;
|
|
186
|
+
}
|
|
187
|
+
for (const rawData of getRevertDataCandidates(error)) {
|
|
188
|
+
const decoded = decodeRevertData(rawData);
|
|
189
|
+
if (decoded) {
|
|
190
|
+
return decoded;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return void 0;
|
|
194
|
+
}
|
|
195
|
+
function decodeViemContractRevert(error) {
|
|
196
|
+
if (!(error instanceof _viem.BaseError)) {
|
|
197
|
+
return void 0;
|
|
198
|
+
}
|
|
199
|
+
const revertError = error.walk(
|
|
200
|
+
(cause) => cause instanceof _viem.ContractFunctionRevertedError
|
|
201
|
+
);
|
|
202
|
+
if (!(revertError instanceof _viem.ContractFunctionRevertedError)) {
|
|
203
|
+
return void 0;
|
|
204
|
+
}
|
|
205
|
+
if (!revertError.raw) {
|
|
206
|
+
return void 0;
|
|
207
|
+
}
|
|
208
|
+
if (revertError.data) {
|
|
209
|
+
const { abiItem, args, errorName } = revertError.data;
|
|
210
|
+
return {
|
|
211
|
+
errorName,
|
|
212
|
+
message: formatDecodedError(errorName, args, abiItem),
|
|
213
|
+
rawData: revertError.raw
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
return decodeRevertData(revertError.raw);
|
|
217
|
+
}
|
|
218
|
+
function decodeRevertData(rawData) {
|
|
219
|
+
for (const abi of revertReasonAbis) {
|
|
220
|
+
try {
|
|
221
|
+
const { abiItem, args, errorName } = _utils.decodeErrorResult.call(void 0, {
|
|
222
|
+
abi,
|
|
223
|
+
data: rawData
|
|
224
|
+
});
|
|
225
|
+
return {
|
|
226
|
+
errorName,
|
|
227
|
+
message: formatDecodedError(errorName, args, abiItem),
|
|
228
|
+
rawData
|
|
229
|
+
};
|
|
230
|
+
} catch (e) {
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const decodedString = decodeRawString(rawData);
|
|
234
|
+
if (decodedString) {
|
|
235
|
+
return {
|
|
236
|
+
errorName: "Error",
|
|
237
|
+
message: decodedString,
|
|
238
|
+
rawData
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
return void 0;
|
|
242
|
+
}
|
|
243
|
+
function formatDecodedError(errorName, args, abiItem) {
|
|
244
|
+
const [firstArg] = _nullishCoalesce(args, () => ( []));
|
|
245
|
+
if (errorName === "Error") {
|
|
246
|
+
return typeof firstArg === "string" ? firstArg : errorName;
|
|
247
|
+
}
|
|
248
|
+
if (errorName === "Panic") {
|
|
249
|
+
const panicCode = String(firstArg);
|
|
250
|
+
return _nullishCoalesce(panicReasons[panicCode], () => ( `Panic(${panicCode})`));
|
|
251
|
+
}
|
|
252
|
+
const formattedArgs = _utils.formatAbiItemWithArgs.call(void 0, {
|
|
253
|
+
abiItem,
|
|
254
|
+
args: _nullishCoalesce(args, () => ( [])),
|
|
255
|
+
includeFunctionName: false,
|
|
256
|
+
includeName: false
|
|
257
|
+
});
|
|
258
|
+
return `${errorName}${_nullishCoalesce(formattedArgs, () => ( ""))}`;
|
|
259
|
+
}
|
|
260
|
+
function decodeRawString(rawData) {
|
|
261
|
+
const bytes = rawData.slice(2);
|
|
262
|
+
if (bytes.length === 0 || bytes.length % 2 !== 0) {
|
|
263
|
+
return void 0;
|
|
264
|
+
}
|
|
265
|
+
let value = "";
|
|
266
|
+
for (let index = 0; index < bytes.length; index += 2) {
|
|
267
|
+
const charCode = Number.parseInt(bytes.slice(index, index + 2), 16);
|
|
268
|
+
if (Number.isNaN(charCode) || charCode < 32 || charCode > 126) {
|
|
269
|
+
return void 0;
|
|
270
|
+
}
|
|
271
|
+
value += String.fromCharCode(charCode);
|
|
272
|
+
}
|
|
273
|
+
return value;
|
|
274
|
+
}
|
|
275
|
+
function getRevertDataCandidates(error) {
|
|
276
|
+
const candidates = [];
|
|
277
|
+
const seen = /* @__PURE__ */ new Set();
|
|
278
|
+
const seenCandidates = /* @__PURE__ */ new Set();
|
|
279
|
+
const addHexCandidate = (candidate) => {
|
|
280
|
+
if (candidate.length < 10 || candidate.length % 2 !== 0 || !_viem.isHex.call(void 0, candidate)) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
if (!seenCandidates.has(candidate)) {
|
|
284
|
+
seenCandidates.add(candidate);
|
|
285
|
+
candidates.push(candidate);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
const addLabeledHexCandidates = (value) => {
|
|
289
|
+
for (const match of value.matchAll(
|
|
290
|
+
/\b(?:reason|revertData|raw|data):\s*(0x[0-9a-fA-F]+)/giu
|
|
291
|
+
)) {
|
|
292
|
+
const [, candidate] = match;
|
|
293
|
+
if (candidate) {
|
|
294
|
+
addHexCandidate(candidate);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
const addHexCandidates = (value) => {
|
|
299
|
+
if (typeof value !== "string") {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
addLabeledHexCandidates(value);
|
|
303
|
+
for (const [candidate] of value.matchAll(/0x[0-9a-fA-F]+/gu)) {
|
|
304
|
+
addHexCandidate(candidate);
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
const visit = (value, depth = 0) => {
|
|
308
|
+
if (value === null || value === void 0 || seen.has(value) || depth > MAX_ERROR_TRAVERSAL_DEPTH) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
addHexCandidates(value);
|
|
312
|
+
if (Array.isArray(value)) {
|
|
313
|
+
seen.add(value);
|
|
314
|
+
value.forEach((item) => visit(item, depth + 1));
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (typeof value !== "object") {
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
seen.add(value);
|
|
321
|
+
const record = value;
|
|
322
|
+
addHexCandidates(record.revertData);
|
|
323
|
+
addHexCandidates(record.raw);
|
|
324
|
+
addHexCandidates(record.data);
|
|
325
|
+
addHexCandidates(record.details);
|
|
326
|
+
addHexCandidates(record.reason);
|
|
327
|
+
addHexCandidates(record.shortMessage);
|
|
328
|
+
addHexCandidates(record.message);
|
|
329
|
+
visit(record.data, depth + 1);
|
|
330
|
+
visit(record.details, depth + 1);
|
|
331
|
+
visit(record.error, depth + 1);
|
|
332
|
+
visit(record.metaMessages, depth + 1);
|
|
333
|
+
visit(record.originalError, depth + 1);
|
|
334
|
+
visit(record.cause, depth + 1);
|
|
335
|
+
};
|
|
336
|
+
visit(error);
|
|
337
|
+
return candidates;
|
|
338
|
+
}
|
|
339
|
+
|
|
160
340
|
// src/DelegationFramework/HybridDeleGator/methods/initialize.ts
|
|
161
341
|
|
|
162
342
|
|
|
@@ -197,7 +377,7 @@ var encode2 = ({
|
|
|
197
377
|
|
|
198
378
|
// src/DelegationFramework/HybridDeleGator/encode.ts
|
|
199
379
|
var encode_exports = {};
|
|
200
|
-
|
|
380
|
+
_chunkW6HPAK4Mcjs.__export.call(void 0, encode_exports, {
|
|
201
381
|
addKey: () => encode3,
|
|
202
382
|
initializeHybridDeleGator: () => encode2,
|
|
203
383
|
reinitializeHybridDeleGator: () => encode4,
|
|
@@ -364,7 +544,7 @@ var encode7 = ({ owners, threshold }) => {
|
|
|
364
544
|
|
|
365
545
|
// src/DelegationFramework/MultiSigDeleGator/encode.ts
|
|
366
546
|
var encode_exports2 = {};
|
|
367
|
-
|
|
547
|
+
_chunkW6HPAK4Mcjs.__export.call(void 0, encode_exports2, {
|
|
368
548
|
addSigner: () => encode8,
|
|
369
549
|
initializeMultiSigDeleGator: () => encode7,
|
|
370
550
|
reinitializeMultiSigDeleGator: () => encode9,
|
|
@@ -577,7 +757,7 @@ var execute = async ({
|
|
|
577
757
|
|
|
578
758
|
// src/DelegationFramework/SimpleFactory/encode.ts
|
|
579
759
|
var encode_exports3 = {};
|
|
580
|
-
|
|
760
|
+
_chunkW6HPAK4Mcjs.__export.call(void 0, encode_exports3, {
|
|
581
761
|
create2Deploy: () => encode14
|
|
582
762
|
});
|
|
583
763
|
|
|
@@ -631,7 +811,7 @@ var simulate15 = async ({
|
|
|
631
811
|
address: contractAddress,
|
|
632
812
|
abi: _delegationabis.DeleGatorCore,
|
|
633
813
|
functionName: "execute",
|
|
634
|
-
args: [mode,
|
|
814
|
+
args: [mode, _chunkW6HPAK4Mcjs.encodeExecutionCalldata.call(void 0, executions)]
|
|
635
815
|
});
|
|
636
816
|
};
|
|
637
817
|
var execute3 = async ({
|
|
@@ -655,13 +835,13 @@ var encode16 = ({
|
|
|
655
835
|
return _viem.encodeFunctionData.call(void 0, {
|
|
656
836
|
abi: _delegationabis.DeleGatorCore,
|
|
657
837
|
functionName: "execute",
|
|
658
|
-
args: [mode,
|
|
838
|
+
args: [mode, _chunkW6HPAK4Mcjs.encodeExecutionCalldata.call(void 0, executions)]
|
|
659
839
|
});
|
|
660
840
|
};
|
|
661
841
|
|
|
662
842
|
// src/DelegationFramework/DeleGatorCore/encode.ts
|
|
663
843
|
var encode_exports4 = {};
|
|
664
|
-
|
|
844
|
+
_chunkW6HPAK4Mcjs.__export.call(void 0, encode_exports4, {
|
|
665
845
|
disableDelegation: () => encode17,
|
|
666
846
|
enableDelegation: () => encode18,
|
|
667
847
|
execute: () => encode15,
|
|
@@ -679,7 +859,7 @@ var simulate16 = async ({
|
|
|
679
859
|
delegationManagerAddress,
|
|
680
860
|
delegation
|
|
681
861
|
}) => {
|
|
682
|
-
const delegationStruct =
|
|
862
|
+
const delegationStruct = _chunkW6HPAK4Mcjs.toDelegationStruct.call(void 0, delegation);
|
|
683
863
|
return _actions.simulateContract.call(void 0, client, {
|
|
684
864
|
address: delegationManagerAddress,
|
|
685
865
|
abi: _delegationabis.DeleGatorCore,
|
|
@@ -700,7 +880,7 @@ var execute4 = async ({
|
|
|
700
880
|
return _actions.writeContract.call(void 0, client, request);
|
|
701
881
|
};
|
|
702
882
|
var encode17 = ({ delegation }) => {
|
|
703
|
-
const delegationStruct =
|
|
883
|
+
const delegationStruct = _chunkW6HPAK4Mcjs.toDelegationStruct.call(void 0, delegation);
|
|
704
884
|
return _viem.encodeFunctionData.call(void 0, {
|
|
705
885
|
abi: _delegationabis.DeleGatorCore,
|
|
706
886
|
functionName: "disableDelegation",
|
|
@@ -717,7 +897,7 @@ var simulate17 = async ({
|
|
|
717
897
|
delegationManagerAddress,
|
|
718
898
|
delegation
|
|
719
899
|
}) => {
|
|
720
|
-
const delegationStruct =
|
|
900
|
+
const delegationStruct = _chunkW6HPAK4Mcjs.toDelegationStruct.call(void 0, delegation);
|
|
721
901
|
return _actions.simulateContract.call(void 0, client, {
|
|
722
902
|
address: delegationManagerAddress,
|
|
723
903
|
abi: _delegationabis.DeleGatorCore,
|
|
@@ -738,7 +918,7 @@ var execute5 = async ({
|
|
|
738
918
|
return _actions.writeContract.call(void 0, client, request);
|
|
739
919
|
};
|
|
740
920
|
var encode18 = ({ delegation }) => {
|
|
741
|
-
const delegationStruct =
|
|
921
|
+
const delegationStruct = _chunkW6HPAK4Mcjs.toDelegationStruct.call(void 0, delegation);
|
|
742
922
|
return _viem.encodeFunctionData.call(void 0, {
|
|
743
923
|
abi: _delegationabis.DeleGatorCore,
|
|
744
924
|
functionName: "enableDelegation",
|
|
@@ -826,5 +1006,7 @@ var encode19 = ({
|
|
|
826
1006
|
|
|
827
1007
|
|
|
828
1008
|
|
|
829
|
-
|
|
830
|
-
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
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; exports.decodeRevertReason = decodeRevertReason; exports.decodeRevertData = decodeRevertData;
|
|
1012
|
+
//# sourceMappingURL=chunk-JKVSTPEC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/smart-accounts-kit/smart-accounts-kit/packages/smart-accounts-kit/dist/chunk-JKVSTPEC.cjs","../src/DelegationFramework/utils.ts","../src/DelegationFramework/DeleGatorCore/read.ts","../src/DelegationFramework/DeleGatorCore/methods/getDelegationManager.ts","../src/DelegationFramework/DeleGatorCore/methods/getDeposit.ts","../src/DelegationFramework/DeleGatorCore/methods/getEntryPoint.ts","../src/DelegationFramework/DeleGatorCore/methods/getNonce.ts","../src/DelegationFramework/DeleGatorCore/methods/getProxyImplementation.ts","../src/DelegationFramework/DeleGatorCore/methods/getProxyVersion.ts","../src/DelegationFramework/DeleGatorCore/methods/isValidSignature.ts","../src/decodeRevertReason.ts","../src/DelegationFramework/HybridDeleGator/methods/initialize.ts","../src/DelegationFramework/HybridDeleGator/encode.ts","../src/DelegationFramework/HybridDeleGator/methods/addKey.ts","../src/DelegationFramework/HybridDeleGator/methods/reinitialize.ts","../src/DelegationFramework/HybridDeleGator/methods/removeKey.ts","../src/DelegationFramework/HybridDeleGator/methods/updateSigners.ts","../src/DelegationFramework/MultiSigDeleGator/methods/initialize.ts","../src/DelegationFramework/MultiSigDeleGator/encode.ts","../src/DelegationFramework/MultiSigDeleGator/methods/addSigner.ts","../src/DelegationFramework/MultiSigDeleGator/methods/reinitialize.ts","../src/DelegationFramework/MultiSigDeleGator/methods/removeSigner.ts","../src/DelegationFramework/MultiSigDeleGator/methods/replaceSigner.ts","../src/DelegationFramework/MultiSigDeleGator/methods/updateMultiSigParameters.ts","../src/DelegationFramework/MultiSigDeleGator/methods/updateThreshold.ts","../src/DelegationFramework/SimpleFactory/methods/create2Deploy.ts","../src/DelegationFramework/SimpleFactory/encode.ts","../src/DelegationFramework/DeleGatorCore/methods/execute.ts","../src/DelegationFramework/DeleGatorCore/methods/executeWithMode.ts","../src/DelegationFramework/DeleGatorCore/encode.ts","../src/DelegationFramework/DeleGatorCore/methods/disableDelegation.ts","../src/DelegationFramework/DeleGatorCore/methods/enableDelegation.ts","../src/DelegationFramework/DeleGatorCore/methods/upgradeToAndCall.ts"],"names":["read","readContract","DeleGatorCore","encode","encodeFunctionData","simulate","simulateContract","HybridDeleGator","encode_exports","MultiSigDeleGator","writeContract","execute"],"mappings":"AAAA;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACNA,0HAA6B;AAC7B,8DAAqD;AAErD,4BAAiC;AACjC,uCAAwB;ADOxB;AACA;AEZA,IAAA,aAAA,EAAA,CAAA,CAAA;AAAA,wCAAA,YAAA,EAAA;AAAA,EAAA,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AEaP;AACX,EAAA;AACA,EAAA;AACsC;AAC/BC,EAAAA;AACAF,IAAAA;AACL,IAAA;AACM,IAAA;AACP,EAAA;AACH;AhC44BU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/smart-accounts-kit/smart-accounts-kit/packages/smart-accounts-kit/dist/chunk-JKVSTPEC.cjs","sourcesContent":[null,"import { ERC1967Proxy } from '@metamask/delegation-abis';\nimport { ERC1967Proxy as ERC1967ProxyBytecode } from '@metamask/delegation-abis/bytecode';\nimport type { Address, Client, Hex } from 'viem';\nimport { encodeDeployData } from 'viem';\nimport { getCode } from 'viem/actions';\n\nimport { getProxyImplementation } from './DeleGatorCore/read';\n\n/**\n * Checks if a contract is deployed at the given address.\n *\n * @param options - The options for checking contract deployment.\n * @param options.client - The client to use for the query.\n * @param options.contractAddress - The address to check for contract deployment.\n * @returns A boolean indicating whether a contract is deployed at the address.\n * @description This function checks if there is actual bytecode at the provided contract address.\n */\nexport async function isContractDeployed({\n client,\n contractAddress,\n}: {\n client: Client;\n contractAddress: Address;\n}): Promise<boolean> {\n const code = await getCode(client, {\n address: contractAddress,\n });\n return Boolean(code) && code !== '0x';\n}\n\n/**\n * Checks if a proxy contract at the given address points to the expected implementation.\n *\n * @param options - The options for checking the implementation.\n * @param options.client - The client to use for the query.\n * @param options.contractAddress - The address of the proxy contract.\n * @param options.expectedImplementationAddress - The address that the implementation should match.\n * @returns A boolean indicating whether the implementation matches the expected one.\n * @description This function verifies both that the contract exists and that its implementation address matches.\n */\nexport async function isImplementationExpected({\n client,\n contractAddress,\n expectedImplementationAddress,\n}: {\n client: Client;\n contractAddress: Address;\n expectedImplementationAddress: Address;\n}): Promise<boolean> {\n if (!(await isContractDeployed({ client, contractAddress }))) {\n return false;\n }\n\n const implementationAddress = await getProxyImplementation({\n client,\n contractAddress,\n });\n\n return implementationAddress === expectedImplementationAddress;\n}\n\n/**\n * Encodes the \"creation code\" for an ERC1967Proxy contract that will be deployed via CREATE2 with the given implementation and initialization code.\n *\n * @param options - The options for encoding the proxy creation code.\n * @param options.implementationAddress - The address of the implementation contract for the proxy to use.\n * @param options.initcode - The calldata for the initialization function of the implementation contract.\n * @returns The encoded creation code for the proxy.\n * @description This function prepares the deployment bytecode for an ERC1967 proxy pointing to the given implementation.\n */\nexport const encodeProxyCreationCode = ({\n implementationAddress,\n initcode,\n}: {\n implementationAddress: Address;\n initcode: Hex;\n}): Hex =>\n encodeDeployData({\n abi: ERC1967Proxy,\n args: [implementationAddress, initcode],\n bytecode: ERC1967ProxyBytecode,\n });\n","import { read as getDelegationManager } from './methods/getDelegationManager';\nimport { read as getDeposit } from './methods/getDeposit';\nimport { read as getEntryPoint } from './methods/getEntryPoint';\nimport { read as getNonce } from './methods/getNonce';\nimport { read as getProxyImplementation } from './methods/getProxyImplementation';\nimport { read as getProxyVersion } from './methods/getProxyVersion';\nimport { read as isValidSignature } from './methods/isValidSignature';\n\nexport {\n getDelegationManager,\n getDeposit,\n getEntryPoint,\n getNonce,\n getProxyImplementation,\n getProxyVersion,\n isValidSignature,\n};\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { readContract } from 'viem/actions';\n\nexport type ReadGetDelegationManagerParameters = {\n client: Client;\n contractAddress: Address;\n};\n\nexport const read = async ({\n client,\n contractAddress,\n}: ReadGetDelegationManagerParameters) =>\n await readContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'delegationManager',\n });\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { readContract } from 'viem/actions';\n\nexport type ReadGetDepositParameters = {\n client: Client;\n contractAddress: Address;\n};\n\nexport const read = async ({\n client,\n contractAddress,\n}: ReadGetDepositParameters) =>\n await readContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'getDeposit',\n });\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { readContract } from 'viem/actions';\n\nexport type ReadGetEntryPointParameters = {\n client: Client;\n contractAddress: Address;\n};\n\nexport const read = async ({\n client,\n contractAddress,\n}: ReadGetEntryPointParameters) =>\n await readContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'entryPoint',\n });\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { readContract } from 'viem/actions';\n\nexport type ReadGetNonceParameters = {\n client: Client;\n contractAddress: Address;\n key?: bigint;\n};\n\nexport const read = async ({\n client,\n contractAddress,\n key,\n}: ReadGetNonceParameters) =>\n await readContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'getNonce',\n args: key ? [key] : undefined,\n });\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { readContract } from 'viem/actions';\n\nexport type ReadGetProxyImplementationParameters = {\n client: Client;\n contractAddress: Address;\n};\n\nexport const read = async ({\n client,\n contractAddress,\n}: ReadGetProxyImplementationParameters) =>\n await readContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'getImplementation',\n });\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { readContract } from 'viem/actions';\n\nexport type ReadGetProxyVersionParameters = {\n client: Client;\n contractAddress: Address;\n};\n\nexport const read = async ({\n client,\n contractAddress,\n}: ReadGetProxyVersionParameters) =>\n await readContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'getInitializedVersion',\n });\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Hex, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { readContract } from 'viem/actions';\n\nexport type IsValidSignatureParameters = {\n client: Client;\n contractAddress: Address;\n hash: Hex;\n signature: Hex;\n};\n\nexport type EncodeIsValidSignatureParameters = {\n hash: Hex;\n signature: Hex;\n};\n\nexport const read = async ({\n client,\n contractAddress,\n hash,\n signature,\n}: IsValidSignatureParameters) =>\n await readContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'isValidSignature',\n args: [hash, signature],\n });\n\nexport const encode = ({\n hash,\n signature,\n}: EncodeIsValidSignatureParameters) => {\n return encodeFunctionData({\n abi: DeleGatorCore,\n functionName: 'isValidSignature',\n args: [hash, signature],\n });\n};\n","import * as delegationAbis from '@metamask/delegation-abis';\nimport { BaseError, ContractFunctionRevertedError, isHex } from 'viem';\nimport type { Abi, AbiItem, Hex } from 'viem';\nimport { decodeErrorResult, formatAbiItemWithArgs } from 'viem/utils';\n\nconst knownRevertAbis = (Object.values(delegationAbis) as Abi[]).filter(\n (abi) => abi.length > 0,\n);\n\n// viem decodes standard Solidity Error(string) and Panic(uint256) with an empty ABI.\nconst standardSolidityErrorAbi: Abi = [] as const;\nconst revertReasonAbis: readonly Abi[] = [\n standardSolidityErrorAbi,\n ...knownRevertAbis,\n];\n\nconst MAX_ERROR_TRAVERSAL_DEPTH = 8;\n\nconst panicReasons: Record<string, string> = {\n '1': 'An `assert` condition failed.',\n '17': 'Arithmetic operation resulted in underflow or overflow.',\n '18': 'Division or modulo by zero.',\n '33': 'Attempted to convert to an invalid type.',\n '34': 'Attempted to access a storage byte array that is incorrectly encoded.',\n '49': 'Performed `.pop()` on an empty array.',\n '50': 'Array index is out of bounds.',\n '65': 'Allocated too much memory or created an array which is too large.',\n '81': 'Attempted to call a zero-initialized variable of internal function type.',\n};\n\nexport type DecodedRevertReason = {\n readonly errorName: string;\n readonly message: string;\n readonly rawData: Hex;\n};\n\n/**\n * Decodes the first recognized revert data candidate in an error chain.\n *\n * @param error - The original error thrown by viem or an RPC provider.\n * @returns A decoded revert reason, if one can be recognized.\n */\nexport function decodeRevertReason(\n error: unknown,\n): DecodedRevertReason | undefined {\n const decodedViemError = decodeViemContractRevert(error);\n\n if (decodedViemError) {\n return decodedViemError;\n }\n\n for (const rawData of getRevertDataCandidates(error)) {\n const decoded = decodeRevertData(rawData);\n\n if (decoded) {\n return decoded;\n }\n }\n\n return undefined;\n}\n\n/**\n * Extracts revert information that viem has already identified in its error\n * chain before falling back to provider-specific string/object shapes.\n *\n * @param error - The original error thrown by viem.\n * @returns A decoded revert reason, if viem exposed enough revert data.\n */\nfunction decodeViemContractRevert(\n error: unknown,\n): DecodedRevertReason | undefined {\n if (!(error instanceof BaseError)) {\n return undefined;\n }\n\n const revertError = error.walk(\n (cause) => cause instanceof ContractFunctionRevertedError,\n );\n\n if (!(revertError instanceof ContractFunctionRevertedError)) {\n return undefined;\n }\n\n if (!revertError.raw) {\n return undefined;\n }\n\n if (revertError.data) {\n const { abiItem, args, errorName } = revertError.data;\n return {\n errorName,\n message: formatDecodedError(errorName, args, abiItem),\n rawData: revertError.raw,\n };\n }\n\n return decodeRevertData(revertError.raw);\n}\n\n/**\n * Decodes raw revert data against standard Solidity errors and known SDK ABIs.\n *\n * @param rawData - ABI-encoded revert data.\n * @returns A decoded revert reason, if the data matches a known error.\n */\nexport function decodeRevertData(\n rawData: Hex,\n): DecodedRevertReason | undefined {\n for (const abi of revertReasonAbis) {\n try {\n const { abiItem, args, errorName } = decodeErrorResult({\n abi,\n data: rawData,\n });\n\n return {\n errorName,\n message: formatDecodedError(errorName, args, abiItem),\n rawData,\n };\n } catch {\n // Try the next ABI until one can decode the revert data.\n }\n }\n\n const decodedString = decodeRawString(rawData);\n\n if (decodedString) {\n return {\n errorName: 'Error',\n message: decodedString,\n rawData,\n };\n }\n\n return undefined;\n}\n\n/**\n * Formats a decoded error into compact user-facing text.\n *\n * @param errorName - The decoded Solidity error name.\n * @param args - The decoded Solidity error arguments.\n * @param abiItem - The ABI item used to decode the error.\n * @returns Human-readable revert text.\n */\nfunction formatDecodedError(\n errorName: string,\n args: readonly unknown[] | undefined,\n abiItem: AbiItem,\n): string {\n const [firstArg] = args ?? [];\n\n if (errorName === 'Error') {\n return typeof firstArg === 'string' ? firstArg : errorName;\n }\n\n if (errorName === 'Panic') {\n const panicCode = String(firstArg);\n return panicReasons[panicCode] ?? `Panic(${panicCode})`;\n }\n\n const formattedArgs = formatAbiItemWithArgs({\n abiItem,\n args: args ?? [],\n includeFunctionName: false,\n includeName: false,\n });\n\n return `${errorName}${formattedArgs ?? ''}`;\n}\n\n/**\n * Decodes revert payloads surfaced by some clients as raw printable ASCII bytes.\n *\n * @param rawData - Hex-encoded bytes that may represent a printable ASCII string.\n * @returns The decoded string when it looks like readable text.\n */\nfunction decodeRawString(rawData: Hex): string | undefined {\n const bytes = rawData.slice(2);\n\n if (bytes.length === 0 || bytes.length % 2 !== 0) {\n return undefined;\n }\n\n let value = '';\n\n for (let index = 0; index < bytes.length; index += 2) {\n const charCode = Number.parseInt(bytes.slice(index, index + 2), 16);\n\n if (Number.isNaN(charCode) || charCode < 0x20 || charCode > 0x7e) {\n return undefined;\n }\n\n value += String.fromCharCode(charCode);\n }\n\n return value;\n}\n\n/**\n * Extracts hex revert data candidates from common viem and JSON-RPC error shapes.\n *\n * @param error - The error object to inspect.\n * @returns Candidate revert data values.\n */\nfunction getRevertDataCandidates(error: unknown): Hex[] {\n const candidates: Hex[] = [];\n const seen = new Set<unknown>();\n const seenCandidates = new Set<Hex>();\n\n const addHexCandidate = (candidate: string): void => {\n if (\n candidate.length < 10 ||\n candidate.length % 2 !== 0 ||\n !isHex(candidate)\n ) {\n return;\n }\n\n if (!seenCandidates.has(candidate)) {\n seenCandidates.add(candidate);\n candidates.push(candidate);\n }\n };\n\n const addLabeledHexCandidates = (value: string): void => {\n for (const match of value.matchAll(\n /\\b(?:reason|revertData|raw|data):\\s*(0x[0-9a-fA-F]+)/giu,\n )) {\n const [, candidate] = match;\n\n if (candidate) {\n addHexCandidate(candidate);\n }\n }\n };\n\n const addHexCandidates = (value: unknown): void => {\n if (typeof value !== 'string') {\n return;\n }\n\n addLabeledHexCandidates(value);\n\n for (const [candidate] of value.matchAll(/0x[0-9a-fA-F]+/gu)) {\n addHexCandidate(candidate);\n }\n };\n\n const visit = (value: unknown, depth = 0): void => {\n if (\n value === null ||\n value === undefined ||\n seen.has(value) ||\n depth > MAX_ERROR_TRAVERSAL_DEPTH\n ) {\n return;\n }\n\n addHexCandidates(value);\n\n if (Array.isArray(value)) {\n seen.add(value);\n value.forEach((item) => visit(item, depth + 1));\n return;\n }\n\n if (typeof value !== 'object') {\n return;\n }\n\n seen.add(value);\n\n const record = value as Record<string, unknown>;\n\n addHexCandidates(record.revertData);\n addHexCandidates(record.raw);\n addHexCandidates(record.data);\n addHexCandidates(record.details);\n addHexCandidates(record.reason);\n addHexCandidates(record.shortMessage);\n addHexCandidates(record.message);\n\n visit(record.data, depth + 1);\n visit(record.details, depth + 1);\n visit(record.error, depth + 1);\n visit(record.metaMessages, depth + 1);\n visit(record.originalError, depth + 1);\n visit(record.cause, depth + 1);\n };\n\n visit(error);\n\n return candidates;\n}\n","import { HybridDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { P256Owner, InitializedClient } from '../../types';\n\nexport type EncodeInitializeParameters = {\n eoaOwner: Address;\n p256Owners: P256Owner[];\n};\n\nexport type SimulateInitializeParameters = {\n client: Client;\n hybridDeleGatorAddress: Address;\n} & EncodeInitializeParameters;\n\nexport type ExecuteInitializeParameters = {\n client: InitializedClient;\n hybridDeleGatorAddress: Address;\n} & EncodeInitializeParameters;\n\nexport const simulate = async ({\n client,\n hybridDeleGatorAddress,\n eoaOwner,\n p256Owners,\n}: SimulateInitializeParameters) => {\n return simulateContract(client, {\n address: hybridDeleGatorAddress,\n abi: HybridDeleGator,\n functionName: 'initialize',\n args: [\n eoaOwner,\n p256Owners.map((p256Owner) => p256Owner.keyId),\n p256Owners.map((p256Owner) => p256Owner.x),\n p256Owners.map((p256Owner) => p256Owner.y),\n ],\n });\n};\n\nexport const execute = async ({\n client,\n hybridDeleGatorAddress,\n eoaOwner,\n p256Owners,\n}: ExecuteInitializeParameters) => {\n const { request } = await simulate({\n client,\n hybridDeleGatorAddress,\n eoaOwner,\n p256Owners,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n eoaOwner,\n p256Owners,\n}: EncodeInitializeParameters) => {\n return encodeFunctionData({\n abi: HybridDeleGator,\n functionName: 'initialize',\n args: [\n eoaOwner,\n p256Owners.map((p256Owner) => p256Owner.keyId),\n p256Owners.map((p256Owner) => p256Owner.x),\n p256Owners.map((p256Owner) => p256Owner.y),\n ],\n });\n};\n","import { encode as addKey } from './methods/addKey';\nimport { encode as initializeHybridDeleGator } from './methods/initialize';\nimport { encode as reinitializeHybridDeleGator } from './methods/reinitialize';\nimport { encode as removeKey } from './methods/removeKey';\nimport { encode as updateSigners } from './methods/updateSigners';\n\nexport {\n addKey,\n initializeHybridDeleGator,\n reinitializeHybridDeleGator,\n removeKey,\n updateSigners,\n};\n","import { HybridDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { P256Owner, InitializedClient } from '../../types';\n\nexport type EncodeAddKeyParameters = {\n p256Owner: P256Owner;\n};\n\nexport type SimulateAddKeyParameters = {\n client: Client;\n hybridDeleGatorAddress: Address;\n} & EncodeAddKeyParameters;\n\nexport type ExecuteAddKeyParameters = {\n client: InitializedClient;\n hybridDeleGatorAddress: Address;\n} & EncodeAddKeyParameters;\n\nexport const simulate = async ({\n client,\n hybridDeleGatorAddress,\n p256Owner,\n}: SimulateAddKeyParameters) => {\n return simulateContract(client, {\n address: hybridDeleGatorAddress,\n abi: HybridDeleGator,\n functionName: 'addKey',\n args: [p256Owner.keyId, p256Owner.x, p256Owner.y],\n });\n};\n\nexport const execute = async ({\n client,\n hybridDeleGatorAddress,\n p256Owner,\n}: ExecuteAddKeyParameters) => {\n const { request } = await simulate({\n client,\n hybridDeleGatorAddress,\n p256Owner,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ p256Owner }: EncodeAddKeyParameters) => {\n return encodeFunctionData({\n abi: HybridDeleGator,\n functionName: 'addKey',\n args: [p256Owner.keyId, p256Owner.x, p256Owner.y],\n });\n};\n","import { HybridDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { P256Owner, InitializedClient } from '../../types';\n\nexport type EncodeReinitializeParameters = {\n version: number;\n eoaOwner: Address;\n p256Owners: P256Owner[];\n removeExistingP256Owners: boolean;\n};\n\nexport type SimulateReinitializeParameters = {\n client: Client;\n hybridDeleGatorAddress: Address;\n} & EncodeReinitializeParameters;\n\nexport type ExecuteReinitializeParameters = {\n client: InitializedClient;\n hybridDeleGatorAddress: Address;\n} & EncodeReinitializeParameters;\n\nexport const simulate = async ({\n client,\n hybridDeleGatorAddress,\n version,\n eoaOwner,\n p256Owners,\n removeExistingP256Owners,\n}: SimulateReinitializeParameters) => {\n return simulateContract(client, {\n address: hybridDeleGatorAddress,\n abi: HybridDeleGator,\n functionName: 'reinitialize',\n args: [\n version,\n eoaOwner,\n p256Owners.map((p256Owner) => p256Owner.keyId),\n p256Owners.map((p256Owner) => p256Owner.x),\n p256Owners.map((p256Owner) => p256Owner.y),\n removeExistingP256Owners,\n ],\n });\n};\n\nexport const execute = async ({\n client,\n hybridDeleGatorAddress,\n version,\n eoaOwner,\n p256Owners,\n removeExistingP256Owners,\n}: ExecuteReinitializeParameters) => {\n const { request } = await simulate({\n client,\n hybridDeleGatorAddress,\n version,\n eoaOwner,\n p256Owners,\n removeExistingP256Owners,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n version,\n eoaOwner,\n p256Owners,\n removeExistingP256Owners,\n}: EncodeReinitializeParameters) => {\n return encodeFunctionData({\n abi: HybridDeleGator,\n functionName: 'reinitialize',\n args: [\n version,\n eoaOwner,\n p256Owners.map((p256Owner) => p256Owner.keyId),\n p256Owners.map((p256Owner) => p256Owner.x),\n p256Owners.map((p256Owner) => p256Owner.y),\n removeExistingP256Owners,\n ],\n });\n};\n","import { HybridDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeRemoveKeyParameters = {\n keyId: string;\n};\n\nexport type SimulateRemoveKeyParameters = {\n client: Client;\n hybridDeleGatorAddress: Address;\n} & EncodeRemoveKeyParameters;\n\nexport type ExecuteRemoveKeyParameters = {\n client: InitializedClient;\n hybridDeleGatorAddress: Address;\n} & EncodeRemoveKeyParameters;\n\nexport const simulate = async ({\n client,\n hybridDeleGatorAddress,\n keyId,\n}: SimulateRemoveKeyParameters) => {\n return simulateContract(client, {\n address: hybridDeleGatorAddress,\n abi: HybridDeleGator,\n functionName: 'removeKey',\n args: [keyId],\n });\n};\n\nexport const execute = async ({\n client,\n hybridDeleGatorAddress,\n keyId,\n}: ExecuteRemoveKeyParameters) => {\n const { request } = await simulate({\n client,\n hybridDeleGatorAddress,\n keyId,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ keyId }: EncodeRemoveKeyParameters) => {\n return encodeFunctionData({\n abi: HybridDeleGator,\n functionName: 'removeKey',\n args: [keyId],\n });\n};\n","import { HybridDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { P256Owner, InitializedClient } from '../../types';\n\nexport type EncodeUpdateSignersParameters = {\n eoaOwner: Address;\n p256Owners: P256Owner[];\n};\n\nexport type SimulateUpdateSignersParameters = {\n client: Client;\n hybridDeleGatorAddress: Address;\n} & EncodeUpdateSignersParameters;\n\nexport type ExecuteUpdateSignersParameters = {\n client: InitializedClient;\n hybridDeleGatorAddress: Address;\n} & EncodeUpdateSignersParameters;\n\nexport const simulate = async ({\n client,\n hybridDeleGatorAddress,\n eoaOwner,\n p256Owners,\n}: SimulateUpdateSignersParameters) => {\n return simulateContract(client, {\n address: hybridDeleGatorAddress,\n abi: HybridDeleGator,\n functionName: 'updateSigners',\n args: [\n eoaOwner,\n p256Owners.map((p256Owner) => p256Owner.keyId),\n p256Owners.map((p256Owner) => p256Owner.x),\n p256Owners.map((p256Owner) => p256Owner.y),\n ],\n });\n};\n\nexport const execute = async ({\n client,\n hybridDeleGatorAddress,\n eoaOwner,\n p256Owners,\n}: ExecuteUpdateSignersParameters) => {\n const { request } = await simulate({\n client,\n hybridDeleGatorAddress,\n eoaOwner,\n p256Owners,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n eoaOwner,\n p256Owners,\n}: EncodeUpdateSignersParameters) => {\n return encodeFunctionData({\n abi: HybridDeleGator,\n functionName: 'updateSigners',\n args: [\n eoaOwner,\n p256Owners.map((p256Owner) => p256Owner.keyId),\n p256Owners.map((p256Owner) => p256Owner.x),\n p256Owners.map((p256Owner) => p256Owner.y),\n ],\n });\n};\n","import { MultiSigDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeInitializeParameters = {\n owners: Address[];\n threshold: bigint;\n};\n\nexport type SimulateInitializeParameters = {\n client: Client;\n multiSigDeleGatorAddress: Address;\n} & EncodeInitializeParameters;\n\nexport type ExecuteInitializeParameters = {\n client: InitializedClient;\n multiSigDeleGatorAddress: Address;\n} & EncodeInitializeParameters;\n\nexport const simulate = async ({\n client,\n multiSigDeleGatorAddress,\n owners,\n threshold,\n}: SimulateInitializeParameters) => {\n return simulateContract(client, {\n address: multiSigDeleGatorAddress,\n abi: MultiSigDeleGator,\n functionName: 'initialize',\n args: [owners, threshold],\n });\n};\n\nexport const execute = async ({\n client,\n multiSigDeleGatorAddress,\n owners,\n threshold,\n}: ExecuteInitializeParameters) => {\n const { request } = await simulate({\n client,\n multiSigDeleGatorAddress,\n owners,\n threshold,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ owners, threshold }: EncodeInitializeParameters) => {\n return encodeFunctionData({\n abi: MultiSigDeleGator,\n functionName: 'initialize',\n args: [owners, threshold],\n });\n};\n","import { encode as addSigner } from './methods/addSigner';\nimport { encode as initializeMultiSigDeleGator } from './methods/initialize';\nimport { encode as reinitializeMultiSigDeleGator } from './methods/reinitialize';\nimport { encode as removeSigner } from './methods/removeSigner';\nimport { encode as replaceSigner } from './methods/replaceSigner';\nimport { encode as updateMultiSigParameters } from './methods/updateMultiSigParameters';\nimport { encode as updateThreshold } from './methods/updateThreshold';\n\nexport {\n addSigner,\n initializeMultiSigDeleGator,\n reinitializeMultiSigDeleGator,\n removeSigner,\n replaceSigner,\n updateThreshold,\n updateMultiSigParameters,\n};\n","import { MultiSigDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeAddSignerParameters = {\n signer: Address;\n};\n\nexport type SimulateAddSignerParameters = {\n client: Client;\n multiSigDeleGatorAddress: Address;\n} & EncodeAddSignerParameters;\n\nexport type ExecuteAddSignerParameters = {\n client: InitializedClient;\n multiSigDeleGatorAddress: Address;\n} & EncodeAddSignerParameters;\n\nexport const simulate = async ({\n client,\n multiSigDeleGatorAddress,\n signer,\n}: SimulateAddSignerParameters) => {\n return simulateContract(client, {\n address: multiSigDeleGatorAddress,\n abi: MultiSigDeleGator,\n functionName: 'addSigner',\n args: [signer],\n });\n};\n\nexport const execute = async ({\n client,\n multiSigDeleGatorAddress,\n signer,\n}: ExecuteAddSignerParameters) => {\n const { request } = await simulate({\n client,\n multiSigDeleGatorAddress,\n signer,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ signer }: EncodeAddSignerParameters) => {\n return encodeFunctionData({\n abi: MultiSigDeleGator,\n functionName: 'addSigner',\n args: [signer],\n });\n};\n","import { MultiSigDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeReinitializeParameters = {\n version: bigint;\n owners: Address[];\n threshold: bigint;\n removeExistingOwners: boolean;\n};\n\nexport type SimulateReinitializeParameters = {\n client: Client;\n multiSigDeleGatorAddress: Address;\n} & EncodeReinitializeParameters;\n\nexport type ExecuteReinitializeParameters = {\n client: InitializedClient;\n multiSigDeleGatorAddress: Address;\n} & EncodeReinitializeParameters;\n\nexport const simulate = async ({\n client,\n multiSigDeleGatorAddress,\n version,\n owners,\n threshold,\n removeExistingOwners,\n}: SimulateReinitializeParameters) => {\n return simulateContract(client, {\n address: multiSigDeleGatorAddress,\n abi: MultiSigDeleGator,\n functionName: 'reinitialize',\n args: [version, owners, threshold, removeExistingOwners],\n });\n};\n\nexport const execute = async ({\n client,\n multiSigDeleGatorAddress,\n version,\n owners,\n threshold,\n removeExistingOwners,\n}: ExecuteReinitializeParameters) => {\n const { request } = await simulate({\n client,\n multiSigDeleGatorAddress,\n version,\n owners,\n threshold,\n removeExistingOwners,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n version,\n owners,\n threshold,\n removeExistingOwners,\n}: EncodeReinitializeParameters) => {\n return encodeFunctionData({\n abi: MultiSigDeleGator,\n functionName: 'reinitialize',\n args: [version, owners, threshold, removeExistingOwners],\n });\n};\n","import { MultiSigDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeRemoveSignerParameters = {\n signer: Address;\n};\n\nexport type SimulateRemoveSignerParameters = {\n client: Client;\n multiSigDeleGatorAddress: Address;\n} & EncodeRemoveSignerParameters;\n\nexport type ExecuteRemoveSignerParameters = {\n client: InitializedClient;\n multiSigDeleGatorAddress: Address;\n} & EncodeRemoveSignerParameters;\n\nexport const simulate = async ({\n client,\n multiSigDeleGatorAddress,\n signer,\n}: SimulateRemoveSignerParameters) => {\n return simulateContract(client, {\n address: multiSigDeleGatorAddress,\n abi: MultiSigDeleGator,\n functionName: 'removeSigner',\n args: [signer],\n });\n};\n\nexport const execute = async ({\n client,\n multiSigDeleGatorAddress,\n signer,\n}: ExecuteRemoveSignerParameters) => {\n const { request } = await simulate({\n client,\n multiSigDeleGatorAddress,\n signer,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ signer }: EncodeRemoveSignerParameters) => {\n return encodeFunctionData({\n abi: MultiSigDeleGator,\n functionName: 'removeSigner',\n args: [signer],\n });\n};\n","import { MultiSigDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeReplaceSignerParameters = {\n oldSigner: Address;\n newSigner: Address;\n};\n\nexport type SimulateReplaceSignerParameters = {\n client: Client;\n multiSigDeleGatorAddress: Address;\n} & EncodeReplaceSignerParameters;\n\nexport type ExecuteReplaceSignerParameters = {\n client: InitializedClient;\n multiSigDeleGatorAddress: Address;\n} & EncodeReplaceSignerParameters;\n\nexport const simulate = async ({\n client,\n multiSigDeleGatorAddress,\n oldSigner,\n newSigner,\n}: SimulateReplaceSignerParameters) => {\n return simulateContract(client, {\n address: multiSigDeleGatorAddress,\n abi: MultiSigDeleGator,\n functionName: 'replaceSigner',\n args: [oldSigner, newSigner],\n });\n};\n\nexport const execute = async ({\n client,\n multiSigDeleGatorAddress,\n oldSigner,\n newSigner,\n}: ExecuteReplaceSignerParameters) => {\n const { request } = await simulate({\n client,\n multiSigDeleGatorAddress,\n oldSigner,\n newSigner,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n oldSigner,\n newSigner,\n}: EncodeReplaceSignerParameters) => {\n return encodeFunctionData({\n abi: MultiSigDeleGator,\n functionName: 'replaceSigner',\n args: [oldSigner, newSigner],\n });\n};\n","import { MultiSigDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeUpdateMultiSigParametersParameters = {\n owners: Address[];\n threshold: bigint;\n removeExistingOwners: boolean;\n};\n\nexport type SimulateUpdateMultiSigParametersParameters = {\n client: Client;\n multiSigDeleGatorAddress: Address;\n} & EncodeUpdateMultiSigParametersParameters;\n\nexport type ExecuteUpdateMultiSigParametersParameters = {\n client: InitializedClient;\n multiSigDeleGatorAddress: Address;\n} & EncodeUpdateMultiSigParametersParameters;\n\nexport const simulate = async ({\n client,\n multiSigDeleGatorAddress,\n owners,\n threshold,\n removeExistingOwners,\n}: SimulateUpdateMultiSigParametersParameters) => {\n return simulateContract(client, {\n address: multiSigDeleGatorAddress,\n abi: MultiSigDeleGator,\n functionName: 'updateMultiSigParameters',\n args: [owners, threshold, removeExistingOwners],\n });\n};\n\nexport const execute = async ({\n client,\n multiSigDeleGatorAddress,\n owners,\n threshold,\n removeExistingOwners,\n}: ExecuteUpdateMultiSigParametersParameters) => {\n const { request } = await simulate({\n client,\n multiSigDeleGatorAddress,\n owners,\n threshold,\n removeExistingOwners,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n owners,\n threshold,\n removeExistingOwners,\n}: EncodeUpdateMultiSigParametersParameters) => {\n return encodeFunctionData({\n abi: MultiSigDeleGator,\n functionName: 'updateMultiSigParameters',\n args: [owners, threshold, removeExistingOwners],\n });\n};\n","import { MultiSigDeleGator } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type EncodeUpdateThresholdParameters = {\n threshold: bigint;\n};\n\nexport type SimulateUpdateThresholdParameters = {\n client: Client;\n multiSigDeleGatorAddress: Address;\n} & EncodeUpdateThresholdParameters;\n\nexport type ExecuteUpdateThresholdParameters = {\n client: InitializedClient;\n multiSigDeleGatorAddress: Address;\n} & EncodeUpdateThresholdParameters;\n\nexport const simulate = async ({\n client,\n multiSigDeleGatorAddress,\n threshold,\n}: SimulateUpdateThresholdParameters) => {\n return simulateContract(client, {\n address: multiSigDeleGatorAddress,\n abi: MultiSigDeleGator,\n functionName: 'updateThreshold',\n args: [threshold],\n });\n};\n\nexport const execute = async ({\n client,\n multiSigDeleGatorAddress,\n threshold,\n}: ExecuteUpdateThresholdParameters) => {\n const { request } = await simulate({\n client,\n multiSigDeleGatorAddress,\n threshold,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ threshold }: EncodeUpdateThresholdParameters) => {\n return encodeFunctionData({\n abi: MultiSigDeleGator,\n functionName: 'updateThreshold',\n args: [threshold],\n });\n};\n","import { SimpleFactory } from '@metamask/delegation-abis';\nimport type { Address, Hex, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type SimulateCreate2DeployParameters = {\n client: Client;\n factoryAddress: Address;\n creationCode: Hex;\n salt: Hex;\n};\n\nexport type ExecuteCreate2DeployParameters = {\n client: InitializedClient;\n factoryAddress: Address;\n creationCode: Hex;\n salt: Hex;\n};\n\nexport const simulate = async ({\n client,\n factoryAddress,\n creationCode,\n salt,\n}: SimulateCreate2DeployParameters) => {\n return simulateContract(client, {\n address: factoryAddress,\n abi: SimpleFactory,\n functionName: 'deploy',\n args: [creationCode, salt],\n });\n};\n\nexport const encode = (creationCode: Hex, salt: Hex) => {\n return encodeFunctionData({\n abi: SimpleFactory,\n functionName: 'deploy',\n args: [creationCode, salt],\n });\n};\n\nexport const execute = async ({\n client,\n factoryAddress,\n creationCode,\n salt,\n}: ExecuteCreate2DeployParameters) => {\n const { request } = await simulate({\n client,\n factoryAddress,\n creationCode,\n salt,\n });\n return writeContract(client, request);\n};\n","import { encode as create2Deploy } from './methods/create2Deploy';\n\nexport { create2Deploy };\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { ExecutionStruct } from '../../../executions';\nimport type { InitializedClient } from '../../types';\n\nexport type SimulateExecuteParameters = {\n client: Client;\n contractAddress: Address;\n execution: ExecutionStruct;\n};\n\nexport type EncodeExecuteParameters = {\n execution: ExecutionStruct;\n};\n\nexport type ExecuteExecuteParameters = {\n client: InitializedClient;\n contractAddress: Address;\n execution: ExecutionStruct;\n};\n\nexport const simulate = async ({\n client,\n contractAddress,\n execution,\n}: SimulateExecuteParameters) => {\n return simulateContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'execute',\n args: [execution],\n });\n};\n\nexport const execute = async ({\n client,\n contractAddress,\n execution,\n}: ExecuteExecuteParameters) => {\n const { request } = await simulate({\n client,\n contractAddress,\n execution,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ execution }: EncodeExecuteParameters) => {\n return encodeFunctionData({\n abi: DeleGatorCore,\n functionName: 'execute',\n args: [execution],\n });\n};\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport { encodeFunctionData } from 'viem';\nimport type { Address, Client } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport { encodeExecutionCalldata } from '../../../executions';\nimport type { ExecutionStruct, ExecutionMode } from '../../../executions';\nimport type { InitializedClient } from '../../types';\n\nexport type SimulateExecuteWithModeParameters = {\n client: Client;\n contractAddress: Address;\n} & EncodeExecuteWithModeParameters;\nexport type EncodeExecuteWithModeParameters = {\n mode: ExecutionMode;\n executions: ExecutionStruct[];\n};\n\nexport type ExecuteExecuteWithModeParameters = {\n client: InitializedClient;\n contractAddress: Address;\n} & EncodeExecuteWithModeParameters;\n\nexport const simulate = async ({\n client,\n contractAddress,\n mode,\n executions,\n}: SimulateExecuteWithModeParameters) => {\n return simulateContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'execute',\n args: [mode, encodeExecutionCalldata(executions)],\n });\n};\n\nexport const execute = async ({\n client,\n contractAddress,\n mode,\n executions,\n}: ExecuteExecuteWithModeParameters) => {\n const { request } = await simulate({\n client,\n contractAddress,\n mode,\n executions,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n mode,\n executions,\n}: EncodeExecuteWithModeParameters) => {\n return encodeFunctionData({\n abi: DeleGatorCore,\n functionName: 'execute',\n args: [mode, encodeExecutionCalldata(executions)],\n });\n};\n","import { encode as disableDelegation } from './methods/disableDelegation';\nimport { encode as enableDelegation } from './methods/enableDelegation';\nimport { encode as execute } from './methods/execute';\nimport { encode as executeWithMode } from './methods/executeWithMode';\nimport { encode as isValidSignature } from './methods/isValidSignature';\nimport { encode as upgradeToAndCall } from './methods/upgradeToAndCall';\n\nexport {\n disableDelegation,\n enableDelegation,\n execute,\n executeWithMode,\n upgradeToAndCall,\n isValidSignature,\n};\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport { encodeFunctionData } from 'viem';\nimport type { Address, Client } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport { toDelegationStruct } from '../../../delegation';\nimport type { Delegation } from '../../../types';\nimport type { InitializedClient } from '../../types';\n\nexport type SimulateDisableDelegationParameters = {\n client: Client;\n delegationManagerAddress: Address;\n delegation: Delegation;\n};\n\nexport type EncodeDisableDelegationParameters = {\n delegation: Delegation;\n};\n\nexport type ExecuteDisableDelegationParameters = {\n client: InitializedClient;\n delegationManagerAddress: Address;\n delegation: Delegation;\n};\n\nexport const simulate = async ({\n client,\n delegationManagerAddress,\n delegation,\n}: SimulateDisableDelegationParameters) => {\n const delegationStruct = toDelegationStruct(delegation);\n\n return simulateContract(client, {\n address: delegationManagerAddress,\n abi: DeleGatorCore,\n functionName: 'disableDelegation',\n args: [delegationStruct],\n });\n};\n\nexport const execute = async ({\n client,\n delegationManagerAddress,\n delegation,\n}: ExecuteDisableDelegationParameters) => {\n const { request } = await simulate({\n client,\n delegationManagerAddress,\n delegation,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ delegation }: EncodeDisableDelegationParameters) => {\n const delegationStruct = toDelegationStruct(delegation);\n\n return encodeFunctionData({\n abi: DeleGatorCore,\n functionName: 'disableDelegation',\n args: [delegationStruct],\n });\n};\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport { encodeFunctionData } from 'viem';\nimport type { Address, Client } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport { toDelegationStruct } from '../../../delegation';\nimport type { Delegation } from '../../../types';\nimport type { InitializedClient } from '../../types';\n\nexport type SimulateEnableDelegationParameters = {\n client: Client;\n delegationManagerAddress: Address;\n delegation: Delegation;\n};\n\nexport type EncodeEnableDelegationParameters = {\n delegation: Delegation;\n};\n\nexport type ExecuteEnableDelegationParameters = {\n client: InitializedClient;\n delegationManagerAddress: Address;\n delegation: Delegation;\n};\n\nexport const simulate = async ({\n client,\n delegationManagerAddress,\n delegation,\n}: SimulateEnableDelegationParameters) => {\n const delegationStruct = toDelegationStruct(delegation);\n\n return simulateContract(client, {\n address: delegationManagerAddress,\n abi: DeleGatorCore,\n functionName: 'enableDelegation',\n args: [delegationStruct],\n });\n};\n\nexport const execute = async ({\n client,\n delegationManagerAddress,\n delegation,\n}: ExecuteEnableDelegationParameters) => {\n const { request } = await simulate({\n client,\n delegationManagerAddress,\n delegation,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({ delegation }: EncodeEnableDelegationParameters) => {\n const delegationStruct = toDelegationStruct(delegation);\n\n return encodeFunctionData({\n abi: DeleGatorCore,\n functionName: 'enableDelegation',\n args: [delegationStruct],\n });\n};\n","import { DeleGatorCore } from '@metamask/delegation-abis';\nimport type { Address, Hex, Client } from 'viem';\nimport { encodeFunctionData } from 'viem';\nimport { simulateContract, writeContract } from 'viem/actions';\n\nimport type { InitializedClient } from '../../types';\n\nexport type SimulateUpgradeToAndCallParameters = {\n client: Client;\n contractAddress: Address;\n} & EncodeUpgradeToAndCallParameters;\n\nexport type EncodeUpgradeToAndCallParameters = {\n implementation: Address;\n data: Hex;\n};\n\nexport type ExecuteUpgradeToAndCallParameters = {\n client: InitializedClient;\n contractAddress: Address;\n} & EncodeUpgradeToAndCallParameters;\n\nexport const simulate = async ({\n client,\n contractAddress,\n implementation,\n data,\n}: SimulateUpgradeToAndCallParameters) => {\n return simulateContract(client, {\n address: contractAddress,\n abi: DeleGatorCore,\n functionName: 'upgradeToAndCall',\n args: [implementation, data],\n });\n};\n\nexport const execute = async ({\n client,\n contractAddress,\n implementation,\n data,\n}: ExecuteUpgradeToAndCallParameters) => {\n const { request } = await simulate({\n client,\n contractAddress,\n implementation,\n data,\n });\n\n return writeContract(client, request);\n};\n\nexport const encode = ({\n implementation,\n data,\n}: EncodeUpgradeToAndCallParameters) => {\n return encodeFunctionData({\n abi: DeleGatorCore,\n functionName: 'upgradeToAndCall',\n args: [implementation, data],\n });\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TNGQTVSY.mjs";
|
|
4
4
|
|
|
5
5
|
// src/DelegationFramework/ERC20PeriodTransferEnforcer/index.ts
|
|
6
6
|
var ERC20PeriodTransferEnforcer_exports = {};
|
|
@@ -296,4 +296,4 @@ export {
|
|
|
296
296
|
read_exports5,
|
|
297
297
|
NativeTokenStreamingEnforcer_exports
|
|
298
298
|
};
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
299
|
+
//# sourceMappingURL=chunk-K7GTZGKJ.mjs.map
|