📖
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
  1. Step by Step Tutorial
  2. Retweet Task

Retweet Txn Executor

You might be surprised to learn that there's not a lot of code changes in the sample-txn-executor project and that there's almost no changes in the txn executor actor. There's nothing the developer needs to do to execute the secure oracle. Comparing this step with the last step, the newly added business logic all happens inside the hosting node (the sample-actor project). Originally in our previous step, the task owner needed to click a button to confirm the worker successfully completed the task. In our current retweet project, this "confirmation" is done by the secure oracle automatically. The secure oracle will call the twiter API to verify if the worker has actually successfully retweeted the original tweet.

All of the secure oracle workflow is transparent to the developers. You as a developer only need to create an OracleHttpRequest and call. In our future developer documentation, there will be more OracleSomethingRequest published. We'll open the code base so that you can write your own OracleYourselfRequest to run different oracles. Furthermore, your actor can earn TEA tokens for you if someone calls your actor. Our billing system will measure the usage, and the caller will pay you. Note that your code (your actor) is an NFT, and you're the owner of this NFT. Your NFT works for you and makes you profit. Isn't that amazing?

PreviousRetweet Sample ActorNextRetweet FAQ

Last updated 2 years ago