
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@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
We found that @vechain/hardhat-web3 demonstrated a not healthy version release cadence and project activity because the last version was released 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 Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.