A Hardhat project for deploying the SEQICO ICO smart contract and SEQ token.
This project contains:
npm install
npx hardhat compile
npx hardhat run scripts/deploy.js
npx hardhat run scripts/deploy-DE.js ```
This project uses Hardhat v3 with the following key dependencies:
@nomicfoundation/hardhat-toolbox-mocha-ethers - Hardhat toolbox for v3+@nomicfoundation/hardhat-ethers@^4.0.0 - Ethers integration@nomicfoundation/hardhat-ethers-chai-matchers@^3.0.0 - Chai matchers for testingchai@^5.1.2 - Testing frameworkThe project has been updated to resolve dependency conflicts with the new Hardhat architecture:
@nomicfoundation/hardhat-chai-matchers@2.1.0 to @nomicfoundation/hardhat-ethers-chai-matchers@3.0.0@nomicfoundation/hardhat-toolbox-mocha-ethers@3.0.0 compatible with Hardhat v3buyWithETH(uint256 tokenAmount): Purchase tokens with ETHbuyWithUSDT(uint256 tokenAmount): Purchase tokens with USDTbuyWithUSDC(uint256 tokenAmount): Purchase tokens with USDCsetPricePerTokenETH(uint256 _pricePerTokenETH): Set ETH price per token (owner only, ≥ 3 ETH)setPricePerTokenUSDT(uint256 _pricePerTokenUSDT): Set USDT price per token (owner only, ≥ 3,000,000)setPricePerTokenUSDC(uint256 _pricePerTokenUSDC): Set USDC price per token (owner only, ≥ 3,000,000)setSEQToken(address _seqToken): Update SEQ token address (owner only)withdrawETH(address payable recipient): Withdraw collected ETH (owner only)withdrawERC20(address token, address recipient): Withdraw ERC20 tokens (owner only)All pricing functions enforce a minimum $3 equivalent:
Attempts to set prices below these thresholds will revert with: "Price must be greater than or equal to $3"
The deployment scripts include configurable parameters:
Note: When deploying, ensure all price parameters meet the minimum validation requirements, or the deployment will fail.
MIT