Sample repo contract written in Rust and compiled to WebAssembly
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo
compiled
contract
src
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
LICENSE
README.md
build.sh
rust-toolchain
wasm-install.sh

README.md

Build Status

Description

A simple contract allows to lend some amount of particular ERC20 token (impl by https://github.com/paritytech/pwasm-token-example) for some interest. It demonstrates how WASM contracts can depend on each other and communicate through ABI. It shows also how to mock callee contract in the test environment.

Build prerequisites

Install rust with wasm32-unknown-unknown target:

rustup target add wasm32-unknown-unknown

Install Wasm build util:

cargo install pwasm-utils --bin wasm-build

Build

Run:

./build.sh

Testing

cargo test --manifest-path="contract/Cargo.toml" --features std