Xiaohui Liu
OP_PUSH_TX and its applications in Bitcoin smart contracts
#1about 2 minutes
Introduction to OP_PUSH_TX and its applications
An overview of the OP_PUSH_TX technique, its internal implementation, and the smart contract applications it enables, including a live demo.
#2about 1 minute
Introducing the OP_PUSH_TX technique for smart contracts
The OP_PUSH_TX technique allows a smart contract to access the current transaction's data by pushing it onto the stack.
#3about 1 minute
Accessing transaction data via the SIGHASH pre-image
The technique pushes the SIGHASH pre-image, which contains transaction data like inputs and outputs, onto the stack for inspection.
#4about 3 minutes
Implementing OP_PUSH_TX as a pseudo-opcode
The technique is implemented as a pseudo-opcode using existing script commands to verify the SIGHASH pre-image is for the current transaction.
#5about 5 minutes
Controlling future spending with transaction introspection
By inspecting the transaction pre-image, smart contracts can enforce rules on future outputs, replicating features like CLTV and P2SH.
#6about 3 minutes
Maintaining state across transactions with OP_PUSH_TX
Stateful smart contracts are created by dividing the locking script into immutable code and mutable data, ensuring state transitions correctly in subsequent transactions.
#7about 2 minutes
Building on-chain games and tokens with stateful contracts
The ability to maintain state enables complex applications like fully on-chain games, fungible and non-fungible tokens, and financial instruments.
#8about 2 minutes
Demonstrating a fully on-chain Tic-Tac-Toe game
A live demo shows a Tic-Tac-Toe game where each move is a Bitcoin transaction, enforcing game rules on-chain and preventing cheating.
#9about 2 minutes
Summary and resources for building with sCrypt
A recap of the OP_PUSH_TX technique and its applications, with links to sCrypt's open-source code, documentation, and community channels.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
01:15 MIN
Crypto crime, EU regulation, and working while you sleep
Fake or News: Self-Driving Cars on Subscription, Crypto Attacks Rising and Working While You Sleep - Théodore Lefèvre
14:14 MIN
Scripting presentations and demos in VS Code
Devs vs. Marketers, COBOL and Copilot, Make Live Coding Easy and more - The Best of LIVE 2025 - Part 3
04:57 MIN
Increasing the value of talk recordings post-event
Cat Herding with Lions and Tigers - Christian Heilmann
03:31 MIN
The value of progressive enhancement and semantic HTML
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
04:17 MIN
Playing a game of real or fake tech headlines
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
01:02 MIN
AI lawsuits, code flagging, and self-driving subscriptions
Fake or News: Self-Driving Cars on Subscription, Crypto Attacks Rising and Working While You Sleep - Théodore Lefèvre
02:33 MIN
Why you might not need JavaScript for everything
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
07:39 MIN
Prompt injection as an unsolved AI security problem
AI in the Open and in Browsers - Tarek Ziadé
Featured Partners
Related Videos
Bitcoin transactions- embedding and using data for applications built on Bitcoin SV
Jack Davies & Alessio Pagani
Introduction to sCrypt - a smart contract language for Bitcoin SV
Liu Xiaohui
Nano services and dust return transactions + long chain
Matej Trampuš & Steve Shadders
Intermediate Bitcoin Script
Steve Shadders
Introduction to TXT
Glenn Wolfe
Connect API for Bitcoin SV applications
Rafa Jiménez
Business sensibilities when developing for Bitcoin
Joshua Henslee
Bitcoin- Ledger vs Blockchain
Evan Freeman
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

SMG Swiss Marketplace Group
Ho Chi Minh City, Viet Nam
Senior

SMG Swiss Marketplace Group
Ho Chi Minh City, Viet Nam
Senior

SMG Swiss Marketplace Group
Ho Chi Minh City, Viet Nam
Junior

SMG Swiss Marketplace Group
Ho Chi Minh City, Viet Nam
Junior

SMG Swiss Marketplace Group
Ho Chi Minh City, Viet Nam
Senior



