
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
hardhat-thor-plugin
Advanced tools
Hardhat plugin for integrating the VeChain Thor protocol.
npm install --save-dev hardhat-thor-plugin
Import the plugin in your hardhat.config.js
:
require("hardhat-thor-plugin");
Or if you are using TypeScript, in your hardhat.config.ts
:
import "hardhat-thor-plugin";
This plugin creates no additional tasks.
This plugins adds an thor
object to the Hardhat Runtime Environment. The object contains the ethers
field which provides the same API as the hardhat-ethers plugin.
This plugin extends the HardhatUserConfig
object with an optional thor
field defined as following:
{
url: string;
privateKeys?: string;
delegate?: string;
}
where url
points to the Thor node, privateKeys
contains private keys that can be used to sign transactions, and delegate
is the url of the gas fee delegator.
This is an example of how to set it in hardhat.config.ts
:
import { HardhatUserConfig } from "hardhat/config";
import "hardhat-thor-plugin";
const config: HardhatUserConfig = {
thor: {
url: 'http://127.0.0.1:8669',
privateKeys: ['0x...']
}
};
export default config;
There are no additional steps you need to take for this plugin to work. Install it and access ethers through the Hardhat Runtime Environment anywhere you need it (tasks, scripts, tests, etc).
For example, you can define task accounts
to print all the accounts defined by the private keys input in hardhat.config.ts
:
import "hardhat-thor-plugin";
task('accounts', 'print', async (_, hre) => {
if(!hre.thor.ethers) {
await hre.thor.connect()
}
if(!hre.thor.ethers) {
throw new Error('Failed to connect')
}
const signers = await hre.thor.ethers.getSigners()
for (const signer of signers) {
console.log(await signer.getAddress())
}
hre.thor.close()
})
Note that you would have to invoke
await hre.thor.connect()
to make hre.thor.ethers
available. The following line
hre.thor.close()
is used to disconnect from the Thor node.
To define a mocha
test:
import { expect } from "chai"
import { thor } from "hardhat"
describe("Test", function () {
before('Connecting', async function () {
await thor.connect()
})
after('Disconnecting', function () {
thor.close()
})
...
})
More examples can be found at repo hardhat-thor-plugin-example
Special thanks to
FAQs
Hardhat plugin for the VeChain Thor protocol
The npm package hardhat-thor-plugin receives a total of 0 weekly downloads. As such, hardhat-thor-plugin popularity was classified as not popular.
We found that hardhat-thor-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.