Skip to content

Commit

Permalink
Merge pull request #35 from vechainfoundation/bump-version-for-release
Browse files Browse the repository at this point in the history
Bump version, add readme for clauses
  • Loading branch information
vanja-vechain authored Aug 8, 2023
2 parents 31e4ed1 + 5b15b0c commit 8440340
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "0.1.2",
"version": "0.1.3",
"author": "Electi Consulting LTD",
"license": "See individual packages",
"private": true,
Expand All @@ -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"
Expand Down
20 changes: 20 additions & 0 deletions packages/ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/ethers/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/vechain/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/web3/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
}

0 comments on commit 8440340

Please sign in to comment.