Skip to content

ox@1.8.14

Choose a tag to compare

@github-actions github-actions released this 09 Nov 02:19
· 62 commits to main since this release
f4be1ac

Patch Changes

  • #602 15ef7a4 Thanks @jxom! - Fixed AbiError.decode to resolve overloaded errors by the selector in data instead of always decoding with the first matching overload.

  • #600 8228e04 Thanks @jxom! - Fixed AbiEvent.assertArgs and AbiEvent.extractLogs not matching integer arguments given as a number against values decoded as bigint, or as a bigint against small integers decoded as number.

  • #588 816729d Thanks @jxom! - Fixed AbiEvent.encode accepting out-of-range values for indexed intN/uintN (N < 256) and wrong-sized bytesN (N < 32) arguments instead of throwing.

  • #576 a6af44f Thanks @jxom! - Added userAddress to AccountOperation transaction operations, so a configurable account acting as an access key (TIP-1111) can collect owner approvals and serialize a keychain V2 envelope for its parent.

  • #564 b03705a Thanks @jxom! - Fixed AbiEvent.decodeLog and AbiEvent.extractLogs to decode anonymous event logs when every event in the ABI is anonymous or, for extractLogs, when eventName names the event, throwing AbiEvent.AnonymousEventAmbiguityError from decodeLog when several anonymous events fit.

  • #580 b0994e1 Thanks @jxom! - Fixed Base32.toBytes and Base32.toHex accepting non-canonical input (non-zero trailing bits or an impossible length) by throwing Base32.InvalidPaddingError.

  • #573 5ba70c0 Thanks @RaphaelFakhri! - Fixed Cbor.decode to decode a __proto__ map key as an own property instead of replacing the prototype of the decoded object.

  • #503 97a4cce Thanks @ara-stock! - Fixed CompactSize.toBytes and CompactSize.toHex silently truncating values larger than 2^64 - 1 instead of throwing.

  • #591 401173c Thanks @jxom! - Fixed Attribution.fromData to return undefined when a codes or CBOR length field claims more bytes than precede it.

  • #584 7f37495 Thanks @jxom! - Fixed Hex.toBigInt and Hex.toNumber throwing on odd-length hex with signed: true, and Hex.fromNumber returning 0x0 for a negative number with signed: true and no size.

  • #596 80d74c1 Thanks @jxom! - Fixed Rlp.toBytes and Rlp.toHex to reject non-canonical encodings (a single byte below 0x80 with a length prefix, or a long-form or zero-padded length) with Rlp.NonCanonicalError.

  • #569 7a564af Thanks @gakonst! - Improved validation performance in Hex.assert, Value, TypedData, Siwe.isUri, ABI overload resolution, and the ox/zod hex, address, quantity, and Solidity type schemas by reusing module-level regular expressions instead of recreating them on every call.

  • #600 8228e04 Thanks @jxom! - Fixed Bytes.fromHex and Hex.toBytes shifting the bytes of odd-length hex values when size was specified.

  • #600 8228e04 Thanks @jxom! - Fixed RpcTransport.fromHttp sending both the default and the caller's Content-Type when fetchOptions.headers set it, instead of the caller's value alone.

  • #570 8a9f850 Thanks @gakonst! - Improved AbiItem.getSignatureHash and AbiItem.getSelector performance, along with the selector lookups in AbiItem.fromAbi, AbiFunction.decodeData, AbiEvent.decodeLog and AbiEvent.extractLogs, by caching signature hashes by normalized signature in a bounded cache that Caches.clear and engine changes reset.

  • #600 8228e04 Thanks @jxom! - Fixed Siwe.validateMessage accepting a message with a nonce shorter than 8 alphanumeric characters or a version other than 1, which EIP-4361 does not allow.

  • #600 8228e04 Thanks @jxom! - Fixed AbiItem.fromAbi throwing AbiItem.AmbiguityError for string and bytes overloads when the argument is a plain string; only hex strings and Uint8Array values now match bytes.

  • #582 8d042de Thanks @jxom! - Fixed Tick.fromPrice accepting negative prices between -1 and 0 as their positive counterparts instead of throwing Tick.PriceOutOfBoundsError.

  • #600 8228e04 Thanks @jxom! - Fixed TypedData.assert and TypedData.validate (and so TypedData.getSignPayload and TypedData.serialize) rejecting struct names that contain :, such as HyperliquidTransaction:SendAsset.

  • #593 c370946 Thanks @jxom! - Fixed UserOperation.toPacked and UserOperation.toInitCode to keep the padded EIP-7702 0x7702 initCode marker expected by EntryPoint 0.8 and 0.9, using the delegate address only with the new forHash option.

  • #598 b2771c8 Thanks @jxom! - Fixed AbiFunction.decodeData returning undefined when a function name has a zero-input overload and the calldata targets another overload, by keeping the other overloads on items fromAbi resolves without args.