@latticexyz/common 2.0.0-next.14 → 2.0.0-next.16

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.
@@ -0,0 +1,62 @@
1
+ import { Chain } from 'viem/chains';
2
+ import * as viem from 'viem';
3
+
4
+ type MUDChain = Chain & {
5
+ faucetUrl?: string;
6
+ };
7
+
8
+ declare const latticeTestnet: {
9
+ readonly name: "Lattice Testnet";
10
+ readonly id: 4242;
11
+ readonly network: "lattice-testnet";
12
+ readonly nativeCurrency: {
13
+ readonly decimals: 18;
14
+ readonly name: "Ether";
15
+ readonly symbol: "ETH";
16
+ };
17
+ readonly rpcUrls: {
18
+ readonly default: {
19
+ readonly http: readonly ["https://follower.testnet-chain.linfra.xyz"];
20
+ readonly webSocket: readonly ["wss://follower.testnet-chain.linfra.xyz"];
21
+ };
22
+ readonly public: {
23
+ readonly http: readonly ["https://follower.testnet-chain.linfra.xyz"];
24
+ readonly webSocket: readonly ["wss://follower.testnet-chain.linfra.xyz"];
25
+ };
26
+ };
27
+ readonly blockExplorers: {
28
+ readonly default: {
29
+ readonly name: "Otterscan";
30
+ readonly url: "https://explorer.testnet-chain.linfra.xyz";
31
+ };
32
+ };
33
+ readonly faucetUrl: "https://faucet.testnet-mud-services.linfra.xyz";
34
+ };
35
+
36
+ declare const mudFoundry: {
37
+ readonly fees: {
38
+ readonly defaultPriorityFee: () => bigint;
39
+ };
40
+ readonly id: 31337;
41
+ readonly name: "Foundry";
42
+ readonly network: "foundry";
43
+ readonly nativeCurrency: {
44
+ readonly decimals: 18;
45
+ readonly name: "Ether";
46
+ readonly symbol: "ETH";
47
+ };
48
+ readonly rpcUrls: {
49
+ readonly default: {
50
+ readonly http: readonly ["http://127.0.0.1:8545"];
51
+ readonly webSocket: readonly ["ws://127.0.0.1:8545"];
52
+ };
53
+ readonly public: {
54
+ readonly http: readonly ["http://127.0.0.1:8545"];
55
+ readonly webSocket: readonly ["ws://127.0.0.1:8545"];
56
+ };
57
+ };
58
+ readonly formatters?: viem.ChainFormatters | undefined;
59
+ readonly serializers?: viem.ChainSerializers<viem.ChainFormatters> | undefined;
60
+ };
61
+
62
+ export { MUDChain, latticeTestnet, mudFoundry };
@@ -0,0 +1,2 @@
1
+ import o from"debug";var e=o("mud:common"),r=o("mud:common");e.log=console.debug.bind(console);r.log=console.error.bind(console);export{e as a};
2
+ //# sourceMappingURL=chunk-TCWGPC6G.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/debug.ts"],"sourcesContent":["import createDebug from \"debug\";\n\nexport const debug = createDebug(\"mud:common\");\nexport const error = createDebug(\"mud:common\");\n\n// Pipe debug output to stdout instead of stderr\ndebug.log = console.debug.bind(console);\n\n// Pipe error output to stderr\nerror.log = console.error.bind(console);\n"],"mappings":"AAAA,OAAOA,MAAiB,QAEjB,IAAMC,EAAQD,EAAY,YAAY,EAChCE,EAAQF,EAAY,YAAY,EAG7CC,EAAM,IAAM,QAAQ,MAAM,KAAK,OAAO,EAGtCC,EAAM,IAAM,QAAQ,MAAM,KAAK,OAAO","names":["createDebug","debug","error"]}
@@ -0,0 +1,182 @@
1
+ import { SchemaType } from '@latticexyz/schema-type/deprecated';
2
+ import { SchemaAbiType } from '@latticexyz/schema-type';
3
+
4
+ declare module "prettier-plugin-solidity" {}
5
+
6
+ interface AbsoluteImportDatum {
7
+ symbol: string;
8
+ path: string;
9
+ }
10
+ interface RelativeImportDatum {
11
+ symbol: string;
12
+ fromPath: string;
13
+ usedInPath: string;
14
+ }
15
+ type ImportDatum = AbsoluteImportDatum | RelativeImportDatum;
16
+ interface StaticResourceData {
17
+ /** Name of the table id constant to render. */
18
+ tableIdName: string;
19
+ namespace: string;
20
+ name: string;
21
+ offchainOnly: boolean;
22
+ }
23
+ interface RenderType {
24
+ typeId: string;
25
+ typeWithLocation: string;
26
+ /** The name of the enum element in SchemaType to use for schema registration (e.g. "UINT256_ARRAY") */
27
+ enumName: string;
28
+ staticByteLength: number;
29
+ isDynamic: boolean;
30
+ /** Empty for internal types. Custom `wrap` method for user defined types. */
31
+ typeWrap: string;
32
+ /** Empty for internal types. Custom `unwrap` method for user defined types. */
33
+ typeUnwrap: string;
34
+ /** Data to generate the custom wrapper and unwrapper if necessary. */
35
+ typeWrappingData?: RenderFieldTypeWrappingData;
36
+ /** Same as typeId for internal types. The underlying `typeId` for user defined types. */
37
+ internalTypeId: string;
38
+ }
39
+ interface RenderKeyTuple extends RenderType {
40
+ name: string;
41
+ isDynamic: false;
42
+ }
43
+ interface RenderField extends RenderType {
44
+ arrayElement: RenderType | undefined;
45
+ name: string;
46
+ }
47
+ interface RenderStaticField extends RenderField {
48
+ isDynamic: false;
49
+ }
50
+ interface RenderDynamicField extends RenderField {
51
+ isDynamic: true;
52
+ }
53
+ type RenderFieldTypeWrappingData = {
54
+ kind: "staticArray";
55
+ elementType: string;
56
+ staticLength: number;
57
+ };
58
+ interface RenderEnum {
59
+ name: string;
60
+ memberNames: string[];
61
+ }
62
+
63
+ declare const renderedSolidityHeader = "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.21;\n\n/* Autogenerated file. Do not edit manually. */";
64
+ /**
65
+ * Renders a list of lines
66
+ */
67
+ declare function renderList<T>(list: T[], renderItem: (item: T, index: number) => string): string;
68
+ /**
69
+ * Renders a comma-separated list of arguments for solidity functions, ignoring empty and undefined ones
70
+ */
71
+ declare function renderArguments(args: (string | undefined)[]): string;
72
+ declare function renderCommonData({ staticResourceData, keyTuple, }: {
73
+ staticResourceData?: StaticResourceData;
74
+ keyTuple: RenderKeyTuple[];
75
+ }): {
76
+ _typedTableId: string;
77
+ _typedKeyArgs: string;
78
+ _keyTupleDefinition: string;
79
+ };
80
+ /** For 2 paths which are relative to a common root, create a relative import path from one to another */
81
+ declare function solidityRelativeImportPath(fromPath: string, usedInPath: string): string;
82
+ /**
83
+ * Aggregates, deduplicates and renders imports for symbols per path.
84
+ * Identical symbols from different paths are NOT handled, they should be checked before rendering.
85
+ */
86
+ declare function renderImports(imports: ImportDatum[]): string;
87
+ /**
88
+ * Aggregates, deduplicates and renders imports for symbols per path.
89
+ * Identical symbols from different paths are NOT handled, they should be checked before rendering.
90
+ */
91
+ declare function renderRelativeImports(imports: RelativeImportDatum[]): string;
92
+ /**
93
+ * Aggregates, deduplicates and renders imports for symbols per path.
94
+ * Identical symbols from different paths are NOT handled, they should be checked before rendering.
95
+ */
96
+ declare function renderAbsoluteImports(imports: AbsoluteImportDatum[]): string;
97
+ declare function renderWithStore(storeArgument: boolean, callback: (data: {
98
+ _typedStore: string | undefined;
99
+ _store: string;
100
+ _commentSuffix: string;
101
+ _methodNamePrefix: string;
102
+ _useExplicitFieldLayout?: boolean;
103
+ }) => string): string;
104
+ declare function renderWithFieldSuffix(withSuffixlessFieldMethods: boolean, fieldName: string, callback: (_methodNameSuffix: string) => string): string;
105
+ declare function renderTableId({ namespace, name, offchainOnly, tableIdName }: StaticResourceData): {
106
+ hardcodedTableId: string;
107
+ tableIdDefinition: string;
108
+ };
109
+ declare function renderValueTypeToBytes32(name: string, { typeUnwrap, internalTypeId }: RenderType): string;
110
+ declare function isLeftAligned(field: Pick<RenderType, "internalTypeId">): boolean;
111
+ declare function getLeftPaddingBits(field: Pick<RenderType, "internalTypeId" | "staticByteLength">): number;
112
+
113
+ declare function renderEnums(enums: RenderEnum[]): string;
114
+
115
+ declare function renderTypeHelpers(options: {
116
+ fields: RenderField[];
117
+ keyTuple: RenderKeyTuple[];
118
+ }): string;
119
+
120
+ declare const schemaTypesToRecsTypeStrings: Record<SchemaType, string>;
121
+
122
+ interface ContractInterfaceFunction {
123
+ name: string;
124
+ parameters: string[];
125
+ stateMutability: string;
126
+ returnParameters: string[];
127
+ }
128
+ interface ContractInterfaceError {
129
+ name: string;
130
+ parameters: string[];
131
+ }
132
+ interface SymbolImport {
133
+ symbol: string;
134
+ path: string;
135
+ }
136
+ /**
137
+ * Parse the contract data to get the functions necessary to generate an interface,
138
+ * and symbols to import from the original contract.
139
+ * @param data contents of a file with the solidity contract
140
+ * @param contractName name of the contract
141
+ * @returns interface data
142
+ */
143
+ declare function contractToInterface(data: string, contractName: string): {
144
+ functions: ContractInterfaceFunction[];
145
+ errors: ContractInterfaceError[];
146
+ symbolImports: SymbolImport[];
147
+ };
148
+
149
+ interface SolidityUserDefinedType {
150
+ typeId: string;
151
+ internalTypeId: string;
152
+ importSymbol: string;
153
+ fromPath: string;
154
+ isRelativePath: boolean;
155
+ }
156
+ /**
157
+ * Parse the solidity data to extract user-defined type information.
158
+ * @param data contents of a solidity file with the user types declarations
159
+ * @param userTypeNames names of the user types to extract
160
+ */
161
+ declare function extractUserTypes(data: string, userTypeNames: string[], fromPath: string): Record<string, SolidityUserDefinedType>;
162
+
163
+ declare function formatSolidity(content: string, prettierConfigPath?: string): Promise<string>;
164
+ declare function formatTypescript(content: string): Promise<string>;
165
+
166
+ declare function formatAndWriteSolidity(output: string, fullOutputPath: string, logPrefix: string): Promise<void>;
167
+ declare function formatAndWriteTypescript(output: string, fullOutputPath: string, logPrefix: string): Promise<void>;
168
+
169
+ type UserType = {
170
+ filePath: string;
171
+ internalType: SchemaAbiType;
172
+ };
173
+ declare function loadAndExtractUserTypes(userTypes: Record<string, UserType>, outputBaseDirectory: string, remappings: [string, string][]): Record<string, SolidityUserDefinedType>;
174
+
175
+ /**
176
+ * Explicitly normalize a given path to a posix path (using `/` as separator).
177
+ * This should be used for generating Solidity files that will be consumed by solc,
178
+ * because solc expects `/` as path separator, but path.join produces `\` if the user is on windows.
179
+ */
180
+ declare function posixPath(path: string): string;
181
+
182
+ export { AbsoluteImportDatum, ContractInterfaceError, ContractInterfaceFunction, ImportDatum, RelativeImportDatum, RenderDynamicField, RenderEnum, RenderField, RenderFieldTypeWrappingData, RenderKeyTuple, RenderStaticField, RenderType, SolidityUserDefinedType, StaticResourceData, UserType, contractToInterface, extractUserTypes, formatAndWriteSolidity, formatAndWriteTypescript, formatSolidity, formatTypescript, getLeftPaddingBits, isLeftAligned, loadAndExtractUserTypes, posixPath, renderAbsoluteImports, renderArguments, renderCommonData, renderEnums, renderImports, renderList, renderRelativeImports, renderTableId, renderTypeHelpers, renderValueTypeToBytes32, renderWithFieldSuffix, renderWithStore, renderedSolidityHeader, schemaTypesToRecsTypeStrings, solidityRelativeImportPath };
package/dist/codegen.js CHANGED
@@ -1,13 +1,13 @@
1
- import{a as S}from"./chunk-7WIPV3R3.js";import{a as p}from"./chunk-UPQEB2HW.js";import G from"path";import{parse as j,visit as b}from"@solidity-parser/parser";function re(r,t){let n=j(r),i=!1,s=[],o=[],a=[];if(b(n,{ContractDefinition({name:y}){y===t&&(i=!0)},FunctionDefinition({name:y,visibility:T,parameters:c,stateMutability:R,returnParameters:g,isConstructor:F,isFallback:k,isReceiveEther:L},u){if(u!==void 0&&u.type==="ContractDefinition"&&u.name===t)try{if(F||k||L)return;if(T==="default")throw new p("Visibility is not specified");if(T==="external"||T==="public"){o.push({name:y===null?"":y,parameters:c.map(l),stateMutability:R||"",returnParameters:g===null?[]:g.map(l)});for(let{typeName:I}of c.concat(g??[])){let W=m(I);s=s.concat(N(n,W))}}}catch(I){throw I instanceof p&&(I.message=`Function "${y}" in contract "${t}": ${I.message}`),I}},CustomErrorDefinition({name:y,parameters:T}){a.push({name:y===null?"":y,parameters:T.map(l)});for(let c of T){let R=m(c.typeName);s=s.concat(N(n,R))}}}),!i)throw new p(`Contract not found: ${t}`);return{functions:o,errors:a,symbolImports:s}}function l({name:r,typeName:t,storageLocation:n}){let i="",{name:s,stateMutability:o}=_(t);return i+=s,o!==null&&(i+=` ${o}`),n!==null&&(i+=` ${n}`),r!==null&&(i+=` ${r}`),i}function _(r){if(r===null)return{name:"",stateMutability:null};if(r.type==="ElementaryTypeName")return{name:r.name,stateMutability:r.stateMutability};if(r.type==="UserDefinedTypeName")return{name:r.namePath,stateMutability:null};if(r.type==="ArrayTypeName"){let t="";r.length?.type==="NumberLiteral"?t=r.length.number:r.length?.type==="Identifier"&&(t=r.length.name);let{name:n,stateMutability:i}=_(r.baseTypeName);return{name:`${n}[${t}]`,stateMutability:i}}else throw new p(`Invalid typeName.type ${r.type}`)}function m(r){if(r?.type==="UserDefinedTypeName")return[r.namePath.split(".")[0]];if(r?.type==="ArrayTypeName"){let t=m(r.baseTypeName);if(r.length?.type==="Identifier"){let n=r.length.name;t.push(n.split(".")[0])}return t}else return[]}function N(r,t){let n=[];for(let i of t){let s;if(b(r,{ImportDirective({path:o,symbolAliases:a}){if(a)for(let y of a){let T=y[1]||y[0];if(i===T){s={symbol:y[0],path:o};return}}}}),s)n.push(s);else throw new p(`Symbol "${i}" has no explicit import`)}return n}import{parse as O,visit as H}from"@solidity-parser/parser";function h(r,t,n){let i=O(r),s=n.at(0)===".",o={};return H(i,{TypeDefinition({name:a,definition:y},T){if(y.name.includes("fixed"))throw new p("Fixed point numbers are not supported by MUD");if(t.includes(a)){if(a in o)throw new p(`File has multiple user types with the same name: ${a}`);T?.type==="ContractDefinition"?o[a]={typeId:`${T.name}.${a}`,internalTypeId:y.name,importSymbol:T.name,fromPath:n,isRelativePath:s}:o[a]={typeId:a,internalTypeId:y.name,importSymbol:a,fromPath:n,isRelativePath:s}}}}),o}import f from"prettier";import K from"prettier-plugin-solidity";async function U(r,t){let n;t&&(n=await f.resolveConfig(t));try{return f.format(r,{plugins:[K],parser:"solidity-parse",printWidth:120,semi:!0,tabWidth:2,useTabs:!1,bracketSpacing:!0,...n})}catch(i){let s;return i instanceof Error?s=i.message:s=i,console.log(`Error during output formatting: ${s}`),r}}async function E(r){return f.format(r,{parser:"typescript"})}import{mkdir as x,writeFile as $}from"fs/promises";import{dirname as w}from"path";var d=S.extend("codegen");async function ue(r,t,n){let i=await U(r);await x(w(t),{recursive:!0}),await $(t,i),d(`${n}: ${t}`)}async function le(r,t,n){let i=await E(r);await x(w(t),{recursive:!0}),await $(t,i),d(`${n}: ${t}`)}import{readFileSync as v}from"fs";import V from"path";function Ne(r,t,n){let i={};for(let[o,{filePath:a}]of Object.entries(r))a in i||(i[a]=[]),i[a].push(o);let s={};for(let[o,a]of Object.entries(i)){let{filePath:y,data:T}=z(t,o,n),c=h(T,a,y);for(let[R,g]of Object.entries(c))if(g.internalTypeId!==r[R].internalType)throw new p(`User type "${R}" has internal type "${g.internalTypeId}" but config specifies "${r[R].internalType}"`);s=Object.assign(s,c)}return s}function z(r,t,n){if(t.at(0)===".")return{filePath:"./"+V.relative(r,t),data:v(t,"utf8")};{let i=t;for(let[s,o]of n)if(i.includes(s)){i=i.replace(s,o);break}return{filePath:t,data:v(i,"utf8")}}}function B(r){return r.replace(/\\/g,"/")}var D=`// SPDX-License-Identifier: MIT
1
+ import{a as l}from"./chunk-TCWGPC6G.js";import{a as p}from"./chunk-UPQEB2HW.js";import X from"path";import{parse as j,visit as _}from"@solidity-parser/parser";function ne(r,t){let n=j(r),i=!1,s=[],o=[],y=[];if(_(n,{ContractDefinition({name:a}){a===t&&(i=!0)},FunctionDefinition({name:a,visibility:T,parameters:c,stateMutability:R,returnParameters:g,isConstructor:M,isFallback:L,isReceiveEther:k},u){if(u!==void 0&&u.type==="ContractDefinition"&&u.name===t)try{if(M||L||k)return;if(T==="default")throw new p("Visibility is not specified");if(T==="external"||T==="public"){o.push({name:a===null?"":a,parameters:c.map(m),stateMutability:R||"",returnParameters:g===null?[]:g.map(m)});for(let{typeName:I}of c.concat(g??[])){let W=f(I);s=s.concat(N(n,W))}}}catch(I){throw I instanceof p&&(I.message=`Function "${a}" in contract "${t}": ${I.message}`),I}},CustomErrorDefinition({name:a,parameters:T}){y.push({name:a===null?"":a,parameters:T.map(m)});for(let c of T){let R=f(c.typeName);s=s.concat(N(n,R))}}}),!i)throw new p(`Contract not found: ${t}`);return{functions:o,errors:y,symbolImports:s}}function m({name:r,typeName:t,storageLocation:n}){let i="",{name:s,stateMutability:o}=b(t);return i+=s,o!==null&&(i+=` ${o}`),n!==null&&(i+=` ${n}`),r!==null&&(i+=` ${r}`),i}function b(r){if(r===null)return{name:"",stateMutability:null};if(r.type==="ElementaryTypeName")return{name:r.name,stateMutability:r.stateMutability};if(r.type==="UserDefinedTypeName")return{name:r.namePath,stateMutability:null};if(r.type==="ArrayTypeName"){let t="";r.length?.type==="NumberLiteral"?t=r.length.number:r.length?.type==="Identifier"&&(t=r.length.name);let{name:n,stateMutability:i}=b(r.baseTypeName);return{name:`${n}[${t}]`,stateMutability:i}}else throw new p(`Invalid typeName.type ${r.type}`)}function f(r){if(r?.type==="UserDefinedTypeName")return[r.namePath.split(".")[0]];if(r?.type==="ArrayTypeName"){let t=f(r.baseTypeName);if(r.length?.type==="Identifier"){let n=r.length.name;t.push(n.split(".")[0])}return t}else return[]}function N(r,t){let n=[];for(let i of t){let s;if(_(r,{ImportDirective({path:o,symbolAliases:y}){if(y)for(let a of y){let T=a[1]||a[0];if(i===T){s={symbol:a[0],path:o};return}}}}),s)n.push(s);else throw new p(`Symbol "${i}" has no explicit import`)}return n}import{parse as O,visit as H}from"@solidity-parser/parser";function h(r,t,n){let i=O(r),s=n.at(0)===".",o={};return H(i,{TypeDefinition({name:y,definition:a},T){if(a.name.includes("fixed"))throw new p("Fixed point numbers are not supported by MUD");if(t.includes(y)){if(y in o)throw new p(`File has multiple user types with the same name: ${y}`);T?.type==="ContractDefinition"?o[y]={typeId:`${T.name}.${y}`,internalTypeId:a.name,importSymbol:T.name,fromPath:n,isRelativePath:s}:o[y]={typeId:y,internalTypeId:a.name,importSymbol:y,fromPath:n,isRelativePath:s}}}}),o}import d from"prettier";import K from"prettier-plugin-solidity";async function U(r,t){let n;t&&(n=await d.resolveConfig(t));try{return d.format(r,{plugins:[K],parser:"solidity-parse",printWidth:120,semi:!0,tabWidth:2,useTabs:!1,bracketSpacing:!0,...n})}catch(i){let s;return i instanceof Error?s=i.message:s=i,console.log(`Error during output formatting: ${s}`),r}}async function E(r){return d.format(r,{parser:"typescript"})}import{mkdir as x,writeFile as $}from"fs/promises";import{dirname as w}from"path";var A=l.extend("codegen"),V=l.extend("codegen");A.log=console.debug.bind(console);V.log=console.error.bind(console);async function le(r,t,n){let i=await U(r);await x(w(t),{recursive:!0}),await $(t,i),A(`${n}: ${t}`)}async function me(r,t,n){let i=await E(r);await x(w(t),{recursive:!0}),await $(t,i),A(`${n}: ${t}`)}import{readFileSync as v}from"fs";import z from"path";function _e(r,t,n){let i={};for(let[o,{filePath:y}]of Object.entries(r))y in i||(i[y]=[]),i[y].push(o);let s={};for(let[o,y]of Object.entries(i)){let{filePath:a,data:T}=G(t,o,n),c=h(T,y,a);for(let[R,g]of Object.entries(c))if(g.internalTypeId!==r[R].internalType)throw new p(`User type "${R}" has internal type "${g.internalTypeId}" but config specifies "${r[R].internalType}"`);s={...s,...c}}return s}function G(r,t,n){if(t.at(0)===".")return{filePath:"./"+z.relative(r,t),data:v(t,"utf8")};{let i=t;for(let[s,o]of n)if(i.includes(s)){i=i.replace(s,o);break}return{filePath:t,data:v(i,"utf8")}}}function B(r){return r.replace(/\\/g,"/")}var D=`// SPDX-License-Identifier: MIT
2
2
  pragma solidity >=0.8.21;
