Phala Network Docs
  • Home
    • ๐Ÿ‘พPhala Network Docs
  • Overview
    • โš–๏ธPhala Network
      • ๐Ÿ’ŽPhala Cloud
      • ๐ŸฅทDstack
      • ๐Ÿ”GPU TEE
    • ๐Ÿ’ŽPHA Token
      • ๐Ÿช™Introduction
      • ๐Ÿ‘Delegation
        • Delegate to StakePool
        • What is Vault
        • What is Share
        • WrappedBalances & W-PHA
        • Examples of Delegation
        • Use Phala App to Delegate
        • Estimate Your Reward
      • ๐Ÿ—ณ๏ธGovernance
        • Governance Mechanism
        • Join the Council
        • Voting for Councillors
        • Apply for Project Funding
        • Phala Treasury
        • Phala Governance
        • Setting Up an Account Identity
  • Phala Cloud
    • ๐Ÿš€Getting Started
      • Create Your Phala Cloud Account
      • Your First CVM Deployment
      • Explore Templates
        • Launch an Eliza Agent
        • Start from Template
    • ๐ŸชจTEEs, Attestation & Zero Trust Security
      • Attestation
      • Security Architecture
    • ๐ŸฅทPhala Cloud User Guides
      • Deploy and Manage CVMs
        • Deploy CVM with Docker Compose
        • Set Secure Environment Variables
        • Deploy Private Docker Image to CVM
        • Debugging and Analyzing Logs
          • Check Logs
          • Private Log Viewer
          • Debug Your Application
        • Application Scaling & Resource Management
        • Upgrade Application
        • Deployment Cheat Sheet
      • Building with TEE
        • Access Your Applications
        • Expose Service Port
        • Setting Up Custom Domain
        • Secure Access Database
        • Create Crypto Wallet
        • Generate Remote Attestation
      • Advanced Deployment Options
        • Deploy CVM with Phala Cloud CLI
        • Deploy CVM with Phala Cloud API
        • Setup a CI/CD Pipeline
    • ๐ŸšขBe Production Ready
      • CI/CD Automation
        • Setup a CI/CD Pipeline
      • Production Checklist
      • Troubleshooting Guide
      • Glossary
    • ๐Ÿ”’Use Cases
      • TEE with AI
      • TEE with FHE and MPC
      • TEE with ZK and ZKrollup
    • ๐Ÿ“‹References
      • Phala Cloud CLI Reference
        • phala
          • auth
          • cvms
          • docker
          • simulator
      • Phala Cloud API & SDKs
        • API Endpoints & Examples
        • SDKs and Integrations
      • Phala Cloud Pricing
    • โ“FAQs
  • Dstack
    • Overview
    • Getting Started
    • Hardware Requirements
    • Design Documents
      • Decentralized Root-of-Trust
      • Key Management Service
      • Zero Trust HTTPs (TLS)
    • Acknowledgement
    • โ“FAQs
  • LLM in GPU TEE
    • ๐Ÿ‘ฉโ€๐Ÿ’ปHost LLM in GPU TEE
    • ๐Ÿ”GPU TEE Inference API
    • ๐ŸŽ๏ธGPU TEE Benchmark
    • โ“FAQs
  • Tech Specs
    • โ›“๏ธBlockchain
      • Blockchain Entities
      • Cluster of Workers
      • Secret Key Hierarchy
  • References
    • ๐Ÿ”Setting Up a Wallet on Phala
      • Acquiring PHA
    • ๐ŸŒ‰SubBridge
      • Cross-chain Transfer
      • Supported Assets
      • Asset Integration Guide
      • Technical Details
    • ๐Ÿ‘ทCommunity Builders
    • ๐ŸคนHackathon Guides
      • ETHGlobal Singapore
      • ETHGlobal San Francisco
      • ETHGlobal Bangkok
    • ๐ŸคฏAdvanced Topics
      • Cross Chain Solutions
      • System Contract and Drivers
      • Run Local Testnet
      • SideVM
    • ๐Ÿ†˜Support
      • Available Phala Chains
      • Resource Limits
      • Transaction Costs
      • Compatibility Matrix
      • Block Explorers
      • Faucet
    • โ‰๏ธFAQ
  • Compute Providers
    • ๐Ÿ™ƒBasic Info
      • Introduction
      • Gemini Tokenomics (Worker Rewards)
      • Budget balancer
      • Staking Mechanism
      • Requirements in Phala
      • Confidence Level & SGX Function
      • Rent Hardware
      • Error Summary
    • ๐ŸฆฟRun Workers on Phala
      • Solo Worker Deployment
      • PRBv3 Deployment
      • Using PRBv3 UI
      • PRB Worker Deployment
      • Switch Workers from Solo to PRB Mode
      • Headers-cache deployment
      • Archive node deployment
    • ๐Ÿ›ก๏ธGatekeeper
      • Collator
      • Gatekeeper
  • Web Directory
    • Discord
    • GitHub
    • Twitter
    • YouTube
    • Forum
    • Medium
    • Telegram
