SrishtiLodhi / Storage_Token

This is a smart contract that allows users to deposit and withdraw ERC20 tokens in a decentralized and secure way.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Token Storage

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.

Getting Started

Prerequisites

To run Token Storage, you will need:

  • Node.js (v12 or higher)
  • Hardhat (v2 or higher)

Installation

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

Usage

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.

Contributing

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.

License

MIT

About

This is a smart contract that allows users to deposit and withdraw ERC20 tokens in a decentralized and secure way.


Languages

Language:JavaScript 59.7%Language:Solidity 40.3%