This project is an ERC20 token implementation based on the OpenZeppelin library. The SciToken
is a simple, fungible cryptocurrency that can be deployed for governance purposes within the framework of a DAO. The token features an initial supply mechanism as well as deployment and testing scripts that facilitate development and testing workflows using Foundry.
- ERC20 Token: Implements the ERC20 token standard.
- Initial Minting: Tokens are initially minted to the deployer's address.
- Script for Deployment: Easy deployment of the contract on Ethereum networks.
- Comprehensive Testing: Includes tests for various token functionalities such as transfers and allowances using Foundry's test environment.
- Node.js (recommended version 14.x or higher)
- Foundry
- Install Foundry using the official installation guide.
To set up the development environment for SciToken, follow these steps:
- Clone the repository:
git clone https://github.com/yourrepository/SciToken.git cd SciToken
- Install Foundry:
curl -L https://foundry.paradigm.xyz | bash foundryup
- Compile the contracts
forge build
To deploy the SciToken contract to a local testnet, run:
forge script DeploySciToken --fork-url <RPC_URL> --private-key <YOUR_PRIVATE_KEY> --broadcast
Replace <RPC_URL> and <YOUR_PRIVATE_KEY> with your Ethereum node RPC URL and private key, respectively.
Execute the tests to ensure the contract operates correctly:
forge test
Minting: Tokens are initially minted to the deployer's address with the ability to transfer to other addresses.
Transfers: Standard ERC20 transfer capabilities.
Approvals and Allowances: Supports ERC20 approve and transferFrom functionalities to enable delegated spending.
- SciToken.sol: Implementation of the SciToken, an ERC20 token.
- DeploySciToken.s.sol: Script for deploying SciToken on Ethereum networks.
- SciTokenTest.sol: Tests for basic functionalities of SciToken.
Contributions to the SciToken project are welcome. Please ensure that your code adheres to the existing code standards and include tests for new features.
This project is licensed under the MIT License - see the LICENSE file for details.