12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- {
- "name": "solidity-typescript-hardhat-template",
- "version": "1.0.0",
- "description": "Basic Hardhat template to get you started with Solidity and TypeScript",
- "scripts": {
- "# ===== 开发工具 ===== #": "",
- "compile": "hardhat compile",
- "test": "hardhat test",
- "coverage": "hardhat coverage",
- "node": "hardhat node",
- "format:check": "prettier --check .",
- "format:write": "prettier --write .",
- "lint:check": "eslint .",
- "lint:fix": "eslint --fix .",
- "sol:format:check": "prettier --check --plugin=prettier-plugin-solidity 'contracts/**/*.sol'",
- "sol:format:write": "prettier --write --plugin=prettier-plugin-solidity 'contracts/**/*.sol'",
- "solhint": "solhint -f table 'contracts/**/*.sol'",
- "": "",
- "# ===== Ignition 部署 ===== #": "",
- "deploy": "hardhat ignition deploy",
- "deploy:local": "npx hardhat ignition deploy ignition/modules/LaunchpadModule.ts --network localhost --reset",
- "deploy:sepolia": "npx hardhat ignition deploy ignition/modules/LaunchpadModule.ts --network sepolia",
- "visualize": "npx hardhat ignition visualize ignition/modules/LaunchpadModule.ts",
- "": "",
- "# ===== 多环境统一调用 ===== #": "",
- "env": "npx ts-node scripts/run-with-env.ts",
- "env:help": "npx ts-node scripts/run-with-env.ts --help",
- "env:quick-help": "echo '多环境调用方式: npm run env <environment> <script>' && echo '例如: npm run env hardhat 01:deploy' && echo '例如: npm run env bsctest 03:init' && echo '例如: npm run env bscmainnet 01:deploy'",
- "": "",
- "# ===== 传统调用方式 (保留兼容性) ===== #": "",
- "01:deploy": "npx ts-node scripts/01-deploy-contracts.ts",
- "02:distribute": "npx ts-node scripts/02-distribute-tokens.ts",
- "03:init": "npx ts-node scripts/03-init-sale.ts",
- "04:contribute-undersubscribed": "npx ts-node scripts/04-test-contributions.ts",
- "04:contribute-oversubscribed": "SCENARIO=1 npx ts-node scripts/04-test-contributions.ts",
- "05:claim": "npx ts-node scripts/05-test-claiming.ts",
- "": "",
- "# ===== 快捷流程 ===== #": "",
- "test:hardhat": "npm run env hardhat 01:deploy && npm run env hardhat 02:distribute && npm run env hardhat 03:init && npm run env hardhat 04:contribute && npm run env hardhat 05:claim",
- "test:bsctest": "npm run env bsctest 01:deploy && npm run env bsctest 02:distribute && npm run env bsctest 03:init && npm run env bsctest 04:contribute && npm run env bsctest 05:claim",
- "test:bscmainnet": "npm run env bscmainnet 01:deploy && npm run env bscmainnet 02:distribute && npm run env bscmainnet 03:init && npm run env bscmainnet 04:contribute && npm run env bscmainnet 05:claim",
- "test:undersubscribed": "npm run 01:deploy && npm run 02:distribute && npm run 03:init && npm run 04:contribute-undersubscribed && npm run 05:claim",
- "test:oversubscribed": "npm run 01:deploy && npm run 02:distribute && npm run 03:init && npm run 04:contribute-oversubscribed && npm run 05:claim",
- "": "",
- "# ===== 简化命令 ===== #": "",
- "04:contribute": "npm run 04:contribute-undersubscribed",
- "04:contribute:over": "npm run 04:contribute-oversubscribed",
- "": "",
- "# ===== 独立工具 ===== #": "",
- "deploy:legacy": "npx ts-node scripts/deploy-bsctest.ts",
- "set-merkle": "npx ts-node scripts/set-merkle-root.ts",
- "": "",
- "# ===== 帮助信息 ===== #": "",
- "help": "echo '🚀 多环境统一调用方式:' && echo 'npm run env <environment> <script>' && echo '' && echo '🌍 可用环境:' && echo ' hardhat - Hardhat本地环境' && echo ' bsctest - BSC测试网环境' && echo ' bscmainnet - BNB主网环境' && echo '' && echo '📜 可用脚本:' && echo ' 01:deploy - 部署合约' && echo ' 02:distribute - 分发代币' && echo ' 03:init - 初始化销售' && echo ' 04:contribute - 测试贡献' && echo ' 05:claim - 测试领取' && echo '' && echo '💡 示例:' && echo ' npm run env hardhat 01:deploy' && echo ' npm run env bsctest 03:init' && echo ' npm run env bscmainnet 01:deploy' && echo '' && echo '🚀 快捷流程:' && echo ' npm run test:hardhat - Hardhat环境完整测试' && echo ' npm run test:bsctest - BSC测试网完整测试' && echo ' npm run test:bscmainnet - BNB主网完整测试'"
- },
- "license": "MIT",
- "dependencies": {
- "@openzeppelin/contracts": "^5.3.0",
- "@openzeppelin/merkle-tree": "^1.0.8",
- "@prb/math": "^4.1.0",
- "abdk-libraries-solidity": "^3.2.0",
- "prb-math": "^2.4.3"
- },
- "devDependencies": {
- "@eslint/eslintrc": "^3.3.1",
- "@eslint/js": "^9.30.0",
- "@nomicfoundation/hardhat-toolbox": "^6.0.0",
- "@nomiclabs/hardhat-solhint": "^4.0.2",
- "@openzeppelin/test-helpers": "^0.5.16",
- "@types/node": "^22.15.34",
- "@typescript-eslint/eslint-plugin": "^8.35.0",
- "@typescript-eslint/parser": "^8.35.0",
- "dotenv": "^17.0.0",
- "eslint": "^9.30.0",
- "eslint-config-prettier": "^10.1.5",
- "eslint-plugin-prettier": "^5.5.1",
- "ethers": "^6.14.4",
- "hardhat": "^2.25.0",
- "prettier": "^3.6.2",
- "prettier-plugin-solidity": "^2.0.0",
- "solhint": "^5.2.0",
- "solidity-coverage": "^0.8.16",
- "typescript": "^5.8.3"
- }
- }
|