v0.4.48
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
ppedziwiatr
2022-03-18 12:00:17 +01:00
parent fa6276bba3
commit 01ce177cc6
2 changed files with 15 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "redstone-smartweave",
"version": "0.4.47",
"version": "0.4.48",
"description": "An implementation of the SmartWeave smart contract protocol.",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",

View File

@@ -26,7 +26,9 @@ LoggerFactory.INST.logLevel('fatal');
const testCases: string[] = JSON.parse(fs.readFileSync(path.join(__dirname, 'test-cases/read-state.json'), 'utf-8'));
const testCasesGw: string[] = JSON.parse(fs.readFileSync(path.join(__dirname, 'test-cases/gateways.json'), 'utf-8'));
const testCasesVm: string[] = JSON.parse(fs.readFileSync(path.join(__dirname, 'test-cases/read-state-vm.json'), 'utf-8'));
const testCasesVm: string[] = JSON.parse(
fs.readFileSync(path.join(__dirname, 'test-cases/read-state-vm.json'), 'utf-8')
);
const chunked: string[][][] = [...chunks(testCases, 10)];
const chunkedGw: string[][][] = [...chunks(testCasesGw, 10)];
@@ -76,17 +78,17 @@ describe.each(chunkedVm)('v1 compare.suite (VM2) %#', (contracts: string[]) => {
.readFileSync(path.join(__dirname, 'test-cases', 'contracts', `${contractTxId}.json`), 'utf-8')
.trim();
console.log('readState', contractTxId);
const result2 = await SmartWeaveNodeFactory.memCachedBased(arweave, 1)
.useRedStoneGateway(null, SourceType.ARWEAVE)
.build()
.contract(contractTxId)
.setEvaluationOptions({
useFastCopy: true,
useVM2: true
})
.readState(blockHeight);
const result2String = stringify(result2.state).trim();
expect(result2String).toEqual(resultString);
const result2 = await SmartWeaveNodeFactory.memCachedBased(arweave, 1)
.useRedStoneGateway(null, SourceType.ARWEAVE)
.build()
.contract(contractTxId)
.setEvaluationOptions({
useFastCopy: true,
useVM2: true
})
.readState(blockHeight);
const result2String = stringify(result2.state).trim();
expect(result2String).toEqual(resultString);
},
800000
);