
CashScript is a high-level programming language for smart contracts on Bitcoin Cash. Maintained by @RoscoKalis and @GeukensMathieu
Joined December 2022
- Tweets151
- Following20
- Followers829
- Likes296
CashScript retweeted
Few people know Bitcoin Cash has smart contracts that are easy to write.
The language is called @CashScriptBCH . It has been around since 2019, it looks like Solidity, and it compiles down to the native scripting system that already runs on Bitcoin Cash. No sidechain, no virtual machine bolted on top, no bridge holding your money while the contract executes.
Here is a complete escrow contract:
pragma cashscript ^0.14.0;
contract TransferWithTimeout(pubkey sender, pubkey recipient, int timeout) {
function transfer(sig recipientSig) {
require(checkSig(recipientSig, recipient));
}
function timeout(sig senderSig) {
require(checkSig(senderSig, sender));
require(tx.time >= timeout);
}
}
Two ways to spend. The recipient can take the money whenever they sign. The sender can take it back after the timeout. That is a working escrow, and it fits in a screenshot.
WHAT MAKES IT DIFFERENT FROM SOLIDITY
CashScript borrows Solidity's syntax and almost none of its problems.
On Ethereum, a contract is an account with storage that lives forever. On Bitcoin Cash, a contract is an address that holds coins and nothing else. There is no stored state to corrupt, no self-destruct, no delegatecall, and no reentrancy, because there is nothing to re-enter. A transaction either satisfies the contract's conditions or it does not, and every node checks that in isolation.
There is also no gas. You pay a fee based on the size of the transaction, not on a computation budget that can spike while you are waiting. A contract that costs a fraction of a cent to use is arithmetic.
WHAT CHANGED THIS YEAR
Bitcoin Cash activated four upgrades in May 2026 under the name Layla, and they matter directly to anyone writing CashScript.
Bounded loops arrived. Before, if a contract needed to check five outputs, you wrote the same verification logic five times. Now you write it once and loop. Functions arrived as well, so shared validation lives in one place. Bitwise operations came back, which lets a contract pack several permissions into a single token commitment and check one bit instead of comparing whole values. And Pay to Script made contract outputs a standard type, instead of a wrapper the rest of the network had to work around.
The tooling followed. The compiler learned loops, the new bitwise operators and Pay to Script first. Then came reusable functions with multiple return values, imports so contracts can share code across files, global constants, and stack traces when a function fails.
The practical difference is not cosmetic. One team rebuilding a prediction market contract collapsed pages of duplicated verification into a loop with a variable offset. More importantly, batch operations became possible: multiple buyers in one transaction, where before the contract hardcoded one.
WHAT IS ALREADY BUILT
This is not a proposal. Contracts written in CashScript are holding real money today.
@BCH_BULL is the clearest example. It is a consumer app for leveraged long, short and hedge positions on BCH against dollars, gold, BTC and other assets, at up to 7.77x leverage, with no custodian. Every position is its own smart contract, generated on demand, and those contracts come from AnyHedge, which is written in CashScript.
@ParyonUSD , the collateralised stablecoin, runs on 26 separate CashScript contracts. They are open source under an MIT licence, published to npm as a package other developers can import, and they have been through two external audits, the first delivered in three passes. Borrowing, redemption, liquidation and a stability pool are all enforced by script on the base layer.
The same pattern shows up across the ecosystem. FundTokens runs on 20 CashScript contracts. Paytaca use it for escrow in peer to peer trades, where two strangers need a rule instead of a middleman. Tapswap uses it for non-custodial token sale offers. Bitcats Heroes, Cash-Ninjas and BCH PUMP all ship contracts written in it, for NFTs and token launches.
One honest note on the ceiling. Cauldron, the main DEX on BCH, is written in raw Script rather than CashScript, and its constant product contract is a stack of opcodes that most developers would not want to hand-write. That route stays open for teams that need it. CashScript is the layer above, and its own documentation ships a version of that same DEX contract rewritten in the high-level language.
WHY THIS MATTERS MORE THAN IT SOUNDS
Every other ecosystem solves programmability by adding a layer. A rollup, a sidechain, a bridge, a sequencer. Each one is a new system with its own bugs, its own trust assumptions and its own operators.
Bitcoin Cash solves it inside the transaction. A CashScript contract is just a locking script, and the coins in it are protected by the same proof-of-work as every other coin on the chain. There is no second system to audit, because the contract is the system.
The code is short because the model removes entire categories of failure before you write a line.
WHERE IT GOES NEXT
The interesting shift is what developers can now build without leaving the base layer. Loops and functions turn a contract from a fixed decision tree into something that can iterate over a batch. Bitwise operations turn a token commitment into a compact permission record. Pay to Script shrinks the cost of the outputs those contracts create.
Put together, that is the toolset for order books, vesting schedules, escrows with arbiters, recurring payments, and lending markets that settle atomically.
Bitcoin Cash is programmable bitcoin.
bitcoin-cash:native
CashScript retweeted
DeFi is happening on Bitcoin Cash/ $BCH!
@RoscoKalis
Our latest episode is here. Forks and Reunions.
As always, there is no time limit and this is another epic installment. Grab some snacks and get stuck in.
The guests are none other than
@cculianu is the creator of Fulcrum, an efficient privacy-preserving SPV client and a pro science carnivore.
@stevethurmond is the most ardent advocate for Cash Stamps and believes Bitcoin was designed as a peer-to-peer electronic cash system and actively promotes Bitcoin Cash as fulfilling that vision
There are also a host of other guests that drop in during this marathon.
They discuss
👑The Evolution of Bitcoin Cash bitcoin-cash:native
👑The Problem with IOU Systems like Lightning
👑The Changing Culture of Bitcoin Cash
👑The Difficulty of Recreating bitcoin:native's Genesis
👑The End of Crypto-Friendly Spaces in Europe
youtube.com/live/SJkwCaQLRuc…
BLISS Bonus Content #1: Rosco's CashScript Workshop!
Learn about programming in BCH with @CashScriptBCH in this masterclass from @RoscoKalis. Recorded on the last day of BLISS, but wasn't broadcast on the livestream.
Tune in and get building!
CashScript retweeted
It's official, ParyonUSD is LIVE! 🎉
Not only is the dapp unlocked, but we also create a full live stats website to get insights into the PUSD metric and on-chain state!
Read the full details in our launch blogpost below:
paryonusd.com/blog/launch
CashScript retweeted
In the early days of @CashScriptBCH, debugging was a pain. If your contract failed, you’d just see “mandatory script verify flag failed” and with a dozen possible verify checks, you had to guess which one broke. Often it meant commenting out code line-by-line and hoping.
CashScript retweeted
Start of the learn to do Bitcoin Cash UTXO contracts series 🙂
youtube.com/watch?v=Ft2jo9sp…
CashScript retweeted
Made a video showcasing the new features in the CashScript pre-release!
"What we've been working on - CashScript vV0.11.0 Pre-Release"
youtu.be/tLKG_5_-JfA
CashScript retweeted
The most fascinating part about creating a programming language is to see how others use it.
User-developers often use patterns/conventions we didn't even think about when creating the language. 🤯
Three recent examples from CashScript:
1) Contract authors started defining structs as comments to keep easier track of how to 'split' bytearrays
2) We saw Fex.cash create an abstraction on top of CashScript to allow for macros/'re-usable functions' to simplify their contract logic. They used the same abstraction to create re-usable constants across contract files.
3) We see contract authors defining their transaction shapes inside of the contract logic file, to give a better mental model for the meaning of each in- and output, what the introspection indexes actually refer to...
We are paying a lot of attention to this and we want to support all these features natively. For 1) and 2) we can clearly take inspiration for other existing languages and the syntax in solidity
However issue 3) is clearly unique to programming in the UTXO model with introspection. I think no single programming language has support for this, because we are advancing the state of the art, and pioneering a new space.
language design is hard, and we want to make sure we get things right.
We want to listen to our users who are pushing what's possible and we want to make CashScript the best it can possibly be.
We're paying attention to your patterns & conventions so we can support them in CashScript natively.
CashScript retweeted
Just did an overhaul of the CashScript Playground UI✨
Instead of cramming everything into the same view, there is now top level navigation 😄
This is what the new Tabs navigation looks like:
Live right now at playground.cashscript.org
CashScript retweeted
We held a CashScript workshop at the @bchbliss conference, @EmergentReasons called it "the most popular thing at the event". 😃
The repo for the workshop is now available, if you to revisit it or check it out can now easily do so!
github.com/CashScript/bliss-…
CashScript retweeted
The new debugging capabilities of CashScript make developing BCH smart contract a much better experience!
Glad to see people trying it out! The next wave of BCH dapps is in the works 🌊
The ability to export transactions into @BitauthIDE for debugging is genius. Using it right now!
CashScript retweeted
Want to learn #UTXO smart contracts on #BitcoinCash? Check out CashScript.org says @EmergentReasons. You can catch up with all our GP Spaces and GP Shorts on our YouTube channel: youtube.com/@generalprotocol…
CashScript retweeted
Made a new video: "NEW CashScript Debugging Tools (version 0.10.0-next changes)"
youtube.com/watch?v=8P8MY7AF…
CashScript retweeted
Huge Update to the CashScript Playground! (Full CashTokens Support)
youtu.be/KN19_4G21Ls
CashScript retweeted
I'm in Prague for Prague DeFi Summit and ETHPrague until the end of the week. Send me a message if you want to meet up!
CashScript retweeted
BCH Bull Production release is out! 2x the contract size, 3x the contract duration, approx 30% cheaper fees, additional asset (CNY), premium tracker and language localization! The bulls are here! bchbull.com #bitcoincash #bch #tutxo #defi #bethebull
CashScript retweeted
The CashScript playground is now fully upgraded for CashTokens support!
Here's an example that demonstrates an NFT-unlocked covenant, the same type of contract that can be used to tokenize AnyHedge payouts 😄
-> next-cashscript-playground.n…
CashScript retweeted
Join us Tomorrow as we Discuss #CashTokens with @GeukensMathieu
🎤What’s CashTokens and What to Expect
#BitcoinCash
xitter.cf/i/spaces/1RDxlaoRvolKL
CashScript retweeted
Responses like these are what motivates me to make the Cashscript tutorial series! The 4th episode on Covenants & Native Introspection is now online! youtu.be/9f-rCskwaC4
It still blows my mind how easily internet strangers can send money with crypto!




















