Skip to content

Commit

Permalink
Update version in docs and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rkalis committed Oct 16, 2023
1 parent cc83e76 commit 65f18f9
Show file tree
Hide file tree
Showing 30 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion examples/announcement.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;

/* This is a contract showcasing covenants outside of regular transactional use.
* It enforces the contract to make an "announcement" on Memo.cash, and send the
Expand Down
2 changes: 1 addition & 1 deletion examples/hodl_vault.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;

// This contract forces HODLing until a certain price target has been reached
// A minimum block is provided to ensure that oracle price entries from before this block are disregarded
Expand Down
2 changes: 1 addition & 1 deletion examples/mecenas.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;

/* This is an unofficial CashScript port of Licho's Mecenas contract. It is
* not compatible with Licho's EC plugin, but rather meant as a demonstration
Expand Down
2 changes: 1 addition & 1 deletion examples/mecenas_locktime.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;

// This is an experimental contract for a more "streaming" Mecenas experience
// Completely untested, just a concept
Expand Down
2 changes: 1 addition & 1 deletion examples/p2pkh.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;

contract P2PKH(bytes20 pkh) {
// Require pk to match stored pkh and signature to match
Expand Down
2 changes: 1 addition & 1 deletion examples/transfer_with_timeout.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;

contract TransferWithTimeout(
pubkey sender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract TransferWithTimeout(
pubkey sender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract TransferWithTimeout(
pubkey sender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract TransferWithTimeout(
pubkey sender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract TransferWithTimeout(
pubkey sender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract P2PKH(bytes20 pkh) {
function spend(pubkey pk, bytes65 s) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract P2PKH() {
function spend() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract P2PKH(bytes20 pkh) {
function spend(pubkey pk, sig s) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cashc/test/compiler/ParseError/full_iso_date.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract Test() {
function test() {
Expand Down
2 changes: 1 addition & 1 deletion packages/cashc/test/compiler/ParseError/invalid_date.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract Test() {
function test() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract Test() {
function test() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract TransferWithTimeout(
pubkey sender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript >=0.9.0 <0.10.0;
pragma cashscript >=0.10.0 <0.11.0;

contract Test() {
function hello(sig s, pubkey pk) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cashc/test/valid-contract-files/announcement.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

/* This is a contract showcasing covenants outside of regular transactional use.
* It enforces the contract to make an "announcement" on Memo.cash, and send the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract Test() {
function hello(sig s, pubkey pk) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cashc/test/valid-contract-files/date_literal.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract Test() {
function test() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract TransferWithTimeout(
pubkey sender,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract P2PKH(bytes20 pkh) {
function spend(pubkey pk, sig s) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

contract P2PKH(bytes20 pkh) {
function spend(pubkey pk, bytes65 s) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cashscript/test/fixture/announcement.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

/* This is a contract showcasing covenants outside of regular transactional use.
* It enforces the contract to make an "announcement" on Memo.cash, and send the
Expand Down
2 changes: 1 addition & 1 deletion packages/cashscript/test/fixture/mecenas.cash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma cashscript ^0.8.0;
pragma cashscript >=0.8.0;

/* This is an unofficial CashScript port of Licho's Mecenas contract. It is
* not compatible with Licho's EC plugin, but rather meant as a demonstration
Expand Down
2 changes: 1 addition & 1 deletion website/docs/basics/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CashScript only offers a JavaScript SDK, but CashScript contracts can be integra
There are some examples available on the [Examples page](/docs/language/examples), that can be used to take inspiration from. Further examples of the JavaScript integration can be found on [GitHub](https://github.com/Bitcoin-com/cashscript/tree/master/examples). A simple example is included below.

```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
contract TransferWithTimeout(pubkey sender, pubkey recipient, int timeout) {
// Allow the recipient to claim their received money
Expand Down
10 changes: 5 additions & 5 deletions website/docs/language/contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The pragma directive follows regular [semantic versioning rules](https://semver.

#### Example
```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
pragma cashscript >= 0.4.0 < 0.5.4;
```

Expand All @@ -22,7 +22,7 @@ A CashScript constructor works slightly differently than what you might be used

#### Example
```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
contract HTLC(pubkey sender, pubkey recipient, int expiration, bytes32 hash) {
...
Expand All @@ -38,7 +38,7 @@ The main construct in a CashScript contract is the function. A contract can cont

#### Example
```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
contract TransferWithTimeout(pubkey sender, pubkey recipient, int timeout) {
function transfer(sig recipientSig) {
Expand All @@ -63,7 +63,7 @@ The most important statement of CashScript contracts is the `require` statement.

#### Example
```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
contract P2PKH(bytes20 pkh) {
function spend(pubkey pk, sig s) {
Expand Down Expand Up @@ -105,7 +105,7 @@ There is no implicit type conversion from non-boolean to boolean types. So `if (

#### Example
```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
contract OneOfTwo(bytes20 pkh1, bytes32 hash1, bytes20 pkh2, bytes32 hash2) {
function spend(pubkey pk, sig s, bytes message) {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/language/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ One interesting use case of Bitcoin Cash is using it for *paper tips*. With pape
As an alternative, a smart contract can be used for these kinds of gifts. This smart contract allows the recipient to claim their gift at any time, but if they don't claim it in time, the sender can reclaim it.

```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
contract TransferWithTimeout(pubkey sender, pubkey recipient, int timeout) {
// Require recipient's signature to match
Expand All @@ -34,7 +34,7 @@ This smart contract works by connecting with a price oracle. This price oracle i
This involves some degree of trust in the price oracle, but since the oracle produces price data for everyone to use, their incentive to attack *your* smart contract is minimised. To improve this situation, you can also choose to connect with multiple oracle providers so you do not have to trust a single party.

```solidity
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
// A minimum block is provided to ensure that oracle price entries from before
// this block are disregarded. i.e. when the BCH price was $1000 in the past,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/sdk/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This contract expects a hardcoded transaction fee of 1000 satoshis. This is nece
To ensure that this leftover money does not get lost in the contract, the contract performs an extra check, and adds the remainder to the transaction fee if it's too low.

```solidity title="Announcement.cash"
pragma cashscript ^0.8.0;
pragma cashscript ^0.9.0;
// This contract enforces making an announcement on Memo.cash and sending the
// remaining balance back to the contract.
Expand Down

1 comment on commit 65f18f9

@vercel
Copy link

@vercel vercel bot commented on 65f18f9 Oct 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.