tenjin-cli 0.1.0-alpha.0 → 0.1.0-alpha.1
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/README.md +39 -7
- package/dist/{ccip-FXWZDDF5.js → ccip-UCLT5VOW.js} +4 -4
- package/dist/{chunk-F5DZJLU3.js → chunk-BRJHUQSY.js} +770 -59
- package/dist/chunk-BRJHUQSY.js.map +1 -0
- package/dist/{chunk-CPUZRZ2A.js → chunk-CUWUHTIL.js} +42 -1
- package/dist/{chunk-CPUZRZ2A.js.map → chunk-CUWUHTIL.js.map} +1 -1
- package/dist/{chunk-376LHMK2.js → chunk-DXPYFVKG.js} +32 -6
- package/dist/chunk-DXPYFVKG.js.map +1 -0
- package/dist/chunk-EXBMF5X7.js +1198 -0
- package/dist/chunk-EXBMF5X7.js.map +1 -0
- package/dist/{chunk-LTTRND4A.js → chunk-EZROUI5U.js} +2 -2
- package/dist/{chunk-PAAL45FJ.js → chunk-IPOWB3G3.js} +123 -133
- package/dist/chunk-IPOWB3G3.js.map +1 -0
- package/dist/{chunk-WOHCAMDQ.js → chunk-LPRVHM7P.js} +14 -697
- package/dist/chunk-LPRVHM7P.js.map +1 -0
- package/dist/{chunk-TX5T3LKJ.js → chunk-Q53IYV2G.js} +3 -2
- package/dist/{chunk-SXQQ2ZSR.js → chunk-T4LKNY7T.js} +24 -11
- package/dist/chunk-T4LKNY7T.js.map +1 -0
- package/dist/chunk-YBMMV4Y4.js +51 -0
- package/dist/chunk-YBMMV4Y4.js.map +1 -0
- package/dist/{chunk-FIYZLITH.js → chunk-YG2DO46P.js} +6 -2
- package/dist/{chunk-FIYZLITH.js.map → chunk-YG2DO46P.js.map} +1 -1
- package/dist/{cli-LMHGCZ5S.js → cli-WA65NP4Y.js} +13 -17
- package/dist/{cli-LMHGCZ5S.js.map → cli-WA65NP4Y.js.map} +1 -1
- package/dist/{config-XVXZ3V2Q.js → config-CEFTL5ZL.js} +9 -51
- package/dist/config-CEFTL5ZL.js.map +1 -0
- package/dist/{doctor-MVLZRVPU.js → doctor-3QBYN46N.js} +7 -7
- package/dist/index.js +1 -1
- package/dist/{secp256k1-35YNNB6F.js → secp256k1-BEZS642W.js} +3 -3
- package/dist/{usdc-OQUOFF6R.js → usdc-44R6XZF2.js} +7 -7
- package/dist/{wallet-QUWK2PA4.js → wallet-ELBTBMXO.js} +8 -10
- package/dist/wallet-XD576HF3.js +173 -0
- package/dist/wallet-XD576HF3.js.map +1 -0
- package/package.json +3 -1
- package/dist/chunk-376LHMK2.js.map +0 -1
- package/dist/chunk-F5DZJLU3.js.map +0 -1
- package/dist/chunk-PAAL45FJ.js.map +0 -1
- package/dist/chunk-QHIEYBLV.js +0 -320
- package/dist/chunk-QHIEYBLV.js.map +0 -1
- package/dist/chunk-SXQQ2ZSR.js.map +0 -1
- package/dist/chunk-WOHCAMDQ.js.map +0 -1
- package/dist/config-XVXZ3V2Q.js.map +0 -1
- package/dist/wallet-NRKWLKHX.js +0 -153
- package/dist/wallet-NRKWLKHX.js.map +0 -1
- /package/dist/{ccip-FXWZDDF5.js.map → ccip-UCLT5VOW.js.map} +0 -0
- /package/dist/{chunk-LTTRND4A.js.map → chunk-EZROUI5U.js.map} +0 -0
- /package/dist/{chunk-TX5T3LKJ.js.map → chunk-Q53IYV2G.js.map} +0 -0
- /package/dist/{doctor-MVLZRVPU.js.map → doctor-3QBYN46N.js.map} +0 -0
- /package/dist/{secp256k1-35YNNB6F.js.map → secp256k1-BEZS642W.js.map} +0 -0
- /package/dist/{usdc-OQUOFF6R.js.map → usdc-44R6XZF2.js.map} +0 -0
- /package/dist/{wallet-QUWK2PA4.js.map → wallet-ELBTBMXO.js.map} +0 -0
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
hashAuthorization,
|
|
8
8
|
hashMessage,
|
|
9
9
|
hashTypedData,
|
|
10
|
+
keccak256 as keccak2562,
|
|
10
11
|
publicKeyToAddress,
|
|
11
12
|
serializeSignature,
|
|
12
13
|
serializeTransaction,
|
|
13
14
|
toBlobSidecars,
|
|
14
15
|
toRlp
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-T4LKNY7T.js";
|
|
16
17
|
import {
|
|
17
18
|
secp256k1
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Q53IYV2G.js";
|
|
19
20
|
import {
|
|
20
21
|
AtomicReadyWalletRejectedUpgradeError,
|
|
21
22
|
AtomicityNotSupportedError,
|
|
22
|
-
BaseError as BaseError2,
|
|
23
23
|
BundleTooLargeError,
|
|
24
24
|
CallExecutionError,
|
|
25
25
|
ChainDisconnectedError,
|
|
@@ -28,7 +28,6 @@ import {
|
|
|
28
28
|
ContractFunctionZeroDataError,
|
|
29
29
|
DuplicateIdError,
|
|
30
30
|
HttpRequestError,
|
|
31
|
-
IntegerOutOfRangeError,
|
|
32
31
|
InternalRpcError,
|
|
33
32
|
InvalidInputRpcError,
|
|
34
33
|
InvalidParamsRpcError,
|
|
@@ -58,7 +57,6 @@ import {
|
|
|
58
57
|
addressResolverAbi,
|
|
59
58
|
assertRequest,
|
|
60
59
|
call,
|
|
61
|
-
concat as concat2,
|
|
62
60
|
createBatchScheduler,
|
|
63
61
|
decodeAbiParameters,
|
|
64
62
|
decodeFunctionResult,
|
|
@@ -75,14 +73,6 @@ import {
|
|
|
75
73
|
formatAbiParameters,
|
|
76
74
|
formatBlockParameter,
|
|
77
75
|
formatTransactionRequest,
|
|
78
|
-
from,
|
|
79
|
-
from2,
|
|
80
|
-
fromBoolean,
|
|
81
|
-
fromBytes,
|
|
82
|
-
fromHex,
|
|
83
|
-
fromNumber,
|
|
84
|
-
fromString,
|
|
85
|
-
fromString2,
|
|
86
76
|
getAbiItem,
|
|
87
77
|
getAbortError,
|
|
88
78
|
getCallError,
|
|
@@ -93,32 +83,16 @@ import {
|
|
|
93
83
|
localBatchGatewayUrl,
|
|
94
84
|
multicall3Abi,
|
|
95
85
|
multicall3Bytecode,
|
|
96
|
-
padLeft,
|
|
97
|
-
padRight,
|
|
98
86
|
parseAbiItem,
|
|
99
87
|
parseAbiParameters,
|
|
100
88
|
serializeStateOverride,
|
|
101
|
-
size as size2,
|
|
102
|
-
size2 as size3,
|
|
103
|
-
slice as slice2,
|
|
104
|
-
slice2 as slice3,
|
|
105
|
-
stringify as stringify2,
|
|
106
89
|
textResolverAbi,
|
|
107
|
-
toBigInt,
|
|
108
|
-
toBoolean,
|
|
109
90
|
toEventSelector,
|
|
110
|
-
toNumber,
|
|
111
|
-
toNumber2,
|
|
112
91
|
toRpc,
|
|
113
|
-
toString,
|
|
114
|
-
trimLeft,
|
|
115
|
-
trimLeft2,
|
|
116
92
|
universalResolverResolveAbi,
|
|
117
93
|
universalResolverReverseAbi,
|
|
118
|
-
validate,
|
|
119
|
-
validate2,
|
|
120
94
|
withResolvers
|
|
121
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-LPRVHM7P.js";
|
|
122
96
|
import {
|
|
123
97
|
AbiDecodingDataSizeTooSmallError,
|
|
124
98
|
AbiDecodingZeroDataError,
|
|
@@ -126,8 +100,10 @@ import {
|
|
|
126
100
|
AbiEventSignatureEmptyTopicsError,
|
|
127
101
|
AbiEventSignatureNotFoundError,
|
|
128
102
|
BaseError,
|
|
103
|
+
BaseError2,
|
|
129
104
|
DecodeLogDataMismatch,
|
|
130
105
|
DecodeLogTopicsMismatch,
|
|
106
|
+
IntegerOutOfRangeError,
|
|
131
107
|
InvalidAddressError,
|
|
132
108
|
LruMap,
|
|
133
109
|
PositionOutOfBoundsError,
|
|
@@ -139,12 +115,20 @@ import {
|
|
|
139
115
|
WaitForTransactionReceiptTimeoutError,
|
|
140
116
|
bytesToHex,
|
|
141
117
|
concat,
|
|
118
|
+
concat2,
|
|
142
119
|
concatHex,
|
|
143
120
|
encodeAbiParameters,
|
|
144
121
|
formatAbiItem,
|
|
145
122
|
formatEther,
|
|
146
123
|
formatGwei,
|
|
147
124
|
formatUnits,
|
|
125
|
+
from,
|
|
126
|
+
fromBoolean,
|
|
127
|
+
fromBytes,
|
|
128
|
+
fromHex,
|
|
129
|
+
fromNumber,
|
|
130
|
+
fromString,
|
|
131
|
+
fromString2,
|
|
148
132
|
getAddress,
|
|
149
133
|
hexToBigInt,
|
|
150
134
|
hexToBool,
|
|
@@ -152,18 +136,33 @@ import {
|
|
|
152
136
|
isAddress,
|
|
153
137
|
isHex,
|
|
154
138
|
keccak256,
|
|
155
|
-
keccak_256,
|
|
156
139
|
numberToHex,
|
|
140
|
+
padLeft,
|
|
141
|
+
padRight,
|
|
157
142
|
parseAccount,
|
|
158
143
|
prettyPrint,
|
|
159
144
|
size,
|
|
145
|
+
size2,
|
|
146
|
+
size3,
|
|
160
147
|
slice,
|
|
148
|
+
slice2,
|
|
149
|
+
slice3,
|
|
161
150
|
stringToBytes,
|
|
162
151
|
stringify,
|
|
152
|
+
stringify2,
|
|
153
|
+
toBigInt,
|
|
154
|
+
toBoolean,
|
|
163
155
|
toBytes,
|
|
164
156
|
toHex,
|
|
165
|
-
|
|
166
|
-
|
|
157
|
+
toNumber,
|
|
158
|
+
toNumber2,
|
|
159
|
+
toString,
|
|
160
|
+
trim,
|
|
161
|
+
trimLeft,
|
|
162
|
+
trimLeft2,
|
|
163
|
+
validate,
|
|
164
|
+
validate2
|
|
165
|
+
} from "./chunk-BRJHUQSY.js";
|
|
167
166
|
import {
|
|
168
167
|
__export
|
|
169
168
|
} from "./chunk-3IMLRUZE.js";
|
|
@@ -303,7 +302,7 @@ function getContractError(err, { abi: abi2, address, args, docsPath: docsPath3,
|
|
|
303
302
|
// node_modules/.pnpm/viem@2.55.2_typescript@6.0.3_zod@4.4.3/node_modules/viem/_esm/utils/signature/recoverPublicKey.js
|
|
304
303
|
async function recoverPublicKey({ hash: hash2, signature }) {
|
|
305
304
|
const hashHex = isHex(hash2) ? hash2 : toHex(hash2);
|
|
306
|
-
const { secp256k1: secp256k12 } = await import("./secp256k1-
|
|
305
|
+
const { secp256k1: secp256k12 } = await import("./secp256k1-BEZS642W.js");
|
|
307
306
|
const signature_ = (() => {
|
|
308
307
|
if (typeof signature === "object" && "r" in signature && "s" in signature) {
|
|
309
308
|
const { r, s, v, yParity } = signature;
|
|
@@ -869,14 +868,14 @@ async function prepareTransactionRequest(client, args) {
|
|
|
869
868
|
return false;
|
|
870
869
|
})();
|
|
871
870
|
const fillResult = attemptFill ? await getAction(client, fillTransaction, "fillTransaction")({ ...request, nonce }).then((result) => {
|
|
872
|
-
const { chainId: chainId2, from:
|
|
871
|
+
const { chainId: chainId2, from: from13, gas: gas2, gasPrice, nonce: nonce2, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, type: type2, ...rest } = result.transaction;
|
|
873
872
|
const feeToken = "feeToken" in rest ? rest.feeToken : void 0;
|
|
874
873
|
const hasFilledFeePayerSignature = "feePayerSignature" in rest && rest.feePayerSignature !== null && typeof rest.feePayerSignature !== "undefined";
|
|
875
874
|
const shouldUseFilledFeeToken = typeof feeToken !== "undefined" && feeToken !== null && (!("feeToken" in request) || hasFilledFeePayerSignature);
|
|
876
875
|
supportsFillTransaction.set(client.uid, true);
|
|
877
876
|
return {
|
|
878
877
|
...request,
|
|
879
|
-
...
|
|
878
|
+
...from13 ? { from: from13 } : {},
|
|
880
879
|
...type2 && !request.type ? { type: type2 } : {},
|
|
881
880
|
...typeof chainId2 !== "undefined" ? { chainId: chainId2 } : {},
|
|
882
881
|
...typeof gas2 !== "undefined" ? { gas: gas2 } : {},
|
|
@@ -3295,7 +3294,7 @@ var SignatureErc8010_exports = {};
|
|
|
3295
3294
|
__export(SignatureErc8010_exports, {
|
|
3296
3295
|
InvalidWrappedSignatureError: () => InvalidWrappedSignatureError,
|
|
3297
3296
|
assert: () => assert4,
|
|
3298
|
-
from: () =>
|
|
3297
|
+
from: () => from8,
|
|
3299
3298
|
magicBytes: () => magicBytes,
|
|
3300
3299
|
suffixParameters: () => suffixParameters,
|
|
3301
3300
|
unwrap: () => unwrap,
|
|
@@ -3340,15 +3339,6 @@ var caches = {
|
|
|
3340
3339
|
};
|
|
3341
3340
|
var checksum = caches.checksum;
|
|
3342
3341
|
|
|
3343
|
-
// node_modules/.pnpm/ox@0.14.30_typescript@6.0.3_zod@4.4.3/node_modules/ox/_esm/core/Hash.js
|
|
3344
|
-
function keccak2562(value, options = {}) {
|
|
3345
|
-
const { as = typeof value === "string" ? "Hex" : "Bytes" } = options;
|
|
3346
|
-
const bytes = keccak_256(from(value));
|
|
3347
|
-
if (as === "Bytes")
|
|
3348
|
-
return bytes;
|
|
3349
|
-
return fromBytes(bytes);
|
|
3350
|
-
}
|
|
3351
|
-
|
|
3352
3342
|
// node_modules/.pnpm/ox@0.14.30_typescript@6.0.3_zod@4.4.3/node_modules/ox/_esm/core/PublicKey.js
|
|
3353
3343
|
function assert(publicKey, options = {}) {
|
|
3354
3344
|
const { compressed } = options;
|
|
@@ -3371,11 +3361,11 @@ function assert(publicKey, options = {}) {
|
|
|
3371
3361
|
}
|
|
3372
3362
|
throw new InvalidError({ publicKey });
|
|
3373
3363
|
}
|
|
3374
|
-
function
|
|
3364
|
+
function from2(value) {
|
|
3375
3365
|
const publicKey = (() => {
|
|
3376
|
-
if (validate2(value))
|
|
3377
|
-
return fromHex2(value);
|
|
3378
3366
|
if (validate(value))
|
|
3367
|
+
return fromHex2(value);
|
|
3368
|
+
if (validate2(value))
|
|
3379
3369
|
return fromBytes2(value);
|
|
3380
3370
|
const { prefix, x, y } = value;
|
|
3381
3371
|
if (typeof x === "bigint" && typeof y === "bigint")
|
|
@@ -3392,8 +3382,8 @@ function fromHex2(publicKey) {
|
|
|
3392
3382
|
if (publicKey.length !== 132 && publicKey.length !== 130 && publicKey.length !== 68)
|
|
3393
3383
|
throw new InvalidSerializedSizeError({ publicKey });
|
|
3394
3384
|
if (publicKey.length === 130) {
|
|
3395
|
-
const x2 = BigInt(
|
|
3396
|
-
const y = BigInt(
|
|
3385
|
+
const x2 = BigInt(slice2(publicKey, 0, 32));
|
|
3386
|
+
const y = BigInt(slice2(publicKey, 32, 64));
|
|
3397
3387
|
return {
|
|
3398
3388
|
prefix: 4,
|
|
3399
3389
|
x: x2,
|
|
@@ -3401,17 +3391,17 @@ function fromHex2(publicKey) {
|
|
|
3401
3391
|
};
|
|
3402
3392
|
}
|
|
3403
3393
|
if (publicKey.length === 132) {
|
|
3404
|
-
const prefix2 = Number(
|
|
3405
|
-
const x2 = BigInt(
|
|
3406
|
-
const y = BigInt(
|
|
3394
|
+
const prefix2 = Number(slice2(publicKey, 0, 1));
|
|
3395
|
+
const x2 = BigInt(slice2(publicKey, 1, 33));
|
|
3396
|
+
const y = BigInt(slice2(publicKey, 33, 65));
|
|
3407
3397
|
return {
|
|
3408
3398
|
prefix: prefix2,
|
|
3409
3399
|
x: x2,
|
|
3410
3400
|
y
|
|
3411
3401
|
};
|
|
3412
3402
|
}
|
|
3413
|
-
const prefix = Number(
|
|
3414
|
-
const x = BigInt(
|
|
3403
|
+
const prefix = Number(slice2(publicKey, 0, 1));
|
|
3404
|
+
const x = BigInt(slice2(publicKey, 1, 33));
|
|
3415
3405
|
return {
|
|
3416
3406
|
prefix,
|
|
3417
3407
|
x
|
|
@@ -3486,7 +3476,7 @@ var InvalidSerializedSizeError = class extends BaseError2 {
|
|
|
3486
3476
|
super(`Value \`${publicKey}\` is an invalid public key size.`, {
|
|
3487
3477
|
metaMessages: [
|
|
3488
3478
|
"Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",
|
|
3489
|
-
`Received ${
|
|
3479
|
+
`Received ${size2(from(publicKey))} bytes.`
|
|
3490
3480
|
]
|
|
3491
3481
|
});
|
|
3492
3482
|
Object.defineProperty(this, "name", {
|
|
@@ -3522,7 +3512,7 @@ function checksum2(address) {
|
|
|
3522
3512
|
return checksum.get(address);
|
|
3523
3513
|
assert2(address, { strict: false });
|
|
3524
3514
|
const hexAddress = address.substring(2).toLowerCase();
|
|
3525
|
-
const hash2 = keccak2562(
|
|
3515
|
+
const hash2 = keccak2562(fromString2(hexAddress), { as: "Bytes" });
|
|
3526
3516
|
const characters = hexAddress.split("");
|
|
3527
3517
|
for (let i = 0; i < 40; i += 2) {
|
|
3528
3518
|
if (hash2[i >> 1] >> 4 >= 8 && characters[i]) {
|
|
@@ -3536,7 +3526,7 @@ function checksum2(address) {
|
|
|
3536
3526
|
checksum.set(address, result);
|
|
3537
3527
|
return result;
|
|
3538
3528
|
}
|
|
3539
|
-
function
|
|
3529
|
+
function from3(address, options = {}) {
|
|
3540
3530
|
const { checksum: checksumVal = false } = options;
|
|
3541
3531
|
assert2(address);
|
|
3542
3532
|
if (checksumVal)
|
|
@@ -3545,7 +3535,7 @@ function from4(address, options = {}) {
|
|
|
3545
3535
|
}
|
|
3546
3536
|
function fromPublicKey(publicKey, options = {}) {
|
|
3547
3537
|
const address = keccak2562(`0x${toHex2(publicKey).slice(4)}`).substring(26);
|
|
3548
|
-
return
|
|
3538
|
+
return from3(`0x${address}`, options);
|
|
3549
3539
|
}
|
|
3550
3540
|
function validate3(address, options = {}) {
|
|
3551
3541
|
const { strict = true } = options ?? {};
|
|
@@ -3724,16 +3714,16 @@ function decodeAddress2(cursor, options = {}) {
|
|
|
3724
3714
|
const { checksum: checksum3 = false } = options;
|
|
3725
3715
|
const value = cursor.readBytes(32);
|
|
3726
3716
|
const wrap3 = (address) => checksum3 ? checksum2(address) : address;
|
|
3727
|
-
return [wrap3(fromBytes(
|
|
3717
|
+
return [wrap3(fromBytes(slice3(value, -20))), 32];
|
|
3728
3718
|
}
|
|
3729
3719
|
function decodeArray(cursor, param, options) {
|
|
3730
3720
|
const { checksumAddress, length, staticPosition } = options;
|
|
3731
3721
|
if (!length) {
|
|
3732
|
-
const offset =
|
|
3722
|
+
const offset = toNumber2(cursor.readBytes(sizeOfOffset));
|
|
3733
3723
|
const start = staticPosition + offset;
|
|
3734
3724
|
const startOfData = start + sizeOfLength;
|
|
3735
3725
|
cursor.setPosition(start);
|
|
3736
|
-
const length2 =
|
|
3726
|
+
const length2 = toNumber2(cursor.readBytes(sizeOfLength));
|
|
3737
3727
|
const dynamicChild = hasDynamicChild(param);
|
|
3738
3728
|
let consumed2 = 0;
|
|
3739
3729
|
const value2 = [];
|
|
@@ -3750,7 +3740,7 @@ function decodeArray(cursor, param, options) {
|
|
|
3750
3740
|
return [value2, 32];
|
|
3751
3741
|
}
|
|
3752
3742
|
if (hasDynamicChild(param)) {
|
|
3753
|
-
const offset =
|
|
3743
|
+
const offset = toNumber2(cursor.readBytes(sizeOfOffset));
|
|
3754
3744
|
const start = staticPosition + offset;
|
|
3755
3745
|
const value2 = [];
|
|
3756
3746
|
for (let i = 0; i < length; ++i) {
|
|
@@ -3782,9 +3772,9 @@ function decodeBool(cursor) {
|
|
|
3782
3772
|
function decodeBytes(cursor, param, { staticPosition }) {
|
|
3783
3773
|
const [_, size5] = param.type.split("bytes");
|
|
3784
3774
|
if (!size5) {
|
|
3785
|
-
const offset =
|
|
3775
|
+
const offset = toNumber2(cursor.readBytes(32));
|
|
3786
3776
|
cursor.setPosition(staticPosition + offset);
|
|
3787
|
-
const length =
|
|
3777
|
+
const length = toNumber2(cursor.readBytes(32));
|
|
3788
3778
|
if (length === 0) {
|
|
3789
3779
|
cursor.setPosition(staticPosition + 32);
|
|
3790
3780
|
return ["0x", 32];
|
|
@@ -3801,7 +3791,7 @@ function decodeNumber(cursor, param) {
|
|
|
3801
3791
|
const size5 = Number.parseInt(param.type.split("int")[1] || "256", 10);
|
|
3802
3792
|
const value = cursor.readBytes(32);
|
|
3803
3793
|
return [
|
|
3804
|
-
size5 > 48 ? toBigInt(value, { signed }) :
|
|
3794
|
+
size5 > 48 ? toBigInt(value, { signed }) : toNumber2(value, { signed }),
|
|
3805
3795
|
32
|
|
3806
3796
|
];
|
|
3807
3797
|
}
|
|
@@ -3811,7 +3801,7 @@ function decodeTuple(cursor, param, options) {
|
|
|
3811
3801
|
const value = hasUnnamedChild ? [] : {};
|
|
3812
3802
|
let consumed = 0;
|
|
3813
3803
|
if (hasDynamicChild(param)) {
|
|
3814
|
-
const offset =
|
|
3804
|
+
const offset = toNumber2(cursor.readBytes(sizeOfOffset));
|
|
3815
3805
|
const start = staticPosition + offset;
|
|
3816
3806
|
for (let i = 0; i < param.components.length; ++i) {
|
|
3817
3807
|
const component = param.components[i];
|
|
@@ -3838,16 +3828,16 @@ function decodeTuple(cursor, param, options) {
|
|
|
3838
3828
|
return [value, consumed];
|
|
3839
3829
|
}
|
|
3840
3830
|
function decodeString(cursor, { staticPosition }) {
|
|
3841
|
-
const offset =
|
|
3831
|
+
const offset = toNumber2(cursor.readBytes(32));
|
|
3842
3832
|
const start = staticPosition + offset;
|
|
3843
3833
|
cursor.setPosition(start);
|
|
3844
|
-
const length =
|
|
3834
|
+
const length = toNumber2(cursor.readBytes(32));
|
|
3845
3835
|
if (length === 0) {
|
|
3846
3836
|
cursor.setPosition(staticPosition + 32);
|
|
3847
3837
|
return ["", 32];
|
|
3848
3838
|
}
|
|
3849
3839
|
const data = cursor.readBytes(length, 32);
|
|
3850
|
-
const value = toString(
|
|
3840
|
+
const value = toString(trimLeft2(data));
|
|
3851
3841
|
cursor.setPosition(staticPosition + 32);
|
|
3852
3842
|
return [value, 32];
|
|
3853
3843
|
}
|
|
@@ -3913,7 +3903,7 @@ function encode(preparedParameters) {
|
|
|
3913
3903
|
if (dynamic)
|
|
3914
3904
|
staticSize += 32;
|
|
3915
3905
|
else
|
|
3916
|
-
staticSize +=
|
|
3906
|
+
staticSize += size2(encoded);
|
|
3917
3907
|
}
|
|
3918
3908
|
const staticParameters = [];
|
|
3919
3909
|
const dynamicParameters = [];
|
|
@@ -3923,7 +3913,7 @@ function encode(preparedParameters) {
|
|
|
3923
3913
|
if (dynamic) {
|
|
3924
3914
|
staticParameters.push(fromNumber(staticSize + dynamicSize, { size: 32 }));
|
|
3925
3915
|
dynamicParameters.push(encoded);
|
|
3926
|
-
dynamicSize +=
|
|
3916
|
+
dynamicSize += size2(encoded);
|
|
3927
3917
|
} else {
|
|
3928
3918
|
staticParameters.push(encoded);
|
|
3929
3919
|
}
|
|
@@ -3980,7 +3970,7 @@ function encodeArray(value, options) {
|
|
|
3980
3970
|
}
|
|
3981
3971
|
function encodeBytes(value, { type }) {
|
|
3982
3972
|
const [, parametersize] = type.split("bytes");
|
|
3983
|
-
const bytesSize =
|
|
3973
|
+
const bytesSize = size2(value);
|
|
3984
3974
|
if (!parametersize) {
|
|
3985
3975
|
let value_ = value;
|
|
3986
3976
|
if (bytesSize % 32 !== 0)
|
|
@@ -4024,15 +4014,15 @@ function encodeNumber(value, { signed, size: size5 }) {
|
|
|
4024
4014
|
};
|
|
4025
4015
|
}
|
|
4026
4016
|
function encodeString(value) {
|
|
4027
|
-
const hexValue =
|
|
4028
|
-
const partsLength = Math.ceil(
|
|
4017
|
+
const hexValue = fromString(value);
|
|
4018
|
+
const partsLength = Math.ceil(size2(hexValue) / 32);
|
|
4029
4019
|
const parts = [];
|
|
4030
4020
|
for (let i = 0; i < partsLength; i++) {
|
|
4031
|
-
parts.push(padRight(
|
|
4021
|
+
parts.push(padRight(slice2(hexValue, i * 32, (i + 1) * 32)));
|
|
4032
4022
|
}
|
|
4033
4023
|
return {
|
|
4034
4024
|
dynamic: true,
|
|
4035
|
-
encoded: concat2(padRight(fromNumber(
|
|
4025
|
+
encoded: concat2(padRight(fromNumber(size2(hexValue), { size: 32 })), ...parts)
|
|
4036
4026
|
};
|
|
4037
4027
|
}
|
|
4038
4028
|
function encodeTuple(value, options) {
|
|
@@ -4289,13 +4279,13 @@ function decode(parameters, data, options = {}) {
|
|
|
4289
4279
|
const { as = "Array", checksumAddress = false } = options;
|
|
4290
4280
|
const bytes = typeof data === "string" ? fromHex(data) : data;
|
|
4291
4281
|
const cursor = create(bytes);
|
|
4292
|
-
if (
|
|
4282
|
+
if (size3(bytes) === 0 && parameters.length > 0)
|
|
4293
4283
|
throw new ZeroDataError();
|
|
4294
|
-
if (
|
|
4284
|
+
if (size3(bytes) && size3(bytes) < 32)
|
|
4295
4285
|
throw new DataSizeTooSmallError({
|
|
4296
4286
|
data: typeof data === "string" ? data : fromBytes(data),
|
|
4297
4287
|
parameters,
|
|
4298
|
-
size:
|
|
4288
|
+
size: size3(bytes)
|
|
4299
4289
|
});
|
|
4300
4290
|
let consumed = 0;
|
|
4301
4291
|
const values = as === "Array" ? [] : {};
|
|
@@ -4353,7 +4343,7 @@ function encodePacked(types, values) {
|
|
|
4353
4343
|
return padLeft(address.toLowerCase(), isArray ? 32 : 0);
|
|
4354
4344
|
}
|
|
4355
4345
|
if (type === "string")
|
|
4356
|
-
return
|
|
4346
|
+
return fromString(value);
|
|
4357
4347
|
if (type === "bytes")
|
|
4358
4348
|
return value;
|
|
4359
4349
|
if (type === "bool")
|
|
@@ -4392,7 +4382,7 @@ function encodePacked(types, values) {
|
|
|
4392
4382
|
}
|
|
4393
4383
|
encodePacked2.encode = encode4;
|
|
4394
4384
|
})(encodePacked || (encodePacked = {}));
|
|
4395
|
-
function
|
|
4385
|
+
function from4(parameters) {
|
|
4396
4386
|
if (Array.isArray(parameters) && typeof parameters[0] === "string")
|
|
4397
4387
|
return parseAbiParameters(parameters);
|
|
4398
4388
|
if (typeof parameters === "string")
|
|
@@ -4439,7 +4429,7 @@ var ArrayLengthMismatchError = class extends BaseError2 {
|
|
|
4439
4429
|
};
|
|
4440
4430
|
var BytesSizeMismatchError = class extends BaseError2 {
|
|
4441
4431
|
constructor({ expectedSize, value }) {
|
|
4442
|
-
super(`Size of bytes "${value}" (bytes${
|
|
4432
|
+
super(`Size of bytes "${value}" (bytes${size2(value)}) does not match expected size (bytes${expectedSize}).`);
|
|
4443
4433
|
Object.defineProperty(this, "name", {
|
|
4444
4434
|
enumerable: true,
|
|
4445
4435
|
configurable: true,
|
|
@@ -4487,7 +4477,7 @@ var InvalidTypeError = class extends BaseError2 {
|
|
|
4487
4477
|
};
|
|
4488
4478
|
|
|
4489
4479
|
// node_modules/.pnpm/ox@0.14.30_typescript@6.0.3_zod@4.4.3/node_modules/ox/_esm/core/Rlp.js
|
|
4490
|
-
function
|
|
4480
|
+
function from5(value, options) {
|
|
4491
4481
|
const { as } = options;
|
|
4492
4482
|
const encodable = getEncodable(value);
|
|
4493
4483
|
const cursor = create(new Uint8Array(encodable.length));
|
|
@@ -4498,7 +4488,7 @@ function from6(value, options) {
|
|
|
4498
4488
|
}
|
|
4499
4489
|
function fromHex3(hex, options = {}) {
|
|
4500
4490
|
const { as = "Hex" } = options;
|
|
4501
|
-
return
|
|
4491
|
+
return from5(hex, { as });
|
|
4502
4492
|
}
|
|
4503
4493
|
function getEncodable(bytes) {
|
|
4504
4494
|
if (Array.isArray(bytes))
|
|
@@ -4602,8 +4592,8 @@ function fromBytes3(signature) {
|
|
|
4602
4592
|
function fromHex4(signature) {
|
|
4603
4593
|
if (signature.length !== 130 && signature.length !== 132)
|
|
4604
4594
|
throw new InvalidSerializedSizeError2({ signature });
|
|
4605
|
-
const r = BigInt(
|
|
4606
|
-
const s = BigInt(
|
|
4595
|
+
const r = BigInt(slice2(signature, 0, 32));
|
|
4596
|
+
const s = BigInt(slice2(signature, 32, 64));
|
|
4607
4597
|
const yParity = (() => {
|
|
4608
4598
|
const yParity2 = Number(`0x${signature.slice(130)}`);
|
|
4609
4599
|
if (Number.isNaN(yParity2))
|
|
@@ -4630,9 +4620,9 @@ function extract2(value) {
|
|
|
4630
4620
|
return void 0;
|
|
4631
4621
|
if (typeof value.s === "undefined")
|
|
4632
4622
|
return void 0;
|
|
4633
|
-
return
|
|
4623
|
+
return from6(value);
|
|
4634
4624
|
}
|
|
4635
|
-
function
|
|
4625
|
+
function from6(signature) {
|
|
4636
4626
|
const signature_ = (() => {
|
|
4637
4627
|
if (typeof signature === "string")
|
|
4638
4628
|
return fromHex4(signature);
|
|
@@ -4678,8 +4668,8 @@ function toTuple(signature) {
|
|
|
4678
4668
|
const { r, s, yParity } = signature;
|
|
4679
4669
|
return [
|
|
4680
4670
|
yParity ? "0x01" : "0x",
|
|
4681
|
-
r === 0n ? "0x" :
|
|
4682
|
-
s === 0n ? "0x" :
|
|
4671
|
+
r === 0n ? "0x" : trimLeft(fromNumber(r)),
|
|
4672
|
+
s === 0n ? "0x" : trimLeft(fromNumber(s))
|
|
4683
4673
|
];
|
|
4684
4674
|
}
|
|
4685
4675
|
function vToYParity(v) {
|
|
@@ -4696,7 +4686,7 @@ var InvalidSerializedSizeError2 = class extends BaseError2 {
|
|
|
4696
4686
|
super(`Value \`${signature}\` is an invalid signature size.`, {
|
|
4697
4687
|
metaMessages: [
|
|
4698
4688
|
"Expected: 64 bytes or 65 bytes.",
|
|
4699
|
-
`Received ${
|
|
4689
|
+
`Received ${size2(from(signature))} bytes.`
|
|
4700
4690
|
]
|
|
4701
4691
|
});
|
|
4702
4692
|
Object.defineProperty(this, "name", {
|
|
@@ -4764,7 +4754,7 @@ var InvalidVError = class extends BaseError2 {
|
|
|
4764
4754
|
};
|
|
4765
4755
|
|
|
4766
4756
|
// node_modules/.pnpm/ox@0.14.30_typescript@6.0.3_zod@4.4.3/node_modules/ox/_esm/core/Authorization.js
|
|
4767
|
-
function
|
|
4757
|
+
function from7(authorization, options = {}) {
|
|
4768
4758
|
if (typeof authorization.chainId === "string")
|
|
4769
4759
|
return fromRpc2(authorization);
|
|
4770
4760
|
return { ...authorization, ...options.signature };
|
|
@@ -4809,32 +4799,32 @@ function recoverPublicKey2(options) {
|
|
|
4809
4799
|
const { payload, signature } = options;
|
|
4810
4800
|
const { r, s, yParity } = signature;
|
|
4811
4801
|
const signature_ = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit(yParity);
|
|
4812
|
-
const point = signature_.recoverPublicKey(
|
|
4813
|
-
return
|
|
4802
|
+
const point = signature_.recoverPublicKey(from(payload).substring(2));
|
|
4803
|
+
return from2(point);
|
|
4814
4804
|
}
|
|
4815
4805
|
|
|
4816
4806
|
// node_modules/.pnpm/ox@0.14.30_typescript@6.0.3_zod@4.4.3/node_modules/ox/_esm/erc8010/SignatureErc8010.js
|
|
4817
4807
|
var magicBytes = "0x8010801080108010801080108010801080108010801080108010801080108010";
|
|
4818
|
-
var suffixParameters =
|
|
4808
|
+
var suffixParameters = from4("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");
|
|
4819
4809
|
function assert4(value) {
|
|
4820
4810
|
if (typeof value === "string") {
|
|
4821
|
-
if (
|
|
4811
|
+
if (slice2(value, -32) !== magicBytes)
|
|
4822
4812
|
throw new InvalidWrappedSignatureError(value);
|
|
4823
4813
|
} else
|
|
4824
4814
|
assert3(value.authorization);
|
|
4825
4815
|
}
|
|
4826
|
-
function
|
|
4816
|
+
function from8(value) {
|
|
4827
4817
|
if (typeof value === "string")
|
|
4828
4818
|
return unwrap(value);
|
|
4829
4819
|
return value;
|
|
4830
4820
|
}
|
|
4831
4821
|
function unwrap(wrapped) {
|
|
4832
4822
|
assert4(wrapped);
|
|
4833
|
-
const suffixLength =
|
|
4834
|
-
const suffix =
|
|
4835
|
-
const signature =
|
|
4823
|
+
const suffixLength = toNumber(slice2(wrapped, -64, -32));
|
|
4824
|
+
const suffix = slice2(wrapped, -suffixLength - 64, -64);
|
|
4825
|
+
const signature = slice2(wrapped, 0, -suffixLength - 64);
|
|
4836
4826
|
const [auth, to, data] = decode(suffixParameters, suffix);
|
|
4837
|
-
const authorization =
|
|
4827
|
+
const authorization = from7({
|
|
4838
4828
|
address: auth.delegation,
|
|
4839
4829
|
chainId: Number(auth.chainId),
|
|
4840
4830
|
nonce: auth.nonce,
|
|
@@ -4853,7 +4843,7 @@ function wrap(value) {
|
|
|
4853
4843
|
assert4(value);
|
|
4854
4844
|
const self = recoverAddress2({
|
|
4855
4845
|
payload: getSignPayload(value.authorization),
|
|
4856
|
-
signature:
|
|
4846
|
+
signature: from6(value.authorization)
|
|
4857
4847
|
});
|
|
4858
4848
|
const suffix = encode2(suffixParameters, [
|
|
4859
4849
|
{
|
|
@@ -4864,7 +4854,7 @@ function wrap(value) {
|
|
|
4864
4854
|
value.to ?? self,
|
|
4865
4855
|
data ?? "0x"
|
|
4866
4856
|
]);
|
|
4867
|
-
const suffixLength = fromNumber(
|
|
4857
|
+
const suffixLength = fromNumber(size2(suffix), { size: 32 });
|
|
4868
4858
|
return concat2(signature, suffix, suffixLength, magicBytes);
|
|
4869
4859
|
}
|
|
4870
4860
|
function validate4(value) {
|
|
@@ -5329,7 +5319,7 @@ function getAmbiguousTypes(sourceParameters, targetParameters, args) {
|
|
|
5329
5319
|
}
|
|
5330
5320
|
|
|
5331
5321
|
// node_modules/.pnpm/ox@0.14.30_typescript@6.0.3_zod@4.4.3/node_modules/ox/_esm/core/AbiItem.js
|
|
5332
|
-
function
|
|
5322
|
+
function from9(abiItem, options = {}) {
|
|
5333
5323
|
const { prepare = true } = options;
|
|
5334
5324
|
const item = (() => {
|
|
5335
5325
|
if (Array.isArray(abiItem))
|
|
@@ -5345,11 +5335,11 @@ function from10(abiItem, options = {}) {
|
|
|
5345
5335
|
}
|
|
5346
5336
|
function fromAbi(abi2, name, options) {
|
|
5347
5337
|
const { args = [], prepare = true } = options ?? {};
|
|
5348
|
-
const isSelector =
|
|
5338
|
+
const isSelector = validate(name, { strict: false });
|
|
5349
5339
|
const abiItems = abi2.filter((abiItem2) => {
|
|
5350
5340
|
if (isSelector) {
|
|
5351
5341
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
5352
|
-
return getSelector(abiItem2) ===
|
|
5342
|
+
return getSelector(abiItem2) === slice2(name, 0, 4);
|
|
5353
5343
|
if (abiItem2.type === "event")
|
|
5354
5344
|
return getSignatureHash(abiItem2) === name;
|
|
5355
5345
|
return false;
|
|
@@ -5423,7 +5413,7 @@ function getSelector(...parameters) {
|
|
|
5423
5413
|
}
|
|
5424
5414
|
return parameters[0];
|
|
5425
5415
|
})();
|
|
5426
|
-
return
|
|
5416
|
+
return slice2(getSignatureHash(abiItem), 0, 4);
|
|
5427
5417
|
}
|
|
5428
5418
|
function getSignature(...parameters) {
|
|
5429
5419
|
const abiItem = (() => {
|
|
@@ -5450,7 +5440,7 @@ function getSignatureHash(...parameters) {
|
|
|
5450
5440
|
})();
|
|
5451
5441
|
if (typeof abiItem !== "string" && "hash" in abiItem && abiItem.hash)
|
|
5452
5442
|
return abiItem.hash;
|
|
5453
|
-
return keccak2562(
|
|
5443
|
+
return keccak2562(fromString(getSignature(abiItem)));
|
|
5454
5444
|
}
|
|
5455
5445
|
var AmbiguityError = class extends BaseError2 {
|
|
5456
5446
|
constructor(x, y) {
|
|
@@ -5503,8 +5493,8 @@ function encode3(...parameters) {
|
|
|
5503
5493
|
const { bytecode, args } = options;
|
|
5504
5494
|
return concat2(bytecode, abiConstructor.inputs?.length && args?.length ? encode2(abiConstructor.inputs, args) : "0x");
|
|
5505
5495
|
}
|
|
5506
|
-
function
|
|
5507
|
-
return
|
|
5496
|
+
function from10(abiConstructor) {
|
|
5497
|
+
return from9(abiConstructor);
|
|
5508
5498
|
}
|
|
5509
5499
|
function fromAbi2(abi2) {
|
|
5510
5500
|
const item = abi2.find((item2) => item2.type === "constructor");
|
|
@@ -5531,8 +5521,8 @@ function encodeData(...parameters) {
|
|
|
5531
5521
|
const data = args.length > 0 ? encode2(item.inputs, args) : void 0;
|
|
5532
5522
|
return data ? concat2(selector, data) : selector;
|
|
5533
5523
|
}
|
|
5534
|
-
function
|
|
5535
|
-
return
|
|
5524
|
+
function from11(abiFunction, options = {}) {
|
|
5525
|
+
return from9(abiFunction, options);
|
|
5536
5526
|
}
|
|
5537
5527
|
function fromAbi3(abi2, name, options) {
|
|
5538
5528
|
const item = fromAbi(abi2, name, options);
|
|
@@ -5555,11 +5545,11 @@ async function simulateCalls(client, parameters) {
|
|
|
5555
5545
|
const account = parameters.account ? parseAccount(parameters.account) : void 0;
|
|
5556
5546
|
if (traceAssetChanges && !account)
|
|
5557
5547
|
throw new BaseError("`account` is required when `traceAssetChanges` is true");
|
|
5558
|
-
const getBalanceData = account ? encode3(
|
|
5548
|
+
const getBalanceData = account ? encode3(from10("constructor(bytes, bytes)"), {
|
|
5559
5549
|
bytecode: deploylessCallViaBytecodeBytecode,
|
|
5560
5550
|
args: [
|
|
5561
5551
|
getBalanceCode,
|
|
5562
|
-
encodeData(
|
|
5552
|
+
encodeData(from11("function getBalance(address)"), [account.address])
|
|
5563
5553
|
]
|
|
5564
5554
|
}) : void 0;
|
|
5565
5555
|
const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {
|
|
@@ -5586,7 +5576,7 @@ async function simulateCalls(client, parameters) {
|
|
|
5586
5576
|
{
|
|
5587
5577
|
calls: assetAddresses.map((address, i) => ({
|
|
5588
5578
|
abi: [
|
|
5589
|
-
|
|
5579
|
+
from11("function balanceOf(address) returns (uint256)")
|
|
5590
5580
|
],
|
|
5591
5581
|
functionName: "balanceOf",
|
|
5592
5582
|
args: [account.address],
|
|
@@ -5618,7 +5608,7 @@ async function simulateCalls(client, parameters) {
|
|
|
5618
5608
|
{
|
|
5619
5609
|
calls: assetAddresses.map((address, i) => ({
|
|
5620
5610
|
abi: [
|
|
5621
|
-
|
|
5611
|
+
from11("function balanceOf(address) returns (uint256)")
|
|
5622
5612
|
],
|
|
5623
5613
|
functionName: "balanceOf",
|
|
5624
5614
|
args: [account.address],
|
|
@@ -5638,7 +5628,7 @@ async function simulateCalls(client, parameters) {
|
|
|
5638
5628
|
calls: assetAddresses.map((address, i) => ({
|
|
5639
5629
|
to: address,
|
|
5640
5630
|
abi: [
|
|
5641
|
-
|
|
5631
|
+
from11("function decimals() returns (uint256)")
|
|
5642
5632
|
],
|
|
5643
5633
|
functionName: "decimals",
|
|
5644
5634
|
from: zeroAddress,
|
|
@@ -5656,7 +5646,7 @@ async function simulateCalls(client, parameters) {
|
|
|
5656
5646
|
calls: assetAddresses.map((address, i) => ({
|
|
5657
5647
|
to: address,
|
|
5658
5648
|
abi: [
|
|
5659
|
-
|
|
5649
|
+
from11("function tokenURI(uint256) returns (string)")
|
|
5660
5650
|
],
|
|
5661
5651
|
functionName: "tokenURI",
|
|
5662
5652
|
args: [0n],
|
|
@@ -5674,7 +5664,7 @@ async function simulateCalls(client, parameters) {
|
|
|
5674
5664
|
{
|
|
5675
5665
|
calls: assetAddresses.map((address, i) => ({
|
|
5676
5666
|
to: address,
|
|
5677
|
-
abi: [
|
|
5667
|
+
abi: [from11("function symbol() returns (string)")],
|
|
5678
5668
|
functionName: "symbol",
|
|
5679
5669
|
from: zeroAddress,
|
|
5680
5670
|
nonce: i
|
|
@@ -5750,7 +5740,7 @@ var SignatureErc6492_exports = {};
|
|
|
5750
5740
|
__export(SignatureErc6492_exports, {
|
|
5751
5741
|
InvalidWrappedSignatureError: () => InvalidWrappedSignatureError2,
|
|
5752
5742
|
assert: () => assert5,
|
|
5753
|
-
from: () =>
|
|
5743
|
+
from: () => from12,
|
|
5754
5744
|
magicBytes: () => magicBytes2,
|
|
5755
5745
|
universalSignatureValidatorAbi: () => universalSignatureValidatorAbi,
|
|
5756
5746
|
universalSignatureValidatorBytecode: () => universalSignatureValidatorBytecode,
|
|
@@ -5805,22 +5795,22 @@ var universalSignatureValidatorAbi = [
|
|
|
5805
5795
|
}
|
|
5806
5796
|
];
|
|
5807
5797
|
function assert5(wrapped) {
|
|
5808
|
-
if (
|
|
5798
|
+
if (slice2(wrapped, -32) !== magicBytes2)
|
|
5809
5799
|
throw new InvalidWrappedSignatureError2(wrapped);
|
|
5810
5800
|
}
|
|
5811
|
-
function
|
|
5801
|
+
function from12(wrapped) {
|
|
5812
5802
|
if (typeof wrapped === "string")
|
|
5813
5803
|
return unwrap2(wrapped);
|
|
5814
5804
|
return wrapped;
|
|
5815
5805
|
}
|
|
5816
5806
|
function unwrap2(wrapped) {
|
|
5817
5807
|
assert5(wrapped);
|
|
5818
|
-
const [to, data, signature] = decode(
|
|
5808
|
+
const [to, data, signature] = decode(from4("address, bytes, bytes"), wrapped);
|
|
5819
5809
|
return { data, signature, to };
|
|
5820
5810
|
}
|
|
5821
5811
|
function wrap2(value) {
|
|
5822
5812
|
const { data, signature, to } = value;
|
|
5823
|
-
return concat2(encode2(
|
|
5813
|
+
return concat2(encode2(from4("address, bytes, bytes"), [
|
|
5824
5814
|
to,
|
|
5825
5815
|
data,
|
|
5826
5816
|
signature
|
|
@@ -6234,7 +6224,7 @@ async function waitForTransactionReceipt(client, parameters) {
|
|
|
6234
6224
|
shouldRetry: ({ error }) => error instanceof BlockNotFoundError
|
|
6235
6225
|
});
|
|
6236
6226
|
retrying = false;
|
|
6237
|
-
const replacementTransaction = block.transactions.find(({ from:
|
|
6227
|
+
const replacementTransaction = block.transactions.find(({ from: from13, nonce }) => from13 === replacedTransaction.from && nonce === replacedTransaction.nonce);
|
|
6238
6228
|
if (!replacementTransaction)
|
|
6239
6229
|
return;
|
|
6240
6230
|
receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({
|
|
@@ -7187,10 +7177,10 @@ var serializers = {
|
|
|
7187
7177
|
};
|
|
7188
7178
|
function serializeTransactionDeposit(transaction) {
|
|
7189
7179
|
assertTransactionDeposit(transaction);
|
|
7190
|
-
const { sourceHash, data, from:
|
|
7180
|
+
const { sourceHash, data, from: from13, gas, isSystemTx, mint, to, value } = transaction;
|
|
7191
7181
|
const serializedTransaction = [
|
|
7192
7182
|
sourceHash,
|
|
7193
|
-
|
|
7183
|
+
from13,
|
|
7194
7184
|
to ?? "0x",
|
|
7195
7185
|
mint ? toHex(mint) : "0x",
|
|
7196
7186
|
value ? toHex(value) : "0x",
|
|
@@ -7211,9 +7201,9 @@ function isDeposit(transaction) {
|
|
|
7211
7201
|
return false;
|
|
7212
7202
|
}
|
|
7213
7203
|
function assertTransactionDeposit(transaction) {
|
|
7214
|
-
const { from:
|
|
7215
|
-
if (
|
|
7216
|
-
throw new InvalidAddressError({ address:
|
|
7204
|
+
const { from: from13, to } = transaction;
|
|
7205
|
+
if (from13 && !isAddress(from13))
|
|
7206
|
+
throw new InvalidAddressError({ address: from13 });
|
|
7217
7207
|
if (to && !isAddress(to))
|
|
7218
7208
|
throw new InvalidAddressError({ address: to });
|
|
7219
7209
|
}
|
|
@@ -7304,4 +7294,4 @@ export {
|
|
|
7304
7294
|
USDC_DECIMALS,
|
|
7305
7295
|
getUsdcBalance
|
|
7306
7296
|
};
|
|
7307
|
-
//# sourceMappingURL=chunk-
|
|
7297
|
+
//# sourceMappingURL=chunk-IPOWB3G3.js.map
|