Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@vechain/hardhat-vechain
Advanced tools
A package extending the Hardhat environment with a vechain
field.
The field contains a Hardhat EthereumProvider
enabling requests via Connex.
hardhat.config.js
to include require("@vechain/hardhat-vechain")
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");
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",
},
}
};
vechain
describe("vechain", function() {
it("should be able to send requests", async function () {
const accounts = await vechain.request({ method: "eth_accounts" });
assert.equals(accounts[0], "0xf077b491b355e64048ce21e3a6fc4751eeea77fa");
});
});
FAQs
Hardhat plugin for a VeChain provider
The npm package @vechain/hardhat-vechain receives a total of 222 weekly downloads. As such, @vechain/hardhat-vechain popularity was classified as not popular.
We found that @vechain/hardhat-vechain demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.