WeAreDevelopers LIVE May 16, 2021

OP_PUSH_TX and its applications in Bitcoin smart contracts

Xiaohui Liu

Lio, creator of sCrypt, proves Bitcoin script is natively Turing complete. Learn how the OP_PUSH_TX pseudo-opcode unlocks stateful, fully on-chain smart contracts without protocol modifications.

Pause
Mute Enter Fullscreen
#1 about 3 min

Introduction to Bitcoin script and OP_PUSH_TX

How the Bitcoin virtual machine evaluates stack-based instructions like OP_PUSH_TX to read transaction state.

#2 about 2 min

Generating sighash preimages for Bitcoin transactions

The process of signing a transaction format containing inputs, outputs, sequence, and spent UTXOs.

#3 about 4 min

Implementing pseudo opcodes using ECDSA signature verification

How checking cryptographic signatures against public keys ensures data integrity for the current transaction preimage.

#4 about 4 min

Controlling transaction spending with OP_PUSH_TX preimages

Practical examples using preimages to implement check lock time verify and pay to script hash without explicit opcode changes.

#5 about 4 min

Maintaining persistent state in Bitcoin smart contracts

Structuring a locking script into immutable code and mutable data parts to propagate counter state across transactions.

#6 about 3 min

Exploring on-chain games and custom token systems

Leveraging arbitrary state data to build cellular automata, non-fungible tokens, and complex financial instruments directly on the blockchain.

#7 about 3 min

Demonstrating a fully on-chain multiplayer game

A live example of a complete Tic-Tac-Toe game where each player move executes as an enforceable transaction on the network.

#8 about 2 min

Resources for building Bitcoin smart contracts

High-level libraries abstract away scripting complexity to enable rapid deployment of decentralized applications.

Matching moments

1:57 min

The Bitcoin SV UTXO smart contract model

Liu Xiaohui · LIVE

5:14 min

Executing Bitcoin scripts on a stack-based architecture

Andreas M Antonopoulos · LIVE

2:20 min

Comparing off-chain javascript execution with bitcoin script

Brenton Gunning · LIVE

4:08 min

Introduction to interoperable apps on Bitcoin

Aaron Russell · LIVE

2:38 min

Emphasizing token utility for network code execution

John Woods John Woods · WWC 2024

4:21 min

Developing a decentralized tic-tac-toe game with smart contracts

Tim Weingärtner · LIVE

Upcoming sessions on this topic

Open session

World Congress 2026 North America

On the Public Clock: Open-Source Defense When You're Not in the Club

Nicholas Muy

VP Engineering Platform and Security at Scrut.io

Nicholas Muy
Open session

World Congress 2026 North America

Give the Agent a Budget, Not a Token

Sachin Malhotra

MTS @Anthropic

Sachin Malhotra
Open session

World Congress 2026 North America

Offloading IoT State: Solving the Memory Crisis on Legacy Hardware

Pravin Nagare

Senior Software Engineer, Roku

Pravin Nagare
Open session

World Congress 2026 North America

Headroom: A Context Optimization Layer for LLM Applications

Tejas Chopra

Senior Software Engineer at Netflix

Tejas Chopra
Open session

World Congress 2026 North America

public void saveMoney(AI): The Developer's Guide to Unit Economics

Hrushikesh Pokala

Senior Software Engineer Lead at Equifax

Hrushikesh Pokala
Open session

World Congress 2026 North America

From Guesswork to Governance: Data Contracts Bring API Discipline to Apache Kafka

Sandon Jacobs

Senior Developer Advocate at IBM

Sandon Jacobs