Token Storage is a solidity smart contract that manages the storage and withdrawal of ERC20 tokens. The contract defines five different slabs with different capacity levels, and tracks the amount of tokens deposited by each user in each slab.The contract includes a capacity limit, preventing the deposit of tokens that exceed the limit.
To run Token Storage, you will need:
- Node.js (v12 or higher)
- Hardhat (v2 or higher)
Clone this repository.
git clone https://github.com/your-username/token-storage.git
Navigate to the project directory and install the required dependencies.
cd token-storage
npm install
Compile the contracts.
npx hardhat compile
Deploy the contracts to the blockchain.
npx hardhat run scripts/deploy.js --network <network-name>
Replace <network-name> with the name of the network you want to deploy to (e.g., goerli).
Run the tests to ensure the contracts are working correctly.
npx hardhat test --network <network-name>
Replace <network-name> with the name of the network you want to test on.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT