OP_PUSH_TX and its applications in Bitcoin smart contracts
What if a Bitcoin contract could inspect its own spending transaction? Discover how OP_PUSH_TX enables stateful applications previously deemed impossible, from on-chain games to financial instruments.
#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
03:00 MIN
Using SPV validation as an alternative to OP_PUSH_TX
Scaling Bitcoin for global adoption
09:39 MIN
Q&A on script optimization, tooling, and advanced concepts
Intermediate Bitcoin Script
03:58 MIN
Understanding Bitcoin's UTXO-based smart contract model
Introduction to sCrypt - a smart contract language for Bitcoin SV
07:49 MIN
Embedding data in transactions with data pushes and carriers
Bitcoin transactions- embedding and using data for applications built on Bitcoin SV
03:10 MIN
Q&A on fungible tokens and advanced script interactions
Run on Bitcoin
02:46 MIN
Modern smart contract development with Bitcoin Script
Bitcoin SV: The Massively Scaled Blockchain to Meet Developer Needs
05:14 MIN
How Bitcoin Script enables programmable money
A Technical Introduction to Bitcoin's 2nd Layer- The Lightning Network
13:15 MIN
Q&A on smart contract indexing, SPV, and databases
Build With Bitcoin SVAt Bitcoin Association, we work to advance business using the Bitcoin SV (BSV) blockchain. A rebirth of the original Bitcoin, Bitcoin SV has restored the protocol to the specifications of creator Satoshi Nakamoto, resulting in a public blockchain cap...
Benedikt Bischof
MLOps – What’s the deal behind it?Welcome to this issue of the WeAreDevelopers Live Talk series. This article recaps an interesting talk by Nico Axtmann who introduced us to MLOpsAbout the speaker:Nico Axtmann is a seasoned machine learning veteran. Starting back in 2014 he observed ...
Chris Heilmann
Dev Digest 131 - AI'm not sure about OSSNews and ArticlesRust and Typescript are rising stars in programming languages 2024 survey, the State of CSS 2024 survey is open and here is what's new in ECMAScript.In security news, a Microsoft update bricks Linux dual-boot systems, they patched a ...
Chris Heilmann
Dev Digest 138 - Are you secure about this?Hello there! This is the 2nd "out of the can" edition of 3 as I am on vacation in Greece eating lovely things on the beach. So, fewer news, but lots of great resources. Many around the topic of security. Enjoy! News and ArticlesGoogle Pixel phones t...
From learning to earning
Jobs that call for the skills explored in this talk.