
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
Pinned Tweet
Hello World! This account will be dedicated to sharing CashScript updates so that you don't have to dig through @RoscoKalis' tweets to find #CashScript update notes.
A thread of previous update notes:
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
v0.13.0: ✨ Loops, P2S and shift operators ✨
xitter.cf/CashScriptBCH/status/2…
v0.14.0: ✨ Reusable functions, globals, and imports ✨
xitter.cf/CashScriptBCH/status/2…
CashScript v0.14.0 was just released! What's new?
🧩 Reusable functions
📌 Global constants
📚 Imports & shareable libraries
🐞 Stack traces when debugging
🛡️ Safer transaction testing
v0.14.0 contains a number of breaking changes, so please refer to the migration guide below 👇
cashscript.org/docs/releases…
Make sure to join our Telegram channel to keep up with active development, and let us know what you build with functions! 👇
t.me/CashScriptBCH
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…
We just upgraded the developer experience for all CashScript developers, whether you prefer the playground or a code editor.
The playground and VS Code extension now feature full compilation results and show you any compile errors immediately. 🫡🚀
We've just released a big new update to the CashScript Playground! It now supports v0.13 as well as 0.12 with a compiler selector, and it features full highlighting, autocomplete and hover hints. 🥳
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 v0.13.0 was just released! What's new?
🔁 Loops & compound assignment
↔️ Bitwise & arithmetic shifts
📦 P2S support
🧠 Type system improvements
🪙 Change and UTXO gathering utilities
v0.13.0 contains a number of breaking changes, so please refer to the migrations guide below 👇
cashscript.org/docs/releases…
While v0.13 was a big release, we have even more coming up in our upcoming releases, including reusable functions.
Stay tuned for more on that, and make sure to join our Telegram channel to keep up with active development! 👇
t.me/CashScriptBCH











