Skip to content

Commit 9afa271

Browse files
committed
Bump version to 0.11.0-next.0 and add release notes for it + update docs
1 parent 0cbcb8d commit 9afa271

File tree

10 files changed

+38
-18
lines changed

10 files changed

+38
-18
lines changed

examples/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cashscript-examples",
33
"private": true,
4-
"version": "0.10.5",
4+
"version": "0.11.0-next.0",
55
"description": "Usage examples of the CashScript SDK",
66
"main": "p2pkh.js",
77
"type": "module",
@@ -13,8 +13,8 @@
1313
"dependencies": {
1414
"@bitauth/libauth": "^3.1.0-next.2",
1515
"@types/node": "^12.7.8",
16-
"cashc": "^0.10.5",
17-
"cashscript": "^0.10.5",
16+
"cashc": "^0.11.0-next.0",
17+
"cashscript": "^0.11.0-next.0",
1818
"eslint": "^8.56.0",
1919
"typescript": "^4.9.5"
2020
}

examples/testing-suite/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "testing-suite",
3-
"version": "0.10.5",
3+
"version": "0.11.0-next.0",
44
"description": "Example project to develop and test CashScript contracts",
55
"main": "index.js",
66
"type": "module",
@@ -26,8 +26,8 @@
2626
},
2727
"dependencies": {
2828
"@bitauth/libauth": "^3.1.0-next.2",
29-
"cashc": "^0.10.5",
30-
"cashscript": "^0.10.5",
29+
"cashc": "^0.11.0-next.0",
30+
"cashscript": "^0.11.0-next.0",
3131
"url-join": "^5.0.0"
3232
},
3333
"devDependencies": {

packages/cashc/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cashc",
3-
"version": "0.10.5",
3+
"version": "0.11.0-next.0",
44
"description": "Compile Bitcoin Cash contracts to Bitcoin Cash Script or artifacts",
55
"keywords": [
66
"bitcoin",
@@ -50,7 +50,7 @@
5050
},
5151
"dependencies": {
5252
"@bitauth/libauth": "^3.1.0-next.2",
53-
"@cashscript/utils": "^0.10.5",
53+
"@cashscript/utils": "^0.11.0-next.0",
5454
"antlr4": "^4.13.1-patch-1",
5555
"commander": "^7.1.0",
5656
"semver": "^7.5.4"

packages/cashc/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export * from './Errors.js';
22
export * as utils from '@cashscript/utils';
33
export { compileFile, compileString } from './compiler.js';
44

5-
export const version = '0.10.5';
5+
export const version = '0.11.0-next.0';

packages/cashscript/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cashscript",
3-
"version": "0.10.5",
3+
"version": "0.11.0-next.0",
44
"description": "Easily write and interact with Bitcoin Cash contracts",
55
"keywords": [
66
"bitcoin cash",
@@ -44,7 +44,7 @@
4444
},
4545
"dependencies": {
4646
"@bitauth/libauth": "^3.1.0-next.2",
47-
"@cashscript/utils": "^0.10.5",
47+
"@cashscript/utils": "^0.11.0-next.0",
4848
"@mr-zwets/bchn-api-wrapper": "^1.0.1",
4949
"delay": "^5.0.0",
5050
"electrum-cash": "^2.0.10",

packages/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cashscript/utils",
3-
"version": "0.10.5",
3+
"version": "0.11.0-next.0",
44
"description": "CashScript utilities and types",
55
"keywords": [
66
"bitcoin cash",

website/docs/compiler/vmlimits.md renamed to website/docs/compiler/vm-limits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If your contract includes multiple functions, consider a modular design. Separat
1515

1616
## Operation Cost Limit
1717

18-
Bitcoin Cash also enforces an **operation cost limit** (op-cost) on each transaction input. The op-cost limit controls the computational budget available for operations in a contract and is calculated based on the input length, with each byte allowing for a higher maximum opereraction cost.
18+
Bitcoin Cash also enforces an **operation cost limit** (op-cost) on each transaction input. The op-cost limit controls the computational budget available for operations in a contract and is calculated based on the input length, with each byte allowing for a higher maximum operation cost.
1919

2020
```ts
2121
function maxOperationCost(unlockingBytecodeLength) {
@@ -33,7 +33,7 @@ To increase your contract's compute budget for resource-intensive operations (e.
3333

3434
For completeness, here are additional Bitcoin Cash VM limits relevant to CashScript development:
3535

36-
- **Signature Operation Count** (SigChecks) Limits the number of signature verifications (e.g. `OP_CHECKSIG`, `OP_CHECKDATASIG`) per transaction to ensure efficient validation.
36+
- **Signature Operation Count** (SigChecks) Limits the number of signature verifications (e.g. `OP_CHECKSIG`, `OP_CHECKDATASIG`) per transaction to ensure efficient validation.
3737

3838
- **Hashing Limit**: Limits the number of hashing operations (e.g. `OP_SHA256`, `OP_HASH160`) allowed per transaction to prevent excessive resource usage.
3939

website/docs/language/types.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,22 @@ VM numbers follow Script Number format (A.K.A. CSCriptNum), to convert VM number
180180

181181
### Semantic Byte Casting
182182

183-
Bytes to bytes casting is just semantic and can be helpful for working with `LockingBytecode` global functions which expect a specific length input. To utilize byte-padding, convert to `int` and utilize the integer padding.
183+
When casting unbounded `bytes` types to bounded `bytes` types (such as `bytes20` or `bytes32`), this is a purely semantic cast. The bytes are not padded with zeros, and no checks are performed to ensure the cast bytes are of the correct length. This can be helpful in certain cases, such as `LockingBytecode`, which expects a specific length input.
184184

185185
#### Example
186186
```solidity
187-
bytes pkh = nftcommitment.split(20)[0];
188-
bytes25 lockingBytecode = new LockingBytecodeP2PKH(bytes20(pkh)):
187+
bytes pkh = nftCommitment.split(20)[0]; // (type = bytes, content = 20 bytes)
188+
bytes20 bytes20Pkh = bytes20(pkh); // (type = bytes20, content = 20 bytes)
189+
bytes25 lockingBytecode = new LockingBytecodeP2PKH(bytes20Pkh);
190+
```
191+
192+
If you do need to pad bytes to a specific length, you can convert the bytes to `int` first, and then cast to the bounded `bytes` type. This will pad the bytes with zeros to the specified length, like specified in the *Int to Byte Casting* section above.
193+
194+
#### Example
195+
```solidity
196+
bytes data = nftCommitment.split(10)[0]; // (type = bytes, content = 10 bytes)
197+
bytes20 paddedData = bytes20(int(data)); // (type = bytes20, content = 20 bytes)
198+
require(storedContractState == paddedData);
189199
```
190200

191201
## Operators

website/docs/releases/release-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
title: Release Notes
33
---
44

5+
## v0.11.0-next.0
6+
7+
This update adds CashScript support for the new BCH 2025 network upgrade. To read more about the upgrade, see [this blog post](https://blog.bitjson.com/2025-chips/).
8+
9+
#### cashc compiler
10+
- :hammer_and_wrench: Remove warning for opcount and update warning for byte size to match new limits.
11+
12+
#### CashScript SDK
13+
- :hammer_and_wrench: Update debug tooling to work with the new `BCH_2025_05` instruction set.
14+
515
## v0.10.5
616

717
#### cashc compiler

website/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
label: 'Compiler',
2626
items: [
2727
'compiler/compiler',
28-
'compiler/vmlimits',
28+
'compiler/vm-limits',
2929
'compiler/artifacts',
3030
'compiler/grammar',
3131
],

0 commit comments

Comments
 (0)