3
3
 
4
- /* Autogenerated file. Do not edit manually. */`;function Y(r,t){return M("",r,t)}function A(r){let t=r.filter(n=>n!==void 0&&n!=="");return M(",",t,n=>n)}function Ce({staticResourceData:r,keyTuple:t}){let n=r?"":"_tableId",i=r?"":"ResourceId _tableId",s=A(t.map(({name:y})=>y)),o=A(t.map(({name:y,typeWithLocation:T})=>`${T} ${y}`)),a=`
4
+ /* Autogenerated file. Do not edit manually. */`;function S(r,t){return F("",r,t)}function Y(r){let t=r.filter(n=>n!==void 0&&n!=="");return F(",",t,n=>n)}function Fe({staticResourceData:r,keyTuple:t}){let n=r?"":"ResourceId _tableId",i=Y(t.map(({name:o,typeWithLocation:y})=>`${y} ${o}`)),s=`
5
5
  bytes32[] memory _keyTuple = new bytes32[](${t.length});
6
- ${Y(t,(y,T)=>`_keyTuple[${T}] = ${X(y.name,y)};`)}
7
- `;return{_tableId:n,_typedTableId:i,_keyArgs:s,_typedKeyArgs:o,_keyTupleDefinition:a}}function P(r,t){return B("./"+G.relative("./"+t,"./"+r))}function Me(r){return C(r.map(t=>"path"in t?t:{symbol:t.symbol,path:P(t.fromPath,t.usedInPath)}))}function Fe(r){return C(r.map(({symbol:t,fromPath:n,usedInPath:i})=>({symbol:t,path:P(n,i)})))}function C(r){let t=new Map;for(let{symbol:i,path:s}of r)t.has(s)||t.set(s,new Set),t.get(s)?.add(i);let n=[];for(let[i,s]of t){let o=[...s].join(", ");n.push(`import { ${o} } from "${B(i)}";`)}return n.join(`
8
- `)}function ke(r,t){let n="";return n+=t(void 0,"StoreSwitch","",void 0,""),n+=t(void 0,"StoreCore","",void 0,"_",!0),r&&(n+=`
9
- `+t("IStore _store","_store"," (using the specified store)","_store","")),n}function Le(r,t,n){let i=`${t[0].toUpperCase()}${t.slice(1)}`,s="";return s+=n(i),r&&(s+=`
10
- `+n("")),s}function We({namespace:r,name:t,offchainOnly:n,tableIdName:i}){let s=`
6
+ ${S(t,(o,y)=>`_keyTuple[${y}] = ${q(o.name,o)};`)}
7
+ `;return{_typedTableId:n,_typedKeyArgs:i,_keyTupleDefinition:s}}function P(r,t){return B("./"+X.relative("./"+t,"./"+r))}function Me(r){return C(r.map(t=>"path"in t?t:{symbol:t.symbol,path:P(t.fromPath,t.usedInPath)}))}function Le(r){return C(r.map(({symbol:t,fromPath:n,usedInPath:i})=>({symbol:t,path:P(n,i)})))}function C(r){let t=new Map;for(let{symbol:i,path:s}of r)t.has(s)||t.set(s,new Set),t.get(s)?.add(i);let n=[];for(let[i,s]of t){let o=[...s].join(", ");n.push(`import { ${o} } from "${B(i)}";`)}return n.join(`
8
+ `)}function ke(r,t){let n="";return n+=t({_typedStore:void 0,_store:"StoreSwitch",_commentSuffix:"",_methodNamePrefix:""}),n+=t({_typedStore:void 0,_store:"StoreCore",_commentSuffix:"",_methodNamePrefix:"_",_useExplicitFieldLayout:!0}),r&&(n+=`
9
+ `+t({_typedStore:"IStore _store",_store:"_store",_commentSuffix:" (using the specified store)",_methodNamePrefix:""})),n}function We(r,t,n){let i=`${t[0].toUpperCase()}${t.slice(1)}`,s="";return s+=n(i),r&&(s+=`
10
+ `+n("")),s}function je({namespace:r,name:t,offchainOnly:n,tableIdName:i}){let s=`
11
11
  ResourceId.wrap(
12
12
  bytes32(
13
13
  abi.encodePacked(
@@ -20,12 +20,12 @@ pragma solidity >=0.8.21;
20
20
  `,o=`
21
21
  ResourceId constant _tableId = ${s};
22
22
  ResourceId constant ${i} = _tableId;
23
- `;return{hardcodedTableId:s,tableIdDefinition:o}}function X(r,{typeUnwrap:t,internalTypeId:n}){let i=t.length?`${t}(${r})`:r;if(n==="bytes32")return i;if(n.match(/^bytes\d{1,2}$/))return`bytes32(${i})`;if(n.match(/^uint\d{1,3}$/))return`bytes32(uint256(${i}))`;if(n.match(/^int\d{1,3}$/))return`bytes32(uint256(int256(${i})))`;if(n==="address")return`bytes32(uint256(uint160(${i})))`;if(n==="bool")return`_boolToBytes32(${i})`;throw new Error(`Unknown value type id ${n}`)}function q(r){return r.internalTypeId.match(/^bytes\d{1,2}$/)!==null}function je(r){return q(r)?0:256-r.staticByteLength*8}function M(r,t,n){return t.map((i,s)=>n(i,s)+(s===t.length-1?"":r)).join(`
24
- `)}function Ke(r){let t=D;return t+=Y(r,({name:n,memberNames:i})=>`
23
+ `;return{hardcodedTableId:s,tableIdDefinition:o}}function q(r,{typeUnwrap:t,internalTypeId:n}){let i=t.length?`${t}(${r})`:r;if(n==="bytes32")return i;if(/^bytes\d{1,2}$/.test(n))return`bytes32(${i})`;if(/^uint\d{1,3}$/.test(n))return`bytes32(uint256(${i}))`;if(/^int\d{1,3}$/.test(n))return`bytes32(uint256(int256(${i})))`;if(n==="address")return`bytes32(uint256(uint160(${i})))`;if(n==="bool")return`_boolToBytes32(${i})`;throw new Error(`Unknown value type id ${n}`)}function J(r){return/^bytes\d{1,2}$/.test(r.internalTypeId)}function Oe(r){return J(r)?0:256-r.staticByteLength*8}function F(r,t,n){return t.map((i,s)=>n(i,s)+(s===t.length-1?"":r)).join(`
24
+ `)}function Ve(r){let t=D;return t+=S(r,({name:n,memberNames:i})=>`
25
25
  enum ${n} {
26
- ${A(i)}
26
+ ${Y(i)}
27
27
  }
28
- `),t}function ze(r){let{fields:t,keyTuple:n}=r,i="";for(let s of J([...t,...n]))i+=s;return t.some(({internalTypeId:s})=>s.match("bool"))&&(i+=`
28
+ `),t}function Ge(r){let{fields:t,keyTuple:n}=r,i="";for(let s of Q([...t,...n]))i+=s;return t.some(({internalTypeId:s})=>s.match("bool"))&&(i+=`
29
29
  /**
30
30
  * @notice Cast a value to a bool.
31
31
  * @dev Boolean values are encoded as uint8 (1 = true, 0 = false), but Solidity doesn't allow casting between uint8 and bool.
@@ -47,7 +47,7 @@ pragma solidity >=0.8.21;
47
47
  result := value
48
48
  }
49
49
  }
50
- `),i}function J(r){let t=new Map,n=new Map;for(let{typeWrappingData:i,typeWrap:s,typeUnwrap:o,internalTypeId:a}of r){if(!i)continue;let{kind:y}=i;if(y==="staticArray"){let{elementType:T,staticLength:c}=i;t.set(s,Q(s,T,c,a)),n.set(o,Z(o,T,c,a))}}return[...t.values(),...n.values()]}function Q(r,t,n,i){return`
50
+ `),i}function Q(r){let t=new Map,n=new Map;for(let{typeWrappingData:i,typeWrap:s,typeUnwrap:o,internalTypeId:y}of r){if(!i)continue;let{kind:a}=i;if(a==="staticArray"){let{elementType:T,staticLength:c}=i;t.set(s,Z(s,T,c,y)),n.set(o,ee(o,T,c,y))}}return[...t.values(),...n.values()]}function Z(r,t,n,i){return`
51
51
  /**
52
52
  * @notice Cast a dynamic array to a static array.
53
53
  * @dev In memory static arrays are just dynamic arrays without the 32 length bytes,
@@ -73,7 +73,7 @@ pragma solidity >=0.8.21;
73
73
  }
74
74
  }
75
75
  }
76
- `}function Z(r,t,n,i){let s=n*32;return`
76
+ `}function ee(r,t,n,i){let s=n*32;return`
77
77
  /**
78
78
  * @notice Copy a static array to a dynamic array.
79
79
  * @dev Static arrays don't have a length prefix, so this function copies the memory from the static array to a new dynamic array.
@@ -94,5 +94,5 @@ pragma solidity >=0.8.21;
94
94
  }
95
95
  Memory.copy(fromPointer, toPointer, ${s});
96
96
  }
97
- `}import{SchemaType as e}from"@latticexyz/schema-type/deprecated";var tt={[e.UINT8]:"RecsType.Number",[e.UINT16]:"RecsType.Number",[e.UINT24]:"RecsType.Number",[e.UINT32]:"RecsType.Number",[e.UINT40]:"RecsType.Number",[e.UINT48]:"RecsType.Number",[e.UINT56]:"RecsType.BigInt",[e.UINT64]:"RecsType.BigInt",[e.UINT72]:"RecsType.BigInt",[e.UINT80]:"RecsType.BigInt",[e.UINT88]:"RecsType.BigInt",[e.UINT96]:"RecsType.BigInt",[e.UINT104]:"RecsType.BigInt",[e.UINT112]:"RecsType.BigInt",[e.UINT120]:"RecsType.BigInt",[e.UINT128]:"RecsType.BigInt",[e.UINT136]:"RecsType.BigInt",[e.UINT144]:"RecsType.BigInt",[e.UINT152]:"RecsType.BigInt",[e.UINT160]:"RecsType.BigInt",[e.UINT168]:"RecsType.BigInt",[e.UINT176]:"RecsType.BigInt",[e.UINT184]:"RecsType.BigInt",[e.UINT192]:"RecsType.BigInt",[e.UINT200]:"RecsType.BigInt",[e.UINT208]:"RecsType.BigInt",[e.UINT216]:"RecsType.BigInt",[e.UINT224]:"RecsType.BigInt",[e.UINT232]:"RecsType.BigInt",[e.UINT240]:"RecsType.BigInt",[e.UINT248]:"RecsType.BigInt",[e.UINT256]:"RecsType.BigInt",[e.INT8]:"RecsType.Number",[e.INT16]:"RecsType.Number",[e.INT24]:"RecsType.Number",[e.INT32]:"RecsType.Number",[e.INT40]:"RecsType.Number",[e.INT48]:"RecsType.Number",[e.INT56]:"RecsType.BigInt",[e.INT64]:"RecsType.BigInt",[e.INT72]:"RecsType.BigInt",[e.INT80]:"RecsType.BigInt",[e.INT88]:"RecsType.BigInt",[e.INT96]:"RecsType.BigInt",[e.INT104]:"RecsType.BigInt",[e.INT112]:"RecsType.BigInt",[e.INT120]:"RecsType.BigInt",[e.INT128]:"RecsType.BigInt",[e.INT136]:"RecsType.BigInt",[e.INT144]:"RecsType.BigInt",[e.INT152]:"RecsType.BigInt",[e.INT160]:"RecsType.BigInt",[e.INT168]:"RecsType.BigInt",[e.INT176]:"RecsType.BigInt",[e.INT184]:"RecsType.BigInt",[e.INT192]:"RecsType.BigInt",[e.INT200]:"RecsType.BigInt",[e.INT208]:"RecsType.BigInt",[e.INT216]:"RecsType.BigInt",[e.INT224]:"RecsType.BigInt",[e.INT232]:"RecsType.BigInt",[e.INT240]:"RecsType.BigInt",[e.INT248]:"RecsType.BigInt",[e.INT256]:"RecsType.BigInt",[e.BYTES1]:"RecsType.String",[e.BYTES2]:"RecsType.String",[e.BYTES3]:"RecsType.String",[e.BYTES4]:"RecsType.String",[e.BYTES5]:"RecsType.String",[e.BYTES6]:"RecsType.String",[e.BYTES7]:"RecsType.String",[e.BYTES8]:"RecsType.String",[e.BYTES9]:"RecsType.String",[e.BYTES10]:"RecsType.String",[e.BYTES11]:"RecsType.String",[e.BYTES12]:"RecsType.String",[e.BYTES13]:"RecsType.String",[e.BYTES14]:"RecsType.String",[e.BYTES15]:"RecsType.String",[e.BYTES16]:"RecsType.String",[e.BYTES17]:"RecsType.String",[e.BYTES18]:"RecsType.String",[e.BYTES19]:"RecsType.String",[e.BYTES20]:"RecsType.String",[e.BYTES21]:"RecsType.String",[e.BYTES22]:"RecsType.String",[e.BYTES23]:"RecsType.String",[e.BYTES24]:"RecsType.String",[e.BYTES25]:"RecsType.String",[e.BYTES26]:"RecsType.String",[e.BYTES27]:"RecsType.String",[e.BYTES28]:"RecsType.String",[e.BYTES29]:"RecsType.String",[e.BYTES30]:"RecsType.String",[e.BYTES31]:"RecsType.String",[e.BYTES32]:"RecsType.String",[e.BOOL]:"RecsType.Boolean",[e.ADDRESS]:"RecsType.String",[e.UINT8_ARRAY]:"RecsType.NumberArray",[e.UINT16_ARRAY]:"RecsType.NumberArray",[e.UINT24_ARRAY]:"RecsType.NumberArray",[e.UINT32_ARRAY]:"RecsType.NumberArray",[e.UINT40_ARRAY]:"RecsType.NumberArray",[e.UINT48_ARRAY]:"RecsType.NumberArray",[e.UINT56_ARRAY]:"RecsType.BigIntArray",[e.UINT64_ARRAY]:"RecsType.BigIntArray",[e.UINT72_ARRAY]:"RecsType.BigIntArray",[e.UINT80_ARRAY]:"RecsType.BigIntArray",[e.UINT88_ARRAY]:"RecsType.BigIntArray",[e.UINT96_ARRAY]:"RecsType.BigIntArray",[e.UINT104_ARRAY]:"RecsType.BigIntArray",[e.UINT112_ARRAY]:"RecsType.BigIntArray",[e.UINT120_ARRAY]:"RecsType.BigIntArray",[e.UINT128_ARRAY]:"RecsType.BigIntArray",[e.UINT136_ARRAY]:"RecsType.BigIntArray",[e.UINT144_ARRAY]:"RecsType.BigIntArray",[e.UINT152_ARRAY]:"RecsType.BigIntArray",[e.UINT160_ARRAY]:"RecsType.BigIntArray",[e.UINT168_ARRAY]:"RecsType.BigIntArray",[e.UINT176_ARRAY]:"RecsType.BigIntArray",[e.UINT184_ARRAY]:"RecsType.BigIntArray",[e.UINT192_ARRAY]:"RecsType.BigIntArray",[e.UINT200_ARRAY]:"RecsType.BigIntArray",[e.UINT208_ARRAY]:"RecsType.BigIntArray",[e.UINT216_ARRAY]:"RecsType.BigIntArray",[e.UINT224_ARRAY]:"RecsType.BigIntArray",[e.UINT232_ARRAY]:"RecsType.BigIntArray",[e.UINT240_ARRAY]:"RecsType.BigIntArray",[e.UINT248_ARRAY]:"RecsType.BigIntArray",[e.UINT256_ARRAY]:"RecsType.BigIntArray",[e.INT8_ARRAY]:"RecsType.NumberArray",[e.INT16_ARRAY]:"RecsType.NumberArray",[e.INT24_ARRAY]:"RecsType.NumberArray",[e.INT32_ARRAY]:"RecsType.NumberArray",[e.INT40_ARRAY]:"RecsType.NumberArray",[e.INT48_ARRAY]:"RecsType.NumberArray",[e.INT56_ARRAY]:"RecsType.BigIntArray",[e.INT64_ARRAY]:"RecsType.BigIntArray",[e.INT72_ARRAY]:"RecsType.BigIntArray",[e.INT80_ARRAY]:"RecsType.BigIntArray",[e.INT88_ARRAY]:"RecsType.BigIntArray",[e.INT96_ARRAY]:"RecsType.BigIntArray",[e.INT104_ARRAY]:"RecsType.BigIntArray",[e.INT112_ARRAY]:"RecsType.BigIntArray",[e.INT120_ARRAY]:"RecsType.BigIntArray",[e.INT128_ARRAY]:"RecsType.BigIntArray",[e.INT136_ARRAY]:"RecsType.BigIntArray",[e.INT144_ARRAY]:"RecsType.BigIntArray",[e.INT152_ARRAY]:"RecsType.BigIntArray",[e.INT160_ARRAY]:"RecsType.BigIntArray",[e.INT168_ARRAY]:"RecsType.BigIntArray",[e.INT176_ARRAY]:"RecsType.BigIntArray",[e.INT184_ARRAY]:"RecsType.BigIntArray",[e.INT192_ARRAY]:"RecsType.BigIntArray",[e.INT200_ARRAY]:"RecsType.BigIntArray",[e.INT208_ARRAY]:"RecsType.BigIntArray",[e.INT216_ARRAY]:"RecsType.BigIntArray",[e.INT224_ARRAY]:"RecsType.BigIntArray",[e.INT232_ARRAY]:"RecsType.BigIntArray",[e.INT240_ARRAY]:"RecsType.BigIntArray",[e.INT248_ARRAY]:"RecsType.BigIntArray",[e.INT256_ARRAY]:"RecsType.BigIntArray",[e.BYTES1_ARRAY]:"RecsType.BigIntArray",[e.BYTES2_ARRAY]:"RecsType.BigIntArray",[e.BYTES3_ARRAY]:"RecsType.BigIntArray",[e.BYTES4_ARRAY]:"RecsType.BigIntArray",[e.BYTES5_ARRAY]:"RecsType.BigIntArray",[e.BYTES6_ARRAY]:"RecsType.BigIntArray",[e.BYTES7_ARRAY]:"RecsType.BigIntArray",[e.BYTES8_ARRAY]:"RecsType.BigIntArray",[e.BYTES9_ARRAY]:"RecsType.BigIntArray",[e.BYTES10_ARRAY]:"RecsType.BigIntArray",[e.BYTES11_ARRAY]:"RecsType.BigIntArray",[e.BYTES12_ARRAY]:"RecsType.BigIntArray",[e.BYTES13_ARRAY]:"RecsType.BigIntArray",[e.BYTES14_ARRAY]:"RecsType.BigIntArray",[e.BYTES15_ARRAY]:"RecsType.BigIntArray",[e.BYTES16_ARRAY]:"RecsType.BigIntArray",[e.BYTES17_ARRAY]:"RecsType.BigIntArray",[e.BYTES18_ARRAY]:"RecsType.BigIntArray",[e.BYTES19_ARRAY]:"RecsType.BigIntArray",[e.BYTES20_ARRAY]:"RecsType.BigIntArray",[e.BYTES21_ARRAY]:"RecsType.BigIntArray",[e.BYTES22_ARRAY]:"RecsType.BigIntArray",[e.BYTES23_ARRAY]:"RecsType.BigIntArray",[e.BYTES24_ARRAY]:"RecsType.BigIntArray",[e.BYTES25_ARRAY]:"RecsType.BigIntArray",[e.BYTES26_ARRAY]:"RecsType.BigIntArray",[e.BYTES27_ARRAY]:"RecsType.BigIntArray",[e.BYTES28_ARRAY]:"RecsType.BigIntArray",[e.BYTES29_ARRAY]:"RecsType.BigIntArray",[e.BYTES30_ARRAY]:"RecsType.BigIntArray",[e.BYTES31_ARRAY]:"RecsType.BigIntArray",[e.BYTES32_ARRAY]:"RecsType.BigIntArray",[e.BOOL_ARRAY]:"RecsType.T",[e.ADDRESS_ARRAY]:"RecsType.StringArray",[e.BYTES]:"RecsType.String",[e.STRING]:"RecsType.String"};export{re as contractToInterface,h as extractUserTypes,ue as formatAndWriteSolidity,le as formatAndWriteTypescript,U as formatSolidity,E as formatTypescript,je as getLeftPaddingBits,q as isLeftAligned,Ne as loadAndExtractUserTypes,B as posixPath,C as renderAbsoluteImports,A as renderArguments,Ce as renderCommonData,Ke as renderEnums,Me as renderImports,Y as renderList,Fe as renderRelativeImports,We as renderTableId,ze as renderTypeHelpers,X as renderValueTypeToBytes32,Le as renderWithFieldSuffix,ke as renderWithStore,D as renderedSolidityHeader,tt as schemaTypesToRecsTypeStrings,P as solidityRelativeImportPath};
97
+ `}import{SchemaType as e}from"@latticexyz/schema-type/deprecated";var rt={[e.UINT8]:"RecsType.Number",[e.UINT16]:"RecsType.Number",[e.UINT24]:"RecsType.Number",[e.UINT32]:"RecsType.Number",[e.UINT40]:"RecsType.Number",[e.UINT48]:"RecsType.Number",[e.UINT56]:"RecsType.BigInt",[e.UINT64]:"RecsType.BigInt",[e.UINT72]:"RecsType.BigInt",[e.UINT80]:"RecsType.BigInt",[e.UINT88]:"RecsType.BigInt",[e.UINT96]:"RecsType.BigInt",[e.UINT104]:"RecsType.BigInt",[e.UINT112]:"RecsType.BigInt",[e.UINT120]:"RecsType.BigInt",[e.UINT128]:"RecsType.BigInt",[e.UINT136]:"RecsType.BigInt",[e.UINT144]:"RecsType.BigInt",[e.UINT152]:"RecsType.BigInt",[e.UINT160]:"RecsType.BigInt",[e.UINT168]:"RecsType.BigInt",[e.UINT176]:"RecsType.BigInt",[e.UINT184]:"RecsType.BigInt",[e.UINT192]:"RecsType.BigInt",[e.UINT200]:"RecsType.BigInt",[e.UINT208]:"RecsType.BigInt",[e.UINT216]:"RecsType.BigInt",[e.UINT224]:"RecsType.BigInt",[e.UINT232]:"RecsType.BigInt",[e.UINT240]:"RecsType.BigInt",[e.UINT248]:"RecsType.BigInt",[e.UINT256]:"RecsType.BigInt",[e.INT8]:"RecsType.Number",[e.INT16]:"RecsType.Number",[e.INT24]:"RecsType.Number",[e.INT32]:"RecsType.Number",[e.INT40]:"RecsType.Number",[e.INT48]:"RecsType.Number",[e.INT56]:"RecsType.BigInt",[e.INT64]:"RecsType.BigInt",[e.INT72]:"RecsType.BigInt",[e.INT80]:"RecsType.BigInt",[e.INT88]:"RecsType.BigInt",[e.INT96]:"RecsType.BigInt",[e.INT104]:"RecsType.BigInt",[e.INT112]:"RecsType.BigInt",[e.INT120]:"RecsType.BigInt",[e.INT128]:"RecsType.BigInt",[e.INT136]:"RecsType.BigInt",[e.INT144]:"RecsType.BigInt",[e.INT152]:"RecsType.BigInt",[e.INT160]:"RecsType.BigInt",[e.INT168]:"RecsType.BigInt",[e.INT176]:"RecsType.BigInt",[e.INT184]:"RecsType.BigInt",[e.INT192]:"RecsType.BigInt",[e.INT200]:"RecsType.BigInt",[e.INT208]:"RecsType.BigInt",[e.INT216]:"RecsType.BigInt",[e.INT224]:"RecsType.BigInt",[e.INT232]:"RecsType.BigInt",[e.INT240]:"RecsType.BigInt",[e.INT248]:"RecsType.BigInt",[e.INT256]:"RecsType.BigInt",[e.BYTES1]:"RecsType.String",[e.BYTES2]:"RecsType.String",[e.BYTES3]:"RecsType.String",[e.BYTES4]:"RecsType.String",[e.BYTES5]:"RecsType.String",[e.BYTES6]:"RecsType.String",[e.BYTES7]:"RecsType.String",[e.BYTES8]:"RecsType.String",[e.BYTES9]:"RecsType.String",[e.BYTES10]:"RecsType.String",[e.BYTES11]:"RecsType.String",[e.BYTES12]:"RecsType.String",[e.BYTES13]:"RecsType.String",[e.BYTES14]:"RecsType.String",[e.BYTES15]:"RecsType.String",[e.BYTES16]:"RecsType.String",[e.BYTES17]:"RecsType.String",[e.BYTES18]:"RecsType.String",[e.BYTES19]:"RecsType.String",[e.BYTES20]:"RecsType.String",[e.BYTES21]:"RecsType.String",[e.BYTES22]:"RecsType.String",[e.BYTES23]:"RecsType.String",[e.BYTES24]:"RecsType.String",[e.BYTES25]:"RecsType.String",[e.BYTES26]:"RecsType.String",[e.BYTES27]:"RecsType.String",[e.BYTES28]:"RecsType.String",[e.BYTES29]:"RecsType.String",[e.BYTES30]:"RecsType.String",[e.BYTES31]:"RecsType.String",[e.BYTES32]:"RecsType.String",[e.BOOL]:"RecsType.Boolean",[e.ADDRESS]:"RecsType.String",[e.UINT8_ARRAY]:"RecsType.NumberArray",[e.UINT16_ARRAY]:"RecsType.NumberArray",[e.UINT24_ARRAY]:"RecsType.NumberArray",[e.UINT32_ARRAY]:"RecsType.NumberArray",[e.UINT40_ARRAY]:"RecsType.NumberArray",[e.UINT48_ARRAY]:"RecsType.NumberArray",[e.UINT56_ARRAY]:"RecsType.BigIntArray",[e.UINT64_ARRAY]:"RecsType.BigIntArray",[e.UINT72_ARRAY]:"RecsType.BigIntArray",[e.UINT80_ARRAY]:"RecsType.BigIntArray",[e.UINT88_ARRAY]:"RecsType.BigIntArray",[e.UINT96_ARRAY]:"RecsType.BigIntArray",[e.UINT104_ARRAY]:"RecsType.BigIntArray",[e.UINT112_ARRAY]:"RecsType.BigIntArray",[e.UINT120_ARRAY]:"RecsType.BigIntArray",[e.UINT128_ARRAY]:"RecsType.BigIntArray",[e.UINT136_ARRAY]:"RecsType.BigIntArray",[e.UINT144_ARRAY]:"RecsType.BigIntArray",[e.UINT152_ARRAY]:"RecsType.BigIntArray",[e.UINT160_ARRAY]:"RecsType.BigIntArray",[e.UINT168_ARRAY]:"RecsType.BigIntArray",[e.UINT176_ARRAY]:"RecsType.BigIntArray",[e.UINT184_ARRAY]:"RecsType.BigIntArray",[e.UINT192_ARRAY]:"RecsType.BigIntArray",[e.UINT200_ARRAY]:"RecsType.BigIntArray",[e.UINT208_ARRAY]:"RecsType.BigIntArray",[e.UINT216_ARRAY]:"RecsType.BigIntArray",[e.UINT224_ARRAY]:"RecsType.BigIntArray",[e.UINT232_ARRAY]:"RecsType.BigIntArray",[e.UINT240_ARRAY]:"RecsType.BigIntArray",[e.UINT248_ARRAY]:"RecsType.BigIntArray",[e.UINT256_ARRAY]:"RecsType.BigIntArray",[e.INT8_ARRAY]:"RecsType.NumberArray",[e.INT16_ARRAY]:"RecsType.NumberArray",[e.INT24_ARRAY]:"RecsType.NumberArray",[e.INT32_ARRAY]:"RecsType.NumberArray",[e.INT40_ARRAY]:"RecsType.NumberArray",[e.INT48_ARRAY]:"RecsType.NumberArray",[e.INT56_ARRAY]:"RecsType.BigIntArray",[e.INT64_ARRAY]:"RecsType.BigIntArray",[e.INT72_ARRAY]:"RecsType.BigIntArray",[e.INT80_ARRAY]:"RecsType.BigIntArray",[e.INT88_ARRAY]:"RecsType.BigIntArray",[e.INT96_ARRAY]:"RecsType.BigIntArray",[e.INT104_ARRAY]:"RecsType.BigIntArray",[e.INT112_ARRAY]:"RecsType.BigIntArray",[e.INT120_ARRAY]:"RecsType.BigIntArray",[e.INT128_ARRAY]:"RecsType.BigIntArray",[e.INT136_ARRAY]:"RecsType.BigIntArray",[e.INT144_ARRAY]:"RecsType.BigIntArray",[e.INT152_ARRAY]:"RecsType.BigIntArray",[e.INT160_ARRAY]:"RecsType.BigIntArray",[e.INT168_ARRAY]:"RecsType.BigIntArray",[e.INT176_ARRAY]:"RecsType.BigIntArray",[e.INT184_ARRAY]:"RecsType.BigIntArray",[e.INT192_ARRAY]:"RecsType.BigIntArray",[e.INT200_ARRAY]:"RecsType.BigIntArray",[e.INT208_ARRAY]:"RecsType.BigIntArray",[e.INT216_ARRAY]:"RecsType.BigIntArray",[e.INT224_ARRAY]:"RecsType.BigIntArray",[e.INT232_ARRAY]:"RecsType.BigIntArray",[e.INT240_ARRAY]:"RecsType.BigIntArray",[e.INT248_ARRAY]:"RecsType.BigIntArray",[e.INT256_ARRAY]:"RecsType.BigIntArray",[e.BYTES1_ARRAY]:"RecsType.BigIntArray",[e.BYTES2_ARRAY]:"RecsType.BigIntArray",[e.BYTES3_ARRAY]:"RecsType.BigIntArray",[e.BYTES4_ARRAY]:"RecsType.BigIntArray",[e.BYTES5_ARRAY]:"RecsType.BigIntArray",[e.BYTES6_ARRAY]:"RecsType.BigIntArray",[e.BYTES7_ARRAY]:"RecsType.BigIntArray",[e.BYTES8_ARRAY]:"RecsType.BigIntArray",[e.BYTES9_ARRAY]:"RecsType.BigIntArray",[e.BYTES10_ARRAY]:"RecsType.BigIntArray",[e.BYTES11_ARRAY]:"RecsType.BigIntArray",[e.BYTES12_ARRAY]:"RecsType.BigIntArray",[e.BYTES13_ARRAY]:"RecsType.BigIntArray",[e.BYTES14_ARRAY]:"RecsType.BigIntArray",[e.BYTES15_ARRAY]:"RecsType.BigIntArray",[e.BYTES16_ARRAY]:"RecsType.BigIntArray",[e.BYTES17_ARRAY]:"RecsType.BigIntArray",[e.BYTES18_ARRAY]:"RecsType.BigIntArray",[e.BYTES19_ARRAY]:"RecsType.BigIntArray",[e.BYTES20_ARRAY]:"RecsType.BigIntArray",[e.BYTES21_ARRAY]:"RecsType.BigIntArray",[e.BYTES22_ARRAY]:"RecsType.BigIntArray",[e.BYTES23_ARRAY]:"RecsType.BigIntArray",[e.BYTES24_ARRAY]:"RecsType.BigIntArray",[e.BYTES25_ARRAY]:"RecsType.BigIntArray",[e.BYTES26_ARRAY]:"RecsType.BigIntArray",[e.BYTES27_ARRAY]:"RecsType.BigIntArray",[e.BYTES28_ARRAY]:"RecsType.BigIntArray",[e.BYTES29_ARRAY]:"RecsType.BigIntArray",[e.BYTES30_ARRAY]:"RecsType.BigIntArray",[e.BYTES31_ARRAY]:"RecsType.BigIntArray",[e.BYTES32_ARRAY]:"RecsType.BigIntArray",[e.BOOL_ARRAY]:"RecsType.T",[e.ADDRESS_ARRAY]:"RecsType.StringArray",[e.BYTES]:"RecsType.String",[e.STRING]:"RecsType.String"};export{ne as contractToInterface,h as extractUserTypes,le as formatAndWriteSolidity,me as formatAndWriteTypescript,U as formatSolidity,E as formatTypescript,Oe as getLeftPaddingBits,J as isLeftAligned,_e as loadAndExtractUserTypes,B as posixPath,C as renderAbsoluteImports,Y as renderArguments,Fe as renderCommonData,Ve as renderEnums,Me as renderImports,S as renderList,Le as renderRelativeImports,je as renderTableId,Ge as renderTypeHelpers,q as renderValueTypeToBytes32,We as renderWithFieldSuffix,ke as renderWithStore,D as renderedSolidityHeader,rt as schemaTypesToRecsTypeStrings,P as solidityRelativeImportPath};
98
98
  //# sourceMappingURL=codegen.js.map