Powered by GitBook
LogoLogo

Participate

  • Compute Providers
  • Node
  • Community
  • About Us

Resources

  • Technical Whitepaper
  • Token Economics
  • Docs
  • GitHub

More

  • Testnet
  • Explorer
  • Careers
  • Responsible Disclosure

COPYRIGHT ยฉ 2024 PHALA.LTD ALL RIGHTS RESERVED. May Phala be with you!

On this page
  • Phala Hackathon Guide at ETHGlobal Singapore
  • Introduction
  • Prizes
  • Important Dates
  • Getting Started
  • Get API Key on RedPill
  • Set Up Your First Agent Contract
  • Getting Rugged By The WiFi?!
  • Resources
  • Support
  • Best Practices
  • Submission Guidelines
  • Judging Criteria
  • Contact Us

Was this helpful?

Edit on GitHub
  1. References
  2. Hackathon Guides

ETHGlobal Singapore

PreviousHackathon GuidesNextETHGlobal San Francisco

Last updated 1 month ago

Was this helpful?

WARNING

This section is no longer recommended for deploying on Phala. To build and deploy securely and efficiently, please use the fully managed platform instead. Check out the doc on how to .

Phala Hackathon Guide at ETHGlobal Singapore

Welcome to the Phala Hackathon Guide! This guide will provide you with all the necessary information to get started building on our platform. Whether you're a seasoned developer or new to the ecosystem, this guide will help you navigate through the essential steps and resources for build on Phala's Agent Contract.

Check out the an Agent Contract we deployed called the !

  • If you want to know how to host HTML pages with hono, check out the Agent Contract template .

Introduction

Welcome to the Hackathon guide for Phala's Agent Contracts. We are offering you the key to connecting to multiple sponsor's bounties through our general-purpose program executing in a TEE (Trusted Execution) on Phala Network at ZERO cost & NO new wallet required.

Why is Agent Contract Built DIFFERENT?!

  • ๐Ÿ’จ Ship Fast: Build and ship with familiar toolchain in minutes

  • โ›‘๏ธ Secure: Execution guarded by rock solid TEE

  • ๐Ÿ”’ Private: Host API keys and user privacy at ease

  • ๐Ÿ’Ž Unstoppable: Powered by IPFS and Phala's 40k+ decentralized TEE workers

  • Support: a small, simple, and ultrafast web framework built on Web Standards.

  • ๐Ÿงช : Vite Testing Framework support, but you're free to change the test framework to your desire.

Here are our feature templates:

    • Derive an ECDSA account within a TEE

    • Sign/Verify Data with the derived account

    • Transact on any EVM chain

Prizes

We have exciting prizes for the top project:

  1. 1st Place: $3,000 + Ledger Nano X

  2. 2nd Place: $1,500 + TEE Swag

  3. 3rd Place: $500 + TEE Swag

Bonus Bounty: Reach the ETHGlobal finals, and youโ€™ll snag another Ledger Nano X on us!

How to qualify for as a top project?

  • Deploy any custom Agent Contract that can be interacted with via HTTP requests

Important Dates

  • Hackathon Start: September 20th

  • Submission Deadline: September 22nd 9am

  • Judging Period: 2 Hours and 30 Minutes

  • Winners Announcement: September 22nd 3pm

Getting Started

To get started with Phala Network

Get API Key on RedPill

If you want to use the global hackathon RedPill API key, here are the details:

  • Free Rate-Limited API Key

    • API Key: sk-qVBlJkO3e99t81623PsB0zHookSQJxU360gDMooLenN01gv2

Before you start building, you'll need to set up your development environment. Here are the prerequisites:

Test RedPill API

curl https://api.red-pill.ai/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer <YOUR_REDPILL_API_KEY>"
-d '{ "model": "o1-preview", "messages": [ { "role": "user", "content": "Hello world!" } ], "temperature": 1 }'

Set Up Your First Agent Contract

To set up your first Agent Contract, you can follow these resources:

  • A New Paradigm in Transacting Onchain

  • AI Related Templates

  • Frontend Hosting Template

Getting Rugged By The WiFi?!

Running the local testnet may return an error if port 8000 is already in use.

npm run dev

Make a Request to Your Local Build

# GET request
curl http://127.0.0.1:8000/local
# GET request with URL queries
curl http://127.0.0.1:8000/local?query1=one&query2=two
# POST request
curl http://127.0.0.1:8000/local -X POST -H 'content-type: application/json' -d '{"foo": "bar"}'

Add Secrets to Your Local Build

