Skip to content

Commit ada7d37

Browse files
committed
Update on-chain message
1 parent b45b02d commit ada7d37

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Time to `Hello World` on CKB
22

3-
The target of this tutorial is very simple: use CKB SDKs in various languages to write "Common Knowledge: Hello world!" into a cell on CKB testnet and check it on CKB explorer.
3+
The target of this tutorial is very simple: use CKB SDKs in various languages to write "Hello Common Knowledge Base!" into a cell on CKB testnet and check it on CKB explorer.
44

55
## Sample Code
66
After installing Lumos, you can use it to send a transaction to CKB testnet, write a simple `Common Knowledge`: "Hello World" into a [cell](https://docs.nervos.org/docs/reference/cell/) on CKB.
@@ -26,7 +26,3 @@ https://github.com/Flouse/ckb-tthw/blob/dfdc7218838e29ef01507f9e368853b1ab3c6933
2626
or https://learn.svelte.dev/tutorial/auto-subscriptions
2727

2828
## Reference
29-
- [Lumos Examples](https://github.com/ckb-js/lumos/blob/develop/examples)
30-
- Preview and interact with `simple transfer` code online through [codesandbox](https://codesandbox.io).
31-
https://codesandbox.io/s/github/ckb-js/lumos/tree/develop/examples/secp256k1-transfer?file=/lib.ts
32-
- etc.

js/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Tutorial: Inscribe "Common Knowledge: Hello World!" to CKB Testnet
1+
# Tutorial: Inscribe "Hello Common Knowledge Base!" to CKB Testnet
22

3-
In this tutorial, you will learn how to write "`Common Knowledge: Hello World!`" into a cell on CKB testnet using [Lumos](https://github.com/ckb-js/lumos), a JavaScript/TypeScript library for Nervos CKB. You will also learn how to check the transaction on CKB explorer.
3+
In this tutorial, you will learn how to write "`Hello Common Knowledge Base!`" into a cell on CKB testnet using [Lumos](https://github.com/ckb-js/lumos), a JavaScript/TypeScript library for Nervos CKB. You will also learn how to check the transaction on CKB explorer.
44

55
## Prerequisites
66
Before we begin, it is better that you have some basic knowledge of [Nervos CKB](https://ckbacademy.vercel.app/courses/basic-theory).
@@ -9,7 +9,7 @@ But if you don't, there's no need to worry, just follow this tutorial step by st
99

1010
## Only 3 Steps
1111

12-
Although some of the complexity is wrapped up, intuitively writing "Common Knowledge: Hello World!" into a cell on CKB testnet is really just `three steps`:
12+
Although some of the complexity is wrapped up, intuitively writing "Hello Common Knowledge Base!" into a cell on CKB testnet is really just `three steps`:
1313

1414
https://github.com/Flouse/ckb-tthw/blob/dfdc7218838e29ef01507f9e368853b1ab3c6933/js/index.ts#L86-L94
1515

@@ -49,7 +49,7 @@ This function is self-explanatory:
4949

5050
### Check the message on CKB explorer
5151
![Check the message on CKB explorer](https://user-images.githubusercontent.com/1297478/236415697-c3a49e0d-eb8f-473e-a0c1-a587c20e5a42.png)
52-
The cell data is the hex format of "Common Knowledge: Hello world!".
52+
The cell data is the hex format of "Hello Common Knowledge Base!".
5353

5454

5555
## Conclusion

js/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const testPrivKey = CHARLIE.PRIVATE_KEY;
1010
const testAccount: Account = generateAccountFromPrivateKey(testPrivKey);
1111
console.assert(testAccount.address === CHARLIE.ADDRESS);
1212

13-
/** create a new transaction that adds a cell with the message "Common Knowledge: Hello world!" */
13+
/** create a new transaction that adds a cell with the message "Hello Common Knowledge Base!" */
1414
const constructHelloWorldTx = async (
1515
onChainMemo: string
1616
): Promise<lumosHelpers.TransactionSkeletonType> => {
@@ -84,7 +84,7 @@ const signAndSendTx = async (
8484
console.log(`Explorer: ${CKB_TESTNET_EXPLORER}/address/${testAccount.address}\n\n`);
8585

8686
// Step 1: this is the message that will be written on chain
87-
const onChainMemo: string = "Common Knowledge: Hello world!";
87+
const onChainMemo: string = "Hello Common Knowledge Base!";
8888

8989
// Step 2: construct the transaction
9090
let txSkeleton = await constructHelloWorldTx(onChainMemo);

0 commit comments

Comments
 (0)