📖
Dev Documents
  • README
  • Basic Concepts
    • TEA Developer Prerequisites
    • The TEA Economic Revolution for Developers
    • The Future of Layer-2s
    • What Makes a Web3 App?
    • Magic of the State Machine
  • Step by Step Tutorial
    • Install Dev Environment
    • Hello World
      • Step 1: Build sample-actor and Run Unit Test
      • Step 2: Start the Local Dev Environment
      • Sample Actor Code Walkthrough
      • Sample Front-end Code Walkthrough
      • 025_understand_request_and_response
    • Deploy Hello World on Testnet
    • Add Login Feature
      • Sample-actor Code Walkthrough - Login Branch
        • tea_sdk_utils
      • Sample Front-end Walkthrough - Login Branch
    • SQL
      • Sample Txn Executor
      • Sample Actor
      • Sample Front-end
    • Reward Fund Transfer
      • Sample Txn Executor
    • Retweet Task
      • Retweet Frontend
      • Retweet Sample Actor
      • Retweet Txn Executor
      • Retweet FAQ
    • Gas Fees
      • Query logs
      • A deep dive into gas measurement and settlement
    • Summary
  • Billing
    • Billing FAQ
    • Gas Fee Billing
    • Gas & Fuse Limits
    • Local Debugging Environment
    • State Maintainer Billing
    • TApp Billing
  • Example TApps
  • Advanced TApps
    • TEA Party TApp Intro
    • TEA Party Code Walkthrough
  • Functions
    • Actors vs Functions
    • Function Calls Between Native & Wasm
    • Native vs Wasm Functions
  • Glossary
    • Actor
    • Adapter
    • App AES Key
    • AuthKey
    • back_end_actor
    • Birth Control
    • Blockchain Listener
    • Capability
    • CML Auctions
    • Commands
    • Consensus
    • Context
    • Conveyor
    • Conveyor: Mutable vs Immutable
    • enclave
    • Followup
    • Front-end
    • GlueSQL
    • GPS
    • Hosting Actor Handlers
    • Hosting CML
    • hosting_profitability
    • Magic of WASM
    • mini-runtime
    • OrbitDb
    • Order of Txns
    • party-actor
    • party-fe
    • Party-state-actor
    • Providers
    • Public Service
    • queries
    • Remote Attestation
    • Staking to Hosting CML
    • Staking to TApp
    • State
    • State Machine
    • State Machine Actor
    • State Machine Replica
    • TEA ID
    • TPM
    • Transactions
    • VMH - Virtual Messaging Hub
    • Where Messages are Stored
Powered by GitBook
On this page
  • Prerequisites
  • Clone the tutorial master branch
  • Setup TApp
  • Build and upload actor to IPFS
  • Update TApp metadata in the Devportal
  • Build and upload front-end
  • Update the front-end CID in Devportal
  • Activate the TApp in the Devportal
  1. Step by Step Tutorial

Deploy Hello World on Testnet

Previous025_understand_request_and_responseNextAdd Login Feature

Last updated 2 years ago

NOTE: this section is currently under development. There's currently no DevPortal URL. When the link becomes available, we'll remove this notice when it's ready to be deployed

In this section of the tutorial, we'll use the dev portal to deploy the Hello World boilerplate to the TEA testnet. The goal is to see the Hello [developer's name] TApp in the browser after launching such a TApp from the TAppStore.

Prerequisites

Besides the prereqs stated earlier, this tutorial involves uploading to IPFS and will require . For those running MacOS it's also available through Homebrew:

brew install ipfs

You'll also need some TEA funds in your wallet to use the Developer Portal. You can request funds by sending us a message in our .

Clone the tutorial master branch

Run git clone https://github.com/tearust/tutorial-v1.git to clone code to local. Recall that there are two folders in the root of the tutorial-v1 code repo:

  • sample-actor (the back end lambda function).

  • sample-front-end (the front end code).

If you'd like to check in any of your modified code to your own git repo, please rename the project to avoid any conflicts.

Setup TApp

  • Login to the Devportal with Metamask: (link will be updated here when ready)

  • You can see your account balance after login.

  • Go to the TApps page in the Devportal. Here you'll create a new TApp and save the token_id:

We will add this token_id minus the leading 0x to ~/sample-actor/impl/manifest.yaml at line 3. You should also change the actor name from sample-actor to a unique name.

Build and upload actor to IPFS

You can build your actor using the same commands we used in the previous step: cd sample-actor and run ./build.sh to build the actor.

To upload the actor to IPFS, run ./ipfs.sh from the same directory which executes the following script:

Save the CID returned from the script to use in the next step.

Update TApp metadata in the Devportal

Go back to the Devportal and click the cog icon next to your TApp listing in the Developer tab.

Enter in the information as instructed in the following image to update your TApp's metadata:

If you get a spend_over_allowance error:

Here you can set the spending limit up to the amount you have in your TEA wallet:

Build and upload front-end

Build the front-end code (jacky_test/sample-front-end/) and upload to IPFS using ~/sample-front-end/ipfs.sh.

Upon succesful completion you'll save the CID of the front-end to use in the next section (the CID is on the last line ending with dist).

Update the front-end CID in Devportal

Edit your TApp and enter in the CID for the front-end:

  • Visit front-end code in ipfs using the URL format http://54.180.82.194:8080/ipfs/[CID]/#/welcome

In our current example it would be http://54.180.82.194:8080/ipfs/QmdGoyx5JLinEPM8ZiMNaXkVjbqmg2rWygvxPBWPNKou4A/#/welcome

Note that the actor will be loaded after the first request. If you see an error "you need to try later", that means the node is loading the actor and will be available when you try later after it's been loaded.

Activate the TApp in the Devportal

Activating the TApp will make it available on the TEA network. To activate your TApp, press the start button next to it in the Devportal:

image
image
image
image
image
Screenshot 2023-04-18 at 12 18 17 PM

Then you'll need to increase the spending limit for the Developer Portal in the :

Screenshot 2023-04-18 at 12 20 53 PM
Screenshot 2023-04-18 at 12 29 24 PM (2)
image
image
image

Once it's active, other users can launch the TApp through .

image
installing the IPFS command line tool
Telegram group
Nitro TAppStore
the TAppstore
Screenshot 2023-04-14 at 4 52 21 PM