LogoLogo
  • Overview
    • Introduction
    • Features
    • Consensus PoSa
  • Building on Bahamut
    • Overview
    • Network Endpoints
    • Deploy Smart Contracts
      • Using Hardhat
        • Create a project
        • Compiling the contract
      • Using Remix
        • Writing a Smart Contract
        • Compiling the contract
    • Deploy a Token
    • Deploy an NFT
    • Explorer
    • Bridge
    • About $FTN
  • Become a validator
    • Step 1: Install the Required Files
    • Step 2: Run the Node
    • Step 3: Set Up Your Wallet
    • Step 4: Generate Validator Keys
    • Step 5: Import Validator Keys and Launch the Validator Client
    • Step 6: Submit Deposit Data
    • Step 7: Set Withdrawal Credentials (BLS to Execution)
  • Validator Checklist
  • Staking Withdrawals
  • Difference on Bahamut Staking vs. Lolik
  • Disclosure
    • Disclaimers
    • Risk Statement
Powered by GitBook
On this page
  1. Building on Bahamut
  2. Deploy Smart Contracts
  3. Using Hardhat

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],

}

},

};

PreviousUsing HardhatNextCompiling the contract

Last updated 7 months ago