Smart Contract Setup: - Add hardhat.config.ts for BSC testnet and mainnet deployment - Configured for Solidity 0.8.20 - Optimizer enabled (200 runs) - BSC testnet and mainnet network configurations - BscScan verification integration Deployment Scripts: - Add deploy-token.ts for IMMBOT token deployment - Deploy ERC20 token with 1 billion supply - Automatic tax configuration (2% tax) - Built-in burn and liquidity mechanics - Post-deployment verification instructions - Add deploy-staking.ts for staking contract deployment - Deploy staking contract with 4 tiers - Automatic tier configuration (5%-50% APY) - Integration with token contract - Set staking contract on token automatically - Add interact-contracts.ts for contract interaction - View token and staking information - Check user balances and stakes - View pending rewards - Display available actions - Add setup-contracts.sh for dependency installation - Install Hardhat and OpenZeppelin contracts - Install verification and testing tools - Setup TypeChain for type generation Documentation: - Add contracts/README.md with comprehensive guide - Contract overview and features - Setup and installation instructions - Deployment procedures (testnet and mainnet) - Contract verification guide - Interaction examples - Security considerations - Troubleshooting section - Gas optimization tips Environment Updates: - Add contract deployment variables to .env.example - BSCSCAN_API_KEY for verification - BSC_TESTNET_RPC and BSC_MAINNET_RPC - STAKING_CONTRACT_ADDRESS placeholder This infrastructure enables complete smart contract deployment and interaction for the IMMBOT token and staking ecosystem.
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import { HardhatUserConfig } from "hardhat/config";
|
|
import "@nomicfoundation/hardhat-toolbox";
|
|
import "dotenv/config";
|
|
|
|
const config: HardhatUserConfig = {
|
|
solidity: {
|
|
version: "0.8.20",
|
|
settings: {
|
|
optimizer: {
|
|
enabled: true,
|
|
runs: 200,
|
|
},
|
|
},
|
|
},
|
|
networks: {
|
|
// BSC Testnet
|
|
bscTestnet: {
|
|
url: process.env.BSC_TESTNET_RPC || "https://data-seed-prebsc-1-s1.binance.org:8545",
|
|
chainId: 97,
|
|
accounts: process.env.WALLET_PRIVATE_KEY ? [process.env.WALLET_PRIVATE_KEY] : [],
|
|
gasPrice: 10000000000, // 10 gwei
|
|
},
|
|
// BSC Mainnet
|
|
bscMainnet: {
|
|
url: process.env.BSC_MAINNET_RPC || "https://bsc-dataseed.binance.org/",
|
|
chainId: 56,
|
|
accounts: process.env.WALLET_PRIVATE_KEY ? [process.env.WALLET_PRIVATE_KEY] : [],
|
|
gasPrice: 5000000000, // 5 gwei
|
|
},
|
|
// Localhost (for testing)
|
|
hardhat: {
|
|
chainId: 31337,
|
|
},
|
|
},
|
|
etherscan: {
|
|
apiKey: {
|
|
bsc: process.env.BSCSCAN_API_KEY || "",
|
|
bscTestnet: process.env.BSCSCAN_API_KEY || "",
|
|
},
|
|
},
|
|
paths: {
|
|
sources: "./contracts",
|
|
tests: "./test/contracts",
|
|
cache: "./cache",
|
|
artifacts: "./artifacts",
|
|
},
|
|
};
|
|
|
|
export default config;
|