Skip to content

Solidity Vault smart contract designed to securely manage the deposits and withdrawals of ERC-20 tokens of a user

Notifications You must be signed in to change notification settings

web3batman/solidity-vault-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Setup

  1. Clone the repository:

    git clone [REPOSITORY_URL]
    cd [REPOSITORY_DIRECTORY]
  2. Compile the contract:

    forge build

Running Tests

To run the test suite:

forge test

This command will execute the test cases defined in the test/Vault.t.sol file, ensuring the contract functions as expected.

About

Solidity Vault smart contract designed to securely manage the deposits and withdrawals of ERC-20 tokens of a user

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published