Use Rust Crates
Not every Rust crate can be used in Phat Contract. This is because the contracts are running inside the ink! runtime, which is different from operating systems like Linux. In general, there are two requirements:
- The crate is in Pure Rust and does not require pre-compiled libraries.
The pink-extension contains the fundamental functions of the Phat Contract. There are also many useful crates and repositories which make developing Phat Contract easy.
pink-s3 enables you to store data to any storage service with S3-API support. Such storage service providers include:
With its confidentiality and HTTP request support, you can safely store like an ETH account in Phat Contract and use it to operate an Ethereum RPC node to do any cross-chain operations. Such a pattern can be easily extended to support other blockchains.
- phat-contract-examples contains the official examples of Phat Contract. The examples are up-to-date, and may use some not-yet-released features;
- awesome-phat-contracts collects the learning materials and some Phat Contract examples from previous hackathon submissions.
Last modified 5mo ago