Hardhat

Hardhat

Hardhat is an Ethereum development environment for flexible, extensible, and fast smart contract development.

You can use Hardhat to edit, compile, debug, and deploy your smart contracts to Pivotal.


Using Hardhat with Pivotal

To configure Hardhat to deploy smart contracts to Pivotal, update your project’s hardhat.config.ts file by adding Pivotal as a network:

networks: {
   // for mainnet
   "pivotal-mainnet": {
     url: 'https://mainnet.thepivotal.xyz',
     accounts: [process.env.PRIVATE_KEY as string],
     gasPrice: 1000000000,
   },
   // for Sepolia testnet
   "pivotal-sepolia": {
     url: "https://sepolia.thepivotal.xyz",
     accounts: [process.env.PRIVATE_KEY as string],
     gasPrice: 1000000000,
   },
   // for local dev environment
   "pivotal-local": {
     url: "http://localhost:8545",
     accounts: [process.env.PRIVATE_KEY as string],
     gasPrice: 1000000000,
   },
 },
 defaultNetwork: "pivotal-local",

For a complete guide on using Hardhat to deploy contracts on Pivotal, see Deploying a Smart Contract.

Last updated