Create a project

In your project folder, run npx hardhat to create a sample project. Choose to create typescript or javascript projects. Then you should create an .env file in the root to store your private key (wallet from which you need to deploy contracts). After that you need to add the Bahamut API key to the .env file for verifying the contract.

Configure Hardhat

Go to hardhat.config.js file. Add created API key and account PrivateKey to config file like this`

module.exports = {

defaultNetwork: "bahamut",

networks: {

sahara: {

url: "https://rpc1.bahamut.io",

accounts: [process.env.PRIVATE_KEY],

}

},

};

Last updated