Skip to content

oasislabs/cipher-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cipher Examples

This repo contains a collection of example contracts that run on Cipher, the confidential Oasis Wasm ParaTime.

The Examples

  • vigil - A dead-person's switch that confidentially stores secrets until a (refreshable) set time.

How to use

  1. Grab the Oasis CLI. It can be used to upload, instantiate, and call contracts on Cipher.
  2. Compile a contract using cargo build --release --target wasm32-unknown-unknown
  3. Optionally, optimize the contract using wasm-opt
    TARGET_DIR="target/wasm32-unknown-unknown/release"
    wasm-opt "${TARGET_DIR}/<contract>.wasm" -o "${TARGET_DIR}/<contract>.opt.wasm" -O3 -c
    
  4. Upload the contract: oasis contracts upload "${TARGET_DIR}/<contract>[.opt].wasm"
  5. Instantiate the contract: oasis contracts instantiate <the-instance-id> <yaml-args>
  6. Call the contract: oasis contract call <the-instance-id> <yaml-args>

About

Examples of Cipher smart contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages