Skip to content

Commit

Permalink
v1.2.48
Browse files Browse the repository at this point in the history
  • Loading branch information
ppedziwiatr committed Jan 23, 2023
1 parent 6f79c30 commit 773f7c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-contracts",
"version": "1.2.47",
"version": "1.2.48",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down Expand Up @@ -74,11 +74,11 @@
"level": "^8.0.0",
"memory-level": "^1.0.0",
"redstone-isomorphic": "1.1.8",
"warp-wasm-metering": "1.0.0",
"safe-stable-stringify": "2.4.1",
"stream-buffers": "^3.0.2",
"unzipit": "^1.4.0",
"vm2": "3.9.11"
"vm2": "3.9.11",
"warp-wasm-metering": "1.0.0"
},
"devDependencies": {
"@types/cheerio": "^0.22.30",
Expand Down
10 changes: 5 additions & 5 deletions src/__tests__/integration/basic/contract-loading.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,20 @@ describe('Testing WarpGatewayContractDefinitionLoader', () => {
it('loads contract definition when cache is empty', async () => {
// Cache is empty
loader.getCache().delete(contract.txId());
expect(await loader.getCache().get({ key: contract.txId(), sortKey: 'cd'})).toBeFalsy();
expect(await loader.getCache().get({ key: contract.txId(), sortKey: 'cd' })).toBeFalsy();

// Load contract
const loaded = await loader.load(contract.txId());
expect(loaded.txId).toBe(contract.txId());
expect(loaded.src).toBe(contractSrc);

// Contract is in its cache
expect(await loader.getCache().get({ key: loaded.txId, sortKey: 'cd'})).toBeTruthy();
expect(await loader.getSrcCache().get({ key: loaded.txId, sortKey: 'cd'})).toBeFalsy();
expect(await loader.getCache().get({ key: loaded.txId, sortKey: 'cd' })).toBeTruthy();
expect(await loader.getSrcCache().get({ key: loaded.txId, sortKey: 'cd' })).toBeFalsy();

// Source is in its cache
expect(await loader.getCache().get({ key: loaded.srcTxId, sortKey: 'src'})).toBeFalsy();
expect(await loader.getSrcCache().get({ key: loaded.srcTxId, sortKey: 'src'})).toBeTruthy();
expect(await loader.getCache().get({ key: loaded.srcTxId, sortKey: 'src' })).toBeFalsy();
expect(await loader.getSrcCache().get({ key: loaded.srcTxId, sortKey: 'src' })).toBeTruthy();
});

it('loads contract definition when cache contains given definition', async () => {
Expand Down

0 comments on commit 773f7c5

Please sign in to comment.