This Solidity smart contract allows users to participate in a presale event by purchasing BTT tokens using ETH or USDC tokens. The contract is developed using Solidity and Foundry.
- Purchase BTT Tokens: Users can buy BTT tokens with ETH or USDC during the presale.
- Presale Duration: The contract supports a specific duration for the presale period.
- Token Allocation: A fixed amount of BTT tokens are available for sale.
- Multiple Payment Options: Users can participate using either ETH or USDC.
- Fund Withdrawal: The collected ETH and USDC can be withdrawn by the contract owner.
- Solidity Version: 0.8.x
- Foundry Framework
-
Clone the repository:
git clone https://github.com/Bryanmankind/BriTech_PreSale.git cd BriTech_PreSale
-
Install dependencies:
forge install
-
Compile the contract:
forge build
-
Run the tests:
forge test
-
Buy Tokens with ETH: Send ETH to the contract address during the presale period to receive BTT tokens. The conversion rate and other details are defined within the contract.
-
Buy Tokens with USDC: Approve the contract to spend your USDC tokens, then call the contract to purchase BTT tokens with USDC.
-
Withdrawal (Owner only): The contract owner can withdraw the collected ETH and USDC after the presale period ends.
briTechPreSale.sol
: Main contract for the BTT token presale, handling purchases, and managing funds.
You can deploy the contract using your preferred Ethereum development environment (e.g., Hardhat, Foundry). Make sure you have the correct ETH and USDC addresses for the chosen network.
This project is licensed under the MIT License.