@helios-lang/contract-utils 0.2.27 → 0.2.29
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
|
@@ -158,6 +158,7 @@ class ContractContextCache {
|
|
|
158
158
|
redeemer: redeemer,
|
|
159
159
|
program: program
|
|
160
160
|
})
|
|
161
|
+
break
|
|
161
162
|
}
|
|
162
163
|
default:
|
|
163
164
|
throw new Error("unhandled purpose")
|
|
@@ -263,15 +264,12 @@ class ContractContextCache {
|
|
|
263
264
|
*/
|
|
264
265
|
let datum = None
|
|
265
266
|
|
|
266
|
-
if (hash instanceof
|
|
267
|
-
datum =
|
|
268
|
-
|
|
269
|
-
? hash.context.datum
|
|
270
|
-
: None
|
|
267
|
+
if (hash.context.datum && hash.context.datum instanceof Cast) {
|
|
268
|
+
datum = hash.context.datum
|
|
269
|
+
}
|
|
271
270
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
271
|
+
if (["spending", "mixed"].includes(purpose) && !datum) {
|
|
272
|
+
throw new Error("Datum is not a Cast type")
|
|
275
273
|
}
|
|
276
274
|
|
|
277
275
|
resValidators[name] = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractContextCache.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextCache.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContractContextCache.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextCache.js"],"names":[],"mappings":"AAyTA,wDAA8D;4BA5SjD,OAAO,mBAAmB,EAAE,aAAa;0BACzC,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,kBAAkB,EAAE,UAAU;yBACrC,OAAO,qBAAqB,EAAE,UAAU;0CACxC,OAAO,sBAAsB,EAAE,2BAA2B;;;;;;;;;;;iBAYvD,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO;eAC9C,MAAM,EAAE;;0BAEG,MAAM;uBACT,aAAa;oBAChB,UAAU;;kBAEZ,UAAU;;;;;;0BAOJ,MAAM;uBACT,aAAa;;;6BAKpB;IACZ,UAAc,EAAE,wBAAwB,CAAA;IACxC,SAAa,EAAE,uBAAuB,CAAA;CACnC;AAxCJ;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;IACI;;OAEG;IACH,OAFU,UAAU,EAAE,CAEjB;IAEL;;;OAGG;IACH,GAFU,MAAM,CAEf;IAED;;OAEG;IACH,SAFU,OAAO,CAEV;IAQP,eAEC;IAED;;OAEG;IACH,WAFW,cAAc,EAAE,QA+G1B;IAED;;OAEG;IACH,aAFW,UAAU,QAMpB;IAED;;OAEG;IACH,SAFa,OAAO,UAAU,CAAC,CAY9B;IAED;;OAEG;IACH,UAFY,cAAc,EAAE,CAyF3B;CACJ"}
|