Skip to content

r2moon/aptos-simple-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages