hh-test-lib
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"version": 9, | ||
"compilerVersion": "1.19.0+commit.72eaeba", | ||
"contract": "TestLibContract", | ||
"md5": "f07eb01282ca9843f0e688e54110c199", | ||
"contract": "TestLib", | ||
"md5": "b802607f3256e11911d7688553ce5599", | ||
"structs": [], | ||
@@ -28,5 +28,3 @@ "library": [ | ||
{ | ||
"type": "function", | ||
"name": "unlock1", | ||
"index": 0, | ||
"type": "constructor", | ||
"params": [ | ||
@@ -38,17 +36,2 @@ { | ||
] | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "unlock2", | ||
"index": 1, | ||
"params": [ | ||
{ | ||
"name": "x", | ||
"type": "int" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "constructor", | ||
"params": [] | ||
} | ||
@@ -59,4 +42,4 @@ ], | ||
"file": "file:///C:/Users/myland/code/test-lib/artifacts/testLib.scrypt", | ||
"hex": "00790087635152615179517993517a75517a756152799c777767007951876355616152615179517994517a756153799c77777767006868", | ||
"hex": "<x>", | ||
"sourceMapFile": "" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { SmartContractLib, SmartContract } from 'scrypt-ts'; | ||
import { SmartContractLib } from 'scrypt-ts'; | ||
export declare class TestLib extends SmartContractLib { | ||
@@ -8,5 +8,1 @@ x: bigint; | ||
} | ||
export declare class TestLibContract extends SmartContract { | ||
unlock1(x: bigint): void; | ||
unlock2(x: bigint): void; | ||
} |
@@ -9,3 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TestLibContract = exports.TestLib = void 0; | ||
exports.TestLib = void 0; | ||
const scrypt_ts_1 = require("scrypt-ts"); | ||
@@ -34,19 +34,2 @@ class TestLib extends scrypt_ts_1.SmartContractLib { | ||
], TestLib, "add", null); | ||
// Test via smart contract: | ||
class TestLibContract extends scrypt_ts_1.SmartContract { | ||
unlock1(x) { | ||
(0, scrypt_ts_1.assert)(TestLib.add(1n, 2n) === x); | ||
} | ||
unlock2(x) { | ||
const myLib = new TestLib(5n); | ||
(0, scrypt_ts_1.assert)(myLib.diff(2n) === x); | ||
} | ||
} | ||
exports.TestLibContract = TestLibContract; | ||
__decorate([ | ||
(0, scrypt_ts_1.method)() | ||
], TestLibContract.prototype, "unlock1", null); | ||
__decorate([ | ||
(0, scrypt_ts_1.method)() | ||
], TestLibContract.prototype, "unlock2", null); | ||
//# sourceMappingURL=testLib.js.map |
{ | ||
"name": "hh-test-lib", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A demo sCrypt library.", | ||
@@ -5,0 +5,0 @@ "author": "", |
@@ -1,1 +0,1 @@ | ||
{"scryptBase":"artifacts","bindings":[{"symbol":"TestLib","path":"testLib.scrypt"},{"symbol":"TestLibContract","path":"testLib.scrypt"}]} | ||
{"scryptBase":"artifacts","bindings":[{"symbol":"TestLib","path":"testLib.scrypt"}]} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
5152
94