Skip to content

Commit

Permalink
Add readme section, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
vanja-vechain committed Jun 9, 2023
1 parent af96959 commit cb79465
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 13 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.0.0",
"version": "0.0.3",
"author": "Electi Consulting LTD",
"license": "See individual packages",
"private": true,
Expand All @@ -17,9 +17,9 @@
"web3": "^1.0.0-beta.36",
"mocha": "^10.2.0",
"@types/mocha": "^10.0.1",
"@vechain/hardhat-vechain": "0.0.1",
"@vechain/hardhat-ethers": "0.0.1",
"@vechain/hardhat-web3": "0.0.1"
"@vechain/hardhat-vechain": "0.0.3",
"@vechain/hardhat-ethers": "0.0.3",
"@vechain/hardhat-web3": "0.0.3"
},
"peerDependencies": {
"hardhat": "^2.12.7"
Expand Down
26 changes: 26 additions & 0 deletions packages/ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,32 @@ module.exports = {
};
```

## Sample `hardhat.config.js` with fee delegation

Fee delegation can be configured by providing optional ```delegate``` config which has required ``url`` and optional ``signer`` field. Url needs to point to delegation a valid
delegation service, for example ```https://sponsor-testnet.vechain.energy/by/${projectId}```.
```js
const {
VECHAIN_URL_SOLO
} = require("@vechain/hardhat-vechain");
require("@vechain/hardhat-web3");

module.exports = {
solidity: {
version: "0.8.17",
},
networks: {
vechain: {
url: VECHAIN_URL_SOLO,
delegate: {
url: "${feeDelegationServiceUrl}",
signer: "${optionalSigner}"
}
},
}
};
```

## 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.0.2",
"version": "0.0.3",
"license": "MIT",
"description": "Hardhat Vechain Ethers Plugin",
"repository": "github:vechainfoundation/hardhat-plugins",
Expand All @@ -18,13 +18,13 @@
"ethers": "^5.0.0",
"hardhat": "^2.12.7",
"@nomiclabs/hardhat-ethers": "^2.2.2",
"@vechain/hardhat-vechain": "^0.0.2"
"@vechain/hardhat-vechain": "^0.0.3"
},
"peerDependencies": {
"ethers": "^5.0.0",
"hardhat": "^2.12.7",
"@nomiclabs/hardhat-ethers": "^2.2.2",
"@vechain/hardhat-vechain": "^0.0.2"
"@vechain/hardhat-vechain": "^0.0.3"
}
}

28 changes: 27 additions & 1 deletion packages/vechain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,38 @@ module.exports = {
};
```

## Sample `hardhat.config.js` with fee delegation

Fee delegation can be configured by providing optional ```delegate``` config which has required ``url`` and optional ``signer`` field. Url needs to point to delegation a valid
delegation service, for example ```https://sponsor-testnet.vechain.energy/by/${projectId}```.
```js
const {
VECHAIN_URL_SOLO
} = require("@vechain/hardhat-vechain");
require("@vechain/hardhat-web3");

module.exports = {
solidity: {
version: "0.8.17",
},
networks: {
vechain: {
url: VECHAIN_URL_SOLO,
delegate: {
url: "${feeDelegationServiceUrl}",
signer: "${optionalSigner}"
}
},
}
};
```

## Testing
- Access the provider using the globally available `vechain`
```js
describe("vechain", function() {
it("should be able to send requests", async function () {
const accounts = await vechain.request(method: "eth_accounts");
const accounts = await vechain.request({ method: "eth_accounts" });
assert.equals(accounts[0], "0xf077b491b355e64048ce21e3a6fc4751eeea77fa");
});
});
Expand Down
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.0.2",
"version": "0.0.3",
"description": "Hardhat plugin for a VeChain provider",
"homepage": "https://github.com/vechainfoundation/hardhat-plugins",
"repository": "github:vechainfoundation/hardhat-plugins",
Expand Down
26 changes: 26 additions & 0 deletions packages/web3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,32 @@ module.exports = {
};
```

## Sample `hardhat.config.js` with fee delegation

Fee delegation can be configured by providing optional ```delegate``` config which has required ``url`` and optional ``signer`` field. Url needs to point to delegation a valid
delegation service, for example ```https://sponsor-testnet.vechain.energy/by/${projectId}```.
```js
const {
VECHAIN_URL_SOLO
} = require("@vechain/hardhat-vechain");
require("@vechain/hardhat-web3");

module.exports = {
solidity: {
version: "0.8.17",
},
networks: {
vechain: {
url: VECHAIN_URL_SOLO,
delegate: {
url: "${feeDelegationServiceUrl}",
signer: "${optionalSigner}"
}
},
}
};
```

## Testing
- Use Hardhat web3 as usual
```js
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.0.2",
"version": "0.0.3",
"description": "Hardhat Vechain Web3 Plugin",
"repository": "github:vechainfoundation/hardhat-plugins",
"author": "Electi Consulting LTD",
Expand All @@ -23,12 +23,12 @@
"web3": "^1.0.0-beta.36",
"hardhat": "^2.12.7",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@vechain/hardhat-vechain": "^0.0.2"
"@vechain/hardhat-vechain": "^0.0.3"
},
"peerDependencies": {
"web3": "^1.0.0-beta.36",
"hardhat": "^2.12.7",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@vechain/hardhat-vechain": "^0.0.2"
"@vechain/hardhat-vechain": "^0.0.3"
}
}
14 changes: 13 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,13 @@
"@types/node" "*"
"@types/responselike" "^1.0.0"

"@types/debug@^4.1.7":
version "4.1.8"
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.8.tgz#cef723a5d0a90990313faec2d1e22aee5eecb317"
integrity sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==
dependencies:
"@types/ms" "*"

"@types/http-cache-semantics@*":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812"
Expand All @@ -766,6 +773,11 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.1.tgz#2f4f65bb08bc368ac39c96da7b2f09140b26851b"
integrity sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==

"@types/ms@*":
version "0.7.31"
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==

"@types/node@*":
version "18.13.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850"
Expand Down Expand Up @@ -1551,7 +1563,7 @@ [email protected], debug@^2.2.0:
dependencies:
ms "2.0.0"

debug@4, [email protected], debug@^4.1.1, debug@^4.3.3:
debug@4, [email protected], debug@^4.1.1, debug@^4.3.3, debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
Expand Down

0 comments on commit cb79465

Please sign in to comment.