Giter VIP home page Giter VIP logo

awesome-phat-contracts's Introduction

Awesome Phat Contracts Awesome

Built with ink!

A curated list of awesome projects and resources relating to Phala's Phat Contracts.

Phala Network

🛑 Hey Now! Hold Up

If you're a dive in 🕳️ first type of builder, 🌪️ ENTER THE FUNNEL to start building your first cross-chain ⛓ dApp on Phat Contract with your choice of EVM chain.

Phat Contract is the program running off-chain on Phala Network that developers can use to implement a broad range of features for their dApps.

By combining on-chain verification with off-chain capabilities, Phat Contracts brings a plethora of features to decentralized applications.

  1. Connect your smart contract anywhere
    • Universal compatibility across EVM and Substrate Blockchains means you can easily connect Phat Contracts to any blockchain without the need for a bridge, expanding your Smart Contract’s capabilities.
  2. Gain access to the internet
    • Send HTTP/HTTPS requests directly from your Smart Contracts enabling seamless integration with any Web2 APIs, unlocking a world of possibilities for your dApps.
  3. Run arbitrarily Complex Logic
    • Execute intense off-chain computations in real-time while bypassing transaction fees and network latency, enhancing your dApps' functionality and user experience at minimum cost.
  4. Computation is always verifiable
    • Complex computation on Phala Network is provided by a Decentralized Network: Secure, Robust, and Trustworthy Infrastructure.

Phat Contract is 100% compatible with Substrate’s pallet-contracts. It fully supports the unmodified ink! smart contracts. Therefore, you can still stick to your favorite toolchain including cargo-contract, @polkadot/contract-api, and the Polkadot.js Extension.

Contents

Resources

  • Phala Network Docs - Phala Network documentation.
  • Phala Builders Program - The Phala Builders Program provides funding, guidance, and support to developers that want to build high-value projects with Phat Contract, and add functionality to Phat Contract itself.
  • Rust Crates for pink
  • Pink Extension
  • Learning
    • Phat Hello Tutorial - tutorial to demonstrate how to use Phat Contract’s HTTP request capability to query an ETH address via Etherscan API. For the video tutorial checkout Phala Phat Hello Tutorial.
    • Frontend SDK - frontend SDK for building UI for Phala Phat Contracts.
    • Ink! Smart Contracts Docs - ink! is an eDSL to write smart contracts in Rust for blockchains built on the Substrate framework. ink! contracts are compiled to WebAssembly.
    • Awesome Ink! - A curated list of awesome projects related to Parity's ink!.
  • Articles/Blogs/Papers
    • Substrate Off-Chain Workers - An post on secure and efficient computing-intensive tasks written by Phil Lucsok in 2019.
    • Phala's Phat Contract - A Medium post about the introduction of off-chain computation to smart contracts written by Phala's Lead Researcher Dr. Shelven Zhou.
    • Off-chaining Models and Approaches to Off-chain Computations - A paper written by Jacob Eberhardt & Jonathan Heiss describing off-chaining models using verifiable off-chain computation (zkSNARKS, Bulletproofs, zkSTARKS), enclave based off-chain computation (TEEs), secure multiparty computation based off-chaining (sMPC) & incentive-driven off-chain computing (IOC).
  • Tools
    • Phala Contract's UI - UI frontend to deploy Phat Contracts.
    • Phala Swanky Integration - Phala Swanky integration for an all-in-one development environment for WASM ink-based Phat Contracts.
    • DevPHAse - Run a Phala local testnet and compile/test Phat Contracts in a development environment.
  • Service Limits

