feat: Add persistent cache for the contract's data #225

This commit is contained in:
ppe
2022-09-27 12:05:47 +02:00
committed by just_ppe
parent 0b9d32f865
commit 70b9d3b8cf
9 changed files with 83 additions and 114 deletions

View File

@@ -17,7 +17,7 @@ async function main() {
});
try {
const warp = WarpFactory.forMainnet({...defaultCacheOptions, inMemory: true});
const warp = WarpFactory.forMainnet({...defaultCacheOptions, inMemory: false});
/*const warp = WarpFactory
.custom(arweave, {
...defaultCacheOptions,
@@ -91,6 +91,8 @@ async function main() {
logger.info("Result", cachedValue.state);
logger.info("Validity", cachedValue.validity);
const result2 = await contract.readState();
} catch (e) {
logger.error(e)