ox 0.14.67 → 0.14.68
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 +36 -0
- package/_cjs/core/AbiEvent.js +45 -1
- package/_cjs/core/AbiEvent.js.map +1 -1
- package/_cjs/core/AbiParameters.js +6 -2
- package/_cjs/core/AbiParameters.js.map +1 -1
- package/_cjs/core/Address.js +24 -21
- package/_cjs/core/Address.js.map +1 -1
- package/_cjs/core/Base58.js +14 -4
- package/_cjs/core/Base58.js.map +1 -1
- package/_cjs/core/Blobs.js +26 -34
- package/_cjs/core/Blobs.js.map +1 -1
- package/_cjs/core/Bytes.js +56 -13
- package/_cjs/core/Bytes.js.map +1 -1
- package/_cjs/core/Cbor.js +33 -18
- package/_cjs/core/Cbor.js.map +1 -1
- package/_cjs/core/FrameReceipt.js +6 -2
- package/_cjs/core/FrameReceipt.js.map +1 -1
- package/_cjs/core/Hex.js +54 -21
- package/_cjs/core/Hex.js.map +1 -1
- package/_cjs/core/Json.js +15 -2
- package/_cjs/core/Json.js.map +1 -1
- package/_cjs/core/Rlp.js +138 -94
- package/_cjs/core/Rlp.js.map +1 -1
- package/_cjs/core/RpcTransport.js +3 -1
- package/_cjs/core/RpcTransport.js.map +1 -1
- package/_cjs/core/Siwe.js +2 -2
- package/_cjs/core/Siwe.js.map +1 -1
- package/_cjs/core/Transaction.js +6 -3
- package/_cjs/core/Transaction.js.map +1 -1
- package/_cjs/core/TransactionReceipt.js +12 -4
- package/_cjs/core/TransactionReceipt.js.map +1 -1
- package/_cjs/core/TransactionRequest.js +6 -2
- package/_cjs/core/TransactionRequest.js.map +1 -1
- package/_cjs/core/TxEnvelopeEip4844.js +1 -1
- package/_cjs/core/TxEnvelopeEip4844.js.map +1 -1
- package/_cjs/core/TypedData.js +19 -8
- package/_cjs/core/TypedData.js.map +1 -1
- package/_cjs/core/internal/abiParameters.js +59 -18
- package/_cjs/core/internal/abiParameters.js.map +1 -1
- package/_cjs/core/internal/address.js +32 -0
- package/_cjs/core/internal/address.js.map +1 -0
- package/_cjs/core/internal/base58.js +11 -9
- package/_cjs/core/internal/base58.js.map +1 -1
- package/_cjs/core/internal/bytes.js +13 -22
- package/_cjs/core/internal/bytes.js.map +1 -1
- package/_cjs/core/internal/caches.js +1 -0
- package/_cjs/core/internal/caches.js.map +1 -1
- package/_cjs/core/internal/cursor.js +32 -10
- package/_cjs/core/internal/cursor.js.map +1 -1
- package/_cjs/core/internal/hex.js +3 -3
- package/_cjs/core/internal/hex.js.map +1 -1
- package/_cjs/core/internal/lru.js +6 -5
- package/_cjs/core/internal/lru.js.map +1 -1
- package/_cjs/core/internal/promise.js +3 -3
- package/_cjs/core/internal/promise.js.map +1 -1
- package/_cjs/erc6492/SignatureErc6492.js +1 -1
- package/_cjs/erc6492/SignatureErc6492.js.map +1 -1
- package/_cjs/tempo/Transaction.js +13 -7
- package/_cjs/tempo/Transaction.js.map +1 -1
- package/_cjs/tempo/TransactionRequest.js +23 -19
- package/_cjs/tempo/TransactionRequest.js.map +1 -1
- package/_cjs/tempo/TxEnvelopeTempo.js +23 -4
- package/_cjs/tempo/TxEnvelopeTempo.js.map +1 -1
- package/_cjs/tempo/ZoneId.js +3 -0
- package/_cjs/tempo/ZoneId.js.map +1 -1
- package/_cjs/tempo/internal/virtualMasterPool.js +12 -3
- package/_cjs/tempo/internal/virtualMasterPool.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/core/AbiEvent.js +69 -0
- package/_esm/core/AbiEvent.js.map +1 -1
- package/_esm/core/AbiParameters.js +8 -2
- package/_esm/core/AbiParameters.js.map +1 -1
- package/_esm/core/Address.js +27 -21
- package/_esm/core/Address.js.map +1 -1
- package/_esm/core/Base58.js +16 -4
- package/_esm/core/Base58.js.map +1 -1
- package/_esm/core/Blobs.js +38 -39
- package/_esm/core/Blobs.js.map +1 -1
- package/_esm/core/Bytes.js +66 -13
- package/_esm/core/Bytes.js.map +1 -1
- package/_esm/core/Cbor.js +33 -17
- package/_esm/core/Cbor.js.map +1 -1
- package/_esm/core/FrameReceipt.js +6 -2
- package/_esm/core/FrameReceipt.js.map +1 -1
- package/_esm/core/Hex.js +70 -21
- package/_esm/core/Hex.js.map +1 -1
- package/_esm/core/Json.js +21 -2
- package/_esm/core/Json.js.map +1 -1
- package/_esm/core/Rlp.js +146 -97
- package/_esm/core/Rlp.js.map +1 -1
- package/_esm/core/RpcTransport.js +4 -1
- package/_esm/core/RpcTransport.js.map +1 -1
- package/_esm/core/Siwe.js +2 -2
- package/_esm/core/Siwe.js.map +1 -1
- package/_esm/core/Transaction.js +6 -3
- package/_esm/core/Transaction.js.map +1 -1
- package/_esm/core/TransactionReceipt.js +12 -4
- package/_esm/core/TransactionReceipt.js.map +1 -1
- package/_esm/core/TransactionRequest.js +6 -2
- package/_esm/core/TransactionRequest.js.map +1 -1
- package/_esm/core/TxEnvelopeEip4844.js +1 -1
- package/_esm/core/TxEnvelopeEip4844.js.map +1 -1
- package/_esm/core/TypedData.js +24 -8
- package/_esm/core/TypedData.js.map +1 -1
- package/_esm/core/internal/abiParameters.js +78 -18
- package/_esm/core/internal/abiParameters.js.map +1 -1
- package/_esm/core/internal/address.js +41 -0
- package/_esm/core/internal/address.js.map +1 -0
- package/_esm/core/internal/base58.js +15 -9
- package/_esm/core/internal/base58.js.map +1 -1
- package/_esm/core/internal/bytes.js +14 -22
- package/_esm/core/internal/bytes.js.map +1 -1
- package/_esm/core/internal/caches.js +1 -0
- package/_esm/core/internal/caches.js.map +1 -1
- package/_esm/core/internal/cursor.js +37 -10
- package/_esm/core/internal/cursor.js.map +1 -1
- package/_esm/core/internal/hex.js +5 -3
- package/_esm/core/internal/hex.js.map +1 -1
- package/_esm/core/internal/lru.js +7 -5
- package/_esm/core/internal/lru.js.map +1 -1
- package/_esm/core/internal/promise.js +4 -3
- package/_esm/core/internal/promise.js.map +1 -1
- package/_esm/erc6492/SignatureErc6492.js +1 -1
- package/_esm/erc6492/SignatureErc6492.js.map +1 -1
- package/_esm/tempo/Transaction.js +15 -7
- package/_esm/tempo/Transaction.js.map +1 -1
- package/_esm/tempo/TransactionRequest.js +25 -19
- package/_esm/tempo/TransactionRequest.js.map +1 -1
- package/_esm/tempo/TxEnvelopeTempo.js +30 -4
- package/_esm/tempo/TxEnvelopeTempo.js.map +1 -1
- package/_esm/tempo/ZoneId.js +7 -1
- package/_esm/tempo/ZoneId.js.map +1 -1
- package/_esm/tempo/internal/virtualMasterPool.js +16 -3
- package/_esm/tempo/internal/virtualMasterPool.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/core/AbiEvent.d.ts +36 -1
- package/_types/core/AbiEvent.d.ts.map +1 -1
- package/_types/core/AbiParameters.d.ts +1 -1
- package/_types/core/AbiParameters.d.ts.map +1 -1
- package/_types/core/Address.d.ts.map +1 -1
- package/_types/core/Base58.d.ts.map +1 -1
- package/_types/core/Blobs.d.ts +2 -3
- package/_types/core/Blobs.d.ts.map +1 -1
- package/_types/core/Bytes.d.ts +2 -0
- package/_types/core/Bytes.d.ts.map +1 -1
- package/_types/core/Cbor.d.ts +13 -6
- package/_types/core/Cbor.d.ts.map +1 -1
- package/_types/core/FrameReceipt.d.ts.map +1 -1
- package/_types/core/Hex.d.ts +3 -1
- package/_types/core/Hex.d.ts.map +1 -1
- package/_types/core/Json.d.ts.map +1 -1
- package/_types/core/Rlp.d.ts +38 -9
- package/_types/core/Rlp.d.ts.map +1 -1
- package/_types/core/RpcTransport.d.ts.map +1 -1
- package/_types/core/Siwe.d.ts.map +1 -1
- package/_types/core/Transaction.d.ts.map +1 -1
- package/_types/core/TransactionReceipt.d.ts.map +1 -1
- package/_types/core/TransactionRequest.d.ts.map +1 -1
- package/_types/core/TypedData.d.ts.map +1 -1
- package/_types/core/internal/abiParameters.d.ts +5 -5
- package/_types/core/internal/abiParameters.d.ts.map +1 -1
- package/_types/core/internal/address.d.ts +14 -0
- package/_types/core/internal/address.d.ts.map +1 -0
- package/_types/core/internal/base58.d.ts.map +1 -1
- package/_types/core/internal/bytes.d.ts +1 -10
- package/_types/core/internal/bytes.d.ts.map +1 -1
- package/_types/core/internal/caches.d.ts +1 -0
- package/_types/core/internal/caches.d.ts.map +1 -1
- package/_types/core/internal/cursor.d.ts +7 -2
- package/_types/core/internal/cursor.d.ts.map +1 -1
- package/_types/core/internal/hex.d.ts.map +1 -1
- package/_types/core/internal/lru.d.ts.map +1 -1
- package/_types/core/internal/promise.d.ts.map +1 -1
- package/_types/erc6492/SignatureErc6492.d.ts +1 -1
- package/_types/erc6492/SignatureErc6492.d.ts.map +1 -1
- package/_types/tempo/Transaction.d.ts.map +1 -1
- package/_types/tempo/TransactionRequest.d.ts.map +1 -1
- package/_types/tempo/TxEnvelopeTempo.d.ts.map +1 -1
- package/_types/tempo/ZoneId.d.ts +3 -1
- package/_types/tempo/ZoneId.d.ts.map +1 -1
- package/_types/tempo/internal/virtualMasterPool.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/core/AbiEvent.ts +72 -0
- package/core/AbiParameters.ts +8 -1
- package/core/Address.ts +25 -20
- package/core/Base58.ts +15 -4
- package/core/Blobs.ts +47 -51
- package/core/Bytes.ts +68 -17
- package/core/Cbor.ts +33 -13
- package/core/FrameReceipt.ts +6 -2
- package/core/Hex.ts +79 -22
- package/core/Json.ts +23 -2
- package/core/Rlp.ts +184 -94
- package/core/RpcTransport.ts +4 -1
- package/core/Siwe.ts +2 -2
- package/core/Transaction.ts +6 -3
- package/core/TransactionReceipt.ts +13 -4
- package/core/TransactionRequest.ts +10 -6
- package/core/TxEnvelopeEip4844.ts +1 -1
- package/core/TypedData.ts +26 -8
- package/core/internal/abiParameters.ts +82 -23
- package/core/internal/address.ts +38 -0
- package/core/internal/base58.ts +14 -9
- package/core/internal/bytes.ts +13 -23
- package/core/internal/caches.ts +1 -0
- package/core/internal/cursor.ts +44 -16
- package/core/internal/hex.ts +5 -3
- package/core/internal/lru.ts +6 -7
- package/core/internal/promise.ts +5 -3
- package/erc6492/SignatureErc6492.ts +1 -1
- package/package.json +1 -1
- package/tempo/AccountSimulation.test.ts +1 -1
- package/tempo/SignaturePreAuthorized.test.ts +1 -1
- package/tempo/Transaction.ts +15 -9
- package/tempo/TransactionRequest.ts +31 -24
- package/tempo/TxEnvelopeTempo.test.ts +52 -0
- package/tempo/TxEnvelopeTempo.ts +32 -6
- package/tempo/ZoneId.test.ts +11 -0
- package/tempo/ZoneId.ts +7 -1
- package/tempo/internal/virtualMasterPool.ts +18 -4
- package/version.ts +1 -1
- package/_cjs/core/internal/uid.js +0 -17
- package/_cjs/core/internal/uid.js.map +0 -1
- package/_esm/core/internal/uid.js +0 -15
- package/_esm/core/internal/uid.js.map +0 -1
- package/_types/core/internal/uid.d.ts +0 -3
- package/_types/core/internal/uid.d.ts.map +0 -1
- package/core/internal/uid.ts +0 -15
|
@@ -107,6 +107,11 @@ export declare namespace decodeParameter {
|
|
|
107
107
|
const sizeOfLength = 32
|
|
108
108
|
const sizeOfOffset = 32
|
|
109
109
|
|
|
110
|
+
const arrayRegex = /^(.*)\[(\d+)?\]$/
|
|
111
|
+
|
|
112
|
+
/** `[max, min]` of each integer type, keyed by `size` and `signed`. */
|
|
113
|
+
const integerBounds = new Map<number, readonly [max: bigint, min: bigint]>()
|
|
114
|
+
|
|
110
115
|
/** @internal */
|
|
111
116
|
export function decodeAddress(
|
|
112
117
|
cursor: Cursor.Cursor,
|
|
@@ -124,14 +129,13 @@ export function decodeAddress(
|
|
|
124
129
|
})
|
|
125
130
|
const wrap = (address: Hex.Hex) =>
|
|
126
131
|
checksum ? Address.checksum(address) : address
|
|
127
|
-
return [wrap(Hex.fromBytes(
|
|
132
|
+
return [wrap(Hex.fromBytes(value.subarray(12))), 32]
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
export declare namespace decodeAddress {
|
|
131
136
|
type ErrorType =
|
|
132
137
|
| Address.InvalidAddressError
|
|
133
138
|
| Hex.fromBytes.ErrorType
|
|
134
|
-
| Bytes.slice.ErrorType
|
|
135
139
|
| Errors.GlobalErrorType
|
|
136
140
|
}
|
|
137
141
|
|
|
@@ -152,7 +156,7 @@ export function decodeArray(
|
|
|
152
156
|
// Note: zero-length fixed arrays (`T[0]`) are not dynamic.
|
|
153
157
|
if (length === null) {
|
|
154
158
|
// Dealing with a dynamic type, so get the offset of the array data.
|
|
155
|
-
const offset =
|
|
159
|
+
const offset = toOffset(cursor.readBytes(sizeOfOffset))
|
|
156
160
|
|
|
157
161
|
// Start is the static position of current slot + offset.
|
|
158
162
|
const start = staticPosition + offset
|
|
@@ -160,7 +164,7 @@ export function decodeArray(
|
|
|
160
164
|
|
|
161
165
|
// Get the length of the array from the offset.
|
|
162
166
|
cursor.setPosition(start)
|
|
163
|
-
const length =
|
|
167
|
+
const length = toOffset(cursor.readBytes(sizeOfLength))
|
|
164
168
|
|
|
165
169
|
// Check if the array has any dynamic children.
|
|
166
170
|
const dynamicChild = hasDynamicChild(param)
|
|
@@ -195,7 +199,7 @@ export function decodeArray(
|
|
|
195
199
|
// we need to decode the offset of the array data.
|
|
196
200
|
if (hasDynamicChild(param)) {
|
|
197
201
|
// Dealing with dynamic types, so get the offset of the array data.
|
|
198
|
-
const offset =
|
|
202
|
+
const offset = toOffset(cursor.readBytes(sizeOfOffset))
|
|
199
203
|
|
|
200
204
|
// Start is the static position of current slot + offset.
|
|
201
205
|
const start = staticPosition + offset
|
|
@@ -238,7 +242,7 @@ export function decodeArray(
|
|
|
238
242
|
}
|
|
239
243
|
|
|
240
244
|
export declare namespace decodeArray {
|
|
241
|
-
type ErrorType =
|
|
245
|
+
type ErrorType = Errors.GlobalErrorType
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
/** @internal */
|
|
@@ -259,12 +263,12 @@ export function decodeBytes(
|
|
|
259
263
|
const [_, size] = param.type.split('bytes')
|
|
260
264
|
if (!size) {
|
|
261
265
|
// Dealing with dynamic types, so get the offset of the bytes data.
|
|
262
|
-
const offset =
|
|
266
|
+
const offset = toOffset(cursor.readBytes(32))
|
|
263
267
|
|
|
264
268
|
// Set position of the cursor to start of bytes data.
|
|
265
269
|
cursor.setPosition(staticPosition + offset)
|
|
266
270
|
|
|
267
|
-
const length =
|
|
271
|
+
const length = toOffset(cursor.readBytes(32))
|
|
268
272
|
|
|
269
273
|
// If there is no length, we have zero data.
|
|
270
274
|
if (length === 0) {
|
|
@@ -282,13 +286,22 @@ export function decodeBytes(
|
|
|
282
286
|
|
|
283
287
|
// Read the whole slot so that a slot cut short of its padding is out of bounds.
|
|
284
288
|
const word = cursor.readBytes(32)
|
|
285
|
-
|
|
289
|
+
const size_ = Number.parseInt(size, 10)
|
|
290
|
+
// The value occupies the high `size` bytes of the word; the rest must be
|
|
291
|
+
// zero padding.
|
|
292
|
+
for (let i = size_; i < 32; i++)
|
|
293
|
+
if (word[i] !== 0)
|
|
294
|
+
throw new AbiParameters.BytesSizeMismatchError({
|
|
295
|
+
expectedSize: size_,
|
|
296
|
+
value: Hex.fromBytes(word),
|
|
297
|
+
})
|
|
298
|
+
return [Hex.fromBytes(word.subarray(0, size_)), 32]
|
|
286
299
|
}
|
|
287
300
|
|
|
288
301
|
export declare namespace decodeBytes {
|
|
289
302
|
type ErrorType =
|
|
303
|
+
| AbiParameters.BytesSizeMismatchError
|
|
290
304
|
| Hex.fromBytes.ErrorType
|
|
291
|
-
| Bytes.toNumber.ErrorType
|
|
292
305
|
| Errors.GlobalErrorType
|
|
293
306
|
}
|
|
294
307
|
|
|
@@ -297,8 +310,13 @@ export function decodeNumber(
|
|
|
297
310
|
cursor: Cursor.Cursor,
|
|
298
311
|
param: AbiParameters.Parameter,
|
|
299
312
|
) {
|
|
300
|
-
const
|
|
301
|
-
|
|
313
|
+
const { type } = param
|
|
314
|
+
// `uint256` is the common case: skip parsing its sign and size.
|
|
315
|
+
const signed = type !== 'uint256' && type.startsWith('int')
|
|
316
|
+
const size =
|
|
317
|
+
type === 'uint256'
|
|
318
|
+
? 256
|
|
319
|
+
: Number.parseInt(type.split('int')[1] || '256', 10)
|
|
302
320
|
const value = Bytes.toBigInt(cursor.readBytes(32), { signed })
|
|
303
321
|
// The word must hold a value that fits the declared size (zero-padded for
|
|
304
322
|
// unsigned, sign-extended for signed types).
|
|
@@ -353,7 +371,7 @@ export function decodeTuple(
|
|
|
353
371
|
// tuple data.
|
|
354
372
|
if (hasDynamicChild(param)) {
|
|
355
373
|
// Dealing with dynamic types, so get the offset of the tuple data.
|
|
356
|
-
const offset =
|
|
374
|
+
const offset = toOffset(cursor.readBytes(sizeOfOffset))
|
|
357
375
|
|
|
358
376
|
// Start is the static position of referencing slot + offset.
|
|
359
377
|
const start = staticPosition + offset
|
|
@@ -389,7 +407,7 @@ export function decodeTuple(
|
|
|
389
407
|
}
|
|
390
408
|
|
|
391
409
|
export declare namespace decodeTuple {
|
|
392
|
-
type ErrorType =
|
|
410
|
+
type ErrorType = Errors.GlobalErrorType
|
|
393
411
|
}
|
|
394
412
|
|
|
395
413
|
/** @internal */
|
|
@@ -398,13 +416,13 @@ export function decodeString(
|
|
|
398
416
|
{ staticPosition }: { staticPosition: number },
|
|
399
417
|
) {
|
|
400
418
|
// Get offset to start of string data.
|
|
401
|
-
const offset =
|
|
419
|
+
const offset = toOffset(cursor.readBytes(32))
|
|
402
420
|
|
|
403
421
|
// Start is the static position of current slot + offset.
|
|
404
422
|
const start = staticPosition + offset
|
|
405
423
|
cursor.setPosition(start)
|
|
406
424
|
|
|
407
|
-
const length =
|
|
425
|
+
const length = toOffset(cursor.readBytes(32))
|
|
408
426
|
|
|
409
427
|
// If there is no length, we have zero data (empty string).
|
|
410
428
|
if (length === 0) {
|
|
@@ -423,7 +441,6 @@ export function decodeString(
|
|
|
423
441
|
|
|
424
442
|
export declare namespace decodeString {
|
|
425
443
|
type ErrorType =
|
|
426
|
-
| Bytes.toNumber.ErrorType
|
|
427
444
|
| Bytes.toString.ErrorType
|
|
428
445
|
| Bytes.trimLeft.ErrorType
|
|
429
446
|
| Errors.GlobalErrorType
|
|
@@ -561,7 +578,7 @@ export function encode(preparedParameters: PreparedParameter[]): Hex.Hex {
|
|
|
561
578
|
}
|
|
562
579
|
|
|
563
580
|
// 3. Concatenate static and dynamic parts.
|
|
564
|
-
return
|
|
581
|
+
return join(staticParameters, dynamicParameters)
|
|
565
582
|
}
|
|
566
583
|
|
|
567
584
|
/** @internal */
|
|
@@ -643,7 +660,7 @@ export function encodeArray<const parameter extends AbiParameters.Parameter>(
|
|
|
643
660
|
}
|
|
644
661
|
return {
|
|
645
662
|
dynamic: false,
|
|
646
|
-
encoded:
|
|
663
|
+
encoded: join(preparedParameters.map(({ encoded }) => encoded)),
|
|
647
664
|
}
|
|
648
665
|
}
|
|
649
666
|
|
|
@@ -724,8 +741,7 @@ export function encodeNumber(
|
|
|
724
741
|
{ signed, size }: { signed: boolean; size: number },
|
|
725
742
|
): PreparedParameter {
|
|
726
743
|
if (typeof size === 'number') {
|
|
727
|
-
const max =
|
|
728
|
-
const min = signed ? -max - 1n : 0n
|
|
744
|
+
const [max, min] = getIntegerBounds(signed, size)
|
|
729
745
|
if (value > max || value < min)
|
|
730
746
|
throw new Hex.IntegerOutOfRangeError({
|
|
731
747
|
max: max.toString(),
|
|
@@ -807,7 +823,7 @@ export function encodeTuple<
|
|
|
807
823
|
dynamic,
|
|
808
824
|
encoded: dynamic
|
|
809
825
|
? encode(preparedParameters)
|
|
810
|
-
:
|
|
826
|
+
: join(preparedParameters.map(({ encoded }) => encoded)),
|
|
811
827
|
}
|
|
812
828
|
}
|
|
813
829
|
|
|
@@ -820,7 +836,9 @@ export declare namespace encodeTuple {
|
|
|
820
836
|
export function getArrayComponents(
|
|
821
837
|
type: string,
|
|
822
838
|
): [length: number | null, innerType: string] | undefined {
|
|
823
|
-
|
|
839
|
+
// Only array types end with `]`, so skip the regex for every other type.
|
|
840
|
+
if (type.charCodeAt(type.length - 1) !== 93) return undefined
|
|
841
|
+
const matches = type.match(arrayRegex)
|
|
824
842
|
return matches
|
|
825
843
|
? // Return `null` if the array is dynamic.
|
|
826
844
|
[matches[2]! ? Number(matches[2]!) : null, matches[1]!]
|
|
@@ -848,3 +866,44 @@ export function hasDynamicChild(param: AbiParameters.Parameter) {
|
|
|
848
866
|
|
|
849
867
|
return false
|
|
850
868
|
}
|
|
869
|
+
|
|
870
|
+
/** @internal */
|
|
871
|
+
function getIntegerBounds(signed: boolean, size: number) {
|
|
872
|
+
const key = size * 2 + (signed ? 1 : 0)
|
|
873
|
+
let bounds = integerBounds.get(key)
|
|
874
|
+
if (!bounds) {
|
|
875
|
+
const max = 2n ** (BigInt(size) - (signed ? 1n : 0n)) - 1n
|
|
876
|
+
bounds = [max, signed ? -max - 1n : 0n]
|
|
877
|
+
integerBounds.set(key, bounds)
|
|
878
|
+
}
|
|
879
|
+
return bounds
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Concatenates encoded parts with a single join, so that arrays of any length
|
|
884
|
+
* avoid spreading into `Hex.concat`.
|
|
885
|
+
*
|
|
886
|
+
* @internal
|
|
887
|
+
*/
|
|
888
|
+
function join(...lists: readonly (readonly Hex.Hex[])[]): Hex.Hex {
|
|
889
|
+
const parts: string[] = []
|
|
890
|
+
for (const list of lists)
|
|
891
|
+
for (let i = 0; i < list.length; i++) parts.push(list[i]!.slice(2))
|
|
892
|
+
return `0x${parts.join('')}`
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Reads an offset or length word as a number. Like `Bytes.toNumber` before it
|
|
897
|
+
* checked for safe integers, values above 6 bytes stay lossy, so that the
|
|
898
|
+
* cursor reports them as out of bounds.
|
|
899
|
+
*
|
|
900
|
+
* @internal
|
|
901
|
+
*/
|
|
902
|
+
function toOffset(word: Bytes.Bytes): number {
|
|
903
|
+
let i = 0
|
|
904
|
+
while (i < 26 && word[i] === 0) i++
|
|
905
|
+
if (i < 26) return Number(Hex.fromBytes(word))
|
|
906
|
+
let value = 0
|
|
907
|
+
for (; i < 32; i++) value = value * 256 + word[i]!
|
|
908
|
+
return value
|
|
909
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const length = 42
|
|
2
|
+
|
|
3
|
+
const ZERO = 48 // '0'
|
|
4
|
+
const NINE = 57 // '9'
|
|
5
|
+
const A_UPPER = 65 // 'A'
|
|
6
|
+
const F_UPPER = 70 // 'F'
|
|
7
|
+
const A_LOWER = 97 // 'a'
|
|
8
|
+
const F_LOWER = 102 // 'f'
|
|
9
|
+
const X_LOWER = 120 // 'x'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Combined shape + lowercase classification for an Ethereum address string.
|
|
13
|
+
* Avoids the regex / try-catch / error-allocation overhead in the hot path
|
|
14
|
+
* and avoids a second pass for callers that need both pieces of metadata
|
|
15
|
+
* (e.g. strict validation).
|
|
16
|
+
*
|
|
17
|
+
* - `0` = invalid shape (not `0x[0-9a-fA-F]{40}`)
|
|
18
|
+
* - `1` = valid shape, all-lowercase hex body (no checksum to verify)
|
|
19
|
+
* - `2` = valid shape, contains at least one `A-F` upper char
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export function classify(value: string): 0 | 1 | 2 {
|
|
24
|
+
if (typeof value !== 'string' || value.length !== length) return 0
|
|
25
|
+
if (value.charCodeAt(0) !== ZERO || value.charCodeAt(1) !== X_LOWER) return 0
|
|
26
|
+
let hasUpper = false
|
|
27
|
+
for (let i = 2; i < length; i++) {
|
|
28
|
+
const code = value.charCodeAt(i)
|
|
29
|
+
if (code >= ZERO && code <= NINE) continue
|
|
30
|
+
if (code >= A_LOWER && code <= F_LOWER) continue
|
|
31
|
+
if (code >= A_UPPER && code <= F_UPPER) {
|
|
32
|
+
hasUpper = true
|
|
33
|
+
continue
|
|
34
|
+
}
|
|
35
|
+
return 0
|
|
36
|
+
}
|
|
37
|
+
return hasUpper ? 2 : 1
|
|
38
|
+
}
|
package/core/internal/base58.ts
CHANGED
|
@@ -72,7 +72,7 @@ export const alphabetToInteger = /* __PURE__ */ Object.freeze<
|
|
|
72
72
|
|
|
73
73
|
/** @internal */
|
|
74
74
|
export function from(value: Hex.Hex | Bytes.Bytes) {
|
|
75
|
-
|
|
75
|
+
const bytes = Bytes.from(value)
|
|
76
76
|
|
|
77
77
|
let integer = (() => {
|
|
78
78
|
let hex = value
|
|
@@ -80,19 +80,24 @@ export function from(value: Hex.Hex | Bytes.Bytes) {
|
|
|
80
80
|
return BigInt(hex as string)
|
|
81
81
|
})()
|
|
82
82
|
|
|
83
|
+
// Divide by 58^9, the largest power of 58 below 2^53, so each BigInt
|
|
84
|
+
// division yields nine digits that number arithmetic can split.
|
|
83
85
|
let result = ''
|
|
84
86
|
while (integer > 0n) {
|
|
85
|
-
|
|
86
|
-
integer
|
|
87
|
-
|
|
87
|
+
let remainder = Number(integer % 7_427_658_739_644_928n)
|
|
88
|
+
integer /= 7_427_658_739_644_928n
|
|
89
|
+
// Every chunk but the most significant one is zero-padded to nine digits.
|
|
90
|
+
for (let i = 0; i < 9 && (remainder > 0 || integer > 0n); i++) {
|
|
91
|
+
result = integerToAlphabet[remainder % 58] + result
|
|
92
|
+
remainder = Math.floor(remainder / 58)
|
|
93
|
+
}
|
|
88
94
|
}
|
|
89
95
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
96
|
+
// Count leading zero bytes (all but the last byte) without copying.
|
|
97
|
+
let zeros = 0
|
|
98
|
+
while (zeros < bytes.length - 1 && bytes[zeros] === 0) zeros++
|
|
94
99
|
|
|
95
|
-
return result
|
|
100
|
+
return '1'.repeat(zeros) + result
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
/** @internal */
|
package/core/internal/bytes.ts
CHANGED
|
@@ -65,25 +65,20 @@ export declare namespace assertEndOffset {
|
|
|
65
65
|
| Errors.GlobalErrorType
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
/** Nibble value of each ASCII hex digit, or `-1` for any other character. */
|
|
69
|
+
const base16 = /*#__PURE__*/ (() => {
|
|
70
|
+
const table = new Int8Array(128).fill(-1)
|
|
71
|
+
for (let i = 0; i < 10; i++) table[48 + i] = i
|
|
72
|
+
for (let i = 0; i < 6; i++) {
|
|
73
|
+
table[65 + i] = 10 + i
|
|
74
|
+
table[97 + i] = 10 + i
|
|
75
|
+
}
|
|
76
|
+
return table
|
|
77
|
+
})()
|
|
77
78
|
|
|
78
79
|
/** @internal */
|
|
79
80
|
export function charCodeToBase16(char: number) {
|
|
80
|
-
|
|
81
|
-
return char - charCodeMap.zero
|
|
82
|
-
if (char >= charCodeMap.A && char <= charCodeMap.F)
|
|
83
|
-
return char - (charCodeMap.A - 10)
|
|
84
|
-
if (char >= charCodeMap.a && char <= charCodeMap.f)
|
|
85
|
-
return char - (charCodeMap.a - 10)
|
|
86
|
-
return undefined
|
|
81
|
+
return char < 128 ? base16[char]! : -1
|
|
87
82
|
}
|
|
88
83
|
|
|
89
84
|
/** @internal */
|
|
@@ -97,11 +92,7 @@ export function pad(bytes: Bytes.Bytes, options: pad.Options = {}) {
|
|
|
97
92
|
type: 'Bytes',
|
|
98
93
|
})
|
|
99
94
|
const paddedBytes = new Uint8Array(size)
|
|
100
|
-
|
|
101
|
-
const padEnd = dir === 'right'
|
|
102
|
-
paddedBytes[padEnd ? i : size - i - 1] =
|
|
103
|
-
bytes[padEnd ? i : bytes.length - i - 1]!
|
|
104
|
-
}
|
|
95
|
+
paddedBytes.set(bytes, dir === 'right' ? 0 : size - bytes.length)
|
|
105
96
|
return paddedBytes
|
|
106
97
|
}
|
|
107
98
|
|
|
@@ -128,8 +119,7 @@ export function trim(
|
|
|
128
119
|
|
|
129
120
|
let sliceLength = 0
|
|
130
121
|
for (let i = 0; i < data.length - 1; i++) {
|
|
131
|
-
if (data[dir === 'left' ? i : data.length - i - 1]
|
|
132
|
-
sliceLength++
|
|
122
|
+
if (data[dir === 'left' ? i : data.length - i - 1] === 0) sliceLength++
|
|
133
123
|
else break
|
|
134
124
|
}
|
|
135
125
|
data =
|
package/core/internal/caches.ts
CHANGED
package/core/internal/cursor.ts
CHANGED
|
@@ -6,7 +6,13 @@ export type Cursor = {
|
|
|
6
6
|
bytes: Bytes
|
|
7
7
|
dataView: DataView
|
|
8
8
|
position: number
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Positions read so far, so a repeated read can be counted. Word-aligned
|
|
11
|
+
* positions, where ABI data is read, go in a bit set with one bit per 32
|
|
12
|
+
* bytes; other positions go in a set. Both are allocated on first use.
|
|
13
|
+
*/
|
|
14
|
+
alignedReads: Uint8Array | undefined
|
|
15
|
+
unalignedReads: Set<number> | undefined
|
|
10
16
|
/** Total number of bytes read. */
|
|
11
17
|
readSize: number
|
|
12
18
|
/** Maximum total number of bytes that can be read. */
|
|
@@ -18,7 +24,6 @@ export type Cursor = {
|
|
|
18
24
|
assertReadSize(length: number): void
|
|
19
25
|
assertPosition(position: number): void
|
|
20
26
|
decrementPosition(offset: number): void
|
|
21
|
-
getReadCount(position?: number): number
|
|
22
27
|
incrementPosition(offset: number): void
|
|
23
28
|
inspectByte(position?: number): Bytes[number]
|
|
24
29
|
inspectBytes(length: number, position?: number): Bytes
|
|
@@ -44,9 +49,19 @@ export type Cursor = {
|
|
|
44
49
|
|
|
45
50
|
const staticCursor: Cursor = {
|
|
46
51
|
bytes: new Uint8Array(),
|
|
47
|
-
|
|
52
|
+
// Lazy: most cursors (e.g. ABI decoding) never read through a `DataView`.
|
|
53
|
+
get dataView() {
|
|
54
|
+
const dataView = new DataView(
|
|
55
|
+
this.bytes.buffer,
|
|
56
|
+
this.bytes.byteOffset,
|
|
57
|
+
this.bytes.byteLength,
|
|
58
|
+
)
|
|
59
|
+
Object.defineProperty(this, 'dataView', { value: dataView })
|
|
60
|
+
return dataView
|
|
61
|
+
},
|
|
48
62
|
position: 0,
|
|
49
|
-
|
|
63
|
+
alignedReads: undefined,
|
|
64
|
+
unalignedReads: undefined,
|
|
50
65
|
readSize: 0,
|
|
51
66
|
readSizeLimit: Number.POSITIVE_INFINITY,
|
|
52
67
|
recursiveReadCount: 0,
|
|
@@ -79,9 +94,6 @@ const staticCursor: Cursor = {
|
|
|
79
94
|
this.assertPosition(position)
|
|
80
95
|
this.position = position
|
|
81
96
|
},
|
|
82
|
-
getReadCount(position) {
|
|
83
|
-
return this.positionReadCount.get(position || this.position) || 0
|
|
84
|
-
},
|
|
85
97
|
incrementPosition(offset) {
|
|
86
98
|
if (offset < 0) throw new NegativeOffsetError({ offset })
|
|
87
99
|
const position = this.position + offset
|
|
@@ -211,9 +223,29 @@ const staticCursor: Cursor = {
|
|
|
211
223
|
},
|
|
212
224
|
_touch() {
|
|
213
225
|
if (this.recursiveReadLimit === Number.POSITIVE_INFINITY) return
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
226
|
+
const { position } = this
|
|
227
|
+
if (position % 32 !== 0 || position > this.bytes.length) {
|
|
228
|
+
const reads = (this.unalignedReads ??= new Set())
|
|
229
|
+
if (reads.has(position)) this.recursiveReadCount++
|
|
230
|
+
else reads.add(position)
|
|
231
|
+
return
|
|
232
|
+
}
|
|
233
|
+
// One bit per 32-byte word, so the set is at most 1/256 the size of the
|
|
234
|
+
// data. It grows with the furthest word read rather than being sized to
|
|
235
|
+
// the whole input up front. Plain arithmetic rather than bitwise operators
|
|
236
|
+
// on lengths and positions, which would coerce them to 32-bit integers.
|
|
237
|
+
const word = position / 32
|
|
238
|
+
const index = Math.floor(word / 8)
|
|
239
|
+
let reads = this.alignedReads
|
|
240
|
+
if (!reads || index >= reads.length) {
|
|
241
|
+
const max = Math.floor(this.bytes.length / 256) + 1
|
|
242
|
+
const next = new Uint8Array(Math.min(max, Math.max(64, (index + 1) * 2)))
|
|
243
|
+
if (reads) next.set(reads)
|
|
244
|
+
reads = this.alignedReads = next
|
|
245
|
+
}
|
|
246
|
+
const bit = 1 << (word % 8)
|
|
247
|
+
if (reads[index]! & bit) this.recursiveReadCount++
|
|
248
|
+
else reads[index]! |= bit
|
|
217
249
|
},
|
|
218
250
|
}
|
|
219
251
|
|
|
@@ -224,12 +256,8 @@ export function create(
|
|
|
224
256
|
): Cursor {
|
|
225
257
|
const cursor: Cursor = Object.create(staticCursor)
|
|
226
258
|
cursor.bytes = bytes
|
|
227
|
-
cursor.
|
|
228
|
-
|
|
229
|
-
bytes.byteOffset,
|
|
230
|
-
bytes.byteLength,
|
|
231
|
-
)
|
|
232
|
-
cursor.positionReadCount = new Map()
|
|
259
|
+
cursor.alignedReads = undefined
|
|
260
|
+
cursor.unalignedReads = undefined
|
|
233
261
|
cursor.recursiveReadLimit = recursiveReadLimit
|
|
234
262
|
// `recursiveReadLimit` allows one read per position plus that many repeated
|
|
235
263
|
// reads. Allow as many bytes as that number of 32-byte reads, so that reads
|
package/core/internal/hex.ts
CHANGED
|
@@ -67,7 +67,9 @@ export function pad(hex_: Hex.Hex, options: pad.Options = {}) {
|
|
|
67
67
|
|
|
68
68
|
if (size === 0) return hex_
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
// Same result as `hex_.replace('0x', '')`, without a search when the prefix
|
|
71
|
+
// is present.
|
|
72
|
+
const hex = hex_.startsWith('0x') ? hex_.slice(2) : hex_.replace('0x', '')
|
|
71
73
|
if (hex.length > size * 2)
|
|
72
74
|
throw new Hex.SizeExceedsPaddingSizeError({
|
|
73
75
|
size: Math.ceil(hex.length / 2),
|
|
@@ -94,11 +96,11 @@ export function trim(
|
|
|
94
96
|
): trim.ReturnType {
|
|
95
97
|
const { dir = 'left' } = options
|
|
96
98
|
|
|
97
|
-
let data = value.replace('0x', '')
|
|
99
|
+
let data = value.startsWith('0x') ? value.slice(2) : value.replace('0x', '')
|
|
98
100
|
|
|
99
101
|
let sliceLength = 0
|
|
100
102
|
for (let i = 0; i < data.length - 1; i++) {
|
|
101
|
-
if (data
|
|
103
|
+
if (data.charCodeAt(dir === 'left' ? i : data.length - i - 1) === 48)
|
|
102
104
|
sliceLength++
|
|
103
105
|
else break
|
|
104
106
|
}
|
package/core/internal/lru.ts
CHANGED
|
@@ -14,20 +14,19 @@ export class LruMap<value = unknown> extends Map<string, value> {
|
|
|
14
14
|
|
|
15
15
|
override get(key: string) {
|
|
16
16
|
const value = super.get(key)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
super.set(key, value)
|
|
21
|
-
}
|
|
22
|
-
|
|
17
|
+
if (value === undefined) return value
|
|
18
|
+
super.delete(key)
|
|
19
|
+
super.set(key, value)
|
|
23
20
|
return value
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
override set(key: string, value: value) {
|
|
24
|
+
// Re-insert so that an existing key becomes the most recently used.
|
|
25
|
+
super.delete(key)
|
|
27
26
|
super.set(key, value)
|
|
28
27
|
if (this.maxSize && this.size > this.maxSize) {
|
|
29
28
|
const firstKey = this.keys().next().value
|
|
30
|
-
if (firstKey) this.delete(firstKey)
|
|
29
|
+
if (firstKey !== undefined) this.delete(firstKey)
|
|
31
30
|
}
|
|
32
31
|
return this
|
|
33
32
|
}
|
package/core/internal/promise.ts
CHANGED
|
@@ -5,7 +5,7 @@ export function withTimeout<data>(
|
|
|
5
5
|
fn: withTimeout.Fn<data>,
|
|
6
6
|
options: withTimeout.Options,
|
|
7
7
|
): Promise<data> {
|
|
8
|
-
const { errorInstance
|
|
8
|
+
const { errorInstance, timeout, signal } = options
|
|
9
9
|
return new Promise((resolve, reject) => {
|
|
10
10
|
;(async () => {
|
|
11
11
|
let timeoutId: any
|
|
@@ -16,12 +16,14 @@ export function withTimeout<data>(
|
|
|
16
16
|
if (signal) {
|
|
17
17
|
controller.abort()
|
|
18
18
|
} else {
|
|
19
|
-
reject(errorInstance)
|
|
19
|
+
reject(errorInstance ?? new TimeoutError())
|
|
20
20
|
}
|
|
21
21
|
}, timeout) as any
|
|
22
22
|
resolve(await fn({ signal: controller.signal }))
|
|
23
23
|
} catch (err) {
|
|
24
|
-
|
|
24
|
+
// Only build the error once the request has timed out.
|
|
25
|
+
if ((err as Error)?.name === 'AbortError')
|
|
26
|
+
reject(errorInstance ?? new TimeoutError())
|
|
25
27
|
reject(err)
|
|
26
28
|
} finally {
|
|
27
29
|
clearTimeout(timeoutId)
|
|
@@ -28,7 +28,7 @@ export const magicBytes =
|
|
|
28
28
|
* Deployless ERC-6492 signature verification bytecode.
|
|
29
29
|
*/
|
|
30
30
|
export const universalSignatureValidatorBytecode =
|
|
31
|
-
'
|
|
31
|
+
'0x608060405234801561001057600080fd5b506040516106ad3803806106ad83398101604081905261002f91610537565b600061003c848484610048565b9050806000526001601ff35b60007f649264926492649264926492649264926492649264926492649264926492649261007483610425565b036101e7576000606080848060200190518101906100929190610590565b60405192955090935091506000906001600160a01b038516906100b69085906105f6565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b908790600401610612565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d1919061064c565b6001600160e01b0319161494505050505061041e565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e906102279087908790600401610612565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610268919061064c565b6001600160e01b03191614905061041e565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061068d83398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e761043e565b5060208201516040808401518451859392600091859190811061030c5761030c610676565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061068d83398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b604080516000808252602082018084528a905260ff841692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa1580156103e0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906104165750886001600160a01b0316816001600160a01b0316145b955050505050505b9392505050565b600060208251101561043657600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461047157600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b838110156104a557818101518382015260200161048d565b50506000910152565b600082601f8301126104bf57600080fd5b81516001600160401b038111156104d8576104d8610474565b604051601f8201601f19908116603f011681016001600160401b038111828210171561050657610506610474565b60405281815283820160200185101561051e57600080fd5b61052f82602083016020870161048a565b949350505050565b60008060006060848603121561054c57600080fd5b83516105578161045c565b6020850151604086015191945092506001600160401b0381111561057a57600080fd5b610586868287016104ae565b9150509250925092565b6000806000606084860312156105a557600080fd5b83516105b08161045c565b60208501519093506001600160401b038111156105cc57600080fd5b6105d8868287016104ae565b604086015190935090506001600160401b0381111561057a57600080fd5b6000825161060881846020870161048a565b9190910192915050565b828152604060208201526000825180604084015261063781606085016020870161048a565b601f01601f1916919091016060019392505050565b60006020828403121561065e57600080fd5b81516001600160e01b03198116811461041e57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572'
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* ABI for the ERC-6492 universal deployless signature validator contract.
|
package/package.json
CHANGED
|
@@ -79,7 +79,7 @@ describe('fromRpc', () => {
|
|
|
79
79
|
expect(() =>
|
|
80
80
|
AccountSimulation.fromRpc({ ...rpc, config: `${config}00` }),
|
|
81
81
|
).toThrowErrorMatchingInlineSnapshot(
|
|
82
|
-
`[
|
|
82
|
+
`[Rlp.TrailingBytesError: RLP payload encodes a single item, but \`1\` trailing byte remains.]`,
|
|
83
83
|
)
|
|
84
84
|
})
|
|
85
85
|
|
|
@@ -225,7 +225,7 @@ describe('unwrap', () => {
|
|
|
225
225
|
).toThrowErrorMatchingInlineSnapshot(`
|
|
226
226
|
[SignaturePreAuthorized.InvalidWrappedSignatureError: Value \`0xf8fab85604f39fd6e51aad88f6f4ce6ab8827279cfffb922663dc3ccd3e78382806b81f811192a9afa9f38335c19a3897a2676008ab611d8a61c73da6988f81a2cc37c5c712f67280aeb732e45688c9347458092b772306c6c1cf8a0f85b821079809472989d24e6e1f0bbe29a5f304d0db21a318c012e84713fb300dad99420c00000000000000000000000000000000000018398968080a0e55f870744098e6baf2f15e0faa6f8f9de283280f26f416dee8dcf9189a553c5b841c026ad99f18042ef3ac0d7a88ffbcd910eb4ccaf435b1acf684f6eb63425909642b07095e6f94edbf489ac1909caa41b0e3eee6971862939e8403c1ab4e617ca1b001165116511651165116511651165116511651165116511651165116511651165\` is an invalid pre-authorized signature.
|
|
227
227
|
|
|
228
|
-
Details:
|
|
228
|
+
Details: RLP payload encodes a single item, but \`1\` trailing byte remains.]
|
|
229
229
|
`)
|
|
230
230
|
})
|
|
231
231
|
|