curl http://127.0.0.1:8000/vaults -H 'Content-Type: application/json' -d '{"cid": "local", "data": {"secretKey":"secretValue"}}'

Check The Logs of Your Local Build

curl 'http://127.0.0.1:8000/logs/all/local'

Resources

Here are some additional resources to assist you:

Support

If you need help, we're here for you:

  • Forum: Post your questions on our Community Forum.

We can't wait to see what you build at the Phala Hackathon. Happy coding!


Best Practices

To ensure a smooth development experience and to make the most out of the Phala platform, consider the following best practices:

  1. Modular Code: Write modular and reusable code to enhance maintainability.

  2. Security First: Always prioritize security, especially when dealing with sensitive data.

  3. Documentation: Document your code and APIs thoroughly to help others understand and contribute.

  4. Testing: Implement comprehensive testing to catch bugs early and ensure reliability.

  5. Community Engagement: Engage with the community to get feedback and improve your project.

Submission Guidelines

To submit your project for the hackathon, follow these steps:

  1. Prepare Your Project: Ensure your project is complete and well-documented.

  2. Create a Repository: Host your project on GitHub or any other version control platform.

  3. Demo Video: Include a short demo video showcasing your project and its features.

Judging Criteria

Projects will be judged based on the following criteria:

  1. Technical excellence: How smoothly everything works

  2. UX and design: How great everything feels

  3. Potential impact: How it is going to make the world a better place

  4. Wow factor: How it would become the next big thing

  5. Business model: How it would generate ROI

Contact Us

If you have any questions or need further assistance, feel free to reach out:

Thank you for participating in the Phala Hackathon. We look forward to seeing your innovative solutions and wish you the best of luck!


Phala Network Team

- Get your and access top LLMs from OpenAI, Anthropic, Meta, Gwen, Mistral, and Google to create a Web3 x AI project for the hackathon.

- Learn about a new paradigm in transacting onchain with the Agent Contract Template with key features to:

(Strong Consideration) Integrate to interact on-chain with any EVM Chain or other sponsor projects at ETHGlobal to create a unique product.

(Strong Consideration) Build an AI x Web3 product with or any other AI related templates we support located in our

Take the RedPill and access top AI LLMs: Get an API Key on . This requires a code to get access. Reach out to the Phala Team to get access. In the meantime, use the free developer API key that is rate limited.

Try a New Paradigm in Transacting Onchain: Build on the where you can derive an account within a TEE and utilize the account to transact on any EVM chain.

Choose from a or build a custom Agent Contract that connect to any API or uses an SDK of your choosing!

Explore Documentation: Familiarize yourself with our .

Join the Community: Connect with other developers on our .

Create a FREE API Key at

API Endpoint URL:

Doc:

Supported Models:

Node.js: Install the latest version of Node.js from .

Code Editor: Any code editor will work. We recommend using .

Viem SDK Template (Derive ECDSA Keys, Sign/Verify Data, Send TX):

RedPill Template:

OpenAI Template:

Anthropic Template:

LangChain:

Function Calling:

GitHub Repository:

Template:

Template:

Template:

Run a local testnet with . All you need to do to get a local testnet started is run:

We recommend using to avoid a large bundle size and the 20MB final artifact limitation.

Docs:

Workshop:

Tech Specs:

: Join our Discord Server for real-time support.

: Agent Contract development FAQ

Email:

Discord: Join our

Forum: Visit our

๐Ÿคน
๐Ÿ”ฅ
Phala Cloud
get started
TEE Cheat Sheet
here
hono/tiny
Vite Test Framework
RedPill Agent Contract
FREE RedPill API Key
Viem SDK Agent Contract
Viem SDK
Agent Contract with the Viem SDK
RedPill Agent Contract Template
docs
RedPill
viem Agent Contract Template
List of Agent Contract Templates
Developer Documentation
Discord Server
https://red-pill.ai/ethglobal
https://api.red-pill.ai/
https://docs.red-pill.ai/getting-started/how-to-use
https://docs.red-pill.ai/get-started/list-models
nodejs.org
Visual Studio Code
AI Agent Contract Viem Template
Build Your First AI Agent Contract
Build Your AI Agent Contract with OpenAI
Anthropic Template Repo
Build Your Agent Contract with LangChain
Create a Weather Agent with Function Calling
AI Agent Template with Function Calling
Brian
Brian Agent Contract Template
'mbd.xyz
'mbd.xyz Agent Contract Template
Chainbase
Chainbase Agent Contract Template
Hono HTML Agent Contract Template
docker support
Hono Docs
@hono/tiny
Vite Test Framework
Developer Documentation
Supported WapoJS Functions
Video
Agent Contract Tech Specs
Discord
FAQ
support@phala.network
Discord Server
Community Forum