Skip to content

Commit

Permalink
fix: typos (#353) (#354)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhengfei Li <genffyl@gmail.com>
  • Loading branch information
RetricSu and genffy committed May 28, 2024
1 parent 7123996 commit 12e6c25
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/carrot-script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CUSTOM_RUSTFLAGS := --cfg debug_assertions
CARGO_ARGS :=
MODE := release
# Tweak this to change the clang version to use for building C code. By default
# we use a bash script with somes heuristics to find clang in current system.
# we use a bash script with some heuristics to find clang in current system.
CLANG := $(shell $(TOP)/scripts/find_clang)
# When this is set, a single contract will be built instead of all contracts
CONTRACT :=
Expand Down
2 changes: 1 addition & 1 deletion examples/carrot-script/contracts/carrot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FULL_RUSTFLAGS := -C target-feature=+zba,+zbb,+zbc,+zbs $(CUSTOM_RUSTFLAGS)
CARGO_ARGS :=
MODE := release
# Tweak this to change the clang version to use for building C code. By default
# we use a bash script with somes heuristics to find clang in current system.
# we use a bash script with some heuristics to find clang in current system.
CLANG := $(shell $(TOP)/scripts/find_clang)
# When this is set to some value, the generated binaries will be copied over
BUILD_DIR :=
Expand Down
2 changes: 1 addition & 1 deletion examples/ckb-js-script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CUSTOM_RUSTFLAGS := --cfg debug_assertions
CARGO_ARGS :=
MODE := release
# Tweak this to change the clang version to use for building C code. By default
# we use a bash script with somes heuristics to find clang in current system.
# we use a bash script with some heuristics to find clang in current system.
CLANG := $(shell $(TOP)/scripts/find_clang)
# When this is set, a single contract will be built instead of all contracts
CONTRACT :=
Expand Down
2 changes: 1 addition & 1 deletion examples/ckb-js-script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ called spawn, where you can call CKB-js-vm from your script use `ckb_spawn` syst
use Script structure to load and execute your JavaScript script in a live cell.

There is also a full tutorial covering all the details for yout to run JavaScript smart contracts
on CKB in the offical docs webesite: [docs.nervos.org](https://docs.nervos.org).
on CKB in the official docs webesite: [docs.nervos.org](https://docs.nervos.org).

*This project was bootstrapped with [ckb-script-templates].*

Expand Down
2 changes: 1 addition & 1 deletion examples/ckb-js-script/contracts/run-js/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FULL_RUSTFLAGS := -C target-feature=+zba,+zbb,+zbc,+zbs $(CUSTOM_RUSTFLAGS)
CARGO_ARGS :=
MODE := release
# Tweak this to change the clang version to use for building C code. By default
# we use a bash script with somes heuristics to find clang in current system.
# we use a bash script with some heuristics to find clang in current system.
CLANG := $(shell $(TOP)/scripts/find_clang)
# When this is set to some value, the generated binaries will be copied over
BUILD_DIR :=
Expand Down
2 changes: 1 addition & 1 deletion website/docs/ecosystem/EcoCardContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ const ecoCardContents: EcoCardProps[] = [
},
{
title: "Poolin",
description: "A great bitocin and multi-cryptocurrency mining pool",
description: "A great bitcoin and multi-cryptocurrency mining pool",
href: "https://www.poolin.com/",
bannerSrc: "poolin",
tags: ["Mining pool"],
Expand Down
4 changes: 2 additions & 2 deletions website/docs/getting-started/how-ckb-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Cell boxes can store any data types, as long as there is enough space to fit the

### Advanced Coding Capabilities

Unlike the simple and limited code that UTXOs can carry, Cells can use complex, Turing-complete codes akin to the normal software runing on your computer. You can learn the difference of [limited scripts](https://en.bitcoin.it/wiki/Script) and [Turing-complete scripts](/docs/tech-explanation/script) further.
Unlike the simple and limited code that UTXOs can carry, Cells can use complex, Turing-complete codes akin to the normal software running on your computer. You can learn the difference of [limited scripts](https://en.bitcoin.it/wiki/Script) and [Turing-complete scripts](/docs/tech-explanation/script) further.

### Dual Lock System

Expand Down Expand Up @@ -71,7 +71,7 @@ Cell: {
```

:::note
The total size of all four fiels above in a Cell must be less than or equal to the Cell's capacity, as shown below:
The total size of all four fields above in a Cell must be less than or equal to the Cell's capacity, as shown below:

```
capacity = Cell's total space >= Sum of the byte lengths of the 4 fields
Expand Down
2 changes: 1 addition & 1 deletion website/docs/node/rpcs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CKB RPCs are a set of programming interfaces provided by the Nervos CKB blockcha

## RPC Provider: Ankr

Ankr is an RPC provider that wors as intermediary to help you interact with the Nervos Network. You might experience some levels of latency depending on the provider’s location.
Ankr is an RPC provider that works as intermediary to help you interact with the Nervos Network. You might experience some levels of latency depending on the provider’s location.
Ankr’s endpoint root: [https://rpc.ankr.com/nervos](https://rpc.ankr.com/nervos)

## CKB JSON-RPC Protocols
Expand Down
4 changes: 2 additions & 2 deletions website/docs/script/intro-to-script.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "Intro to Script"

# Intro to Script

A [Script](/docs/tech-explanation/script) in Nervos CKB is a binary executable that can be executed on-chain. It is Turing-complete and can perform arbitray logic to guard and protect your on-chain assets. You can think of it as smart contract.
A [Script](/docs/tech-explanation/script) in Nervos CKB is a binary executable that can be executed on-chain. It is Turing-complete and can perform arbitrary logic to guard and protect your on-chain assets. You can think of it as smart contract.

## How a Script Work

Expand All @@ -24,7 +24,7 @@ A Script can be one of two types:

In most cases, Lock Script works the same with Type Script. The difference is that, only the Lock Script from the input Cells will be exeuted in the transaction, while the Type Script from both the input Cells and output Cells will be executed in the transaction.

This difference has lead to the different usecases of Lock Script and Type Script as we have mentioned above. Lock Script is often used to control owener ship of a Cell while Type Script defines what kinds of changes of a Cell is valid for the transaction.
This difference has lead to the different usecases of Lock Script and Type Script as we have mentioned above. Lock Script is often used to control owner ship of a Cell while Type Script defines what kinds of changes of a Cell is valid for the transaction.

## Script Structure

Expand Down
4 changes: 2 additions & 2 deletions website/docs/script/js-script.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ fn hello_script() {
];

// prepare output cell data
let outputs_data = vec![Bytes::new()), Bytes::new()];
let outputs_data = vec![Bytes::new(), Bytes::new()];

// build transaction
let tx = TransactionBuilder::default()
Expand Down Expand Up @@ -775,7 +775,7 @@ if (exit_code != 0) {
Compile this `sudt.js` into binaries with CKB-Debugger:

```sh
ckb-debugger --read-file js/fib.js --bin deps/ckb-js-vm -- -c | awk '/Run result: 0/{exit} {print}' | xxd -r -p > js/build/fib.bc
ckb-debugger --read-file js/sudt.js --bin deps/ckb-js-vm -- -c | awk '/Run result: 0/{exit} {print}' | xxd -r -p > js/build/sudt.bc
```

Add a new test to the `tests` file:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/tech-explanation/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Nervos Network, comprising thousands of computers and millions of transactions,

To achieve Nervos' objectives, a consensus mechanism without compromise is imperative. Proof of Work (PoW) emerged as the optimal choice with the following advantages over Proof of Stake (PoS):

- **Decentralization**: PoW mining adapts to external factors, such as mining equipments, energy consumption, and regulation. This necessitates ongoing reinvestment to maintain competitiveness, thereby discouraging monopolization in the long run.
- **Decentralization**: PoW mining adapts to external factors, such as mining equipment, energy consumption, and regulation. This necessitates ongoing reinvestment to maintain competitiveness, thereby discouraging monopolization in the long run.
- **Security**: PoW offers a simpler and more robust framework, requiring fewer assumptions than alternative consensus mechanisms. This reduces the potential for security vulnerabilities and ensures a more secure network overall.
- **Fairness**: PoW mitigates advantages favoring early participants. Unlike PoS, where rewards are deterministically awarded and favor those who enter the system early, PoW ensures a more equitable distribution of rewards over time.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/tech-explanation/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@ A Live Cell that is created in a transaction.

### Overlord

A byzantine fault tollerant consensus algorithm designed by Nervos for Huobi which can support thousands of transactions per second.
A byzantine fault tolerant consensus algorithm designed by Nervos for Huobi which can support thousands of transactions per second.

#### See Also

Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface EcoSectionProps {
children: React.ReactNode;
}

// Card componnet at the top of the home page
// Card component at the top of the home page
function HomeCardSection() {
return (
<CardLayout colNum={[3, 1, 1, 1]} gap={16}>
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/ImgContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface ImgContainerProps {
src: string;
}

export default function ImgContaienr({
export default function ImgContainer({
alt,
src,
}: ImgContainerProps): JSX.Element {
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Home() {
src={"/svg/header-glow.svg"}
alt={"glowing effect"}
/>
<SwtichToDark />
<SwitchToDark />
<CookieConsent />
<div className={clsx(styles.sectionContainer)}>
<div className={styles.header1}>Nervos CKB Documentation</div>
Expand Down Expand Up @@ -89,7 +89,7 @@ export default function Home() {
);
}

function SwtichToDark() {
function SwitchToDark() {
const { setColorMode } = useColorMode();

useEffect(() => {
Expand Down

0 comments on commit 12e6c25

Please sign in to comment.