Skip to content

Phala-Network/phat-contract-examples

Repository files navigation

Phat Contract Examples

This repo provides examples that demonstrate Phala phat contract features.

Environment Preparation

An operating system of macOS or Linux systems like Ubuntu 18.04/20.04 is recommended for the workshop.

  • For macOS users, we recommend to use the Homebrew package manager to install the dependencies
  • For other Linux distribution users, use the package manager with the system like Apt/Yum

The following toolchains are needed:

  • Rust toolchain
    • Install rustup, rustup is the "package manager" of different versions of Rust compilers: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    • This will install rustup and cargo
  • Ink! Contract toolchain
    • Install contract toolchain: cargo install cargo-contract --force
  • Install frontend toolchain
  • Install toml-cli
    • cargo install toml-cli

Check your installation with

$ rustup toolchain list
# stable-x86_64-unknown-linux-gnu (default)

$ cargo --version
# cargo 1.67.1 (8ecd4f20a 2023-01-10)

$ cargo-contract --version
# cargo-contract 2.0.0-unknown-x86_64-unknown-linux-gnu

$ node --version
# v17.5.0

$ yarn --version
# 1.22.17

Build

Run make in the root directory to build all the examples:

git clone https://github.com/Phala-Network/phat-contract-examples.git
make
ls dist/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published