4. Deploying BMC Smart contract
4.1 Deploying BMC Smart contract to Klaytn Testnet
Step 1 - Creating a .env file
touch .envBAOBAB_URL= "Your RPC URL"
PRIVATE_KEY= "your private key copied from metamask wallet"Step 2 - Setting up Hardhat Configs
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
const BAOBAB_URL = process.env.BAOBAB_URL;
const PRIVATE_KEY = process.env.PRIVATE_KEY;
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.18",
defaultNetwork: "hardhat",
networks: {
baobab: {
url: BAOBAB_URL,
accounts: [PRIVATE_KEY],
}
}
};Step 3 - Creating deployment scripts
4.2 Interacting with BMC Smart Contract
Previous3. Testing the contract using scriptsNext5. Building the BMC Frontend with React and Web3Onboard
Last updated
Was this helpful?