Requirements:
-
There should be a ‘deposit’, and ‘withdraw’ function that any user can use to deposit and withdraw any whitelisted ERC-20 token on the contract
-
There should also be three additional functions that only admins can call. i) ‘pause’ and ii) ‘unpause’ that prevent/enable new deposits or withdrawals from occurring. iii) whitelistToken that admins call to whitelist tokens
-
The code repository should contain testing for the contract as well. i) The repository should also contain instructions in the readme for running tests
-
The vault should be usable by any number of users
-
How to build
npm install
npx hardhat compile
-
How to deploy contract
npx hardhat run scripts/deploy.ts --network mainnet
-
How to test
npx hardhat test