@algorandfoundation/algorand-typescript-testing 1.0.0-beta.7 → 1.0.0-beta.9
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/index.mjs +4 -4
- package/index.mjs.map +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3577,12 +3577,12 @@ class ContractContext {
|
|
|
3577
3577
|
return txns;
|
|
3578
3578
|
}
|
|
3579
3579
|
isArc4(type) {
|
|
3580
|
-
// TODO: uncomment the following line once version puya-ts 1.0.0 is released
|
|
3581
|
-
// return (type as DeliberateAny as typeof BaseContract).isArc4 ?? false
|
|
3582
3580
|
const result = type.isArc4;
|
|
3583
3581
|
if (result !== undefined && result !== null) {
|
|
3584
3582
|
return result;
|
|
3585
3583
|
}
|
|
3584
|
+
// TODO: uncomment the following line once version puya-ts 1.0.0 is released and delete the rest of the function
|
|
3585
|
+
// throw new internal.errors.CodeError('Cannot create a contract for class as it does not extend Contract or BaseContract')
|
|
3586
3586
|
const proto = Object.getPrototypeOf(type);
|
|
3587
3587
|
if (proto === BaseContract) {
|
|
3588
3588
|
return false;
|
|
@@ -3590,8 +3590,8 @@ class ContractContext {
|
|
|
3590
3590
|
else if (proto === Contract) {
|
|
3591
3591
|
return true;
|
|
3592
3592
|
}
|
|
3593
|
-
else if (proto === null) {
|
|
3594
|
-
|
|
3593
|
+
else if (proto === Object || proto === null) {
|
|
3594
|
+
throw new internal.errors.CodeError('Cannot create a contract for class as it does not extend Contract or BaseContract');
|
|
3595
3595
|
}
|
|
3596
3596
|
return this.isArc4(proto);
|
|
3597
3597
|
}
|