Added complete Foundry deployment solution as the fastest and most automated way to deploy smart contracts to BSC Testnet. New Files: - DEPLOY_WITH_FOUNDRY.md: Comprehensive Foundry deployment guide - foundry.toml: Foundry configuration for BSC Testnet - scripts/foundry-deploy.sh: Automated deployment script - scripts/deploy-contracts.ts: Alternative ethers.js deployment Changes: - package.json: Added contracts:deploy, contracts:build scripts - DEPLOYMENT_STATUS.md: Updated to recommend Foundry as Option 1 - README.md: Updated deployment section with Foundry first Features: ✅ One-command deployment: npm run contracts:deploy ✅ Automatic contract linking (setStakingContract) ✅ Saves deployment.json with all addresses ✅ Shows BscScan verification links ✅ Full validation and error handling ✅ No ESM/CommonJS conflicts (unlike Hardhat 3.x) Time to deploy: 20-30 minutes (vs 45 min with Remix) Deployment Options Now: 1. Foundry (RECOMMENDED) - Fastest, automated 2. Remix IDE - Easiest for beginners 3. Hardhat - Advanced, separate environment Addresses user feedback by providing automated deployment solution.
29 lines
711 B
TOML
29 lines
711 B
TOML
# Foundry Configuration for Contract Deployment
|
|
# Foundry is a fast, portable smart contract development toolchain
|
|
# Install: curl -L https://foundry.paradigm.xyz | bash && foundryup
|
|
|
|
[profile.default]
|
|
src = "contracts"
|
|
out = "out"
|
|
libs = ["node_modules"]
|
|
solc_version = "0.8.20"
|
|
|
|
# BSC Testnet Configuration
|
|
[rpc_endpoints]
|
|
bsc_testnet = "https://data-seed-prebsc-1-s1.binance.org:8545/"
|
|
|
|
[etherscan]
|
|
bsc_testnet = { key = "${BSCSCAN_API_KEY}", url = "https://api-testnet.bscscan.com/api" }
|
|
|
|
# Optimizer settings (match Hardhat config)
|
|
optimizer = true
|
|
optimizer_runs = 200
|
|
|
|
# Gas configuration
|
|
gas_limit = 8000000
|
|
gas_price = 10000000000 # 10 gwei
|
|
|
|
# Additional settings
|
|
evm_version = "paris"
|
|
via_ir = false
|