@helios-lang/contract-utils 0.2.41 → 0.2.42
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
CHANGED
|
@@ -139,57 +139,7 @@ export class DagCompiler {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
const {
|
|
144
|
-
cborHex: unoptimizedCborHex,
|
|
145
|
-
plutusVersion: unoptimPlutusVersion
|
|
146
|
-
} = this.lib.compile(
|
|
147
|
-
validator.$sourceCode,
|
|
148
|
-
Array.from(moduleDeps.values()),
|
|
149
|
-
{
|
|
150
|
-
optimize: false,
|
|
151
|
-
hashDependencies: hashDepHashes,
|
|
152
|
-
allValidatorHashTypes: hashTypes,
|
|
153
|
-
ownHash: validator.$dependsOnOwnHash ? ownHash : undefined,
|
|
154
|
-
parameters: parameters,
|
|
155
|
-
isTestnet: isTestnet,
|
|
156
|
-
excludeUserFuncs: excludeUserFuncs,
|
|
157
|
-
onCompileUserFunc: (
|
|
158
|
-
name,
|
|
159
|
-
cborHex,
|
|
160
|
-
cborHexAlt,
|
|
161
|
-
plutusVersion
|
|
162
|
-
) => {
|
|
163
|
-
let uplc = restoreUplcProgram(plutusVersion, cborHex)
|
|
164
|
-
|
|
165
|
-
if (cborHexAlt) {
|
|
166
|
-
uplc = uplc.withAlt(
|
|
167
|
-
/** @type {any} */ (
|
|
168
|
-
restoreUplcProgram(
|
|
169
|
-
plutusVersion,
|
|
170
|
-
cborHexAlt
|
|
171
|
-
)
|
|
172
|
-
)
|
|
173
|
-
)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
this.cachedUserFuncs[name] = uplc
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
// TODO: with source mapping
|
|
182
|
-
const unoptimizedProgram = restoreUplcProgram(
|
|
183
|
-
unoptimPlutusVersion,
|
|
184
|
-
unoptimizedCborHex
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
const completeProgram = optimizedProgram.withAlt(
|
|
188
|
-
/** @type {any} */ (unoptimizedProgram)
|
|
189
|
-
)
|
|
190
|
-
|
|
191
|
-
// add result to cache (unoptimizedProgram is attached to optimizedProgram)
|
|
192
|
-
this.addValidatorToCache(validator, completeProgram, ownHash)
|
|
142
|
+
this.addValidatorToCache(validator, optimizedProgram, ownHash)
|
|
193
143
|
}
|
|
194
144
|
|
|
195
145
|
/**
|
|
@@ -232,6 +182,7 @@ export class DagCompiler {
|
|
|
232
182
|
cborHexAlt,
|
|
233
183
|
plutusVersion
|
|
234
184
|
) => {
|
|
185
|
+
console.log(`Compiled user function ${name}`)
|
|
235
186
|
let uplc = restoreUplcProgram(plutusVersion, cborHex)
|
|
236
187
|
|
|
237
188
|
if (cborHexAlt) {
|
|
@@ -250,6 +201,8 @@ export class DagCompiler {
|
|
|
250
201
|
}
|
|
251
202
|
)
|
|
252
203
|
|
|
204
|
+
console.log(`Compiled validator ${validator.$name} (unoptimized)`)
|
|
205
|
+
|
|
253
206
|
// TODO: with source mapping
|
|
254
207
|
const unoptimizedProgram = restoreUplcProgram(
|
|
255
208
|
unoptimPlutusVersion,
|
|
@@ -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":"AAgXA;;;GAGG;AACH,iDAHW,eAAe,GACb,MAAM,EAAE,CAsBpB;AA7XD;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;GAEG;AACH;IA6BI;;;OAGG;IACH,iBAHW,WAAW,cACX,UAAU,EAOpB;IArCD;;;;OAIG;IACH,qBAAG;IAEH;;;;OAIG;IACH,wBAAM;IAEN;;;;OAIG;IACH,kCAAgB;IAEhB;;;;OAIG;IACH,iCAAe;IAQX,sDAA4B;IAKhC;;;;;;OAMG;IACH,kBANW,eAAe,EAAE,cACjB,OAAO,MAAM,EAAE,GAAG,CAAC,aACnB,OAAO;;SAEL,iBAAiB,CA4J7B;IAED;;;;;OAKG;IACH,4BAsCC;IAED;;;;;OAKG;IACH,yBA8BC;IAED;;;;;OAKG;IACH,qBAoBC;IAED;;;;;OAKG;IACH,4BAeC;CACJ;0BAlWY,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"}
|