@parity/hardhat-polkadot
v0.2.1
Published
Use Hardhat with Polkadot all-in-one plugin
Downloads
12,701
Readme
Build on Polkadot with Hardhat Plugin
Compatibility
- Not compatible with solidity versions lower than
0.8.0.
Installation
Using npm:
$ npm install -D @parity/hardhat-polkadotUsing yarn:
$ yarn add -D @parity/hardhat-polkadot Using pnpm:
$ pnpm add -D @parity/hardhat-polkadot Configuration
- Import the package in the
hardhat.config.tsfile:
...
import "@parity/hardhat-polkadot";
...Create 2 binaries - One for the node and another for the ETH-RPC adapter. See step 1. of Deploying with a Local Node.
Example configuration in
hardhat.config.ts
const config: HardhatUserConfig = {
networks: {
hardhat: {
polkadot: true,
nodeConfig: {
useAnvil: true,
nodeBinaryPath: 'INSERT_PATH_TO_ANVIL_NODE',
},
},
},
};Usage
Get started from a boilerplate.
$ npx hardhat-polkadot initCompile solidity smart contracts for the Polkadot network, creating Polkadot compatible hardhat artifacts.
$ npx hardhat compileTest smart contracts locally. See more in Testing Your Contract.
$ npx hardhat testDeploy smart contracts locally or to a Live Network. See more in Deploying with a Local Node and Deploying to a live Network.
$ npx hardhat ignition deploy ./ignition/modules/deploy.jsRun custom scripts locally or on a Live Network. See more in Interacting with Your Contract.
$ npx hardhat run scripts/interact.jsDocumentation
See Examples
Get started from scratch with How to use Hardhat with Polkadot
Follow tutorial with Test and Deploy with Hardhat
