Welcome to the official repository for OurToken (OT), an ERC20-compliant token built with Solidity. This token is designed as a simple implementation of the ERC20 standard and can be used as a foundation for various blockchain applications.
OurToken (OT) is an ERC20 token implemented using OpenZeppelin's well-audited libraries to ensure security and reliability. This project demonstrates the basics of deploying and interacting with an ERC20 token contract on the Ethereum blockchain.
- Compliant with ERC20 Standard: Ensures compatibility with wallets, exchanges, and other blockchain tools.
- Initial Supply: The total supply is minted to the deployer's address during contract deployment.
- Customizable Parameters: Token name and symbol are customizable (
OurToken
andOT
in this implementation). - OpenZeppelin Library: Built with the industry-standard OpenZeppelin ERC20 implementation for security and reliability.
To use or develop this project, follow the steps below:
- Install Node.js and npm.
- Install Foundry for smart contract development.
- Install Git for version control.
git clone https://github.com/your-username/our-token.git
cd our-token
Install the required Solidity libraries and dependencies:
npm install
To deploy the OurToken
contract, use any Ethereum development environment (e.g., Remix, Hardhat, or Foundry). For Foundry:
- Update the deployment script with the desired initial supply:
uint256 initialSupply = 1000 * 10 ** 18; // Example: 1,000 tokens with 18 decimals
- Deploy the contract:
forge script script/DeployOurToken.s.sol --rpc-url <YOUR_RPC_URL> --private-key <YOUR_PRIVATE_KEY> --broadcast
Once deployed, you can:
- Check the total supply:
ourToken.totalSupply();
- Transfer tokens:
ourToken.transfer(recipientAddress, amount);
- Approve spending:
ourToken.approve(spenderAddress, amount);
- Check balances:
ourToken.balanceOf(walletAddress);
contracts/
: Contains the Solidity source code.test/
: Contains test scripts for the token.script/
: Deployment and utility scripts.
- Install Foundry.
- Build the project:
forge build
Write and run tests to ensure the token functions as expected.
To run tests, execute:
forge test
Tests include:
- Verifying the initial supply is minted to the deployer.
- Ensuring ERC20 standard functions like
transfer
,approve
, andallowance
work correctly. - Testing edge cases such as exceeding balances or allowances.
This project is licensed under the MIT License. See the LICENSE file for details.
We welcome contributions to improve OurToken. Please:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request with detailed changes.
- OpenZeppelin: For providing secure and reusable smart contract libraries.
- Foundry: For simplifying smart contract development.
For questions or feedback, please open an issue or reach out via [Your Twitter/Email/LinkedIn].
This repository serves as a starting point for developing your custom token. Feel free to customize and expand upon it as needed! 🚀