All Projects → openethereum → Pwasm Repo Contract

openethereum / Pwasm Repo Contract

Licence: mit
Sample repo contract written in Rust and compiled to WebAssembly

Programming Languages

rust
11053 projects

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].