From 4b3f2a81ab934599bb24720f30bddfebbd9e683c Mon Sep 17 00:00:00 2001 From: ppedziwiatr Date: Mon, 4 Apr 2022 10:45:51 +0200 Subject: [PATCH] chore: restoring node req. --- package.json | 5 ++++- tools/bundle.ts | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 76a3297..cbc9d26 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,14 @@ { "name": "redstone-smartweave", - "version": "0.4.55", + "version": "0.4.56", "description": "An implementation of the SmartWeave smart contract protocol.", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", "types": "./lib/types/index.d.ts", "sideEffects": false, + "engines": { + "node": ">=16.5" + }, "scripts": { "build:cjs": "tsc -b tsconfig.json && tsc-alias -p tsconfig.json", "build:esm": "tsc -b tsconfig.esm.json && tsc-alias -p tsconfig.esm.json", diff --git a/tools/bundle.ts b/tools/bundle.ts index b906682..6f48289 100644 --- a/tools/bundle.ts +++ b/tools/bundle.ts @@ -40,25 +40,28 @@ async function main() { const jwk = readJSON('../redstone-node/.secrets/redstone-jwk.json'); // connecting to a given contract const token = smartweave - .contract("KT45jaf8n9UwgkEareWxPgLJk4oMWpI5NODgYVIF1fY") + .contract("-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ") .setEvaluationOptions({ + useVM2: true, sequencerAddress: "https://gateway.redstone.finance/" }) // connecting wallet to a contract. It is required before performing any "writeInteraction" // calling "writeInteraction" without connecting to a wallet first will cause a runtime error. .connect(jwk); - //const result1 = await token.readState(); + const result1 = await token.readState(); + + console.log(token.lastReadStateStats()); //logger.info("Amount of computed interactions before 'bundleInteraction':", Object.keys(result1.validity).length); - for (let i = 0 ; i < 100 ; i++) { + /*for (let i = 0 ; i < 100 ; i++) { console.log(`mint ${i + 1}`); const result = await token.bundleInteraction({ function: "mint" }); await sleep(1000); - } + }*/