Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.13 KB

Readme.md

File metadata and controls

39 lines (24 loc) · 1.13 KB

Simple Aptos Vault smart contract

Spec

  1. There should be a ‘deposit’, and ‘withdraw’ function that any user can use to deposit and withdraw their own Coins, but no other user's coins

  2. There should also be two additional functions that only admins can call. ‘Pause’ and ‘Unpause’ that prevent/enable new deposits or withdrawals from occurring.

  3. The module should contain testing for functions as well.

  4. The module can accept any ‘Coin’ of any type from any number of users

Setup environment

Install Aptos CLI

Install the Aptos CLI following the Installing Aptos CLI guide.

Create an account and fund it

Create an account and fund it following the Aptos Developer Tutorials guide.

How to run

Compile

Compile the contract

aptos move compile --named-addresses simple_vault=default

Run tests

Run unit tests

aptos move test --named-addresses simple_vault=default