Phat Bricks 🧱

  • Phat Bricks UI - Phat Bricks offers the ability to deploy applications without the need for coding. Phat Contract provides pre-defined components (Phat Bricks), and customizable templates (Blueprints) to effortlessly construct functional and efficient dApps.
  • LensAPI Oracle - LensAPI Oracle blueprint that allows for Consumer Contract on Polygon to trustlessly get data from the Lens API.
    • DeveloperDAO Workshop - DeveloperDAO Workshop with hashwarlock on how to deploy a LensAPI Oracle, connect a Consumer Contract on Polygon to the LensAPI Oracle, and finally connecting a UI to the Consumer Contract.
    • LensAPI Oracle Consumer Contract Template - LensAPI Oracle Consumer Contract template that connects to the LensAPI Oracle blueprint deployed on Phala Network.
    • How to Test Your First Function Locally - Learn how to test your custom JS function locally before deploying your LensAPI Oracle to PoC5 testnet or mainnet.
  • Phala Blueprint Proposals - Repo to submit issues and new proposals for blueprints to be added to the Phat Bricks UI.

Consumer Contract Examples

  • Lens Treasure Hunt - Example of a Consumer Contract for the LensAPI Oracle to create a treasure hunt based on Lens Profiles.

dApps

  • PrivaDEX - PrivaDEX is the cross-chain DEX aggregator native to Polkadot. As an example, you can swap from USDC (Wormhole) on Moonbeam to ARSW on Astar in one click.

Phat Contract Examples

  • Phat Bricks - Phat Bricks offers the ability to deploy applications without the need for coding. Phat Contract provides pre-defined components (Phat Bricks), and customizable templates (Blueprints) to effortlessly construct functional and efficient dApps.
  • Phat Offchain Rollup - Phat Offchain Rollup is an SDK designed to simplify the process of connecting Phat Contracts to a wide range of blockchains. Its primary focus is on providing transactional and atomic cross-blockchain operations for seamless integration and interaction.
  • Phat Contract Tutorials by GuiGuo12358 - Phala tutorials written by community member and technical ambassador GuiGuo12358
  • Deprecated Examples
    • Sub0 2022 Oracale & Off-Chain Rollup Workshop - an upgrade from the Oracle Workshop that implements the off-chain rollup pallet in the Phala testnet chain for the Phat Contract to respond with price feed information from the Phat Contracts to the Phala testnet chain.
    • Oracle Workshop - an extensive workshop demonstrating how to write an Oracle with Phat Contracts.
    • Phat Contract Examples - boilerplate examples of various Phat Contracts.
    • Phat Storage - how to connect Phala's Phat Contract to external storage services, both centralized (Amazon s3) and decentralized (Arweave/Filecoin through 4everland, Storj, Filebase).
    • ETH Holder - derive an ETH ECDSA account in the Phat Contract then fund the account w/ ETH and send a raw transaction to a configured RPC Node with the eth_sendRawTransaction RPC method.
    • Phat RPC - a Phat Contract that can interact with OnFinality RPC nodes through HTTPS requests.
    • Secret File - secret file implementation using Phat Contracts.
    • Github Attestation - a workshop demonstrating how to write a Phat Contract with its HTTP request capability on Phala.
    • X-Chain HTTP Request: Subgraph NounsDAO - demonstrate how to make a HTTPS request to an indexing service Subgraph to query information about the NounsDAO collection in a Phat Contract.
    • Roshambo - a game of Roshambo (Rock, Paper, Scissors) in a Phat Contract.

Ink Smart Contract Examples

Past Hackathon dApps

Note These are outdated versions that do not reflect the current native Phat Contract development stack. Let these serve as ideas of what is possible.

  • PhaPass - a password manager on Phala
  • Darkpool DEX - a proof-of-concept Darkpool Decentralized Exchange as a dApp/smart contract on top of Phala.
  • RMRK Ghost Auction - a simple ghost auction that would allow RMRK NFT artists to run automated auctions while not available on Singular using HTTP requests on Phala Phat Contracts.
  • SecretMD - a rich markdown editor which allows users to store and share any plain markdown file onto a distributed and confidential Phala blockchain in Polkadot ecosystem.
  • Phat 2FA - an application achieves two-factor authentication on chain, without leaking any sensitive data.
  • Privacy Preserving Voting - a simple account based voting mechanism using Phat Contracts.

awesome-phat-contracts's People

Contributors

hashwarlock avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.