@latticexyz/schema-type 2.0.0-next.0 → 2.0.0-next.10
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/dist/typescript/deprecated/index.js.map +1 -1
- package/dist/typescript/index.js +1 -1
- package/dist/typescript/index.js.map +1 -1
- package/package.json +6 -5
- package/src/solidity/SchemaType.sol +1 -1
- package/src/typescript/deprecated/utils/encodeSchema.ts +1 -0
- package/src/typescript/dynamicAbiTypes.ts +3 -3
- package/src/typescript/staticAbiTypes.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/typescript/deprecated/SchemaType.ts","../../../src/typescript/deprecated/mappings/SchemaTypeToAbiType.ts","../../../src/typescript/deprecated/types/AbiTypes.ts","../../../src/typescript/deprecated/mappings/AbiTypeToSchemaType.ts","../../../src/typescript/deprecated/utils/getStaticByteLength.ts","../../../src/typescript/deprecated/types/StaticAbiTypes.ts","../../../src/typescript/deprecated/mappings/SchemaTypeArrayToElement.ts","../../../src/typescript/deprecated/utils/encodeSchema.ts","../../../src/typescript/deprecated/mappings/AbiTypeToDefaultValue.ts","../../../src/typescript/deprecated/utils/getAbiTypeDefaultValue.ts"],"sourcesContent":["// WARNING: SchemaType enum MUST mirror the solidity version!\n// WARNING: SchemaType methods use hardcoded enum indexes, review them after any changes to the enum\nexport enum SchemaType {\n UINT8,\n UINT16,\n UINT24,\n UINT32,\n UINT40,\n UINT48,\n UINT56,\n UINT64,\n UINT72,\n UINT80,\n UINT88,\n UINT96,\n UINT104,\n UINT112,\n UINT120,\n UINT128,\n UINT136,\n UINT144,\n UINT152,\n UINT160,\n UINT168,\n UINT176,\n UINT184,\n UINT192,\n UINT200,\n UINT208,\n UINT216,\n UINT224,\n UINT232,\n UINT240,\n UINT248,\n UINT256,\n INT8,\n INT16,\n INT24,\n INT32,\n INT40,\n INT48,\n INT56,\n INT64,\n INT72,\n INT80,\n INT88,\n INT96,\n INT104,\n INT112,\n INT120,\n INT128,\n INT136,\n INT144,\n INT152,\n INT160,\n INT168,\n INT176,\n INT184,\n INT192,\n INT200,\n INT208,\n INT216,\n INT224,\n INT232,\n INT240,\n INT248,\n INT256,\n BYTES1,\n BYTES2,\n BYTES3,\n BYTES4,\n BYTES5,\n BYTES6,\n BYTES7,\n BYTES8,\n BYTES9,\n BYTES10,\n BYTES11,\n BYTES12,\n BYTES13,\n BYTES14,\n BYTES15,\n BYTES16,\n BYTES17,\n BYTES18,\n BYTES19,\n BYTES20,\n BYTES21,\n BYTES22,\n BYTES23,\n BYTES24,\n BYTES25,\n BYTES26,\n BYTES27,\n BYTES28,\n BYTES29,\n BYTES30,\n BYTES31,\n BYTES32,\n BOOL,\n ADDRESS,\n UINT8_ARRAY,\n UINT16_ARRAY,\n UINT24_ARRAY,\n UINT32_ARRAY,\n UINT40_ARRAY,\n UINT48_ARRAY,\n UINT56_ARRAY,\n UINT64_ARRAY,\n UINT72_ARRAY,\n UINT80_ARRAY,\n UINT88_ARRAY,\n UINT96_ARRAY,\n UINT104_ARRAY,\n UINT112_ARRAY,\n UINT120_ARRAY,\n UINT128_ARRAY,\n UINT136_ARRAY,\n UINT144_ARRAY,\n UINT152_ARRAY,\n UINT160_ARRAY,\n UINT168_ARRAY,\n UINT176_ARRAY,\n UINT184_ARRAY,\n UINT192_ARRAY,\n UINT200_ARRAY,\n UINT208_ARRAY,\n UINT216_ARRAY,\n UINT224_ARRAY,\n UINT232_ARRAY,\n UINT240_ARRAY,\n UINT248_ARRAY,\n UINT256_ARRAY,\n INT8_ARRAY,\n INT16_ARRAY,\n INT24_ARRAY,\n INT32_ARRAY,\n INT40_ARRAY,\n INT48_ARRAY,\n INT56_ARRAY,\n INT64_ARRAY,\n INT72_ARRAY,\n INT80_ARRAY,\n INT88_ARRAY,\n INT96_ARRAY,\n INT104_ARRAY,\n INT112_ARRAY,\n INT120_ARRAY,\n INT128_ARRAY,\n INT136_ARRAY,\n INT144_ARRAY,\n INT152_ARRAY,\n INT160_ARRAY,\n INT168_ARRAY,\n INT176_ARRAY,\n INT184_ARRAY,\n INT192_ARRAY,\n INT200_ARRAY,\n INT208_ARRAY,\n INT216_ARRAY,\n INT224_ARRAY,\n INT232_ARRAY,\n INT240_ARRAY,\n INT248_ARRAY,\n INT256_ARRAY,\n BYTES1_ARRAY,\n BYTES2_ARRAY,\n BYTES3_ARRAY,\n BYTES4_ARRAY,\n BYTES5_ARRAY,\n BYTES6_ARRAY,\n BYTES7_ARRAY,\n BYTES8_ARRAY,\n BYTES9_ARRAY,\n BYTES10_ARRAY,\n BYTES11_ARRAY,\n BYTES12_ARRAY,\n BYTES13_ARRAY,\n BYTES14_ARRAY,\n BYTES15_ARRAY,\n BYTES16_ARRAY,\n BYTES17_ARRAY,\n BYTES18_ARRAY,\n BYTES19_ARRAY,\n BYTES20_ARRAY,\n BYTES21_ARRAY,\n BYTES22_ARRAY,\n BYTES23_ARRAY,\n BYTES24_ARRAY,\n BYTES25_ARRAY,\n BYTES26_ARRAY,\n BYTES27_ARRAY,\n BYTES28_ARRAY,\n BYTES29_ARRAY,\n BYTES30_ARRAY,\n BYTES31_ARRAY,\n BYTES32_ARRAY,\n BOOL_ARRAY,\n ADDRESS_ARRAY,\n BYTES,\n STRING,\n}\n","import { SchemaType } from \"../SchemaType\";\n\nexport const SchemaTypeToAbiType = {\n [SchemaType.UINT8]: \"uint8\",\n [SchemaType.UINT16]: \"uint16\",\n [SchemaType.UINT24]: \"uint24\",\n [SchemaType.UINT32]: \"uint32\",\n [SchemaType.UINT40]: \"uint40\",\n [SchemaType.UINT48]: \"uint48\",\n [SchemaType.UINT56]: \"uint56\",\n [SchemaType.UINT64]: \"uint64\",\n [SchemaType.UINT72]: \"uint72\",\n [SchemaType.UINT80]: \"uint80\",\n [SchemaType.UINT88]: \"uint88\",\n [SchemaType.UINT96]: \"uint96\",\n [SchemaType.UINT104]: \"uint104\",\n [SchemaType.UINT112]: \"uint112\",\n [SchemaType.UINT120]: \"uint120\",\n [SchemaType.UINT128]: \"uint128\",\n [SchemaType.UINT136]: \"uint136\",\n [SchemaType.UINT144]: \"uint144\",\n [SchemaType.UINT152]: \"uint152\",\n [SchemaType.UINT160]: \"uint160\",\n [SchemaType.UINT168]: \"uint168\",\n [SchemaType.UINT176]: \"uint176\",\n [SchemaType.UINT184]: \"uint184\",\n [SchemaType.UINT192]: \"uint192\",\n [SchemaType.UINT200]: \"uint200\",\n [SchemaType.UINT208]: \"uint208\",\n [SchemaType.UINT216]: \"uint216\",\n [SchemaType.UINT224]: \"uint224\",\n [SchemaType.UINT232]: \"uint232\",\n [SchemaType.UINT240]: \"uint240\",\n [SchemaType.UINT248]: \"uint248\",\n [SchemaType.UINT256]: \"uint256\",\n\n [SchemaType.INT8]: \"int8\",\n [SchemaType.INT16]: \"int16\",\n [SchemaType.INT24]: \"int24\",\n [SchemaType.INT32]: \"int32\",\n [SchemaType.INT40]: \"int40\",\n [SchemaType.INT48]: \"int48\",\n [SchemaType.INT56]: \"int56\",\n [SchemaType.INT64]: \"int64\",\n [SchemaType.INT72]: \"int72\",\n [SchemaType.INT80]: \"int80\",\n [SchemaType.INT88]: \"int88\",\n [SchemaType.INT96]: \"int96\",\n [SchemaType.INT104]: \"int104\",\n [SchemaType.INT112]: \"int112\",\n [SchemaType.INT120]: \"int120\",\n [SchemaType.INT128]: \"int128\",\n [SchemaType.INT136]: \"int136\",\n [SchemaType.INT144]: \"int144\",\n [SchemaType.INT152]: \"int152\",\n [SchemaType.INT160]: \"int160\",\n [SchemaType.INT168]: \"int168\",\n [SchemaType.INT176]: \"int176\",\n [SchemaType.INT184]: \"int184\",\n [SchemaType.INT192]: \"int192\",\n [SchemaType.INT200]: \"int200\",\n [SchemaType.INT208]: \"int208\",\n [SchemaType.INT216]: \"int216\",\n [SchemaType.INT224]: \"int224\",\n [SchemaType.INT232]: \"int232\",\n [SchemaType.INT240]: \"int240\",\n [SchemaType.INT248]: \"int248\",\n [SchemaType.INT256]: \"int256\",\n\n [SchemaType.BYTES1]: \"bytes1\",\n [SchemaType.BYTES2]: \"bytes2\",\n [SchemaType.BYTES3]: \"bytes3\",\n [SchemaType.BYTES4]: \"bytes4\",\n [SchemaType.BYTES5]: \"bytes5\",\n [SchemaType.BYTES6]: \"bytes6\",\n [SchemaType.BYTES7]: \"bytes7\",\n [SchemaType.BYTES8]: \"bytes8\",\n [SchemaType.BYTES9]: \"bytes9\",\n [SchemaType.BYTES10]: \"bytes10\",\n [SchemaType.BYTES11]: \"bytes11\",\n [SchemaType.BYTES12]: \"bytes12\",\n [SchemaType.BYTES13]: \"bytes13\",\n [SchemaType.BYTES14]: \"bytes14\",\n [SchemaType.BYTES15]: \"bytes15\",\n [SchemaType.BYTES16]: \"bytes16\",\n [SchemaType.BYTES17]: \"bytes17\",\n [SchemaType.BYTES18]: \"bytes18\",\n [SchemaType.BYTES19]: \"bytes19\",\n [SchemaType.BYTES20]: \"bytes20\",\n [SchemaType.BYTES21]: \"bytes21\",\n [SchemaType.BYTES22]: \"bytes22\",\n [SchemaType.BYTES23]: \"bytes23\",\n [SchemaType.BYTES24]: \"bytes24\",\n [SchemaType.BYTES25]: \"bytes25\",\n [SchemaType.BYTES26]: \"bytes26\",\n [SchemaType.BYTES27]: \"bytes27\",\n [SchemaType.BYTES28]: \"bytes28\",\n [SchemaType.BYTES29]: \"bytes29\",\n [SchemaType.BYTES30]: \"bytes30\",\n [SchemaType.BYTES31]: \"bytes31\",\n [SchemaType.BYTES32]: \"bytes32\",\n\n [SchemaType.BOOL]: \"bool\",\n [SchemaType.ADDRESS]: \"address\",\n\n [SchemaType.UINT8_ARRAY]: \"uint8[]\",\n [SchemaType.UINT16_ARRAY]: \"uint16[]\",\n [SchemaType.UINT24_ARRAY]: \"uint24[]\",\n [SchemaType.UINT32_ARRAY]: \"uint32[]\",\n [SchemaType.UINT40_ARRAY]: \"uint40[]\",\n [SchemaType.UINT48_ARRAY]: \"uint48[]\",\n [SchemaType.UINT56_ARRAY]: \"uint56[]\",\n [SchemaType.UINT64_ARRAY]: \"uint64[]\",\n [SchemaType.UINT72_ARRAY]: \"uint72[]\",\n [SchemaType.UINT80_ARRAY]: \"uint80[]\",\n [SchemaType.UINT88_ARRAY]: \"uint88[]\",\n [SchemaType.UINT96_ARRAY]: \"uint96[]\",\n [SchemaType.UINT104_ARRAY]: \"uint104[]\",\n [SchemaType.UINT112_ARRAY]: \"uint112[]\",\n [SchemaType.UINT120_ARRAY]: \"uint120[]\",\n [SchemaType.UINT128_ARRAY]: \"uint128[]\",\n [SchemaType.UINT136_ARRAY]: \"uint136[]\",\n [SchemaType.UINT144_ARRAY]: \"uint144[]\",\n [SchemaType.UINT152_ARRAY]: \"uint152[]\",\n [SchemaType.UINT160_ARRAY]: \"uint160[]\",\n [SchemaType.UINT168_ARRAY]: \"uint168[]\",\n [SchemaType.UINT176_ARRAY]: \"uint176[]\",\n [SchemaType.UINT184_ARRAY]: \"uint184[]\",\n [SchemaType.UINT192_ARRAY]: \"uint192[]\",\n [SchemaType.UINT200_ARRAY]: \"uint200[]\",\n [SchemaType.UINT208_ARRAY]: \"uint208[]\",\n [SchemaType.UINT216_ARRAY]: \"uint216[]\",\n [SchemaType.UINT224_ARRAY]: \"uint224[]\",\n [SchemaType.UINT232_ARRAY]: \"uint232[]\",\n [SchemaType.UINT240_ARRAY]: \"uint240[]\",\n [SchemaType.UINT248_ARRAY]: \"uint248[]\",\n [SchemaType.UINT256_ARRAY]: \"uint256[]\",\n\n [SchemaType.INT8_ARRAY]: \"int8[]\",\n [SchemaType.INT16_ARRAY]: \"int16[]\",\n [SchemaType.INT24_ARRAY]: \"int24[]\",\n [SchemaType.INT32_ARRAY]: \"int32[]\",\n [SchemaType.INT40_ARRAY]: \"int40[]\",\n [SchemaType.INT48_ARRAY]: \"int48[]\",\n [SchemaType.INT56_ARRAY]: \"int56[]\",\n [SchemaType.INT64_ARRAY]: \"int64[]\",\n [SchemaType.INT72_ARRAY]: \"int72[]\",\n [SchemaType.INT80_ARRAY]: \"int80[]\",\n [SchemaType.INT88_ARRAY]: \"int88[]\",\n [SchemaType.INT96_ARRAY]: \"int96[]\",\n [SchemaType.INT104_ARRAY]: \"int104[]\",\n [SchemaType.INT112_ARRAY]: \"int112[]\",\n [SchemaType.INT120_ARRAY]: \"int120[]\",\n [SchemaType.INT128_ARRAY]: \"int128[]\",\n [SchemaType.INT136_ARRAY]: \"int136[]\",\n [SchemaType.INT144_ARRAY]: \"int144[]\",\n [SchemaType.INT152_ARRAY]: \"int152[]\",\n [SchemaType.INT160_ARRAY]: \"int160[]\",\n [SchemaType.INT168_ARRAY]: \"int168[]\",\n [SchemaType.INT176_ARRAY]: \"int176[]\",\n [SchemaType.INT184_ARRAY]: \"int184[]\",\n [SchemaType.INT192_ARRAY]: \"int192[]\",\n [SchemaType.INT200_ARRAY]: \"int200[]\",\n [SchemaType.INT208_ARRAY]: \"int208[]\",\n [SchemaType.INT216_ARRAY]: \"int216[]\",\n [SchemaType.INT224_ARRAY]: \"int224[]\",\n [SchemaType.INT232_ARRAY]: \"int232[]\",\n [SchemaType.INT240_ARRAY]: \"int240[]\",\n [SchemaType.INT248_ARRAY]: \"int248[]\",\n [SchemaType.INT256_ARRAY]: \"int256[]\",\n\n [SchemaType.BYTES1_ARRAY]: \"bytes1[]\",\n [SchemaType.BYTES2_ARRAY]: \"bytes2[]\",\n [SchemaType.BYTES3_ARRAY]: \"bytes3[]\",\n [SchemaType.BYTES4_ARRAY]: \"bytes4[]\",\n [SchemaType.BYTES5_ARRAY]: \"bytes5[]\",\n [SchemaType.BYTES6_ARRAY]: \"bytes6[]\",\n [SchemaType.BYTES7_ARRAY]: \"bytes7[]\",\n [SchemaType.BYTES8_ARRAY]: \"bytes8[]\",\n [SchemaType.BYTES9_ARRAY]: \"bytes9[]\",\n [SchemaType.BYTES10_ARRAY]: \"bytes10[]\",\n [SchemaType.BYTES11_ARRAY]: \"bytes11[]\",\n [SchemaType.BYTES12_ARRAY]: \"bytes12[]\",\n [SchemaType.BYTES13_ARRAY]: \"bytes13[]\",\n [SchemaType.BYTES14_ARRAY]: \"bytes14[]\",\n [SchemaType.BYTES15_ARRAY]: \"bytes15[]\",\n [SchemaType.BYTES16_ARRAY]: \"bytes16[]\",\n [SchemaType.BYTES17_ARRAY]: \"bytes17[]\",\n [SchemaType.BYTES18_ARRAY]: \"bytes18[]\",\n [SchemaType.BYTES19_ARRAY]: \"bytes19[]\",\n [SchemaType.BYTES20_ARRAY]: \"bytes20[]\",\n [SchemaType.BYTES21_ARRAY]: \"bytes21[]\",\n [SchemaType.BYTES22_ARRAY]: \"bytes22[]\",\n [SchemaType.BYTES23_ARRAY]: \"bytes23[]\",\n [SchemaType.BYTES24_ARRAY]: \"bytes24[]\",\n [SchemaType.BYTES25_ARRAY]: \"bytes25[]\",\n [SchemaType.BYTES26_ARRAY]: \"bytes26[]\",\n [SchemaType.BYTES27_ARRAY]: \"bytes27[]\",\n [SchemaType.BYTES28_ARRAY]: \"bytes28[]\",\n [SchemaType.BYTES29_ARRAY]: \"bytes29[]\",\n [SchemaType.BYTES30_ARRAY]: \"bytes30[]\",\n [SchemaType.BYTES31_ARRAY]: \"bytes31[]\",\n [SchemaType.BYTES32_ARRAY]: \"bytes32[]\",\n\n [SchemaType.BOOL_ARRAY]: \"bool[]\",\n [SchemaType.ADDRESS_ARRAY]: \"address[]\",\n\n [SchemaType.BYTES]: \"bytes\",\n [SchemaType.STRING]: \"string\",\n} as const satisfies Record<SchemaType, string>;\n","import { SchemaType } from \"../SchemaType\";\nimport { SchemaTypeToAbiType } from \"../mappings/SchemaTypeToAbiType\";\n\nexport type AbiType = (typeof SchemaTypeToAbiType)[SchemaType];\nexport const AbiTypes = Object.values(SchemaTypeToAbiType);\n","import { SchemaTypeToAbiType } from \"./SchemaTypeToAbiType\";\nimport { SchemaType } from \"../SchemaType\";\n\nexport const AbiTypeToSchemaType = Object.fromEntries(\n Object.entries(SchemaTypeToAbiType).map(([schemaType, abiType]) => [abiType, parseInt(schemaType) as SchemaType])\n) satisfies Record<string, SchemaType>;\n","import { SchemaType } from \"../SchemaType\";\n\nexport function getStaticByteLength(schemaType: SchemaType) {\n const val = schemaType.valueOf();\n if (val < 32) {\n // uint8-256\n return val + 1;\n } else if (val < 64) {\n // int8-256, offset by 32\n return val + 1 - 32;\n } else if (val < 96) {\n // bytes1-32, offset by 64\n return val + 1 - 64;\n }\n\n // Other static types\n if (schemaType == SchemaType.BOOL) {\n return 1;\n } else if (schemaType == SchemaType.ADDRESS) {\n return 20;\n }\n\n // Return 0 for all dynamic types\n return 0;\n}\n","import { AbiTypes } from \"./AbiTypes\";\nimport { AbiTypeToSchemaType } from \"../mappings/AbiTypeToSchemaType\";\nimport { getStaticByteLength } from \"../utils/getStaticByteLength\";\nimport { SchemaTypeToAbiType } from \"../mappings/SchemaTypeToAbiType\";\nimport { StaticSchemaType } from \"./StaticSchemaType\";\n\nexport type StaticAbiType = (typeof SchemaTypeToAbiType)[StaticSchemaType];\nexport const StaticAbiTypes = AbiTypes.filter(\n (abiType) => getStaticByteLength(AbiTypeToSchemaType[abiType]) > 0\n) as StaticAbiType[];\n","import { StaticSchemaType } from \"../types/StaticSchemaType\";\nimport { ArraySchemaType } from \"../types/ArraySchemaType\";\nimport { SchemaType } from \"../SchemaType\";\n\nexport const SchemaTypeArrayToElement = {\n [SchemaType.UINT8_ARRAY]: SchemaType.UINT8,\n [SchemaType.UINT16_ARRAY]: SchemaType.UINT16,\n [SchemaType.UINT24_ARRAY]: SchemaType.UINT24,\n [SchemaType.UINT32_ARRAY]: SchemaType.UINT32,\n [SchemaType.UINT40_ARRAY]: SchemaType.UINT40,\n [SchemaType.UINT48_ARRAY]: SchemaType.UINT48,\n [SchemaType.UINT56_ARRAY]: SchemaType.UINT56,\n [SchemaType.UINT64_ARRAY]: SchemaType.UINT64,\n [SchemaType.UINT72_ARRAY]: SchemaType.UINT72,\n [SchemaType.UINT80_ARRAY]: SchemaType.UINT80,\n [SchemaType.UINT88_ARRAY]: SchemaType.UINT88,\n [SchemaType.UINT96_ARRAY]: SchemaType.UINT96,\n [SchemaType.UINT104_ARRAY]: SchemaType.UINT104,\n [SchemaType.UINT112_ARRAY]: SchemaType.UINT112,\n [SchemaType.UINT120_ARRAY]: SchemaType.UINT120,\n [SchemaType.UINT128_ARRAY]: SchemaType.UINT128,\n [SchemaType.UINT136_ARRAY]: SchemaType.UINT136,\n [SchemaType.UINT144_ARRAY]: SchemaType.UINT144,\n [SchemaType.UINT152_ARRAY]: SchemaType.UINT152,\n [SchemaType.UINT160_ARRAY]: SchemaType.UINT160,\n [SchemaType.UINT168_ARRAY]: SchemaType.UINT168,\n [SchemaType.UINT176_ARRAY]: SchemaType.UINT176,\n [SchemaType.UINT184_ARRAY]: SchemaType.UINT184,\n [SchemaType.UINT192_ARRAY]: SchemaType.UINT192,\n [SchemaType.UINT200_ARRAY]: SchemaType.UINT200,\n [SchemaType.UINT208_ARRAY]: SchemaType.UINT208,\n [SchemaType.UINT216_ARRAY]: SchemaType.UINT216,\n [SchemaType.UINT224_ARRAY]: SchemaType.UINT224,\n [SchemaType.UINT232_ARRAY]: SchemaType.UINT232,\n [SchemaType.UINT240_ARRAY]: SchemaType.UINT240,\n [SchemaType.UINT248_ARRAY]: SchemaType.UINT248,\n [SchemaType.UINT256_ARRAY]: SchemaType.UINT256,\n\n [SchemaType.INT8_ARRAY]: SchemaType.INT8,\n [SchemaType.INT16_ARRAY]: SchemaType.INT16,\n [SchemaType.INT24_ARRAY]: SchemaType.INT24,\n [SchemaType.INT32_ARRAY]: SchemaType.INT32,\n [SchemaType.INT40_ARRAY]: SchemaType.INT40,\n [SchemaType.INT48_ARRAY]: SchemaType.INT48,\n [SchemaType.INT56_ARRAY]: SchemaType.INT56,\n [SchemaType.INT64_ARRAY]: SchemaType.INT64,\n [SchemaType.INT72_ARRAY]: SchemaType.INT72,\n [SchemaType.INT80_ARRAY]: SchemaType.INT80,\n [SchemaType.INT88_ARRAY]: SchemaType.INT88,\n [SchemaType.INT96_ARRAY]: SchemaType.INT96,\n [SchemaType.INT104_ARRAY]: SchemaType.INT104,\n [SchemaType.INT112_ARRAY]: SchemaType.INT112,\n [SchemaType.INT120_ARRAY]: SchemaType.INT120,\n [SchemaType.INT128_ARRAY]: SchemaType.INT128,\n [SchemaType.INT136_ARRAY]: SchemaType.INT136,\n [SchemaType.INT144_ARRAY]: SchemaType.INT144,\n [SchemaType.INT152_ARRAY]: SchemaType.INT152,\n [SchemaType.INT160_ARRAY]: SchemaType.INT160,\n [SchemaType.INT168_ARRAY]: SchemaType.INT168,\n [SchemaType.INT176_ARRAY]: SchemaType.INT176,\n [SchemaType.INT184_ARRAY]: SchemaType.INT184,\n [SchemaType.INT192_ARRAY]: SchemaType.INT192,\n [SchemaType.INT200_ARRAY]: SchemaType.INT200,\n [SchemaType.INT208_ARRAY]: SchemaType.INT208,\n [SchemaType.INT216_ARRAY]: SchemaType.INT216,\n [SchemaType.INT224_ARRAY]: SchemaType.INT224,\n [SchemaType.INT232_ARRAY]: SchemaType.INT232,\n [SchemaType.INT240_ARRAY]: SchemaType.INT240,\n [SchemaType.INT248_ARRAY]: SchemaType.INT248,\n [SchemaType.INT256_ARRAY]: SchemaType.INT256,\n\n [SchemaType.BYTES1_ARRAY]: SchemaType.BYTES1,\n [SchemaType.BYTES2_ARRAY]: SchemaType.BYTES2,\n [SchemaType.BYTES3_ARRAY]: SchemaType.BYTES3,\n [SchemaType.BYTES4_ARRAY]: SchemaType.BYTES4,\n [SchemaType.BYTES5_ARRAY]: SchemaType.BYTES5,\n [SchemaType.BYTES6_ARRAY]: SchemaType.BYTES6,\n [SchemaType.BYTES7_ARRAY]: SchemaType.BYTES7,\n [SchemaType.BYTES8_ARRAY]: SchemaType.BYTES8,\n [SchemaType.BYTES9_ARRAY]: SchemaType.BYTES9,\n [SchemaType.BYTES10_ARRAY]: SchemaType.BYTES10,\n [SchemaType.BYTES11_ARRAY]: SchemaType.BYTES11,\n [SchemaType.BYTES12_ARRAY]: SchemaType.BYTES12,\n [SchemaType.BYTES13_ARRAY]: SchemaType.BYTES13,\n [SchemaType.BYTES14_ARRAY]: SchemaType.BYTES14,\n [SchemaType.BYTES15_ARRAY]: SchemaType.BYTES15,\n [SchemaType.BYTES16_ARRAY]: SchemaType.BYTES16,\n [SchemaType.BYTES17_ARRAY]: SchemaType.BYTES17,\n [SchemaType.BYTES18_ARRAY]: SchemaType.BYTES18,\n [SchemaType.BYTES19_ARRAY]: SchemaType.BYTES19,\n [SchemaType.BYTES20_ARRAY]: SchemaType.BYTES20,\n [SchemaType.BYTES21_ARRAY]: SchemaType.BYTES21,\n [SchemaType.BYTES22_ARRAY]: SchemaType.BYTES22,\n [SchemaType.BYTES23_ARRAY]: SchemaType.BYTES23,\n [SchemaType.BYTES24_ARRAY]: SchemaType.BYTES24,\n [SchemaType.BYTES25_ARRAY]: SchemaType.BYTES25,\n [SchemaType.BYTES26_ARRAY]: SchemaType.BYTES26,\n [SchemaType.BYTES27_ARRAY]: SchemaType.BYTES27,\n [SchemaType.BYTES28_ARRAY]: SchemaType.BYTES28,\n [SchemaType.BYTES29_ARRAY]: SchemaType.BYTES29,\n [SchemaType.BYTES30_ARRAY]: SchemaType.BYTES30,\n [SchemaType.BYTES31_ARRAY]: SchemaType.BYTES31,\n [SchemaType.BYTES32_ARRAY]: SchemaType.BYTES32,\n\n [SchemaType.BOOL_ARRAY]: SchemaType.BOOL,\n [SchemaType.ADDRESS_ARRAY]: SchemaType.ADDRESS,\n} as {\n [K in SchemaType]: K extends ArraySchemaType ? StaticSchemaType : never;\n};\n","import { getStaticByteLength } from \"./getStaticByteLength\";\nimport { SchemaType } from \"../SchemaType\";\n\n/**\n * Encode a table schema into a bytes32 hex string\n * Port of `Schema.sol` from `@latticexyz/store`\n * @param schema The schema to encode SchemaType[]\n * @returns The encoded schema as a 32 byte hex string\n */\n\nexport function encodeSchema(schema: SchemaType[]): Uint8Array {\n if (schema.length > 28) throw new Error(\"Schema can only have up to 28 fields\");\n const encodedSchema = new Uint8Array(32);\n let length = 0;\n let staticFields = 0;\n\n // Compute the length of the schema and the number of static fields\n // and store the schema types in the encoded schema\n let hasDynamicFields = false;\n for (let i = 0; i < schema.length; i++) {\n const staticByteLength = getStaticByteLength(schema[i]);\n\n // Increase the static field count if the field is static\n if (staticByteLength > 0) {\n // Revert if we have seen a dynamic field before, but now we see a static field\n if (hasDynamicFields) throw new Error(\"Static fields must come before dynamic fields in the schema\");\n staticFields++;\n } else {\n // Flag that we have seen a dynamic field\n hasDynamicFields = true;\n }\n\n length += staticByteLength;\n encodedSchema[i + 4] = schema[i];\n }\n\n // Require max 14 dynamic fields\n const dynamicFields = schema.length - staticFields;\n if (dynamicFields > 14) throw new Error(\"Schema can only have up to 14 dynamic fields\");\n\n // Store total static length, and number of static and dynamic fields\n new DataView(encodedSchema.buffer).setUint16(0, length); // 2 length bytes\n encodedSchema[2] = staticFields; // number of static fields\n encodedSchema[3] = dynamicFields; // number of dynamic fields\n\n return encodedSchema;\n}\n","export const AbiTypeToDefaultValue = {\n uint8: 0,\n uint16: 0,\n uint24: 0,\n uint32: 0,\n uint40: 0,\n uint48: 0,\n uint56: 0n,\n uint64: 0n,\n uint72: 0n,\n uint80: 0n,\n uint88: 0n,\n uint96: 0n,\n uint104: 0n,\n uint112: 0n,\n uint120: 0n,\n uint128: 0n,\n uint136: 0n,\n uint144: 0n,\n uint152: 0n,\n uint160: 0n,\n uint168: 0n,\n uint176: 0n,\n uint184: 0n,\n uint192: 0n,\n uint200: 0n,\n uint208: 0n,\n uint216: 0n,\n uint224: 0n,\n uint232: 0n,\n uint240: 0n,\n uint248: 0n,\n uint256: 0n,\n\n int8: 0,\n int16: 0,\n int24: 0,\n int32: 0,\n int40: 0,\n int48: 0,\n int56: 0n,\n int64: 0n,\n int72: 0n,\n int80: 0n,\n int88: 0n,\n int96: 0n,\n int104: 0n,\n int112: 0n,\n int120: 0n,\n int128: 0n,\n int136: 0n,\n int144: 0n,\n int152: 0n,\n int160: 0n,\n int168: 0n,\n int176: 0n,\n int184: 0n,\n int192: 0n,\n int200: 0n,\n int208: 0n,\n int216: 0n,\n int224: 0n,\n int232: 0n,\n int240: 0n,\n int248: 0n,\n int256: 0n,\n\n bytes1: \"0x00\",\n bytes2: \"0x0000\",\n bytes3: \"0x000000\",\n bytes4: \"0x00000000\",\n bytes5: \"0x0000000000\",\n bytes6: \"0x000000000000\",\n bytes7: \"0x00000000000000\",\n bytes8: \"0x0000000000000000\",\n bytes9: \"0x000000000000000000\",\n bytes10: \"0x00000000000000000000\",\n bytes11: \"0x0000000000000000000000\",\n bytes12: \"0x000000000000000000000000\",\n bytes13: \"0x00000000000000000000000000\",\n bytes14: \"0x0000000000000000000000000000\",\n bytes15: \"0x000000000000000000000000000000\",\n bytes16: \"0x00000000000000000000000000000000\",\n bytes17: \"0x0000000000000000000000000000000000\",\n bytes18: \"0x000000000000000000000000000000000000\",\n bytes19: \"0x00000000000000000000000000000000000000\",\n bytes20: \"0x0000000000000000000000000000000000000000\",\n bytes21: \"0x000000000000000000000000000000000000000000\",\n bytes22: \"0x00000000000000000000000000000000000000000000\",\n bytes23: \"0x0000000000000000000000000000000000000000000000\",\n bytes24: \"0x000000000000000000000000000000000000000000000000\",\n bytes25: \"0x00000000000000000000000000000000000000000000000000\",\n bytes26: \"0x0000000000000000000000000000000000000000000000000000\",\n bytes27: \"0x000000000000000000000000000000000000000000000000000000\",\n bytes28: \"0x00000000000000000000000000000000000000000000000000000000\",\n bytes29: \"0x0000000000000000000000000000000000000000000000000000000000\",\n bytes30: \"0x000000000000000000000000000000000000000000000000000000000000\",\n bytes31: \"0x00000000000000000000000000000000000000000000000000000000000000\",\n bytes32: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n\n bool: false,\n address: \"0x0000000000000000000000000000000000000000\",\n\n \"uint8[]\": [] as number[],\n \"uint16[]\": [] as number[],\n \"uint24[]\": [] as number[],\n \"uint32[]\": [] as number[],\n \"uint40[]\": [] as number[],\n \"uint48[]\": [] as number[],\n \"uint56[]\": [] as bigint[],\n \"uint64[]\": [] as bigint[],\n \"uint72[]\": [] as bigint[],\n \"uint80[]\": [] as bigint[],\n \"uint88[]\": [] as bigint[],\n \"uint96[]\": [] as bigint[],\n \"uint104[]\": [] as bigint[],\n \"uint112[]\": [] as bigint[],\n \"uint120[]\": [] as bigint[],\n \"uint128[]\": [] as bigint[],\n \"uint136[]\": [] as bigint[],\n \"uint144[]\": [] as bigint[],\n \"uint152[]\": [] as bigint[],\n \"uint160[]\": [] as bigint[],\n \"uint168[]\": [] as bigint[],\n \"uint176[]\": [] as bigint[],\n \"uint184[]\": [] as bigint[],\n \"uint192[]\": [] as bigint[],\n \"uint200[]\": [] as bigint[],\n \"uint208[]\": [] as bigint[],\n \"uint216[]\": [] as bigint[],\n \"uint224[]\": [] as bigint[],\n \"uint232[]\": [] as bigint[],\n \"uint240[]\": [] as bigint[],\n \"uint248[]\": [] as bigint[],\n \"uint256[]\": [] as bigint[],\n\n \"int8[]\": [] as number[],\n \"int16[]\": [] as number[],\n \"int24[]\": [] as number[],\n \"int32[]\": [] as number[],\n \"int40[]\": [] as number[],\n \"int48[]\": [] as number[],\n \"int56[]\": [] as bigint[],\n \"int64[]\": [] as bigint[],\n \"int72[]\": [] as bigint[],\n \"int80[]\": [] as bigint[],\n \"int88[]\": [] as bigint[],\n \"int96[]\": [] as bigint[],\n \"int104[]\": [] as bigint[],\n \"int112[]\": [] as bigint[],\n \"int120[]\": [] as bigint[],\n \"int128[]\": [] as bigint[],\n \"int136[]\": [] as bigint[],\n \"int144[]\": [] as bigint[],\n \"int152[]\": [] as bigint[],\n \"int160[]\": [] as bigint[],\n \"int168[]\": [] as bigint[],\n \"int176[]\": [] as bigint[],\n \"int184[]\": [] as bigint[],\n \"int192[]\": [] as bigint[],\n \"int200[]\": [] as bigint[],\n \"int208[]\": [] as bigint[],\n \"int216[]\": [] as bigint[],\n \"int224[]\": [] as bigint[],\n \"int232[]\": [] as bigint[],\n \"int240[]\": [] as bigint[],\n \"int248[]\": [] as bigint[],\n \"int256[]\": [] as bigint[],\n\n \"bytes1[]\": [] as `0x${string}`[],\n \"bytes2[]\": [] as `0x${string}`[],\n \"bytes3[]\": [] as `0x${string}`[],\n \"bytes4[]\": [] as `0x${string}`[],\n \"bytes5[]\": [] as `0x${string}`[],\n \"bytes6[]\": [] as `0x${string}`[],\n \"bytes7[]\": [] as `0x${string}`[],\n \"bytes8[]\": [] as `0x${string}`[],\n \"bytes9[]\": [] as `0x${string}`[],\n \"bytes10[]\": [] as `0x${string}`[],\n \"bytes11[]\": [] as `0x${string}`[],\n \"bytes12[]\": [] as `0x${string}`[],\n \"bytes13[]\": [] as `0x${string}`[],\n \"bytes14[]\": [] as `0x${string}`[],\n \"bytes15[]\": [] as `0x${string}`[],\n \"bytes16[]\": [] as `0x${string}`[],\n \"bytes17[]\": [] as `0x${string}`[],\n \"bytes18[]\": [] as `0x${string}`[],\n \"bytes19[]\": [] as `0x${string}`[],\n \"bytes20[]\": [] as `0x${string}`[],\n \"bytes21[]\": [] as `0x${string}`[],\n \"bytes22[]\": [] as `0x${string}`[],\n \"bytes23[]\": [] as `0x${string}`[],\n \"bytes24[]\": [] as `0x${string}`[],\n \"bytes25[]\": [] as `0x${string}`[],\n \"bytes26[]\": [] as `0x${string}`[],\n \"bytes27[]\": [] as `0x${string}`[],\n \"bytes28[]\": [] as `0x${string}`[],\n \"bytes29[]\": [] as `0x${string}`[],\n \"bytes30[]\": [] as `0x${string}`[],\n \"bytes31[]\": [] as `0x${string}`[],\n \"bytes32[]\": [] as `0x${string}`[],\n\n \"bool[]\": [] as boolean[],\n \"address[]\": [] as `0x${string}`[],\n\n bytes: \"0x\",\n string: \"\",\n} as const;\n","import { AbiTypeToPrimitiveType } from \"../mappings\";\nimport { AbiTypeToDefaultValue } from \"../mappings/AbiTypeToDefaultValue\";\n\n/**\n * Return a value corresponding to the Solidity default value for a given abi type\n */\nexport function getAbiTypeDefaultValue<T extends string>(abiType: T) {\n // Remove fixed array lengths (eg map uint256[10] to uint256[])\n const normalizedType = abiType.replace(/(\\w+)\\[\\d+\\]/g, \"$1[]\");\n return AbiTypeToDefaultValue[normalizedType as keyof typeof AbiTypeToDefaultValue] as AbiTypeToPrimitiveType<T>;\n}\n"],"mappings":"AAEO,IAAKA,OACVA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,gBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,kBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,oBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sBACAA,IAAA,sB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AY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EAEb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EAEd,SAAU,CAAC,EACX,YAAa,CAAC,EAEd,MAAO,KACP,OAAQ,EACV,ECzMO,SAASC,EAAyCC,EAAY,CAEnE,IAAMC,EAAiBD,EAAQ,QAAQ,gBAAiB,MAAM,EAC9D,OAAOE,EAAsBD,CAAoD,CACnF","names":["SchemaType","SchemaTypeToAbiType","AbiTypes","SchemaTypeToAbiType","AbiTypeToSchemaType","SchemaTypeToAbiType","schemaType","abiType","getStaticByteLength","schemaType","val","StaticAbiTypes","AbiTypes","abiType","getStaticByteLength","AbiTypeToSchemaType","SchemaTypeArrayToElement","encodeSchema","schema","encodedSchema","length","staticFields","hasDynamicFields","staticByteLength","getStaticByteLength","dynamicFields","AbiTypeToDefaultValue","getAbiTypeDefaultValue","abiType","normalizedType","AbiTypeToDefaultValue"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/typescript/deprecated/SchemaType.ts","../../../src/typescript/deprecated/mappings/SchemaTypeToAbiType.ts","../../../src/typescript/deprecated/types/AbiTypes.ts","../../../src/typescript/deprecated/mappings/AbiTypeToSchemaType.ts","../../../src/typescript/deprecated/utils/getStaticByteLength.ts","../../../src/typescript/deprecated/types/StaticAbiTypes.ts","../../../src/typescript/deprecated/mappings/SchemaTypeArrayToElement.ts","../../../src/typescript/deprecated/utils/encodeSchema.ts","../../../src/typescript/deprecated/mappings/AbiTypeToDefaultValue.ts","../../../src/typescript/deprecated/utils/getAbiTypeDefaultValue.ts"],"sourcesContent":["// WARNING: SchemaType enum MUST mirror the solidity version!\n// WARNING: SchemaType methods use hardcoded enum indexes, review them after any changes to the enum\nexport enum SchemaType {\n UINT8,\n UINT16,\n UINT24,\n UINT32,\n UINT40,\n UINT48,\n UINT56,\n UINT64,\n UINT72,\n UINT80,\n UINT88,\n UINT96,\n UINT104,\n UINT112,\n UINT120,\n UINT128,\n UINT136,\n UINT144,\n UINT152,\n UINT160,\n UINT168,\n UINT176,\n UINT184,\n UINT192,\n UINT200,\n UINT208,\n UINT216,\n UINT224,\n UINT232,\n UINT240,\n UINT248,\n UINT256,\n INT8,\n INT16,\n INT24,\n INT32,\n INT40,\n INT48,\n INT56,\n INT64,\n INT72,\n INT80,\n INT88,\n INT96,\n INT104,\n INT112,\n INT120,\n INT128,\n INT136,\n INT144,\n INT152,\n INT160,\n INT168,\n INT176,\n INT184,\n INT192,\n INT200,\n INT208,\n INT216,\n INT224,\n INT232,\n INT240,\n INT248,\n INT256,\n BYTES1,\n BYTES2,\n BYTES3,\n BYTES4,\n BYTES5,\n BYTES6,\n BYTES7,\n BYTES8,\n BYTES9,\n BYTES10,\n BYTES11,\n BYTES12,\n BYTES13,\n BYTES14,\n BYTES15,\n BYTES16,\n BYTES17,\n BYTES18,\n BYTES19,\n BYTES20,\n BYTES21,\n BYTES22,\n BYTES23,\n BYTES24,\n BYTES25,\n BYTES26,\n BYTES27,\n BYTES28,\n BYTES29,\n BYTES30,\n BYTES31,\n BYTES32,\n BOOL,\n ADDRESS,\n UINT8_ARRAY,\n UINT16_ARRAY,\n UINT24_ARRAY,\n UINT32_ARRAY,\n UINT40_ARRAY,\n UINT48_ARRAY,\n UINT56_ARRAY,\n UINT64_ARRAY,\n UINT72_ARRAY,\n UINT80_ARRAY,\n UINT88_ARRAY,\n UINT96_ARRAY,\n UINT104_ARRAY,\n UINT112_ARRAY,\n UINT120_ARRAY,\n UINT128_ARRAY,\n UINT136_ARRAY,\n UINT144_ARRAY,\n UINT152_ARRAY,\n UINT160_ARRAY,\n UINT168_ARRAY,\n UINT176_ARRAY,\n UINT184_ARRAY,\n UINT192_ARRAY,\n UINT200_ARRAY,\n UINT208_ARRAY,\n UINT216_ARRAY,\n UINT224_ARRAY,\n UINT232_ARRAY,\n UINT240_ARRAY,\n UINT248_ARRAY,\n UINT256_ARRAY,\n INT8_ARRAY,\n INT16_ARRAY,\n INT24_ARRAY,\n INT32_ARRAY,\n INT40_ARRAY,\n INT48_ARRAY,\n INT56_ARRAY,\n INT64_ARRAY,\n INT72_ARRAY,\n INT80_ARRAY,\n INT88_ARRAY,\n INT96_ARRAY,\n INT104_ARRAY,\n INT112_ARRAY,\n INT120_ARRAY,\n INT128_ARRAY,\n INT136_ARRAY,\n INT144_ARRAY,\n INT152_ARRAY,\n INT160_ARRAY,\n INT168_ARRAY,\n INT176_ARRAY,\n INT184_ARRAY,\n INT192_ARRAY,\n INT200_ARRAY,\n INT208_ARRAY,\n INT216_ARRAY,\n INT224_ARRAY,\n INT232_ARRAY,\n INT240_ARRAY,\n INT248_ARRAY,\n INT256_ARRAY,\n BYTES1_ARRAY,\n BYTES2_ARRAY,\n BYTES3_ARRAY,\n BYTES4_ARRAY,\n BYTES5_ARRAY,\n BYTES6_ARRAY,\n BYTES7_ARRAY,\n BYTES8_ARRAY,\n BYTES9_ARRAY,\n BYTES10_ARRAY,\n BYTES11_ARRAY,\n BYTES12_ARRAY,\n BYTES13_ARRAY,\n BYTES14_ARRAY,\n BYTES15_ARRAY,\n BYTES16_ARRAY,\n BYTES17_ARRAY,\n BYTES18_ARRAY,\n BYTES19_ARRAY,\n BYTES20_ARRAY,\n BYTES21_ARRAY,\n BYTES22_ARRAY,\n BYTES23_ARRAY,\n BYTES24_ARRAY,\n BYTES25_ARRAY,\n BYTES26_ARRAY,\n BYTES27_ARRAY,\n BYTES28_ARRAY,\n BYTES29_ARRAY,\n BYTES30_ARRAY,\n BYTES31_ARRAY,\n BYTES32_ARRAY,\n BOOL_ARRAY,\n ADDRESS_ARRAY,\n BYTES,\n STRING,\n}\n","import { SchemaType } from \"../SchemaType\";\n\nexport const SchemaTypeToAbiType = {\n [SchemaType.UINT8]: \"uint8\",\n [SchemaType.UINT16]: \"uint16\",\n [SchemaType.UINT24]: \"uint24\",\n [SchemaType.UINT32]: \"uint32\",\n [SchemaType.UINT40]: \"uint40\",\n [SchemaType.UINT48]: \"uint48\",\n [SchemaType.UINT56]: \"uint56\",\n [SchemaType.UINT64]: \"uint64\",\n [SchemaType.UINT72]: \"uint72\",\n [SchemaType.UINT80]: \"uint80\",\n [SchemaType.UINT88]: \"uint88\",\n [SchemaType.UINT96]: \"uint96\",\n [SchemaType.UINT104]: \"uint104\",\n [SchemaType.UINT112]: \"uint112\",\n [SchemaType.UINT120]: \"uint120\",\n [SchemaType.UINT128]: \"uint128\",\n [SchemaType.UINT136]: \"uint136\",\n [SchemaType.UINT144]: \"uint144\",\n [SchemaType.UINT152]: \"uint152\",\n [SchemaType.UINT160]: \"uint160\",\n [SchemaType.UINT168]: \"uint168\",\n [SchemaType.UINT176]: \"uint176\",\n [SchemaType.UINT184]: \"uint184\",\n [SchemaType.UINT192]: \"uint192\",\n [SchemaType.UINT200]: \"uint200\",\n [SchemaType.UINT208]: \"uint208\",\n [SchemaType.UINT216]: \"uint216\",\n [SchemaType.UINT224]: \"uint224\",\n [SchemaType.UINT232]: \"uint232\",\n [SchemaType.UINT240]: \"uint240\",\n [SchemaType.UINT248]: \"uint248\",\n [SchemaType.UINT256]: \"uint256\",\n\n [SchemaType.INT8]: \"int8\",\n [SchemaType.INT16]: \"int16\",\n [SchemaType.INT24]: \"int24\",\n [SchemaType.INT32]: \"int32\",\n [SchemaType.INT40]: \"int40\",\n [SchemaType.INT48]: \"int48\",\n [SchemaType.INT56]: \"int56\",\n [SchemaType.INT64]: \"int64\",\n [SchemaType.INT72]: \"int72\",\n [SchemaType.INT80]: \"int80\",\n [SchemaType.INT88]: \"int88\",\n [SchemaType.INT96]: \"int96\",\n [SchemaType.INT104]: \"int104\",\n [SchemaType.INT112]: \"int112\",\n [SchemaType.INT120]: \"int120\",\n [SchemaType.INT128]: \"int128\",\n [SchemaType.INT136]: \"int136\",\n [SchemaType.INT144]: \"int144\",\n [SchemaType.INT152]: \"int152\",\n [SchemaType.INT160]: \"int160\",\n [SchemaType.INT168]: \"int168\",\n [SchemaType.INT176]: \"int176\",\n [SchemaType.INT184]: \"int184\",\n [SchemaType.INT192]: \"int192\",\n [SchemaType.INT200]: \"int200\",\n [SchemaType.INT208]: \"int208\",\n [SchemaType.INT216]: \"int216\",\n [SchemaType.INT224]: \"int224\",\n [SchemaType.INT232]: \"int232\",\n [SchemaType.INT240]: \"int240\",\n [SchemaType.INT248]: \"int248\",\n [SchemaType.INT256]: \"int256\",\n\n [SchemaType.BYTES1]: \"bytes1\",\n [SchemaType.BYTES2]: \"bytes2\",\n [SchemaType.BYTES3]: \"bytes3\",\n [SchemaType.BYTES4]: \"bytes4\",\n [SchemaType.BYTES5]: \"bytes5\",\n [SchemaType.BYTES6]: \"bytes6\",\n [SchemaType.BYTES7]: \"bytes7\",\n [SchemaType.BYTES8]: \"bytes8\",\n [SchemaType.BYTES9]: \"bytes9\",\n [SchemaType.BYTES10]: \"bytes10\",\n [SchemaType.BYTES11]: \"bytes11\",\n [SchemaType.BYTES12]: \"bytes12\",\n [SchemaType.BYTES13]: \"bytes13\",\n [SchemaType.BYTES14]: \"bytes14\",\n [SchemaType.BYTES15]: \"bytes15\",\n [SchemaType.BYTES16]: \"bytes16\",\n [SchemaType.BYTES17]: \"bytes17\",\n [SchemaType.BYTES18]: \"bytes18\",\n [SchemaType.BYTES19]: \"bytes19\",\n [SchemaType.BYTES20]: \"bytes20\",\n [SchemaType.BYTES21]: \"bytes21\",\n [SchemaType.BYTES22]: \"bytes22\",\n [SchemaType.BYTES23]: \"bytes23\",\n [SchemaType.BYTES24]: \"bytes24\",\n [SchemaType.BYTES25]: \"bytes25\",\n [SchemaType.BYTES26]: \"bytes26\",\n [SchemaType.BYTES27]: \"bytes27\",\n [SchemaType.BYTES28]: \"bytes28\",\n [SchemaType.BYTES29]: \"bytes29\",\n [SchemaType.BYTES30]: \"bytes30\",\n [SchemaType.BYTES31]: \"bytes31\",\n [SchemaType.BYTES32]: \"bytes32\",\n\n [SchemaType.BOOL]: \"bool\",\n [SchemaType.ADDRESS]: \"address\",\n\n [SchemaType.UINT8_ARRAY]: \"uint8[]\",\n [SchemaType.UINT16_ARRAY]: \"uint16[]\",\n [SchemaType.UINT24_ARRAY]: \"uint24[]\",\n [SchemaType.UINT32_ARRAY]: \"uint32[]\",\n [SchemaType.UINT40_ARRAY]: \"uint40[]\",\n [SchemaType.UINT48_ARRAY]: \"uint48[]\",\n [SchemaType.UINT56_ARRAY]: \"uint56[]\",\n [SchemaType.UINT64_ARRAY]: \"uint64[]\",\n [SchemaType.UINT72_ARRAY]: \"uint72[]\",\n [SchemaType.UINT80_ARRAY]: \"uint80[]\",\n [SchemaType.UINT88_ARRAY]: \"uint88[]\",\n [SchemaType.UINT96_ARRAY]: \"uint96[]\",\n [SchemaType.UINT104_ARRAY]: \"uint104[]\",\n [SchemaType.UINT112_ARRAY]: \"uint112[]\",\n [SchemaType.UINT120_ARRAY]: \"uint120[]\",\n [SchemaType.UINT128_ARRAY]: \"uint128[]\",\n [SchemaType.UINT136_ARRAY]: \"uint136[]\",\n [SchemaType.UINT144_ARRAY]: \"uint144[]\",\n [SchemaType.UINT152_ARRAY]: \"uint152[]\",\n [SchemaType.UINT160_ARRAY]: \"uint160[]\",\n [SchemaType.UINT168_ARRAY]: \"uint168[]\",\n [SchemaType.UINT176_ARRAY]: \"uint176[]\",\n [SchemaType.UINT184_ARRAY]: \"uint184[]\",\n [SchemaType.UINT192_ARRAY]: \"uint192[]\",\n [SchemaType.UINT200_ARRAY]: \"uint200[]\",\n [SchemaType.UINT208_ARRAY]: \"uint208[]\",\n [SchemaType.UINT216_ARRAY]: \"uint216[]\",\n [SchemaType.UINT224_ARRAY]: \"uint224[]\",\n [SchemaType.UINT232_ARRAY]: \"uint232[]\",\n [SchemaType.UINT240_ARRAY]: \"uint240[]\",\n [SchemaType.UINT248_ARRAY]: \"uint248[]\",\n [SchemaType.UINT256_ARRAY]: \"uint256[]\",\n\n [SchemaType.INT8_ARRAY]: \"int8[]\",\n [SchemaType.INT16_ARRAY]: \"int16[]\",\n [SchemaType.INT24_ARRAY]: \"int24[]\",\n [SchemaType.INT32_ARRAY]: \"int32[]\",\n [SchemaType.INT40_ARRAY]: \"int40[]\",\n [SchemaType.INT48_ARRAY]: \"int48[]\",\n [SchemaType.INT56_ARRAY]: \"int56[]\",\n [SchemaType.INT64_ARRAY]: \"int64[]\",\n [SchemaType.INT72_ARRAY]: \"int72[]\",\n [SchemaType.INT80_ARRAY]: \"int80[]\",\n [SchemaType.INT88_ARRAY]: \"int88[]\",\n [SchemaType.INT96_ARRAY]: \"int96[]\",\n [SchemaType.INT104_ARRAY]: \"int104[]\",\n [SchemaType.INT112_ARRAY]: \"int112[]\",\n [SchemaType.INT120_ARRAY]: \"int120[]\",\n [SchemaType.INT128_ARRAY]: \"int128[]\",\n [SchemaType.INT136_ARRAY]: \"int136[]\",\n [SchemaType.INT144_ARRAY]: \"int144[]\",\n [SchemaType.INT152_ARRAY]: \"int152[]\",\n [SchemaType.INT160_ARRAY]: \"int160[]\",\n [SchemaType.INT168_ARRAY]: \"int168[]\",\n [SchemaType.INT176_ARRAY]: \"int176[]\",\n [SchemaType.INT184_ARRAY]: \"int184[]\",\n [SchemaType.INT192_ARRAY]: \"int192[]\",\n [SchemaType.INT200_ARRAY]: \"int200[]\",\n [SchemaType.INT208_ARRAY]: \"int208[]\",\n [SchemaType.INT216_ARRAY]: \"int216[]\",\n [SchemaType.INT224_ARRAY]: \"int224[]\",\n [SchemaType.INT232_ARRAY]: \"int232[]\",\n [SchemaType.INT240_ARRAY]: \"int240[]\",\n [SchemaType.INT248_ARRAY]: \"int248[]\",\n [SchemaType.INT256_ARRAY]: \"int256[]\",\n\n [SchemaType.BYTES1_ARRAY]: \"bytes1[]\",\n [SchemaType.BYTES2_ARRAY]: \"bytes2[]\",\n [SchemaType.BYTES3_ARRAY]: \"bytes3[]\",\n [SchemaType.BYTES4_ARRAY]: \"bytes4[]\",\n [SchemaType.BYTES5_ARRAY]: \"bytes5[]\",\n [SchemaType.BYTES6_ARRAY]: \"bytes6[]\",\n [SchemaType.BYTES7_ARRAY]: \"bytes7[]\",\n [SchemaType.BYTES8_ARRAY]: \"bytes8[]\",\n [SchemaType.BYTES9_ARRAY]: \"bytes9[]\",\n [SchemaType.BYTES10_ARRAY]: \"bytes10[]\",\n [SchemaType.BYTES11_ARRAY]: \"bytes11[]\",\n [SchemaType.BYTES12_ARRAY]: \"bytes12[]\",\n [SchemaType.BYTES13_ARRAY]: \"bytes13[]\",\n [SchemaType.BYTES14_ARRAY]: \"bytes14[]\",\n [SchemaType.BYTES15_ARRAY]: \"bytes15[]\",\n [SchemaType.BYTES16_ARRAY]: \"bytes16[]\",\n [SchemaType.BYTES17_ARRAY]: \"bytes17[]\",\n [SchemaType.BYTES18_ARRAY]: \"bytes18[]\",\n [SchemaType.BYTES19_ARRAY]: \"bytes19[]\",\n [SchemaType.BYTES20_ARRAY]: \"bytes20[]\",\n [SchemaType.BYTES21_ARRAY]: \"bytes21[]\",\n [SchemaType.BYTES22_ARRAY]: \"bytes22[]\",\n [SchemaType.BYTES23_ARRAY]: \"bytes23[]\",\n [SchemaType.BYTES24_ARRAY]: \"bytes24[]\",\n [SchemaType.BYTES25_ARRAY]: \"bytes25[]\",\n [SchemaType.BYTES26_ARRAY]: \"bytes26[]\",\n [SchemaType.BYTES27_ARRAY]: \"bytes27[]\",\n [SchemaType.BYTES28_ARRAY]: \"bytes28[]\",\n [SchemaType.BYTES29_ARRAY]: \"bytes29[]\",\n [SchemaType.BYTES30_ARRAY]: \"bytes30[]\",\n [SchemaType.BYTES31_ARRAY]: \"bytes31[]\",\n [SchemaType.BYTES32_ARRAY]: \"bytes32[]\",\n\n [SchemaType.BOOL_ARRAY]: \"bool[]\",\n [SchemaType.ADDRESS_ARRAY]: \"address[]\",\n\n [SchemaType.BYTES]: \"bytes\",\n [SchemaType.STRING]: \"string\",\n} as const satisfies Record<SchemaType, string>;\n","import { SchemaType } from \"../SchemaType\";\nimport { SchemaTypeToAbiType } from \"../mappings/SchemaTypeToAbiType\";\n\nexport type AbiType = (typeof SchemaTypeToAbiType)[SchemaType];\nexport const AbiTypes = Object.values(SchemaTypeToAbiType);\n","import { SchemaTypeToAbiType } from \"./SchemaTypeToAbiType\";\nimport { SchemaType } from \"../SchemaType\";\n\nexport const AbiTypeToSchemaType = Object.fromEntries(\n Object.entries(SchemaTypeToAbiType).map(([schemaType, abiType]) => [abiType, parseInt(schemaType) as SchemaType])\n) satisfies Record<string, SchemaType>;\n","import { SchemaType } from \"../SchemaType\";\n\nexport function getStaticByteLength(schemaType: SchemaType) {\n const val = schemaType.valueOf();\n if (val < 32) {\n // uint8-256\n return val + 1;\n } else if (val < 64) {\n // int8-256, offset by 32\n return val + 1 - 32;\n } else if (val < 96) {\n // bytes1-32, offset by 64\n return val + 1 - 64;\n }\n\n // Other static types\n if (schemaType == SchemaType.BOOL) {\n return 1;\n } else if (schemaType == SchemaType.ADDRESS) {\n return 20;\n }\n\n // Return 0 for all dynamic types\n return 0;\n}\n","import { AbiTypes } from \"./AbiTypes\";\nimport { AbiTypeToSchemaType } from \"../mappings/AbiTypeToSchemaType\";\nimport { getStaticByteLength } from \"../utils/getStaticByteLength\";\nimport { SchemaTypeToAbiType } from \"../mappings/SchemaTypeToAbiType\";\nimport { StaticSchemaType } from \"./StaticSchemaType\";\n\nexport type StaticAbiType = (typeof SchemaTypeToAbiType)[StaticSchemaType];\nexport const StaticAbiTypes = AbiTypes.filter(\n (abiType) => getStaticByteLength(AbiTypeToSchemaType[abiType]) > 0\n) as StaticAbiType[];\n","import { StaticSchemaType } from \"../types/StaticSchemaType\";\nimport { ArraySchemaType } from \"../types/ArraySchemaType\";\nimport { SchemaType } from \"../SchemaType\";\n\nexport const SchemaTypeArrayToElement = {\n [SchemaType.UINT8_ARRAY]: SchemaType.UINT8,\n [SchemaType.UINT16_ARRAY]: SchemaType.UINT16,\n [SchemaType.UINT24_ARRAY]: SchemaType.UINT24,\n [SchemaType.UINT32_ARRAY]: SchemaType.UINT32,\n [SchemaType.UINT40_ARRAY]: SchemaType.UINT40,\n [SchemaType.UINT48_ARRAY]: SchemaType.UINT48,\n [SchemaType.UINT56_ARRAY]: SchemaType.UINT56,\n [SchemaType.UINT64_ARRAY]: SchemaType.UINT64,\n [SchemaType.UINT72_ARRAY]: SchemaType.UINT72,\n [SchemaType.UINT80_ARRAY]: SchemaType.UINT80,\n [SchemaType.UINT88_ARRAY]: SchemaType.UINT88,\n [SchemaType.UINT96_ARRAY]: SchemaType.UINT96,\n [SchemaType.UINT104_ARRAY]: SchemaType.UINT104,\n [SchemaType.UINT112_ARRAY]: SchemaType.UINT112,\n [SchemaType.UINT120_ARRAY]: SchemaType.UINT120,\n [SchemaType.UINT128_ARRAY]: SchemaType.UINT128,\n [SchemaType.UINT136_ARRAY]: SchemaType.UINT136,\n [SchemaType.UINT144_ARRAY]: SchemaType.UINT144,\n [SchemaType.UINT152_ARRAY]: SchemaType.UINT152,\n [SchemaType.UINT160_ARRAY]: SchemaType.UINT160,\n [SchemaType.UINT168_ARRAY]: SchemaType.UINT168,\n [SchemaType.UINT176_ARRAY]: SchemaType.UINT176,\n [SchemaType.UINT184_ARRAY]: SchemaType.UINT184,\n [SchemaType.UINT192_ARRAY]: SchemaType.UINT192,\n [SchemaType.UINT200_ARRAY]: SchemaType.UINT200,\n [SchemaType.UINT208_ARRAY]: SchemaType.UINT208,\n [SchemaType.UINT216_ARRAY]: SchemaType.UINT216,\n [SchemaType.UINT224_ARRAY]: SchemaType.UINT224,\n [SchemaType.UINT232_ARRAY]: SchemaType.UINT232,\n [SchemaType.UINT240_ARRAY]: SchemaType.UINT240,\n [SchemaType.UINT248_ARRAY]: SchemaType.UINT248,\n [SchemaType.UINT256_ARRAY]: SchemaType.UINT256,\n\n [SchemaType.INT8_ARRAY]: SchemaType.INT8,\n [SchemaType.INT16_ARRAY]: SchemaType.INT16,\n [SchemaType.INT24_ARRAY]: SchemaType.INT24,\n [SchemaType.INT32_ARRAY]: SchemaType.INT32,\n [SchemaType.INT40_ARRAY]: SchemaType.INT40,\n [SchemaType.INT48_ARRAY]: SchemaType.INT48,\n [SchemaType.INT56_ARRAY]: SchemaType.INT56,\n [SchemaType.INT64_ARRAY]: SchemaType.INT64,\n [SchemaType.INT72_ARRAY]: SchemaType.INT72,\n [SchemaType.INT80_ARRAY]: SchemaType.INT80,\n [SchemaType.INT88_ARRAY]: SchemaType.INT88,\n [SchemaType.INT96_ARRAY]: SchemaType.INT96,\n [SchemaType.INT104_ARRAY]: SchemaType.INT104,\n [SchemaType.INT112_ARRAY]: SchemaType.INT112,\n [SchemaType.INT120_ARRAY]: SchemaType.INT120,\n [SchemaType.INT128_ARRAY]: SchemaType.INT128,\n [SchemaType.INT136_ARRAY]: SchemaType.INT136,\n [SchemaType.INT144_ARRAY]: SchemaType.INT144,\n [SchemaType.INT152_ARRAY]: SchemaType.INT152,\n [SchemaType.INT160_ARRAY]: SchemaType.INT160,\n [SchemaType.INT168_ARRAY]: SchemaType.INT168,\n [SchemaType.INT176_ARRAY]: SchemaType.INT176,\n [SchemaType.INT184_ARRAY]: SchemaType.INT184,\n [SchemaType.INT192_ARRAY]: SchemaType.INT192,\n [SchemaType.INT200_ARRAY]: SchemaType.INT200,\n [SchemaType.INT208_ARRAY]: SchemaType.INT208,\n [SchemaType.INT216_ARRAY]: SchemaType.INT216,\n [SchemaType.INT224_ARRAY]: SchemaType.INT224,\n [SchemaType.INT232_ARRAY]: SchemaType.INT232,\n [SchemaType.INT240_ARRAY]: SchemaType.INT240,\n [SchemaType.INT248_ARRAY]: SchemaType.INT248,\n [SchemaType.INT256_ARRAY]: SchemaType.INT256,\n\n [SchemaType.BYTES1_ARRAY]: SchemaType.BYTES1,\n [SchemaType.BYTES2_ARRAY]: SchemaType.BYTES2,\n [SchemaType.BYTES3_ARRAY]: SchemaType.BYTES3,\n [SchemaType.BYTES4_ARRAY]: SchemaType.BYTES4,\n [SchemaType.BYTES5_ARRAY]: SchemaType.BYTES5,\n [SchemaType.BYTES6_ARRAY]: SchemaType.BYTES6,\n [SchemaType.BYTES7_ARRAY]: SchemaType.BYTES7,\n [SchemaType.BYTES8_ARRAY]: SchemaType.BYTES8,\n [SchemaType.BYTES9_ARRAY]: SchemaType.BYTES9,\n [SchemaType.BYTES10_ARRAY]: SchemaType.BYTES10,\n [SchemaType.BYTES11_ARRAY]: SchemaType.BYTES11,\n [SchemaType.BYTES12_ARRAY]: SchemaType.BYTES12,\n [SchemaType.BYTES13_ARRAY]: SchemaType.BYTES13,\n [SchemaType.BYTES14_ARRAY]: SchemaType.BYTES14,\n [SchemaType.BYTES15_ARRAY]: SchemaType.BYTES15,\n [SchemaType.BYTES16_ARRAY]: SchemaType.BYTES16,\n [SchemaType.BYTES17_ARRAY]: SchemaType.BYTES17,\n [SchemaType.BYTES18_ARRAY]: SchemaType.BYTES18,\n [SchemaType.BYTES19_ARRAY]: SchemaType.BYTES19,\n [SchemaType.BYTES20_ARRAY]: SchemaType.BYTES20,\n [SchemaType.BYTES21_ARRAY]: SchemaType.BYTES21,\n [SchemaType.BYTES22_ARRAY]: SchemaType.BYTES22,\n [SchemaType.BYTES23_ARRAY]: SchemaType.BYTES23,\n [SchemaType.BYTES24_ARRAY]: SchemaType.BYTES24,\n [SchemaType.BYTES25_ARRAY]: SchemaType.BYTES25,\n [SchemaType.BYTES26_ARRAY]: SchemaType.BYTES26,\n [SchemaType.BYTES27_ARRAY]: SchemaType.BYTES27,\n [SchemaType.BYTES28_ARRAY]: SchemaType.BYTES28,\n [SchemaType.BYTES29_ARRAY]: SchemaType.BYTES29,\n [SchemaType.BYTES30_ARRAY]: SchemaType.BYTES30,\n [SchemaType.BYTES31_ARRAY]: SchemaType.BYTES31,\n [SchemaType.BYTES32_ARRAY]: SchemaType.BYTES32,\n\n [SchemaType.BOOL_ARRAY]: SchemaType.BOOL,\n [SchemaType.ADDRESS_ARRAY]: SchemaType.ADDRESS,\n} as {\n [K in SchemaType]: K extends ArraySchemaType ? StaticSchemaType : never;\n};\n","import { getStaticByteLength } from \"./getStaticByteLength\";\nimport { SchemaType } from \"../SchemaType\";\n\n/**\n * Encode a table schema into a bytes32 hex string\n * Port of `Schema.sol` from `@latticexyz/store`\n * @param schema The schema to encode SchemaType[]\n * @returns The encoded schema as a 32 byte hex string\n * @deprecated use `schemaToHex` from `protocol-parser` instead\n */\n\nexport function encodeSchema(schema: SchemaType[]): Uint8Array {\n if (schema.length > 28) throw new Error(\"Schema can only have up to 28 fields\");\n const encodedSchema = new Uint8Array(32);\n let length = 0;\n let staticFields = 0;\n\n // Compute the length of the schema and the number of static fields\n // and store the schema types in the encoded schema\n let hasDynamicFields = false;\n for (let i = 0; i < schema.length; i++) {\n const staticByteLength = getStaticByteLength(schema[i]);\n\n // Increase the static field count if the field is static\n if (staticByteLength > 0) {\n // Revert if we have seen a dynamic field before, but now we see a static field\n if (hasDynamicFields) throw new Error(\"Static fields must come before dynamic fields in the schema\");\n staticFields++;\n } else {\n // Flag that we have seen a dynamic field\n hasDynamicFields = true;\n }\n\n length += staticByteLength;\n encodedSchema[i + 4] = schema[i];\n }\n\n // Require max 14 dynamic fields\n const dynamicFields = schema.length - staticFields;\n if (dynamicFields > 14) throw new Error(\"Schema can only have up to 14 dynamic fields\");\n\n // Store total static length, and number of static and dynamic fields\n new DataView(encodedSchema.buffer).setUint16(0, length); // 2 length bytes\n encodedSchema[2] = staticFields; // number of static fields\n encodedSchema[3] = dynamicFields; // number of dynamic fields\n\n return encodedSchema;\n}\n","export const AbiTypeToDefaultValue = {\n uint8: 0,\n uint16: 0,\n uint24: 0,\n uint32: 0,\n uint40: 0,\n uint48: 0,\n uint56: 0n,\n uint64: 0n,\n uint72: 0n,\n uint80: 0n,\n uint88: 0n,\n uint96: 0n,\n uint104: 0n,\n uint112: 0n,\n uint120: 0n,\n uint128: 0n,\n uint136: 0n,\n uint144: 0n,\n uint152: 0n,\n uint160: 0n,\n uint168: 0n,\n uint176: 0n,\n uint184: 0n,\n uint192: 0n,\n uint200: 0n,\n uint208: 0n,\n uint216: 0n,\n uint224: 0n,\n uint232: 0n,\n uint240: 0n,\n uint248: 0n,\n uint256: 0n,\n\n int8: 0,\n int16: 0,\n int24: 0,\n int32: 0,\n int40: 0,\n int48: 0,\n int56: 0n,\n int64: 0n,\n int72: 0n,\n int80: 0n,\n int88: 0n,\n int96: 0n,\n int104: 0n,\n int112: 0n,\n int120: 0n,\n int128: 0n,\n int136: 0n,\n int144: 0n,\n int152: 0n,\n int160: 0n,\n int168: 0n,\n int176: 0n,\n int184: 0n,\n int192: 0n,\n int200: 0n,\n int208: 0n,\n int216: 0n,\n int224: 0n,\n int232: 0n,\n int240: 0n,\n int248: 0n,\n int256: 0n,\n\n bytes1: \"0x00\",\n bytes2: \"0x0000\",\n bytes3: \"0x000000\",\n bytes4: \"0x00000000\",\n bytes5: \"0x0000000000\",\n bytes6: \"0x000000000000\",\n bytes7: \"0x00000000000000\",\n bytes8: \"0x0000000000000000\",\n bytes9: \"0x000000000000000000\",\n bytes10: \"0x00000000000000000000\",\n bytes11: \"0x0000000000000000000000\",\n bytes12: \"0x000000000000000000000000\",\n bytes13: \"0x00000000000000000000000000\",\n bytes14: \"0x0000000000000000000000000000\",\n bytes15: \"0x000000000000000000000000000000\",\n bytes16: \"0x00000000000000000000000000000000\",\n bytes17: \"0x0000000000000000000000000000000000\",\n bytes18: \"0x000000000000000000000000000000000000\",\n bytes19: \"0x00000000000000000000000000000000000000\",\n bytes20: \"0x0000000000000000000000000000000000000000\",\n bytes21: \"0x000000000000000000000000000000000000000000\",\n bytes22: \"0x00000000000000000000000000000000000000000000\",\n bytes23: \"0x0000000000000000000000000000000000000000000000\",\n bytes24: \"0x000000000000000000000000000000000000000000000000\",\n bytes25: \"0x00000000000000000000000000000000000000000000000000\",\n bytes26: \"0x0000000000000000000000000000000000000000000000000000\",\n bytes27: \"0x000000000000000000000000000000000000000000000000000000\",\n bytes28: \"0x00000000000000000000000000000000000000000000000000000000\",\n bytes29: \"0x0000000000000000000000000000000000000000000000000000000000\",\n bytes30: \"0x000000000000000000000000000000000000000000000000000000000000\",\n bytes31: \"0x00000000000000000000000000000000000000000000000000000000000000\",\n bytes32: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n\n bool: false,\n address: \"0x0000000000000000000000000000000000000000\",\n\n \"uint8[]\": [] as number[],\n \"uint16[]\": [] as number[],\n \"uint24[]\": [] as number[],\n \"uint32[]\": [] as number[],\n \"uint40[]\": [] as number[],\n \"uint48[]\": [] as number[],\n \"uint56[]\": [] as bigint[],\n \"uint64[]\": [] as bigint[],\n \"uint72[]\": [] as bigint[],\n \"uint80[]\": [] as bigint[],\n \"uint88[]\": [] as bigint[],\n \"uint96[]\": [] as bigint[],\n \"uint104[]\": [] as bigint[],\n \"uint112[]\": [] as bigint[],\n \"uint120[]\": [] as bigint[],\n \"uint128[]\": [] as bigint[],\n \"uint136[]\": [] as bigint[],\n \"uint144[]\": [] as bigint[],\n \"uint152[]\": [] as bigint[],\n \"uint160[]\": [] as bigint[],\n \"uint168[]\": [] as bigint[],\n \"uint176[]\": [] as bigint[],\n \"uint184[]\": [] as bigint[],\n \"uint192[]\": [] as bigint[],\n \"uint200[]\": [] as bigint[],\n \"uint208[]\": [] as bigint[],\n \"uint216[]\": [] as bigint[],\n \"uint224[]\": [] as bigint[],\n \"uint232[]\": [] as bigint[],\n \"uint240[]\": [] as bigint[],\n \"uint248[]\": [] as bigint[],\n \"uint256[]\": [] as bigint[],\n\n \"int8[]\": [] as number[],\n \"int16[]\": [] as number[],\n \"int24[]\": [] as number[],\n \"int32[]\": [] as number[],\n \"int40[]\": [] as number[],\n \"int48[]\": [] as number[],\n \"int56[]\": [] as bigint[],\n \"int64[]\": [] as bigint[],\n \"int72[]\": [] as bigint[],\n \"int80[]\": [] as bigint[],\n \"int88[]\": [] as bigint[],\n \"int96[]\": [] as bigint[],\n \"int104[]\": [] as bigint[],\n \"int112[]\": [] as bigint[],\n \"int120[]\": [] as bigint[],\n \"int128[]\": [] as bigint[],\n \"int136[]\": [] as bigint[],\n \"int144[]\": [] as bigint[],\n \"int152[]\": [] as bigint[],\n \"int160[]\": [] as bigint[],\n \"int168[]\": [] as bigint[],\n \"int176[]\": [] as bigint[],\n \"int184[]\": [] as bigint[],\n \"int192[]\": [] as bigint[],\n \"int200[]\": [] as bigint[],\n \"int208[]\": [] as bigint[],\n \"int216[]\": [] as bigint[],\n \"int224[]\": [] as bigint[],\n \"int232[]\": [] as bigint[],\n \"int240[]\": [] as bigint[],\n \"int248[]\": [] as bigint[],\n \"int256[]\": [] as bigint[],\n\n \"bytes1[]\": [] as `0x${string}`[],\n \"bytes2[]\": [] as `0x${string}`[],\n \"bytes3[]\": [] as `0x${string}`[],\n \"bytes4[]\": [] as `0x${string}`[],\n \"bytes5[]\": [] as `0x${string}`[],\n \"bytes6[]\": [] as `0x${string}`[],\n \"bytes7[]\": [] as `0x${string}`[],\n \"bytes8[]\": [] as `0x${string}`[],\n \"bytes9[]\": [] as `0x${string}`[],\n \"bytes10[]\": [] as `0x${string}`[],\n \"bytes11[]\": [] as `0x${string}`[],\n \"bytes12[]\": [] as `0x${string}`[],\n \"bytes13[]\": [] as `0x${string}`[],\n \"bytes14[]\": [] as `0x${string}`[],\n \"bytes15[]\": [] as `0x${string}`[],\n \"bytes16[]\": [] as `0x${string}`[],\n \"bytes17[]\": [] as `0x${string}`[],\n \"bytes18[]\": [] as `0x${string}`[],\n \"bytes19[]\": [] as `0x${string}`[],\n \"bytes20[]\": [] as `0x${string}`[],\n \"bytes21[]\": [] as `0x${string}`[],\n \"bytes22[]\": [] as `0x${string}`[],\n \"bytes23[]\": [] as `0x${string}`[],\n \"bytes24[]\": [] as `0x${string}`[],\n \"bytes25[]\": [] as `0x${string}`[],\n \"bytes26[]\": [] as `0x${string}`[],\n \"bytes27[]\": [] as `0x${string}`[],\n \"bytes28[]\": [] as `0x${string}`[],\n \"bytes29[]\": [] as `0x${string}`[],\n \"bytes30[]\": [] as `0x${string}`[],\n \"bytes31[]\": [] as `0x${string}`[],\n \"bytes32[]\": [] as `0x${string}`[],\n\n \"bool[]\": [] as boolean[],\n \"address[]\": [] as `0x${string}`[],\n\n bytes: \"0x\",\n string: \"\",\n} as const;\n","import { AbiTypeToPrimitiveType } from \"../mappings\";\nimport { AbiTypeToDefaultValue } from \"../mappings/AbiTypeToDefaultValue\";\n\n/**\n * Return a value corresponding to the Solidity default value for a given abi type\n */\nexport function getAbiTypeDefaultValue<T extends string>(abiType: T) {\n // Remove fixed array lengths (eg map uint256[10] to uint256[])\n const normalizedType = abiType.replace(/(\\w+)\\[\\d+\\]/g, \"$1[]\");\n return AbiTypeToDefaultValue[normalizedType as keyof typeof AbiTypeToDefaultValue] as AbiTypeToPrimitiveType<T>;\n}\n"],"mappings":"AAEO,IAAKA,OACVA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA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AY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EAEb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EAEd,SAAU,CAAC,EACX,YAAa,CAAC,EAEd,MAAO,KACP,OAAQ,EACV,ECzMO,SAASC,EAAyCC,EAAY,CAEnE,IAAMC,EAAiBD,EAAQ,QAAQ,gBAAiB,MAAM,EAC9D,OAAOE,EAAsBD,CAAoD,CACnF","names":["SchemaType","SchemaTypeToAbiType","AbiTypes","SchemaTypeToAbiType","AbiTypeToSchemaType","SchemaTypeToAbiType","schemaType","abiType","getStaticByteLength","schemaType","val","StaticAbiTypes","AbiTypes","abiType","getStaticByteLength","AbiTypeToSchemaType","SchemaTypeArrayToElement","encodeSchema","schema","encodedSchema","length","staticFields","hasDynamicFields","staticByteLength","getStaticByteLength","dynamicFields","AbiTypeToDefaultValue","getAbiTypeDefaultValue","abiType","normalizedType","AbiTypeToDefaultValue"]}
|
package/dist/typescript/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var i=/\[\]$/;function
|
|
1
|
+
var i=/\[\]$/;function b(t){return i.test(t)}function r(t){return t.replace(i,"")}var n=["uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","bool","address","uint8[]","uint16[]","uint24[]","uint32[]","uint40[]","uint48[]","uint56[]","uint64[]","uint72[]","uint80[]","uint88[]","uint96[]","uint104[]","uint112[]","uint120[]","uint128[]","uint136[]","uint144[]","uint152[]","uint160[]","uint168[]","uint176[]","uint184[]","uint192[]","uint200[]","uint208[]","uint216[]","uint224[]","uint232[]","uint240[]","uint248[]","uint256[]","int8[]","int16[]","int24[]","int32[]","int40[]","int48[]","int56[]","int64[]","int72[]","int80[]","int88[]","int96[]","int104[]","int112[]","int120[]","int128[]","int136[]","int144[]","int152[]","int160[]","int168[]","int176[]","int184[]","int192[]","int200[]","int208[]","int216[]","int224[]","int232[]","int240[]","int248[]","int256[]","bytes1[]","bytes2[]","bytes3[]","bytes4[]","bytes5[]","bytes6[]","bytes7[]","bytes8[]","bytes9[]","bytes10[]","bytes11[]","bytes12[]","bytes13[]","bytes14[]","bytes15[]","bytes16[]","bytes17[]","bytes18[]","bytes19[]","bytes20[]","bytes21[]","bytes22[]","bytes23[]","bytes24[]","bytes25[]","bytes26[]","bytes27[]","bytes28[]","bytes29[]","bytes30[]","bytes31[]","bytes32[]","bool[]","address[]","bytes","string"],e=n.slice(0,98),y=n.slice(98);var s={"uint8[]":[],"uint16[]":[],"uint24[]":[],"uint32[]":[],"uint40[]":[],"uint48[]":[],"uint56[]":[],"uint64[]":[],"uint72[]":[],"uint80[]":[],"uint88[]":[],"uint96[]":[],"uint104[]":[],"uint112[]":[],"uint120[]":[],"uint128[]":[],"uint136[]":[],"uint144[]":[],"uint152[]":[],"uint160[]":[],"uint168[]":[],"uint176[]":[],"uint184[]":[],"uint192[]":[],"uint200[]":[],"uint208[]":[],"uint216[]":[],"uint224[]":[],"uint232[]":[],"uint240[]":[],"uint248[]":[],"uint256[]":[],"int8[]":[],"int16[]":[],"int24[]":[],"int32[]":[],"int40[]":[],"int48[]":[],"int56[]":[],"int64[]":[],"int72[]":[],"int80[]":[],"int88[]":[],"int96[]":[],"int104[]":[],"int112[]":[],"int120[]":[],"int128[]":[],"int136[]":[],"int144[]":[],"int152[]":[],"int160[]":[],"int168[]":[],"int176[]":[],"int184[]":[],"int192[]":[],"int200[]":[],"int208[]":[],"int216[]":[],"int224[]":[],"int232[]":[],"int240[]":[],"int248[]":[],"int256[]":[],"bytes1[]":[],"bytes2[]":[],"bytes3[]":[],"bytes4[]":[],"bytes5[]":[],"bytes6[]":[],"bytes7[]":[],"bytes8[]":[],"bytes9[]":[],"bytes10[]":[],"bytes11[]":[],"bytes12[]":[],"bytes13[]":[],"bytes14[]":[],"bytes15[]":[],"bytes16[]":[],"bytes17[]":[],"bytes18[]":[],"bytes19[]":[],"bytes20[]":[],"bytes21[]":[],"bytes22[]":[],"bytes23[]":[],"bytes24[]":[],"bytes25[]":[],"bytes26[]":[],"bytes27[]":[],"bytes28[]":[],"bytes29[]":[],"bytes30[]":[],"bytes31[]":[],"bytes32[]":[],"bool[]":[],"address[]":[],bytes:"0x",string:""};function T(t){return y.includes(t)}var a={uint8:0,uint16:0,uint24:0,uint32:0,uint40:0,uint48:0,uint56:0n,uint64:0n,uint72:0n,uint80:0n,uint88:0n,uint96:0n,uint104:0n,uint112:0n,uint120:0n,uint128:0n,uint136:0n,uint144:0n,uint152:0n,uint160:0n,uint168:0n,uint176:0n,uint184:0n,uint192:0n,uint200:0n,uint208:0n,uint216:0n,uint224:0n,uint232:0n,uint240:0n,uint248:0n,uint256:0n,int8:0,int16:0,int24:0,int32:0,int40:0,int48:0,int56:0n,int64:0n,int72:0n,int80:0n,int88:0n,int96:0n,int104:0n,int112:0n,int120:0n,int128:0n,int136:0n,int144:0n,int152:0n,int160:0n,int168:0n,int176:0n,int184:0n,int192:0n,int200:0n,int208:0n,int216:0n,int224:0n,int232:0n,int240:0n,int248:0n,int256:0n,bytes1:"0x00",bytes2:"0x0000",bytes3:"0x000000",bytes4:"0x00000000",bytes5:"0x0000000000",bytes6:"0x000000000000",bytes7:"0x00000000000000",bytes8:"0x0000000000000000",bytes9:"0x000000000000000000",bytes10:"0x00000000000000000000",bytes11:"0x0000000000000000000000",bytes12:"0x000000000000000000000000",bytes13:"0x00000000000000000000000000",bytes14:"0x0000000000000000000000000000",bytes15:"0x000000000000000000000000000000",bytes16:"0x00000000000000000000000000000000",bytes17:"0x0000000000000000000000000000000000",bytes18:"0x000000000000000000000000000000000000",bytes19:"0x00000000000000000000000000000000000000",bytes20:"0x0000000000000000000000000000000000000000",bytes21:"0x000000000000000000000000000000000000000000",bytes22:"0x00000000000000000000000000000000000000000000",bytes23:"0x0000000000000000000000000000000000000000000000",bytes24:"0x000000000000000000000000000000000000000000000000",bytes25:"0x00000000000000000000000000000000000000000000000000",bytes26:"0x0000000000000000000000000000000000000000000000000000",bytes27:"0x000000000000000000000000000000000000000000000000000000",bytes28:"0x00000000000000000000000000000000000000000000000000000000",bytes29:"0x0000000000000000000000000000000000000000000000000000000000",bytes30:"0x000000000000000000000000000000000000000000000000000000000000",bytes31:"0x00000000000000000000000000000000000000000000000000000000000000",bytes32:"0x0000000000000000000000000000000000000000000000000000000000000000",bool:!1,address:"0x0000000000000000000000000000000000000000"},A={uint8:1,uint16:2,uint24:3,uint32:4,uint40:5,uint48:6,uint56:7,uint64:8,uint72:9,uint80:10,uint88:11,uint96:12,uint104:13,uint112:14,uint120:15,uint128:16,uint136:17,uint144:18,uint152:19,uint160:20,uint168:21,uint176:22,uint184:23,uint192:24,uint200:25,uint208:26,uint216:27,uint224:28,uint232:29,uint240:30,uint248:31,uint256:32,int8:1,int16:2,int24:3,int32:4,int40:5,int48:6,int56:7,int64:8,int72:9,int80:10,int88:11,int96:12,int104:13,int112:14,int120:15,int128:16,int136:17,int144:18,int152:19,int160:20,int168:21,int176:22,int184:23,int192:24,int200:25,int208:26,int216:27,int224:28,int232:29,int240:30,int248:31,int256:32,bytes1:1,bytes2:2,bytes3:3,bytes4:4,bytes5:5,bytes6:6,bytes7:7,bytes8:8,bytes9:9,bytes10:10,bytes11:11,bytes12:12,bytes13:13,bytes14:14,bytes15:15,bytes16:16,bytes17:17,bytes18:18,bytes19:19,bytes20:20,bytes21:21,bytes22:22,bytes23:23,bytes24:24,bytes25:25,bytes26:26,bytes27:27,bytes28:28,bytes29:29,bytes30:30,bytes31:31,bytes32:32,bool:1,address:20};function g(t){return e.includes(t)}var P={...a,...s};export{r as arrayAbiTypeToStaticAbiType,s as dynamicAbiTypeToDefaultValue,y as dynamicAbiTypes,b as isArrayAbiType,T as isDynamicAbiType,g as isStaticAbiType,P as schemaAbiTypeToDefaultValue,n as schemaAbiTypes,A as staticAbiTypeToByteLength,a as staticAbiTypeToDefaultValue,e as staticAbiTypes};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typescript/arrayAbiTypes.ts","../../src/typescript/dynamicAbiTypes.ts","../../src/typescript/schemaAbiTypes.ts","../../src/typescript/staticAbiTypes.ts","../../src/typescript/schemaAbiTypeToDefaultValue.ts"],"sourcesContent":["import { StaticAbiType } from \"./schemaAbiTypes\";\n\nconst arrayAbiTypePattern = /\\[\\]$/;\n\nexport type ArrayAbiTypeToStaticAbiType<T extends string> = T extends `${infer StaticAbiType}[]`\n ? StaticAbiType\n : never;\n\nexport function isArrayAbiType<T extends `${StaticAbiType}[]`>(abiType: string): abiType is T {\n return arrayAbiTypePattern.test(abiType);\n}\n\nexport function arrayAbiTypeToStaticAbiType<T extends `${StaticAbiType}[]`>(\n abiType: T\n): ArrayAbiTypeToStaticAbiType<T> {\n return abiType.replace(arrayAbiTypePattern, \"\") as ArrayAbiTypeToStaticAbiType<T>;\n}\n","import { Hex } from \"viem\";\nimport { DynamicAbiType, SchemaAbiType } from \"./schemaAbiTypes\";\nimport { LiteralToBroad } from \"./utils\";\nimport { isArrayAbiType } from \"./arrayAbiTypes\";\n\n// Variable-length ABI types, where their lengths are encoded by a PackedCounter within the record\n\nexport type DynamicPrimitiveType =\n | readonly number[]\n | readonly bigint[]\n | readonly Hex[]\n | readonly boolean[]\n | Hex\n | string;\n\nexport const dynamicAbiTypeToDefaultValue = {\n \"uint8[]\": [] as readonly number[],\n \"uint16[]\": [] as readonly number[],\n \"uint24[]\": [] as readonly number[],\n \"uint32[]\": [] as readonly number[],\n \"uint40[]\": [] as readonly number[],\n \"uint48[]\": [] as readonly number[],\n \"uint56[]\": [] as readonly bigint[],\n \"uint64[]\": [] as readonly bigint[],\n \"uint72[]\": [] as readonly bigint[],\n \"uint80[]\": [] as readonly bigint[],\n \"uint88[]\": [] as readonly bigint[],\n \"uint96[]\": [] as readonly bigint[],\n \"uint104[]\": [] as readonly bigint[],\n \"uint112[]\": [] as readonly bigint[],\n \"uint120[]\": [] as readonly bigint[],\n \"uint128[]\": [] as readonly bigint[],\n \"uint136[]\": [] as readonly bigint[],\n \"uint144[]\": [] as readonly bigint[],\n \"uint152[]\": [] as readonly bigint[],\n \"uint160[]\": [] as readonly bigint[],\n \"uint168[]\": [] as readonly bigint[],\n \"uint176[]\": [] as readonly bigint[],\n \"uint184[]\": [] as readonly bigint[],\n \"uint192[]\": [] as readonly bigint[],\n \"uint200[]\": [] as readonly bigint[],\n \"uint208[]\": [] as readonly bigint[],\n \"uint216[]\": [] as readonly bigint[],\n \"uint224[]\": [] as readonly bigint[],\n \"uint232[]\": [] as readonly bigint[],\n \"uint240[]\": [] as readonly bigint[],\n \"uint248[]\": [] as readonly bigint[],\n \"uint256[]\": [] as readonly bigint[],\n\n \"int8[]\": [] as readonly number[],\n \"int16[]\": [] as readonly number[],\n \"int24[]\": [] as readonly number[],\n \"int32[]\": [] as readonly number[],\n \"int40[]\": [] as readonly number[],\n \"int48[]\": [] as readonly number[],\n \"int56[]\": [] as readonly bigint[],\n \"int64[]\": [] as readonly bigint[],\n \"int72[]\": [] as readonly bigint[],\n \"int80[]\": [] as readonly bigint[],\n \"int88[]\": [] as readonly bigint[],\n \"int96[]\": [] as readonly bigint[],\n \"int104[]\": [] as readonly bigint[],\n \"int112[]\": [] as readonly bigint[],\n \"int120[]\": [] as readonly bigint[],\n \"int128[]\": [] as readonly bigint[],\n \"int136[]\": [] as readonly bigint[],\n \"int144[]\": [] as readonly bigint[],\n \"int152[]\": [] as readonly bigint[],\n \"int160[]\": [] as readonly bigint[],\n \"int168[]\": [] as readonly bigint[],\n \"int176[]\": [] as readonly bigint[],\n \"int184[]\": [] as readonly bigint[],\n \"int192[]\": [] as readonly bigint[],\n \"int200[]\": [] as readonly bigint[],\n \"int208[]\": [] as readonly bigint[],\n \"int216[]\": [] as readonly bigint[],\n \"int224[]\": [] as readonly bigint[],\n \"int232[]\": [] as readonly bigint[],\n \"int240[]\": [] as readonly bigint[],\n \"int248[]\": [] as readonly bigint[],\n \"int256[]\": [] as readonly bigint[],\n\n \"bytes1[]\": [] as readonly Hex[],\n \"bytes2[]\": [] as readonly Hex[],\n \"bytes3[]\": [] as readonly Hex[],\n \"bytes4[]\": [] as readonly Hex[],\n \"bytes5[]\": [] as readonly Hex[],\n \"bytes6[]\": [] as readonly Hex[],\n \"bytes7[]\": [] as readonly Hex[],\n \"bytes8[]\": [] as readonly Hex[],\n \"bytes9[]\": [] as readonly Hex[],\n \"bytes10[]\": [] as readonly Hex[],\n \"bytes11[]\": [] as readonly Hex[],\n \"bytes12[]\": [] as readonly Hex[],\n \"bytes13[]\": [] as readonly Hex[],\n \"bytes14[]\": [] as readonly Hex[],\n \"bytes15[]\": [] as readonly Hex[],\n \"bytes16[]\": [] as readonly Hex[],\n \"bytes17[]\": [] as readonly Hex[],\n \"bytes18[]\": [] as readonly Hex[],\n \"bytes19[]\": [] as readonly Hex[],\n \"bytes20[]\": [] as readonly Hex[],\n \"bytes21[]\": [] as readonly Hex[],\n \"bytes22[]\": [] as readonly Hex[],\n \"bytes23[]\": [] as readonly Hex[],\n \"bytes24[]\": [] as readonly Hex[],\n \"bytes25[]\": [] as readonly Hex[],\n \"bytes26[]\": [] as readonly Hex[],\n \"bytes27[]\": [] as readonly Hex[],\n \"bytes28[]\": [] as readonly Hex[],\n \"bytes29[]\": [] as readonly Hex[],\n \"bytes30[]\": [] as readonly Hex[],\n \"bytes31[]\": [] as readonly Hex[],\n \"bytes32[]\": [] as readonly Hex[],\n\n \"bool[]\": [] as readonly boolean[],\n \"address[]\": [] as readonly Hex[],\n\n bytes: \"0x\",\n string: \"\",\n} as const satisfies Record<DynamicAbiType, DynamicPrimitiveType>;\n\nexport type DynamicAbiTypeToPrimitiveType<TDynamicAbiType extends DynamicAbiType = DynamicAbiType> = LiteralToBroad<\n (typeof dynamicAbiTypeToDefaultValue)[TDynamicAbiType]\n>;\n\nexport function isDynamicAbiType(abiType: SchemaAbiType): abiType is DynamicAbiType {\n return isArrayAbiType(abiType) || abiType === \"bytes\" || abiType === \"string\";\n}\n","import { AbiType } from \"abitype\";\nimport { TupleSplit } from \"./utils\";\n\n// Keep this array in sync with SchemaType.sol enum\nexport const schemaAbiTypes = [\n \"uint8\",\n \"uint16\",\n \"uint24\",\n \"uint32\",\n \"uint40\",\n \"uint48\",\n \"uint56\",\n \"uint64\",\n \"uint72\",\n \"uint80\",\n \"uint88\",\n \"uint96\",\n \"uint104\",\n \"uint112\",\n \"uint120\",\n \"uint128\",\n \"uint136\",\n \"uint144\",\n \"uint152\",\n \"uint160\",\n \"uint168\",\n \"uint176\",\n \"uint184\",\n \"uint192\",\n \"uint200\",\n \"uint208\",\n \"uint216\",\n \"uint224\",\n \"uint232\",\n \"uint240\",\n \"uint248\",\n \"uint256\",\n \"int8\",\n \"int16\",\n \"int24\",\n \"int32\",\n \"int40\",\n \"int48\",\n \"int56\",\n \"int64\",\n \"int72\",\n \"int80\",\n \"int88\",\n \"int96\",\n \"int104\",\n \"int112\",\n \"int120\",\n \"int128\",\n \"int136\",\n \"int144\",\n \"int152\",\n \"int160\",\n \"int168\",\n \"int176\",\n \"int184\",\n \"int192\",\n \"int200\",\n \"int208\",\n \"int216\",\n \"int224\",\n \"int232\",\n \"int240\",\n \"int248\",\n \"int256\",\n \"bytes1\",\n \"bytes2\",\n \"bytes3\",\n \"bytes4\",\n \"bytes5\",\n \"bytes6\",\n \"bytes7\",\n \"bytes8\",\n \"bytes9\",\n \"bytes10\",\n \"bytes11\",\n \"bytes12\",\n \"bytes13\",\n \"bytes14\",\n \"bytes15\",\n \"bytes16\",\n \"bytes17\",\n \"bytes18\",\n \"bytes19\",\n \"bytes20\",\n \"bytes21\",\n \"bytes22\",\n \"bytes23\",\n \"bytes24\",\n \"bytes25\",\n \"bytes26\",\n \"bytes27\",\n \"bytes28\",\n \"bytes29\",\n \"bytes30\",\n \"bytes31\",\n \"bytes32\",\n \"bool\",\n \"address\",\n \"uint8[]\",\n \"uint16[]\",\n \"uint24[]\",\n \"uint32[]\",\n \"uint40[]\",\n \"uint48[]\",\n \"uint56[]\",\n \"uint64[]\",\n \"uint72[]\",\n \"uint80[]\",\n \"uint88[]\",\n \"uint96[]\",\n \"uint104[]\",\n \"uint112[]\",\n \"uint120[]\",\n \"uint128[]\",\n \"uint136[]\",\n \"uint144[]\",\n \"uint152[]\",\n \"uint160[]\",\n \"uint168[]\",\n \"uint176[]\",\n \"uint184[]\",\n \"uint192[]\",\n \"uint200[]\",\n \"uint208[]\",\n \"uint216[]\",\n \"uint224[]\",\n \"uint232[]\",\n \"uint240[]\",\n \"uint248[]\",\n \"uint256[]\",\n \"int8[]\",\n \"int16[]\",\n \"int24[]\",\n \"int32[]\",\n \"int40[]\",\n \"int48[]\",\n \"int56[]\",\n \"int64[]\",\n \"int72[]\",\n \"int80[]\",\n \"int88[]\",\n \"int96[]\",\n \"int104[]\",\n \"int112[]\",\n \"int120[]\",\n \"int128[]\",\n \"int136[]\",\n \"int144[]\",\n \"int152[]\",\n \"int160[]\",\n \"int168[]\",\n \"int176[]\",\n \"int184[]\",\n \"int192[]\",\n \"int200[]\",\n \"int208[]\",\n \"int216[]\",\n \"int224[]\",\n \"int232[]\",\n \"int240[]\",\n \"int248[]\",\n \"int256[]\",\n \"bytes1[]\",\n \"bytes2[]\",\n \"bytes3[]\",\n \"bytes4[]\",\n \"bytes5[]\",\n \"bytes6[]\",\n \"bytes7[]\",\n \"bytes8[]\",\n \"bytes9[]\",\n \"bytes10[]\",\n \"bytes11[]\",\n \"bytes12[]\",\n \"bytes13[]\",\n \"bytes14[]\",\n \"bytes15[]\",\n \"bytes16[]\",\n \"bytes17[]\",\n \"bytes18[]\",\n \"bytes19[]\",\n \"bytes20[]\",\n \"bytes21[]\",\n \"bytes22[]\",\n \"bytes23[]\",\n \"bytes24[]\",\n \"bytes25[]\",\n \"bytes26[]\",\n \"bytes27[]\",\n \"bytes28[]\",\n \"bytes29[]\",\n \"bytes30[]\",\n \"bytes31[]\",\n \"bytes32[]\",\n \"bool[]\",\n \"address[]\",\n \"bytes\",\n \"string\",\n] as const satisfies readonly AbiType[];\n\nexport type SchemaAbiType = (typeof schemaAbiTypes)[number];\n\n// These are defined here to keep the index position (98) consolidated, since we use it both in runtime code and type definition\nexport const staticAbiTypes = schemaAbiTypes.slice(0, 98) as any as TupleSplit<typeof schemaAbiTypes, 98>[0];\nexport const dynamicAbiTypes = schemaAbiTypes.slice(98) as any as TupleSplit<typeof schemaAbiTypes, 98>[1];\n\nexport type StaticAbiType = (typeof staticAbiTypes)[number];\nexport type DynamicAbiType = (typeof dynamicAbiTypes)[number];\n","import { Hex } from \"viem\";\nimport { StaticAbiType } from \"./schemaAbiTypes\";\nimport { LiteralToBroad } from \"./utils\";\n\n// Fixed-length ABI types\n\nexport type StaticPrimitiveType = number | bigint | boolean | Hex;\n\nexport const staticAbiTypeToDefaultValue = {\n uint8: 0,\n uint16: 0,\n uint24: 0,\n uint32: 0,\n uint40: 0,\n uint48: 0,\n uint56: 0n,\n uint64: 0n,\n uint72: 0n,\n uint80: 0n,\n uint88: 0n,\n uint96: 0n,\n uint104: 0n,\n uint112: 0n,\n uint120: 0n,\n uint128: 0n,\n uint136: 0n,\n uint144: 0n,\n uint152: 0n,\n uint160: 0n,\n uint168: 0n,\n uint176: 0n,\n uint184: 0n,\n uint192: 0n,\n uint200: 0n,\n uint208: 0n,\n uint216: 0n,\n uint224: 0n,\n uint232: 0n,\n uint240: 0n,\n uint248: 0n,\n uint256: 0n,\n\n int8: 0,\n int16: 0,\n int24: 0,\n int32: 0,\n int40: 0,\n int48: 0,\n int56: 0n,\n int64: 0n,\n int72: 0n,\n int80: 0n,\n int88: 0n,\n int96: 0n,\n int104: 0n,\n int112: 0n,\n int120: 0n,\n int128: 0n,\n int136: 0n,\n int144: 0n,\n int152: 0n,\n int160: 0n,\n int168: 0n,\n int176: 0n,\n int184: 0n,\n int192: 0n,\n int200: 0n,\n int208: 0n,\n int216: 0n,\n int224: 0n,\n int232: 0n,\n int240: 0n,\n int248: 0n,\n int256: 0n,\n\n bytes1: \"0x00\",\n bytes2: \"0x0000\",\n bytes3: \"0x000000\",\n bytes4: \"0x00000000\",\n bytes5: \"0x0000000000\",\n bytes6: \"0x000000000000\",\n bytes7: \"0x00000000000000\",\n bytes8: \"0x0000000000000000\",\n bytes9: \"0x000000000000000000\",\n bytes10: \"0x00000000000000000000\",\n bytes11: \"0x0000000000000000000000\",\n bytes12: \"0x000000000000000000000000\",\n bytes13: \"0x00000000000000000000000000\",\n bytes14: \"0x0000000000000000000000000000\",\n bytes15: \"0x000000000000000000000000000000\",\n bytes16: \"0x00000000000000000000000000000000\",\n bytes17: \"0x0000000000000000000000000000000000\",\n bytes18: \"0x000000000000000000000000000000000000\",\n bytes19: \"0x00000000000000000000000000000000000000\",\n bytes20: \"0x0000000000000000000000000000000000000000\",\n bytes21: \"0x000000000000000000000000000000000000000000\",\n bytes22: \"0x00000000000000000000000000000000000000000000\",\n bytes23: \"0x0000000000000000000000000000000000000000000000\",\n bytes24: \"0x000000000000000000000000000000000000000000000000\",\n bytes25: \"0x00000000000000000000000000000000000000000000000000\",\n bytes26: \"0x0000000000000000000000000000000000000000000000000000\",\n bytes27: \"0x000000000000000000000000000000000000000000000000000000\",\n bytes28: \"0x00000000000000000000000000000000000000000000000000000000\",\n bytes29: \"0x0000000000000000000000000000000000000000000000000000000000\",\n bytes30: \"0x000000000000000000000000000000000000000000000000000000000000\",\n bytes31: \"0x00000000000000000000000000000000000000000000000000000000000000\",\n bytes32: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n\n bool: false,\n address: \"0x0000000000000000000000000000000000000000\",\n} as const satisfies Record<StaticAbiType, StaticPrimitiveType>;\n\nexport type StaticAbiTypeToPrimitiveType<TStaticAbiType extends StaticAbiType = StaticAbiType> = LiteralToBroad<\n (typeof staticAbiTypeToDefaultValue)[TStaticAbiType]\n>;\n\nexport const staticAbiTypeToByteLength = {\n uint8: 1,\n uint16: 2,\n uint24: 3,\n uint32: 4,\n uint40: 5,\n uint48: 6,\n uint56: 7,\n uint64: 8,\n uint72: 9,\n uint80: 10,\n uint88: 11,\n uint96: 12,\n uint104: 13,\n uint112: 14,\n uint120: 15,\n uint128: 16,\n uint136: 17,\n uint144: 18,\n uint152: 19,\n uint160: 20,\n uint168: 21,\n uint176: 22,\n uint184: 23,\n uint192: 24,\n uint200: 25,\n uint208: 26,\n uint216: 27,\n uint224: 28,\n uint232: 29,\n uint240: 30,\n uint248: 31,\n uint256: 32,\n\n int8: 1,\n int16: 2,\n int24: 3,\n int32: 4,\n int40: 5,\n int48: 6,\n int56: 7,\n int64: 8,\n int72: 9,\n int80: 10,\n int88: 11,\n int96: 12,\n int104: 13,\n int112: 14,\n int120: 15,\n int128: 16,\n int136: 17,\n int144: 18,\n int152: 19,\n int160: 20,\n int168: 21,\n int176: 22,\n int184: 23,\n int192: 24,\n int200: 25,\n int208: 26,\n int216: 27,\n int224: 28,\n int232: 29,\n int240: 30,\n int248: 31,\n int256: 32,\n\n bytes1: 1,\n bytes2: 2,\n bytes3: 3,\n bytes4: 4,\n bytes5: 5,\n bytes6: 6,\n bytes7: 7,\n bytes8: 8,\n bytes9: 9,\n bytes10: 10,\n bytes11: 11,\n bytes12: 12,\n bytes13: 13,\n bytes14: 14,\n bytes15: 15,\n bytes16: 16,\n bytes17: 17,\n bytes18: 18,\n bytes19: 19,\n bytes20: 20,\n bytes21: 21,\n bytes22: 22,\n bytes23: 23,\n bytes24: 24,\n bytes25: 25,\n bytes26: 26,\n bytes27: 27,\n bytes28: 28,\n bytes29: 29,\n bytes30: 30,\n bytes31: 31,\n bytes32: 32,\n\n bool: 1,\n address: 20,\n} as const satisfies Record<StaticAbiType, number>;\n","import { SchemaAbiType } from \"./schemaAbiTypes\";\nimport { DynamicAbiTypeToPrimitiveType, dynamicAbiTypeToDefaultValue } from \"./dynamicAbiTypes\";\nimport { StaticAbiTypeToPrimitiveType, staticAbiTypeToDefaultValue } from \"./staticAbiTypes\";\n\nexport const schemaAbiTypeToDefaultValue = {\n ...staticAbiTypeToDefaultValue,\n ...dynamicAbiTypeToDefaultValue,\n} as const satisfies Record<SchemaAbiType, StaticAbiTypeToPrimitiveType | DynamicAbiTypeToPrimitiveType>;\n"],"mappings":"AAEA,IAAMA,EAAsB,QAMrB,SAASC,EAA+CC,EAA+B,CAC5F,OAAOF,EAAoB,KAAKE,CAAO,CACzC,CAEO,SAASC,EACdD,EACgC,CAChC,OAAOA,EAAQ,QAAQF,EAAqB,EAAE,CAChD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AAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EAEd,SAAU,CAAC,EACX,YAAa,CAAC,EAEd,MAAO,KACP,OAAQ,EACV,EAMO,SAASC,EAAiBC,EAAmD,CAClF,OAAOC,EAAeD,CAAO,GAAKA,IAAY,SAAWA,IAAY,QACvE,CC5HO,IAAME,EAAiB,CAC5B,QACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,OACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,OACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SAC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AAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,GAET,KAAM,EACN,QAAS,EACX,ECtNO,IAAMC,EAA8B,CACzC,GAAGC,EACH,GAAGC,CACL","names":["arrayAbiTypePattern","isArrayAbiType","abiType","arrayAbiTypeToStaticAbiType","dynamicAbiTypeToDefaultValue","isDynamicAbiType","abiType","isArrayAbiType","schemaAbiTypes","staticAbiTypes","dynamicAbiTypes","staticAbiTypeToDefaultValue","staticAbiTypeToByteLength","schemaAbiTypeToDefaultValue","staticAbiTypeToDefaultValue","dynamicAbiTypeToDefaultValue"]}
|
|
1
|
+
{"version":3,"sources":["../../src/typescript/arrayAbiTypes.ts","../../src/typescript/schemaAbiTypes.ts","../../src/typescript/dynamicAbiTypes.ts","../../src/typescript/staticAbiTypes.ts","../../src/typescript/schemaAbiTypeToDefaultValue.ts"],"sourcesContent":["import { StaticAbiType } from \"./schemaAbiTypes\";\n\nconst arrayAbiTypePattern = /\\[\\]$/;\n\nexport type ArrayAbiTypeToStaticAbiType<T extends string> = T extends `${infer StaticAbiType}[]`\n ? StaticAbiType\n : never;\n\nexport function isArrayAbiType<T extends `${StaticAbiType}[]`>(abiType: string): abiType is T {\n return arrayAbiTypePattern.test(abiType);\n}\n\nexport function arrayAbiTypeToStaticAbiType<T extends `${StaticAbiType}[]`>(\n abiType: T\n): ArrayAbiTypeToStaticAbiType<T> {\n return abiType.replace(arrayAbiTypePattern, \"\") as ArrayAbiTypeToStaticAbiType<T>;\n}\n","import { AbiType } from \"abitype\";\nimport { TupleSplit } from \"./utils\";\n\n// Keep this array in sync with SchemaType.sol enum\nexport const schemaAbiTypes = [\n \"uint8\",\n \"uint16\",\n \"uint24\",\n \"uint32\",\n \"uint40\",\n \"uint48\",\n \"uint56\",\n \"uint64\",\n \"uint72\",\n \"uint80\",\n \"uint88\",\n \"uint96\",\n \"uint104\",\n \"uint112\",\n \"uint120\",\n \"uint128\",\n \"uint136\",\n \"uint144\",\n \"uint152\",\n \"uint160\",\n \"uint168\",\n \"uint176\",\n \"uint184\",\n \"uint192\",\n \"uint200\",\n \"uint208\",\n \"uint216\",\n \"uint224\",\n \"uint232\",\n \"uint240\",\n \"uint248\",\n \"uint256\",\n \"int8\",\n \"int16\",\n \"int24\",\n \"int32\",\n \"int40\",\n \"int48\",\n \"int56\",\n \"int64\",\n \"int72\",\n \"int80\",\n \"int88\",\n \"int96\",\n \"int104\",\n \"int112\",\n \"int120\",\n \"int128\",\n \"int136\",\n \"int144\",\n \"int152\",\n \"int160\",\n \"int168\",\n \"int176\",\n \"int184\",\n \"int192\",\n \"int200\",\n \"int208\",\n \"int216\",\n \"int224\",\n \"int232\",\n \"int240\",\n \"int248\",\n \"int256\",\n \"bytes1\",\n \"bytes2\",\n \"bytes3\",\n \"bytes4\",\n \"bytes5\",\n \"bytes6\",\n \"bytes7\",\n \"bytes8\",\n \"bytes9\",\n \"bytes10\",\n \"bytes11\",\n \"bytes12\",\n \"bytes13\",\n \"bytes14\",\n \"bytes15\",\n \"bytes16\",\n \"bytes17\",\n \"bytes18\",\n \"bytes19\",\n \"bytes20\",\n \"bytes21\",\n \"bytes22\",\n \"bytes23\",\n \"bytes24\",\n \"bytes25\",\n \"bytes26\",\n \"bytes27\",\n \"bytes28\",\n \"bytes29\",\n \"bytes30\",\n \"bytes31\",\n \"bytes32\",\n \"bool\",\n \"address\",\n \"uint8[]\",\n \"uint16[]\",\n \"uint24[]\",\n \"uint32[]\",\n \"uint40[]\",\n \"uint48[]\",\n \"uint56[]\",\n \"uint64[]\",\n \"uint72[]\",\n \"uint80[]\",\n \"uint88[]\",\n \"uint96[]\",\n \"uint104[]\",\n \"uint112[]\",\n \"uint120[]\",\n \"uint128[]\",\n \"uint136[]\",\n \"uint144[]\",\n \"uint152[]\",\n \"uint160[]\",\n \"uint168[]\",\n \"uint176[]\",\n \"uint184[]\",\n \"uint192[]\",\n \"uint200[]\",\n \"uint208[]\",\n \"uint216[]\",\n \"uint224[]\",\n \"uint232[]\",\n \"uint240[]\",\n \"uint248[]\",\n \"uint256[]\",\n \"int8[]\",\n \"int16[]\",\n \"int24[]\",\n \"int32[]\",\n \"int40[]\",\n \"int48[]\",\n \"int56[]\",\n \"int64[]\",\n \"int72[]\",\n \"int80[]\",\n \"int88[]\",\n \"int96[]\",\n \"int104[]\",\n \"int112[]\",\n \"int120[]\",\n \"int128[]\",\n \"int136[]\",\n \"int144[]\",\n \"int152[]\",\n \"int160[]\",\n \"int168[]\",\n \"int176[]\",\n \"int184[]\",\n \"int192[]\",\n \"int200[]\",\n \"int208[]\",\n \"int216[]\",\n \"int224[]\",\n \"int232[]\",\n \"int240[]\",\n \"int248[]\",\n \"int256[]\",\n \"bytes1[]\",\n \"bytes2[]\",\n \"bytes3[]\",\n \"bytes4[]\",\n \"bytes5[]\",\n \"bytes6[]\",\n \"bytes7[]\",\n \"bytes8[]\",\n \"bytes9[]\",\n \"bytes10[]\",\n \"bytes11[]\",\n \"bytes12[]\",\n \"bytes13[]\",\n \"bytes14[]\",\n \"bytes15[]\",\n \"bytes16[]\",\n \"bytes17[]\",\n \"bytes18[]\",\n \"bytes19[]\",\n \"bytes20[]\",\n \"bytes21[]\",\n \"bytes22[]\",\n \"bytes23[]\",\n \"bytes24[]\",\n \"bytes25[]\",\n \"bytes26[]\",\n \"bytes27[]\",\n \"bytes28[]\",\n \"bytes29[]\",\n \"bytes30[]\",\n \"bytes31[]\",\n \"bytes32[]\",\n \"bool[]\",\n \"address[]\",\n \"bytes\",\n \"string\",\n] as const satisfies readonly AbiType[];\n\nexport type SchemaAbiType = (typeof schemaAbiTypes)[number];\n\n// These are defined here to keep the index position (98) consolidated, since we use it both in runtime code and type definition\nexport const staticAbiTypes = schemaAbiTypes.slice(0, 98) as any as TupleSplit<typeof schemaAbiTypes, 98>[0];\nexport const dynamicAbiTypes = schemaAbiTypes.slice(98) as any as TupleSplit<typeof schemaAbiTypes, 98>[1];\n\nexport type StaticAbiType = (typeof staticAbiTypes)[number];\nexport type DynamicAbiType = (typeof dynamicAbiTypes)[number];\n","import { Hex } from \"viem\";\nimport { DynamicAbiType, SchemaAbiType, dynamicAbiTypes } from \"./schemaAbiTypes\";\nimport { LiteralToBroad } from \"./utils\";\nimport { isArrayAbiType } from \"./arrayAbiTypes\";\n\n// Variable-length ABI types, where their lengths are encoded by a PackedCounter within the record\n\nexport type DynamicPrimitiveType =\n | readonly number[]\n | readonly bigint[]\n | readonly Hex[]\n | readonly boolean[]\n | Hex\n | string;\n\nexport const dynamicAbiTypeToDefaultValue = {\n \"uint8[]\": [] as readonly number[],\n \"uint16[]\": [] as readonly number[],\n \"uint24[]\": [] as readonly number[],\n \"uint32[]\": [] as readonly number[],\n \"uint40[]\": [] as readonly number[],\n \"uint48[]\": [] as readonly number[],\n \"uint56[]\": [] as readonly bigint[],\n \"uint64[]\": [] as readonly bigint[],\n \"uint72[]\": [] as readonly bigint[],\n \"uint80[]\": [] as readonly bigint[],\n \"uint88[]\": [] as readonly bigint[],\n \"uint96[]\": [] as readonly bigint[],\n \"uint104[]\": [] as readonly bigint[],\n \"uint112[]\": [] as readonly bigint[],\n \"uint120[]\": [] as readonly bigint[],\n \"uint128[]\": [] as readonly bigint[],\n \"uint136[]\": [] as readonly bigint[],\n \"uint144[]\": [] as readonly bigint[],\n \"uint152[]\": [] as readonly bigint[],\n \"uint160[]\": [] as readonly bigint[],\n \"uint168[]\": [] as readonly bigint[],\n \"uint176[]\": [] as readonly bigint[],\n \"uint184[]\": [] as readonly bigint[],\n \"uint192[]\": [] as readonly bigint[],\n \"uint200[]\": [] as readonly bigint[],\n \"uint208[]\": [] as readonly bigint[],\n \"uint216[]\": [] as readonly bigint[],\n \"uint224[]\": [] as readonly bigint[],\n \"uint232[]\": [] as readonly bigint[],\n \"uint240[]\": [] as readonly bigint[],\n \"uint248[]\": [] as readonly bigint[],\n \"uint256[]\": [] as readonly bigint[],\n\n \"int8[]\": [] as readonly number[],\n \"int16[]\": [] as readonly number[],\n \"int24[]\": [] as readonly number[],\n \"int32[]\": [] as readonly number[],\n \"int40[]\": [] as readonly number[],\n \"int48[]\": [] as readonly number[],\n \"int56[]\": [] as readonly bigint[],\n \"int64[]\": [] as readonly bigint[],\n \"int72[]\": [] as readonly bigint[],\n \"int80[]\": [] as readonly bigint[],\n \"int88[]\": [] as readonly bigint[],\n \"int96[]\": [] as readonly bigint[],\n \"int104[]\": [] as readonly bigint[],\n \"int112[]\": [] as readonly bigint[],\n \"int120[]\": [] as readonly bigint[],\n \"int128[]\": [] as readonly bigint[],\n \"int136[]\": [] as readonly bigint[],\n \"int144[]\": [] as readonly bigint[],\n \"int152[]\": [] as readonly bigint[],\n \"int160[]\": [] as readonly bigint[],\n \"int168[]\": [] as readonly bigint[],\n \"int176[]\": [] as readonly bigint[],\n \"int184[]\": [] as readonly bigint[],\n \"int192[]\": [] as readonly bigint[],\n \"int200[]\": [] as readonly bigint[],\n \"int208[]\": [] as readonly bigint[],\n \"int216[]\": [] as readonly bigint[],\n \"int224[]\": [] as readonly bigint[],\n \"int232[]\": [] as readonly bigint[],\n \"int240[]\": [] as readonly bigint[],\n \"int248[]\": [] as readonly bigint[],\n \"int256[]\": [] as readonly bigint[],\n\n \"bytes1[]\": [] as readonly Hex[],\n \"bytes2[]\": [] as readonly Hex[],\n \"bytes3[]\": [] as readonly Hex[],\n \"bytes4[]\": [] as readonly Hex[],\n \"bytes5[]\": [] as readonly Hex[],\n \"bytes6[]\": [] as readonly Hex[],\n \"bytes7[]\": [] as readonly Hex[],\n \"bytes8[]\": [] as readonly Hex[],\n \"bytes9[]\": [] as readonly Hex[],\n \"bytes10[]\": [] as readonly Hex[],\n \"bytes11[]\": [] as readonly Hex[],\n \"bytes12[]\": [] as readonly Hex[],\n \"bytes13[]\": [] as readonly Hex[],\n \"bytes14[]\": [] as readonly Hex[],\n \"bytes15[]\": [] as readonly Hex[],\n \"bytes16[]\": [] as readonly Hex[],\n \"bytes17[]\": [] as readonly Hex[],\n \"bytes18[]\": [] as readonly Hex[],\n \"bytes19[]\": [] as readonly Hex[],\n \"bytes20[]\": [] as readonly Hex[],\n \"bytes21[]\": [] as readonly Hex[],\n \"bytes22[]\": [] as readonly Hex[],\n \"bytes23[]\": [] as readonly Hex[],\n \"bytes24[]\": [] as readonly Hex[],\n \"bytes25[]\": [] as readonly Hex[],\n \"bytes26[]\": [] as readonly Hex[],\n \"bytes27[]\": [] as readonly Hex[],\n \"bytes28[]\": [] as readonly Hex[],\n \"bytes29[]\": [] as readonly Hex[],\n \"bytes30[]\": [] as readonly Hex[],\n \"bytes31[]\": [] as readonly Hex[],\n \"bytes32[]\": [] as readonly Hex[],\n\n \"bool[]\": [] as readonly boolean[],\n \"address[]\": [] as readonly Hex[],\n\n bytes: \"0x\",\n string: \"\",\n} as const satisfies Record<DynamicAbiType, DynamicPrimitiveType>;\n\nexport type DynamicAbiTypeToPrimitiveType<TDynamicAbiType extends DynamicAbiType = DynamicAbiType> = LiteralToBroad<\n (typeof dynamicAbiTypeToDefaultValue)[TDynamicAbiType]\n>;\n\nexport function isDynamicAbiType(abiType: string): abiType is DynamicAbiType {\n return dynamicAbiTypes.includes(abiType as DynamicAbiType);\n}\n","import { Hex } from \"viem\";\nimport { StaticAbiType, staticAbiTypes } from \"./schemaAbiTypes\";\nimport { LiteralToBroad } from \"./utils\";\n\n// Fixed-length ABI types\n\nexport type StaticPrimitiveType = number | bigint | boolean | Hex;\n\nexport const staticAbiTypeToDefaultValue = {\n uint8: 0,\n uint16: 0,\n uint24: 0,\n uint32: 0,\n uint40: 0,\n uint48: 0,\n uint56: 0n,\n uint64: 0n,\n uint72: 0n,\n uint80: 0n,\n uint88: 0n,\n uint96: 0n,\n uint104: 0n,\n uint112: 0n,\n uint120: 0n,\n uint128: 0n,\n uint136: 0n,\n uint144: 0n,\n uint152: 0n,\n uint160: 0n,\n uint168: 0n,\n uint176: 0n,\n uint184: 0n,\n uint192: 0n,\n uint200: 0n,\n uint208: 0n,\n uint216: 0n,\n uint224: 0n,\n uint232: 0n,\n uint240: 0n,\n uint248: 0n,\n uint256: 0n,\n\n int8: 0,\n int16: 0,\n int24: 0,\n int32: 0,\n int40: 0,\n int48: 0,\n int56: 0n,\n int64: 0n,\n int72: 0n,\n int80: 0n,\n int88: 0n,\n int96: 0n,\n int104: 0n,\n int112: 0n,\n int120: 0n,\n int128: 0n,\n int136: 0n,\n int144: 0n,\n int152: 0n,\n int160: 0n,\n int168: 0n,\n int176: 0n,\n int184: 0n,\n int192: 0n,\n int200: 0n,\n int208: 0n,\n int216: 0n,\n int224: 0n,\n int232: 0n,\n int240: 0n,\n int248: 0n,\n int256: 0n,\n\n bytes1: \"0x00\",\n bytes2: \"0x0000\",\n bytes3: \"0x000000\",\n bytes4: \"0x00000000\",\n bytes5: \"0x0000000000\",\n bytes6: \"0x000000000000\",\n bytes7: \"0x00000000000000\",\n bytes8: \"0x0000000000000000\",\n bytes9: \"0x000000000000000000\",\n bytes10: \"0x00000000000000000000\",\n bytes11: \"0x0000000000000000000000\",\n bytes12: \"0x000000000000000000000000\",\n bytes13: \"0x00000000000000000000000000\",\n bytes14: \"0x0000000000000000000000000000\",\n bytes15: \"0x000000000000000000000000000000\",\n bytes16: \"0x00000000000000000000000000000000\",\n bytes17: \"0x0000000000000000000000000000000000\",\n bytes18: \"0x000000000000000000000000000000000000\",\n bytes19: \"0x00000000000000000000000000000000000000\",\n bytes20: \"0x0000000000000000000000000000000000000000\",\n bytes21: \"0x000000000000000000000000000000000000000000\",\n bytes22: \"0x00000000000000000000000000000000000000000000\",\n bytes23: \"0x0000000000000000000000000000000000000000000000\",\n bytes24: \"0x000000000000000000000000000000000000000000000000\",\n bytes25: \"0x00000000000000000000000000000000000000000000000000\",\n bytes26: \"0x0000000000000000000000000000000000000000000000000000\",\n bytes27: \"0x000000000000000000000000000000000000000000000000000000\",\n bytes28: \"0x00000000000000000000000000000000000000000000000000000000\",\n bytes29: \"0x0000000000000000000000000000000000000000000000000000000000\",\n bytes30: \"0x000000000000000000000000000000000000000000000000000000000000\",\n bytes31: \"0x00000000000000000000000000000000000000000000000000000000000000\",\n bytes32: \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n\n bool: false,\n address: \"0x0000000000000000000000000000000000000000\",\n} as const satisfies Record<StaticAbiType, StaticPrimitiveType>;\n\nexport type StaticAbiTypeToPrimitiveType<TStaticAbiType extends StaticAbiType = StaticAbiType> = LiteralToBroad<\n (typeof staticAbiTypeToDefaultValue)[TStaticAbiType]\n>;\n\nexport const staticAbiTypeToByteLength = {\n uint8: 1,\n uint16: 2,\n uint24: 3,\n uint32: 4,\n uint40: 5,\n uint48: 6,\n uint56: 7,\n uint64: 8,\n uint72: 9,\n uint80: 10,\n uint88: 11,\n uint96: 12,\n uint104: 13,\n uint112: 14,\n uint120: 15,\n uint128: 16,\n uint136: 17,\n uint144: 18,\n uint152: 19,\n uint160: 20,\n uint168: 21,\n uint176: 22,\n uint184: 23,\n uint192: 24,\n uint200: 25,\n uint208: 26,\n uint216: 27,\n uint224: 28,\n uint232: 29,\n uint240: 30,\n uint248: 31,\n uint256: 32,\n\n int8: 1,\n int16: 2,\n int24: 3,\n int32: 4,\n int40: 5,\n int48: 6,\n int56: 7,\n int64: 8,\n int72: 9,\n int80: 10,\n int88: 11,\n int96: 12,\n int104: 13,\n int112: 14,\n int120: 15,\n int128: 16,\n int136: 17,\n int144: 18,\n int152: 19,\n int160: 20,\n int168: 21,\n int176: 22,\n int184: 23,\n int192: 24,\n int200: 25,\n int208: 26,\n int216: 27,\n int224: 28,\n int232: 29,\n int240: 30,\n int248: 31,\n int256: 32,\n\n bytes1: 1,\n bytes2: 2,\n bytes3: 3,\n bytes4: 4,\n bytes5: 5,\n bytes6: 6,\n bytes7: 7,\n bytes8: 8,\n bytes9: 9,\n bytes10: 10,\n bytes11: 11,\n bytes12: 12,\n bytes13: 13,\n bytes14: 14,\n bytes15: 15,\n bytes16: 16,\n bytes17: 17,\n bytes18: 18,\n bytes19: 19,\n bytes20: 20,\n bytes21: 21,\n bytes22: 22,\n bytes23: 23,\n bytes24: 24,\n bytes25: 25,\n bytes26: 26,\n bytes27: 27,\n bytes28: 28,\n bytes29: 29,\n bytes30: 30,\n bytes31: 31,\n bytes32: 32,\n\n bool: 1,\n address: 20,\n} as const satisfies Record<StaticAbiType, number>;\n\nexport function isStaticAbiType(abiType: string): abiType is StaticAbiType {\n return staticAbiTypes.includes(abiType as StaticAbiType);\n}\n","import { SchemaAbiType } from \"./schemaAbiTypes\";\nimport { DynamicAbiTypeToPrimitiveType, dynamicAbiTypeToDefaultValue } from \"./dynamicAbiTypes\";\nimport { StaticAbiTypeToPrimitiveType, staticAbiTypeToDefaultValue } from \"./staticAbiTypes\";\n\nexport const schemaAbiTypeToDefaultValue = {\n ...staticAbiTypeToDefaultValue,\n ...dynamicAbiTypeToDefaultValue,\n} as const satisfies Record<SchemaAbiType, StaticAbiTypeToPrimitiveType | DynamicAbiTypeToPrimitiveType>;\n"],"mappings":"AAEA,IAAMA,EAAsB,QAMrB,SAASC,EAA+CC,EAA+B,CAC5F,OAAOF,EAAoB,KAAKE,CAAO,CACzC,CAEO,SAASC,EACdD,EACgC,CAChC,OAAOA,EAAQ,QAAQF,EAAqB,EAAE,CAChD,CCZO,IAAMI,EAAiB,CAC5B,QACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,OACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,OACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SACA,YACA,QACA,QACF,EAKaC,EAAiBD,EAAe,MAAM,EAAG,EAAE,EAC3CE,EAAkBF,EAAe,MAAM,EAAE,EClM/C,IAAMG,EAA+B,CAC1C,UAAW,CAAC,EACZ,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,WAAY,CAAC,EACb,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CAAC,EACd,YAAa,CA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ern","isArrayAbiType","abiType","arrayAbiTypeToStaticAbiType","schemaAbiTypes","staticAbiTypes","dynamicAbiTypes","dynamicAbiTypeToDefaultValue","isDynamicAbiType","abiType","dynamicAbiTypes","staticAbiTypeToDefaultValue","staticAbiTypeToByteLength","isStaticAbiType","abiType","staticAbiTypes","schemaAbiTypeToDefaultValue","staticAbiTypeToDefaultValue","dynamicAbiTypeToDefaultValue"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latticexyz/schema-type",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.10",
|
|
4
4
|
"description": "SchemaType enum for various languages",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"abitype": "0.9.3",
|
|
28
|
-
"viem": "1.
|
|
28
|
+
"viem": "1.6.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
|
|
32
32
|
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
|
|
33
33
|
"tsup": "^6.7.0",
|
|
34
34
|
"vitest": "0.31.4",
|
|
35
|
-
"@latticexyz/gas-report": "2.0.0-next.
|
|
35
|
+
"@latticexyz/gas-report": "2.0.0-next.10"
|
|
36
36
|
},
|
|
37
37
|
"gitHead": "914a1e0ae4a573d685841ca2ea921435057deb8f",
|
|
38
38
|
"scripts": {
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"clean": "pnpm run clean:js",
|
|
42
42
|
"clean:js": "rimraf dist/typescript",
|
|
43
43
|
"dev": "tsup --watch",
|
|
44
|
-
"gas-report": "
|
|
45
|
-
"test": "vitest typecheck --run && vitest --run && forge test"
|
|
44
|
+
"gas-report": "gas-report --save gas-report.json",
|
|
45
|
+
"test": "vitest typecheck --run && vitest --run && forge test",
|
|
46
|
+
"test:ci": "pnpm run test"
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -6,6 +6,7 @@ import { SchemaType } from "../SchemaType";
|
|
|
6
6
|
* Port of `Schema.sol` from `@latticexyz/store`
|
|
7
7
|
* @param schema The schema to encode SchemaType[]
|
|
8
8
|
* @returns The encoded schema as a 32 byte hex string
|
|
9
|
+
* @deprecated use `schemaToHex` from `protocol-parser` instead
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
export function encodeSchema(schema: SchemaType[]): Uint8Array {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hex } from "viem";
|
|
2
|
-
import { DynamicAbiType, SchemaAbiType } from "./schemaAbiTypes";
|
|
2
|
+
import { DynamicAbiType, SchemaAbiType, dynamicAbiTypes } from "./schemaAbiTypes";
|
|
3
3
|
import { LiteralToBroad } from "./utils";
|
|
4
4
|
import { isArrayAbiType } from "./arrayAbiTypes";
|
|
5
5
|
|
|
@@ -124,6 +124,6 @@ export type DynamicAbiTypeToPrimitiveType<TDynamicAbiType extends DynamicAbiType
|
|
|
124
124
|
(typeof dynamicAbiTypeToDefaultValue)[TDynamicAbiType]
|
|
125
125
|
>;
|
|
126
126
|
|
|
127
|
-
export function isDynamicAbiType(abiType:
|
|
128
|
-
return
|
|
127
|
+
export function isDynamicAbiType(abiType: string): abiType is DynamicAbiType {
|
|
128
|
+
return dynamicAbiTypes.includes(abiType as DynamicAbiType);
|
|
129
129
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hex } from "viem";
|
|
2
|
-
import { StaticAbiType } from "./schemaAbiTypes";
|
|
2
|
+
import { StaticAbiType, staticAbiTypes } from "./schemaAbiTypes";
|
|
3
3
|
import { LiteralToBroad } from "./utils";
|
|
4
4
|
|
|
5
5
|
// Fixed-length ABI types
|
|
@@ -217,3 +217,7 @@ export const staticAbiTypeToByteLength = {
|
|
|
217
217
|
bool: 1,
|
|
218
218
|
address: 20,
|
|
219
219
|
} as const satisfies Record<StaticAbiType, number>;
|
|
220
|
+
|
|
221
|
+
export function isStaticAbiType(abiType: string): abiType is StaticAbiType {
|
|
222
|
+
return staticAbiTypes.includes(abiType as StaticAbiType);
|
|
223
|
+
}
|