@helios-lang/contract-utils 0.2.64 → 0.2.65
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/package.json +1 -1
- package/src/context/ContractContextBuilder.js +8 -8
- package/src/context/DagCompiler.js +1 -0
- package/types/context/ContractContextBuilder.d.ts +4 -0
- package/types/context/ContractContextBuilder.d.ts.map +1 -1
- package/types/context/DagCompiler.d.ts +4 -0
- package/types/context/DagCompiler.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ import { contractContextCache } from "./ContractContextCache.js"
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
+
* if `debug` is true, the ir is included where possible
|
|
27
28
|
* @typedef {{
|
|
28
29
|
* isMainnet: boolean
|
|
29
30
|
* expectedHashes?: {[name: string]: string}
|
|
@@ -125,14 +126,13 @@ export class ContractContextBuilder {
|
|
|
125
126
|
const cached = contractContextCache.shift()
|
|
126
127
|
|
|
127
128
|
const compiled =
|
|
128
|
-
cached
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
)
|
|
129
|
+
cached ||
|
|
130
|
+
dagCompiler.build(
|
|
131
|
+
Object.values(this.validators),
|
|
132
|
+
props.parameters ?? {},
|
|
133
|
+
!props.isMainnet,
|
|
134
|
+
props.expectedHashes
|
|
135
|
+
)
|
|
136
136
|
|
|
137
137
|
// TODO: adapt to use generic cache interface
|
|
138
138
|
contractContextCache.push(compiled)
|
|
@@ -24,6 +24,7 @@ import { configureCast } from "../cast/index.js"
|
|
|
24
24
|
* }} DagCompilerConfig
|
|
25
25
|
*/
|
|
26
26
|
/**
|
|
27
|
+
* if `debug` is true, the ir is included in the user functions where possible
|
|
27
28
|
* @typedef {{
|
|
28
29
|
* debug?: boolean
|
|
29
30
|
* validators: {[name: string]: AnyContractValidatorContext}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* @typedef {import("./ContractContext.js").ContractContext<Vs, Ms>} ContractContext
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
|
+
* if `debug` is true, the ir is included where possible
|
|
18
19
|
* @typedef {{
|
|
19
20
|
* isMainnet: boolean
|
|
20
21
|
* expectedHashes?: {[name: string]: string}
|
|
@@ -88,6 +89,9 @@ export type ContractContext<Vs extends {
|
|
|
88
89
|
}, Ms extends {
|
|
89
90
|
[name: string]: LoadedModule;
|
|
90
91
|
}> = import("./ContractContext.js").ContractContext<Vs, Ms>;
|
|
92
|
+
/**
|
|
93
|
+
* if `debug` is true, the ir is included where possible
|
|
94
|
+
*/
|
|
91
95
|
export type ContractContextBuildProps = {
|
|
92
96
|
isMainnet: boolean;
|
|
93
97
|
expectedHashes?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractContextBuilder.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextBuilder.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"ContractContextBuilder.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextBuilder.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;;;;;GASG;AAEH;;;GAGG;AACH,oCAHiD,EAAE,SAAtC;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAA;CAAE,EACF,EAAE,SAAnC;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE;IA0BzC;;OAEG;IACH,gBAFa,sBAAsB,CAAC,EAAE,EAAE,EAAE,CAAC,CAI1C;IAfD;;;;OAIG;IACH,sBAGC;IArBD;;;;OAIG;IACH,4BAAU;IAEV;;;OAGG;IACH,kBAFU,EAAE,CAEL;IAmBP;;;;;;;OAOG;IACH,KAP+B,CAAC,SAAlB,eAAgB,aACnB,CAAC,GACC,sBAAs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|
|
18
18
|
*/
|
|
19
19
|
/**
|
|
20
|
+
* if `debug` is true, the ir is included in the user functions where possible
|
|
20
21
|
* @typedef {{
|
|
21
22
|
* debug?: boolean
|
|
22
23
|
* validators: {[name: string]: AnyContractValidatorContext}
|
|
@@ -104,6 +105,9 @@ export type AnyContractValidatorContext = import("./ContractContext.js").AnyCont
|
|
|
104
105
|
export type DagCompilerConfig = CastConfig & {
|
|
105
106
|
debug?: boolean;
|
|
106
107
|
};
|
|
108
|
+
/**
|
|
109
|
+
* if `debug` is true, the ir is included in the user functions where possible
|
|
110
|
+
*/
|
|
107
111
|
export type DagCompilerOutput = {
|
|
108
112
|
debug?: boolean;
|
|
109
113
|
validators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DagCompiler.d.ts","sourceRoot":"","sources":["../../src/context/DagCompiler.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DagCompiler.d.ts","sourceRoot":"","sources":["../../src/context/DagCompiler.js"],"names":[],"mappings":"AA8YA;;;GAGG;AACH,iDAHW,eAAe,GACb,MAAM,EAAE,CAsBpB;AA3ZD;;;;;;;GAOG;AAEH;;;;GAIG;AACH;;;;;;;GAOG;AAEH;;GAEG;AACH;IA6BI;;;OAGG;IACH,iBAHW,WAAW,UACX,iBAAiB,EAO3B;IArCD;;;;OAIG;IACH,qBAAG;IAEH;;;;OAIG;IACH,wBAAM;IAEN;;;;OAIG;IACH,kCAAgB;IAEhB;;;;OAIG;IACH,iCAAe;IAaf;;;;;;OAMG;IACH,kBANW,eAAe,EAAE,cACjB,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,aACxB,OAAO,mBACP,MAAM,CAAC;QAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAC,GAC9B,iBAAiB,CAkL7B;IAED;;;;;OAKG;IACH,4BAsCC;IAED;;;;;OAKG;IACH,yBA8BC;IAED;;;;;OAKG;IACH,qBAoBC;IAED;;;;;OAKG;IACH,4BAeC;CACJ;uBAhYY,OAAO,mBAAmB,EAAE,QAAQ;0BACpC,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,kBAAkB,EAAE,UAAU;8BACrC,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;0CAC1C,OAAO,sBAAsB,EAAE,2BAA2B;gCAI1D,UAAU,GAAG;IACzB,KAAS,CAAC,EAAE,OAAO,CAAA;CAChB;;;;gCAIS;IACZ,KAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAc,EAAE;QAAC,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,CAAA;KAAC,CAAA;IAC7D,SAAa,EAAE;QAAC,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;KAAC,CAAA;CACzC"}
|