write a smart contract by hardhat
npm install --save-dev hardhat
npx hardhat
--> Create an empty hardhat.config.js
npm install --save-dev @nomicfoundation/hardhat-toolbox
add this line require("@nomicfoundation/hardhat-toolbox");
to your hardhat.config.js
so that it looks like this:
require("@nomicfoundation/hardhat-toolbox");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.18",
};
and then start to write your own contract
npx hardhat compile
config.networks.network_name --> testnet
npx hardhat run scripts/deploy.js --network testnet
npx hardhat run scripts/deploy.js --network testnet
Deploying contracts with the account: 0x4b60D19788C064B9d019dF65f90D12c8A129d0b5 Account balance: 100000000000000000 Token address: 0x8D6D12Fe0462Eaf888265091585402f7D0Ed0959
npx hardhat verify --network testnet 0x8D6D12Fe0462Eaf888265091585402f7D0Ed0959
https://testnet.bscscan.com/address/0x8D6D12Fe0462Eaf888265091585402f7D0Ed0959
- #code -> get Contract ABI and save it to your DAPP (contractABI)