Skip to content

Commit 1d2b05f

Browse files
committed
Fix spellcheck
1 parent 037757a commit 1d2b05f

File tree

15 files changed

+60
-35
lines changed

15 files changed

+60
-35
lines changed

.cspell.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"cashc",
3434
"cashproof",
3535
"cashscript",
36+
"cashtokens",
3637
"castable",
3738
"checkdatasig",
3839
"checkdatasigverify",
@@ -79,6 +80,7 @@
7980
"INPUTBYTECODE",
8081
"INPUTINDEX",
8182
"INPUTSEQUENCENUMBER",
83+
"ints",
8284
"kalis",
8385
"keypair",
8486
"keypairs",
@@ -98,6 +100,7 @@
98100
"meep",
99101
"minimaldata",
100102
"minimalif",
103+
"mocknet",
101104
"n",
102105
"noncompressed",
103106
"nonschnorr",
@@ -109,6 +112,7 @@
109112
"numequal",
110113
"numequalverify",
111114
"numnotequal",
115+
"NOTEQUAL",
112116
"op",
113117
"opcode",
114118
"opcodes",
@@ -156,21 +160,28 @@
156160
"sigs",
157161
"spedn",
158162
"startup",
163+
"standardness",
159164
"tagline",
160165
"teardown",
161166
"tendo",
162167
"timeout",
168+
"timeops",
169+
"timelock",
170+
"timelocks",
163171
"toaltstack",
164172
"troutner",
165173
"tuple",
166174
"tuples",
175+
"typeof",
167176
"txid",
168177
"TXINPUTCOUNT",
169178
"TXLOCKTIME",
170179
"TXOUTPUTCOUNT",
171180
"txvalue",
172181
"TXVERSION",
173182
"unary",
183+
"unlocker",
184+
"unlockers",
174185
"utxo",
175186
"utxo's",
176187
"UTXOBYTECODE",
@@ -185,29 +196,43 @@
185196
"workdir"
186197
],
187198
"ignoreWords": [
199+
"bitcats",
188200
"bitcoincashjs",
201+
"branchup",
202+
"bchguru",
189203
"cashcompiler",
204+
"cashninjas",
190205
"cherian",
206+
"CSCriptNum",
191207
"docu",
208+
"fundme",
209+
"hardhat",
192210
"infima",
193211
"jedex",
194212
"lichos",
213+
"mainnetjs",
195214
"maxdepth",
196215
"networkprovider",
197216
"outputnulldata",
198217
"outputp",
218+
"pako",
219+
"popd",
220+
"pushd",
199221
"setfiletype",
200222
"tada",
223+
"tapswap",
201224
"txage",
202225
"txbytecode",
203226
"txhashoutputs",
204227
"txtime",
228+
"vite",
205229
"withage",
206230
"withfeeperbyte",
207231
"withhardcodedfee",
208232
"withminchange",
209233
"withopreturn",
210-
"withtime"
234+
"withtime",
235+
"XBVJRKV"
211236
],
212237
"ignorePaths": [
213238
// Do not spellcheck NPM files

packages/cashscript/src/LibauthTemplate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const buildTemplate = async ({
101101
};
102102

103103
// add extra unlocking and locking script for P2PKH inputs spent alongside our contract
104-
// this is needed for correct cross-referrences in the template
104+
// this is needed for correct cross-references in the template
105105
template.scripts[unlockScriptName] = {
106106
name: unlockScriptName,
107107
script:

packages/cashscript/src/Transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export class Transaction {
278278
// Compare nfts in- and outputs, check if inputs have nfts corresponding to outputs
279279
// Keep list of nfts in inputs without matching output
280280
// First check immutable nfts, then mutable & minting nfts together
281-
// This is so an immutible input gets matched first and is removed from the list of unused nfts
281+
// This is so an immutable input gets matched first and is removed from the list of unused nfts
282282
let unusedNfts = listNftsInputs;
283283
for (const nftInput of listNftsInputs) {
284284
if (nftInput.capability === 'none') {

packages/cashscript/src/TransactionBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class TransactionBuilder {
5252
(!unlocker && utxos.some((utxo) => !isUnlockableUtxo(utxo)))
5353
|| (unlocker && utxos.some((utxo) => isUnlockableUtxo(utxo)))
5454
) {
55-
throw new Error('Either all UTXOs must have an individual unlocker speciifed, or no UTXOs must have an individual unlocker specified and a shared unlocker must be provided');
55+
throw new Error('Either all UTXOs must have an individual unlocker specified, or no UTXOs must have an individual unlocker specified and a shared unlocker must be provided');
5656
}
5757

5858
if (!unlocker) {

packages/cashscript/test/debugging.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ describe('Debugging tests', () => {
694694
});
695695

696696
// test_multiline_non_require_error
697-
it('should fail with correct error message and statament when a multiline non-require statement fails', async () => {
697+
it('should fail with correct error message and statement when a multiline non-require statement fails', async () => {
698698
const contract = new Contract(artifact3, [], { provider });
699699

700700
provider.addUtxo(contract.address, randomUtxo());

website/docs/basics/about-bch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_label: About Bitcoin Cash
55

66
Bitcoin Cash (ticker BCH) is one of the biggest cryptocurrencies. Bitcoin Cash is a fork of Bitcoin started in 2017 because of differences in vision for the future of the Bitcoin project.
77

8-
Bitcoin Cash shares many of the same fundamentals as Bitcoin (BTC) like the *Proof-of-Work* consensus alrgorithm and the *UTXO data-model*. However regarding smart contract programmability, Bitcoin Cash has significantly diverged from Bitcoin (BTC). We will first cover the UTXO data model and then delve into the smart contract capabilities of Bitcoin Cash.
8+
Bitcoin Cash shares many of the same fundamentals as Bitcoin (BTC) like the *Proof-of-Work* consensus algorithm and the *UTXO data-model*. However regarding smart contract programmability, Bitcoin Cash has significantly diverged from Bitcoin (BTC). We will first cover the UTXO data model and then delve into the smart contract capabilities of Bitcoin Cash.
99

1010
:::info
1111
To learn more about the Bitcoin Basics refer to the book ['Mastering Bitcoin'](https://github.com/bitcoinbook/bitcoinbook). There is also a modified version for BCH specifically called ['Mastering Bitcoin Cash'](https://github.com/Bitcoin-com/mastering-bitcoin-cash).
@@ -31,4 +31,4 @@ The locking and unlocking scripts of regular transactions and smart contracts on
3131

3232
### CashScript
3333

34-
CashScript is a high-level programming language for smart contracts on Bitcoin Cash that offers a strong abstraction for a smoother development experience. The CashScript syntax is based on Ethereum's smart contract language Solidity, but its functionality is very different since smart contracts on Bitcoin Cash differ greatly from smart contracts on Ethereum.
34+
CashScript is a high-level programming language for smart contracts on Bitcoin Cash that offers a strong abstraction for a smoother development experience. The CashScript syntax is based on Ethereum's smart contract language Solidity, but its functionality is very different since smart contracts on Bitcoin Cash differ greatly from smart contracts on Ethereum.

website/docs/basics/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ With the CashScript playground there's a nice integrated editor to get started,
2020

2121
To write CashScript smart contracts locally you use a code editor. For the best developer experience, we recommend to use VS Code with the CashScript extension. This way it will automatically recognize `.cash` files and offer highlighting and autocompletion.
2222

23-
:::note prerequisties
23+
:::note prerequisites
2424
- Basic familiarity with the command line
2525
- Node.js installed
2626
- A code editor (VS Code recommended)
@@ -149,4 +149,4 @@ const transferDetails = await contract.functions
149149
console.log(transferDetails);
150150
```
151151

152-
Congrats 🎉! You've successfully created a transaction spending from a Bitcoin Cash smart contract!
152+
Congrats 🎉! You've successfully created a transaction spending from a Bitcoin Cash smart contract!

website/docs/guides/debugging.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ If a CashScript transaction is evaluated with `.debug()` or is sent to a network
2626
```bash
2727
HodlVault.cash:23 Require statement failed at input 0 in contract HodlVault.cash at line 23.
2828
Failing statement: require(price >= priceTarget)
29-
Bithauth IDE: [link]
29+
Bitauth IDE: [link]
3030
```
3131

3232
Read the error message to see which line in the CashScript contract causes the transaction validation to fail. Investigate whether the contract function invocation is the issue (on the TypeScript SDK side) or whether the issue is in the CashScript contract itself (so you'd need to update your contract and recompile the artifact). If it is not clear **why** the CashScript contract is failing on that line, then you can use the following two strategies: console logging & Bitauth IDE stack trace.
3333

3434
### Console Logging
3535

36-
To help with debugging you can add `console.log` statements to your CashScript contract file to log variables. This way you investigate whether the variables have the expected values when they get to the failing `require` statement in the CashScript file. After adding the `console.log` statements, recompile your contract so they are added to your contract's Artifact.
36+
To help with debugging you can add `console.log` statements to your CashScript contract file to log variables. This way you investigate whether the variables have the expected values when they get to the failing `require` statement in the CashScript file. After adding the `console.log` statements, recompile your contract so they are added to your contract's Artifact.
3737

3838
### Bitauth IDE
3939

@@ -50,7 +50,7 @@ const uri = await transaction.bitauthUri();
5050
It is unsafe to debug transactions on mainnet as private keys will be exposed to BitAuth IDE and transmitted over the network.
5151
:::
5252

53-
The Bithauth IDE will show you the two-way mapping between the CashScript contract code generated opcodes. Here is [a Bithauth IDE link][BitauthIDE] for the basic `TransferWithTimeout` contract as an example:
53+
The Bitauth IDE will show you the two-way mapping between the CashScript contract code generated opcodes. Here is [a Bitauth IDE link][BitauthIDE] for the basic `TransferWithTimeout` contract as an example:
5454

5555
```js
5656
// "TransferWithTimeout" contract constructor parameters
@@ -73,7 +73,7 @@ OP_3 OP_ROLL OP_1 OP_ROLL OP_CHECKSIG OP_VERIFY /* require(checkSig(send
7373
OP_1 OP_ROLL OP_CHECKLOCKTIMEVERIFY OP_DROP /* require(tx.time >= timeout); */
7474
OP_1 OP_NIP /* } */
7575
OP_ENDIF /* } */
76-
/*
76+
/*
7777
```
7878
7979
## Advanced Transaction Builder
@@ -88,12 +88,12 @@ When a transaction gets rejected by a full node, it will return a cryptic error
8888
mandatory-script-verify-flag-failed (Script failed an OP_VERIFY operation) (code 16)
8989
```
9090
91-
Read the message carefully to investigate whether the issue is a failing script (failing OpCode) or whether a standardness rule like minimum-relay-fee is violated.
91+
Read the message carefully to investigate whether the issue is a failing script (failing OpCode) or whether a standardness rule like minimum-relay-fee is violated.
9292
If the cause is a failing OpCode, you can check the contract's Artifact to see how many appearances this OpCode has. Sometimes the OpCode only appears once or twice, indicating where the failing `require` statement is. Other times you might see 15 appearances of the OpCode leaving you to try the next strategies.
9393
9494
### Removing Contract Checks
9595
96-
If your contract fails, you can remove (or comment out) the lines that are the likely cause of the error. After recompiling to a new Artifact you can test whether the remaining subcontract works or fails with a different error. If this is the case, then you learned that there is an issue in the removed CashScript code block. In the worst case, when you have no indication from the failing opcode (previous strategy), then you will have to try to remove different parts of your contract and try different sub-contracts repeatedly.
96+
If your contract fails, you can remove (or comment out) the lines that are the likely cause of the error. After recompiling to a new Artifact you can test whether the remaining subcontract works or fails with a different error. If this is the case, then you learned that there is an issue in the removed CashScript code block. In the worst case, when you have no indication from the failing opcode (previous strategy), then you will have to try to remove different parts of your contract and try different sub-contracts repeatedly.
9797
9898
To use this strategy effectively, the contract setup with funding should be automated as to avoid having to send testnet coins manually to each different subcontract. However inefficient, this strategy should always be able to get you to find the failing line in your CashScript contract. Then you can investigate whether the issue is the contract invocation or the `require` statement in the CashScript file.
9999

website/docs/guides/optimization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ console.log(contract.opcount);
109109
console.log(contract.bytesize);
110110
```
111111
112-
With this workflow, you can make changes to the contract and the run the JavaScript program to
112+
With this workflow, you can make changes to the contract and the run the JavaScript program to
113113
get an accurate measure of how the bytesize of your contract changes with different optimizations.
114114
115115
## To optimize or not to optimize?
@@ -120,5 +120,5 @@ In the context of optimizing contract bytecode, there's an important remark to c
120120
121121
>We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
122122
123-
It's worth considering whether optimizing the redeem script is necessary at all. If the contract is accepted by the network, and there is no glaring inefficiency in the bytecode, perhaps the best optimization is to not to obsess prematurely about things like blocksize.
123+
It's worth considering whether optimizing the redeem script is necessary at all. If the contract is accepted by the network, and there is no glaring inefficiency in the bytecode, perhaps the best optimization is to not to obsess prematurely about things like block size.
124124

website/docs/language/globals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ int tx.locktime
7171
Represents the `nLocktime` field of the transaction. This is similar to the [`tx.time`][tx.time] global variable but `tx.time` can only be used in `require` statements, not for variable declaration.
7272

7373
:::tip
74-
The usecase for `tx.locktime` is to read the `nLocktime` value and add to the local state. Example usage for this is demonstrated in the [Sablier example](/docs/guides/covenants#keeping-local-state-in-nfts).
74+
The use case for `tx.locktime` is to read the `nLocktime` value and add to the local state. Example usage for this is demonstrated in the [Sablier example](/docs/guides/covenants#keeping-local-state-in-nfts).
7575
:::
7676

7777
### tx.inputs

0 commit comments

Comments
 (0)