Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@vechain/hardhat-web3
Advanced tools
A package extending Hardhat Web3 plugin to use a Connex provider.
hardhat.config.js
to require @vechain/hardhat-vechain
and @vechain/hardhat-web3
.networks
to include a vechain
configurationNote: A solo Thor instance should be running for the below configurations to work
hardhat.config.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
},
}
};
hardhat.config.js
with fee delegationFee 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}
.
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}"
}
},
}
};
hardhat.config.js
Multiple network can also be configured to simplify testing and deployments. Networks which are targeting VechainThor
nodes should have vechain
as part of the network name (vechain, vechain_testnet, vechainNode are all valid). Network
names without this requirement won't be preprocessed by the plugin and it is not expected to function properly with Thor
network. Sample configuration:
const {
VECHAIN_URL_SOLO
} = require("@vechain/hardhat-vechain");
require("@vechain/hardhat-web3");
module.exports = {
solidity: {
version: "0.8.17",
},
networks: {
vechain_solo: {
url: VECHAIN_URL_SOLO,
delegate: {
url: "${feeDelegationServiceUrl}",
signer: "${optionalSigner}"
}
},
vechain_mainnet: {
url: "https://mainnet.veblocks.net",
},
}
};
describe("vechain-web3", function() {
it("should be able to get accounts", async function () {
const accounts = await await web3.eth.getAccounts();;
assert.equals(accounts[0], "0xf077b491b355e64048ce21e3a6fc4751eeea77fa");
});
});
FAQs
Hardhat Vechain Web3 Plugin
The npm package @vechain/hardhat-web3 receives a total of 7 weekly downloads. As such, @vechain/hardhat-web3 popularity was classified as not popular.
We found that @vechain/hardhat-web3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.