This project consists of Solidity contracts for creating and managing tokens and an ICO (Initial Coin Offering). Below are the details of the files and instructions on how to use and deploy them.
- Contract Name: USDT
- Description: Defines a USDT token contract that extends the ERC20 standard.
- Functions: Minting, transferring tokens in human-readable format.
- Contract Name: ICOCrowdsale
- Description: Manages an ICO with functionalities for buying tokens, referral rewards, and withdrawals.
- Functions: Buying tokens, checking and claiming referral rewards, withdrawing funds.
- Contract Name: TS (Tether Swap)
- Description: Defines a token contract with functionalities for transferring and burning tokens.
- Functions: Transferring tokens in human-readable format, burning tokens.
- Go to Remix IDE.
- Create a new Solidity file for each contract.
- Copy the content of each
.sol
file from the repository and paste it into the corresponding file in Remix.
- In the "Solidity Compiler" tab, select the compiler version
0.8.0
to match the pragma version used in the code.
- Click the "Compile" button for each contract.
- In the "Deploy & Run Transactions" tab, select the environment (e.g., JavaScript VM, Injected Web3).
- Select the contract you want to deploy and fill in any required constructor parameters.
- Click the "Deploy" button.
- Use the deployed contract interface in Remix to call functions and interact with the contract.
Verifying your smart contract allows others to see the source code and understand how the contract works. Here's how you can verify your contract:
- Deploy the contract on the desired network (e.g., Ethereum Mainnet, Binance Smart Chain).
- Note the contract address after deployment.
- Navigate to the explorer for the network you deployed on (e.g., Etherscan for Ethereum, BscScan for Binance Smart Chain).
- Enter the contract address in the search bar and go to the contract's page.
- Click the "Contract" tab, then click the "Verify and Publish" link.
- Some explorers require the contract code to be flattened (i.e., all dependencies and imports combined into a single file).
- You can flatten the code using the "Solidity Flattener" plugin in Remix.
- In Remix, go to the "Plugins" tab and search for "Solidity Flattener."
- Click "Activate" to enable the plugin.
- Select the contract file you want to flatten.
- Click the "Flatten" button in the Solidity Flattener plugin.
- The flattened code will be displayed. You can copy this code for verification.
- In the explorer's verification page, paste the flattened Solidity code (if required) or the original code.
- Select the compiler version used (e.g.,
0.8.0
). - Fill in the constructor arguments if any were used during deployment.
- Click the "Verify and Publish" button.
- If everything is correct, the contract will be verified, and the source code will be visible on the explorer.
Sometimes, you may need to use tools like ABI Hashex to obtain the ABI (Application Binary Interface) of the contract.
- Navigate to https://abi.hashex.org/.
- Copy the ABI code from your contract (available in Remix after compilation).
- Paste the ABI code into the ABI Hashex tool.
- The tool will provide various information related to the contract, such as function signatures and details.
This project provides a comprehensive solution for token creation, ICO management, and token operations. Follow the above steps to deploy and interact with the contracts using Remix.