Skip to content

trinhvanminh/chat-dapp

Repository files navigation

prepare

  1. Bscscan account to get API_KEY
  2. A Metamask wallet to get PRI_KEY

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

compile, deploy, and verify

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

Get your contract information

https://testnet.bscscan.com/address/0x8D6D12Fe0462Eaf888265091585402f7D0Ed0959

write your DAPP

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published