Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Phala-Network/phat-contract-examples
https://github.com/Phala-Network/phat-contract-examples
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Phala-Network/phat-contract-examples
- Owner: Phala-Network
- Created: 2022-06-02T01:49:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-22T07:09:20.000Z (11 months ago)
- Last Synced: 2024-05-20T22:47:03.648Z (8 months ago)
- Language: Rust
- Size: 281 KB
- Stars: 7
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-phat-contracts - Phat Contract Examples - boilerplate examples of various Phat Contracts. (Phat Contract Examples / Consumer Contract Examples)
README
# 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/YumThe 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
- Node.js (>=v16), follow the [official tutorial](https://nodejs.org/en/download/package-manager/)
- Yarn (v1): `npm install --global yarn`
- Install toml-cli
- `cargo install toml-cli`Check your installation with
```bash
$ 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:
```bash
git clone https://github.com/Phala-Network/phat-contract-examples.git
make
ls dist/
```