From 5b15b0c4d2604adb31ef8be6e1a556c814dc8d98 Mon Sep 17 00:00:00 2001 From: vanjatomic Date: Tue, 8 Aug 2023 16:21:21 +0200 Subject: [PATCH] Bump version, add readme for clauses --- package.json | 8 ++++---- packages/ethers/README.md | 20 ++++++++++++++++++++ packages/ethers/package.json | 6 +++--- packages/vechain/package.json | 2 +- packages/web3/package.json | 6 +++--- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 1578dda..9df9b95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "0.1.2", + "version": "0.1.3", "author": "Electi Consulting LTD", "license": "See individual packages", "private": true, @@ -20,9 +20,9 @@ "@nomiclabs/hardhat-web3": "^2.0.0", "@nomiclabs/hardhat-ethers": "^2.2.2", "@types/debug": "^4.1.8", - "@vechain/hardhat-vechain": "^0.1.2", - "@vechain/hardhat-ethers": "^0.1.2", - "@vechain/hardhat-web3": "^0.1.2", + "@vechain/hardhat-vechain": "^0.1.3", + "@vechain/hardhat-ethers": "^0.1.3", + "@vechain/hardhat-web3": "^0.1.3", "@types/jest": "^29.5.2", "ts-jest": "^29.1.0", "jest": "^29.5.0" diff --git a/packages/ethers/README.md b/packages/ethers/README.md index 1405820..d8ca944 100644 --- a/packages/ethers/README.md +++ b/packages/ethers/README.md @@ -83,6 +83,26 @@ module.exports = { }; ``` +## Clauses support + +Vechain Thor network supports sending multiple clauses as part of one transaction. Clauses are then executed atomically on +a chain. Hardhat plugin supports Vechain tx construction with multiple clauses. Example code: + +```js +const clauseBuilder = new ClausesBuilder(baseContract); +const tx = await clauseBuilder.withClause({ + args: [1], + abi: JSON.stringify([{ type: 'function', name: 'method1'}] ), + method: 'method1' +}).withClause({ + args: [2], + abi: JSON.stringify([{ type: 'function', name: 'method2'}] ), + method: 'method2' +}).send() +``` + +Where `baseContract` is an instance of a deployed contract. + ## Testing - Use Hardhat Ethers as usual ```js diff --git a/packages/ethers/package.json b/packages/ethers/package.json index 7391a08..ba09bf2 100644 --- a/packages/ethers/package.json +++ b/packages/ethers/package.json @@ -1,6 +1,6 @@ { "name": "@vechain/hardhat-ethers", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "description": "Hardhat Vechain Ethers Plugin", "repository": "github:vechainfoundation/hardhat-plugins", @@ -29,12 +29,12 @@ "ethers": "^5.0.0", "hardhat": "^2.12.7", "@nomiclabs/hardhat-ethers": "^2.2.2", - "@vechain/hardhat-vechain": "^0.1.2" + "@vechain/hardhat-vechain": "^0.1.3" }, "peerDependencies": { "ethers": "^5.0.0", "hardhat": "^2.12.7", "@nomiclabs/hardhat-ethers": "^2.2.2", - "@vechain/hardhat-vechain": "^0.1.2" + "@vechain/hardhat-vechain": "^0.1.3" } } \ No newline at end of file diff --git a/packages/vechain/package.json b/packages/vechain/package.json index 7ae5f7d..8022958 100644 --- a/packages/vechain/package.json +++ b/packages/vechain/package.json @@ -1,6 +1,6 @@ { "name": "@vechain/hardhat-vechain", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "description": "Hardhat plugin for a VeChain provider", "homepage": "https://github.com/vechainfoundation/hardhat-plugins", diff --git a/packages/web3/package.json b/packages/web3/package.json index 94bac37..5a09fd4 100644 --- a/packages/web3/package.json +++ b/packages/web3/package.json @@ -1,6 +1,6 @@ { "name": "@vechain/hardhat-web3", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "description": "Hardhat Vechain Web3 Plugin", "repository": "github:vechainfoundation/hardhat-plugins", @@ -29,12 +29,12 @@ "web3": "^1.0.0-beta.36", "hardhat": "^2.12.7", "@nomiclabs/hardhat-web3": "^2.0.0", - "@vechain/hardhat-vechain": "^0.1.2" + "@vechain/hardhat-vechain": "^0.1.3" }, "peerDependencies": { "web3": "^1.0.0-beta.36", "hardhat": "^2.12.7", "@nomiclabs/hardhat-web3": "^2.0.0", - "@vechain/hardhat-vechain": "^0.1.2" + "@vechain/hardhat-vechain": "^0.1.3" } } \ No newline at end of file