https://github.com/web3batman/solidity-vault-contract
Solidity Vault smart contract designed to securely manage the deposits and withdrawals of ERC-20 tokens of a user
https://github.com/web3batman/solidity-vault-contract
solidity
Last synced: 3 months ago
JSON representation
Solidity Vault smart contract designed to securely manage the deposits and withdrawals of ERC-20 tokens of a user
- Host: GitHub
- URL: https://github.com/web3batman/solidity-vault-contract
- Owner: web3batman
- Created: 2024-05-09T07:53:05.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-26T15:14:10.000Z (about 2 years ago)
- Last Synced: 2025-10-03T14:48:34.489Z (8 months ago)
- Topics: solidity
- Language: Solidity
- Homepage:
- Size: 7.81 KB
- Stars: 10
- Watchers: 0
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vault Contract
## Overview
The Vault contract is a Solidity smart contract designed to securely manage the deposits and withdrawals of ERC-20 tokens of a user. It includes features like whitelisting of tokens, pausing and unpausing of deposit/withdrawal functions, and access control for administrative functions.
## Features
- **Deposit and Withdrawal**: Users can deposit and withdraw whitelisted ERC-20 tokens deposited by them.
- **Token Whitelisting**: Admin can whitelist tokens that are allowed for deposit.
- **Pause/Unpause**: Admin can pause or unpause the contract, restricting or allowing deposits and withdrawals.
- **Access Control**: Only admin can pause/unpause the contract and whitelist tokens.
## Requirements
- [Solidity](https://soliditylang.org/)
- [Foundry](https://getfoundry.sh/)
## Setup
1. **Clone the repository**:
```bash
git clone [REPOSITORY_URL]
cd [REPOSITORY_DIRECTORY]
```
2. **Compile the contract**:
```bash
forge build
```
## Running Tests
To run the test suite:
```bash
forge test
```
This command will execute the test cases defined in the `test/Vault.t.sol` file, ensuring the contract functions as expected.