From 5801737238a8b07db5afa19f6a4f2835bc8b4b65 Mon Sep 17 00:00:00 2001 From: ppedziwiatr Date: Thu, 18 Jan 2024 11:59:43 +0100 Subject: [PATCH] v1.4.33 --- package.json | 2 +- .../integration/basic/contract-loading.test.ts | 7 +++++-- .../arweave-sequenced-interaction-loader.test.ts | 16 ++++++++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 453a8410..f1d8fc01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "warp-contracts", - "version": "1.4.32", + "version": "1.4.33", "description": "An implementation of the SmartWeave smart contract protocol.", "types": "./lib/types/index.d.ts", "main": "./lib/cjs/index.js", diff --git a/src/__tests__/integration/basic/contract-loading.test.ts b/src/__tests__/integration/basic/contract-loading.test.ts index da36707f..eb87f530 100644 --- a/src/__tests__/integration/basic/contract-loading.test.ts +++ b/src/__tests__/integration/basic/contract-loading.test.ts @@ -13,7 +13,7 @@ import { WarpGatewayContractDefinitionLoader } from '../../../core/modules/impl/ import { DefaultEvaluationOptions } from '../../../core/modules/StateEvaluator'; import { LexicographicalInteractionsSorter } from '../../../core/modules/impl/LexicographicalInteractionsSorter'; import { DeployPlugin } from 'warp-contracts-plugin-deploy'; -import { CacheableContractDefinitionLoader } from "../../../core/modules/impl/CacheableContractDefinitionLoader"; +import { CacheableContractDefinitionLoader } from '../../../core/modules/impl/CacheableContractDefinitionLoader'; interface ExampleContractState { counter: number; @@ -44,7 +44,10 @@ describe('Testing WarpGatewayContractDefinitionLoader', () => { const { arweave } = warp; - loader = new CacheableContractDefinitionLoader(new WarpGatewayContractDefinitionLoader(arweave, 'local'), 'local', { ...defaultCacheOptions, inMemory: true }); + loader = new CacheableContractDefinitionLoader(new WarpGatewayContractDefinitionLoader(arweave, 'local'), 'local', { + ...defaultCacheOptions, + inMemory: true + }); loader.warp = warp; sorter = new LexicographicalInteractionsSorter(arweave); diff --git a/src/__tests__/regression/arweave-sequenced-interaction-loader.test.ts b/src/__tests__/regression/arweave-sequenced-interaction-loader.test.ts index 80167e1d..00322374 100644 --- a/src/__tests__/regression/arweave-sequenced-interaction-loader.test.ts +++ b/src/__tests__/regression/arweave-sequenced-interaction-loader.test.ts @@ -2,12 +2,12 @@ import { ArweaveGatewayBundledContractDefinitionLoader } from '../../core/module import { ArweaveGatewayBundledInteractionLoader } from '../../core/modules/impl/ArweaveGatewayBundledInteractionLoader'; import { SourceType, WarpGatewayInteractionsLoader } from '../../core/modules/impl/WarpGatewayInteractionsLoader'; import { EvaluationOptions } from '../../core/modules/StateEvaluator'; -import { defaultCacheOptions, WarpFactory } from "../../core/WarpFactory"; +import { defaultCacheOptions, WarpFactory } from '../../core/WarpFactory'; import { LoggerFactory } from '../../logging/LoggerFactory'; import { WarpGatewayContractDefinitionLoader } from '../../core/modules/impl/WarpGatewayContractDefinitionLoader'; import stringify from 'safe-stable-stringify'; import Arweave from 'arweave/node/common'; -import { CacheableContractDefinitionLoader } from "../../core/modules/impl/CacheableContractDefinitionLoader"; +import { CacheableContractDefinitionLoader } from '../../core/modules/impl/CacheableContractDefinitionLoader'; const EXAMPLE_CONTRACT_TX_ID = 'T8Fakv0Sol6ALQ4Mt6FTxEJVDJWT-HDUmcI3qIA49U4'; const EXAMPLE_CONTRACT_SRC_TX_ID = 'QEIweYIpdMSer_E33VreYzmuTIx33FQ4Sq32XJqlLQw'; @@ -32,7 +32,11 @@ describe('Arweave Gateway interaction loader', () => { it('should load contract definition', async () => { const warp = WarpFactory.forMainnet(); - const wrLoader = new CacheableContractDefinitionLoader(new WarpGatewayContractDefinitionLoader(warp.arweave, 'local'), 'local', { ...defaultCacheOptions, inMemory: true }) + const wrLoader = new CacheableContractDefinitionLoader( + new WarpGatewayContractDefinitionLoader(warp.arweave, 'local'), + 'local', + { ...defaultCacheOptions, inMemory: true } + ); wrLoader.warp = warp; const arLoader = new ArweaveGatewayBundledContractDefinitionLoader(warp.environment); @@ -86,7 +90,11 @@ describe('Arweave Gateway interaction loader', () => { const arweave = Arweave.init({ host: 'arweave.net', port: 443, protocol: 'https' }); const arLoader = new ArweaveGatewayBundledInteractionLoader(arweave, 'mainnet'); - const wrLoader = new CacheableContractDefinitionLoader(new WarpGatewayContractDefinitionLoader(arweave, 'local'), 'local', { ...defaultCacheOptions, inMemory: true }); + const wrLoader = new CacheableContractDefinitionLoader( + new WarpGatewayContractDefinitionLoader(arweave, 'local'), + 'local', + { ...defaultCacheOptions, inMemory: true } + ); const withArLoader = WarpFactory.custom(arweave, { inMemory: true, dbLocation: '' }, 'mainnet') .setInteractionsLoader(arLoader) .setDefinitionLoader(wrLoader)