Skip to content

@latticexyz/protocol-parser@2.0.0-next.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 21 Jul 14:48
· 1136 commits to main since this release
f0dfff7

Minor Changes

  • #1100 b98e5180 Thanks @alvrs! - feat: add abiTypesToSchema, a util to turn a list of abi types into a Schema by separating static and dynamic types

  • #1111 ca50fef8 Thanks @alvrs! - feat: add encodeKeyTuple, a util to encode key tuples in Typescript (equivalent to key tuple encoding in Solidity and inverse of decodeKeyTuple).
    Example:

    encodeKeyTuple({ staticFields: ["uint256", "int32", "bytes16", "address", "bool", "int8"], dynamicFields: [] }, [
      42n,
      -42,
      "0x12340000000000000000000000000000",
      "0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF",
      true,
      3,
    ]);
    // [
    //  "0x000000000000000000000000000000000000000000000000000000000000002a",
    //  "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd6",
    //  "0x1234000000000000000000000000000000000000000000000000000000000000",
    //  "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff",
    //  "0x0000000000000000000000000000000000000000000000000000000000000001",
    //  "0x0000000000000000000000000000000000000000000000000000000000000003",
    // ]

Patch Changes