Skip to content

Commit 6ad5875

Browse files
authored
Merge pull request #536 from nervosnetwork/v2
Merge v2.16.0 into develop
2 parents a41dc63 + f187887 commit 6ad5875

File tree

39 files changed

+953
-475
lines changed

39 files changed

+953
-475
lines changed

examples/ccc-molecule/package-lock.json

Lines changed: 224 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/ccc-molecule/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
"tsx": "^4.19.2"
1717
},
1818
"dependencies": {
19-
"@ckb-ccc/shell": "^1.1.3"
19+
"@ckb-ccc/shell": "^1.1.6"
2020
}
2121
}

examples/create-dob/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"author": "",
1111
"license": "MIT",
1212
"dependencies": {
13-
"@ckb-ccc/core": "^0.0.14-alpha.0",
13+
"@ckb-ccc/core": "^1.5.3",
1414
"@spore-sdk/core": "0.2.0-beta.3",
1515
"@types/react": "^18.0.25",
1616
"@types/react-dom": "^18.0.9",

examples/create-dob/yarn.lock

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@
2929
chalk "^2.4.2"
3030
js-tokens "^4.0.0"
3131

32-
"@ckb-ccc/core@^0.0.14-alpha.0":
33-
version "0.0.14-alpha.0"
34-
resolved "https://registry.yarnpkg.com/@ckb-ccc/core/-/core-0.0.14-alpha.0.tgz#b9ec6e143472c90be54c0e39e2fc323070ec1739"
35-
integrity sha512-kKMah5xWzLt48YE9Asc1KfDfN5lX7c7IE09X/7/ozVqWRNEyY1u6UmSQXyOV5LwP2fgvJmkkRD54H2RRAtNVoA==
32+
"@ckb-ccc/core@^1.5.3":
33+
version "1.5.3"
34+
resolved "https://registry.yarnpkg.com/@ckb-ccc/core/-/core-1.5.3.tgz#90f2cf099b4dc723c48fa42c3aa3fe7fb9758267"
35+
integrity sha512-/W7SYbygBateN6odqkMhQlkoQFs+45pJ7hYZYEaEpRdF6DjU7sIOvVSkw3qXiUOK37b2qAWJj3I8CJQbesKpng==
3636
dependencies:
37-
"@joyid/ckb" "^1.0.1"
37+
"@joyid/ckb" "^1.1.1"
3838
"@noble/ciphers" "^0.5.3"
3939
"@noble/curves" "^1.4.2"
4040
"@noble/hashes" "^1.4.0"
4141
abort-controller "^3.0.0"
4242
bech32 "^2.0.0"
4343
bitcoinjs-message "^2.2.0"
44+
bs58check "^4.0.0"
4445
buffer "^6.0.3"
4546
cross-fetch "^4.0.0"
4647
ethers "^6.13.1"
@@ -205,13 +206,13 @@
205206
resolved "https://registry.yarnpkg.com/@exact-realty/multipart-parser/-/multipart-parser-1.0.12.tgz#8dc730154ef1c28836840ffdf889d41c1b109470"
206207
integrity sha512-HTIbhEQg+llTPpVsoUJzAkv8ClZwMJAGv03FY/6kL7nTcQuJ6vOiylQt5J761MrXrxLYshQy9bQMBLSuD2hDtQ==
207208

208-
"@joyid/ckb@^1.0.1":
209-
version "1.0.1"
210-
resolved "https://registry.yarnpkg.com/@joyid/ckb/-/ckb-1.0.1.tgz#837acecbfd5b120a8702d363384d888d7b25c7b3"
211-
integrity sha512-pKAJouigChqcwKgtLw4RNOwi+nBh3NVjpU+qZd+uu3wmoTpivnSRLbJH8/SlkgQcWn2aJ+mDJchR8GpQYh5H6Q==
209+
"@joyid/ckb@^1.1.1":
210+
version "1.1.1"
211+
resolved "https://registry.yarnpkg.com/@joyid/ckb/-/ckb-1.1.1.tgz#4b8087f9268c97115e6190fd7ae31c34b2e19eeb"
212+
integrity sha512-UIDH41PKN6EnLp1j9/6P4Pb+IaBuJKwLRw7Azo6q4E7uLgYu1E1vjBCYwsyYY1xqr8iwwZ1eyrbNgnTIH2B4vQ==
212213
dependencies:
213214
"@joyid/common" "0.2.0"
214-
"@nervosnetwork/ckb-sdk-utils" "^0.109.2"
215+
"@nervosnetwork/ckb-sdk-utils" "^0.109.5"
215216
cross-fetch "4.0.0"
216217
uncrypto "^0.1.3"
217218

@@ -304,21 +305,21 @@
304305
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.2.tgz#0f164b726869f71da3c594171df5ebc1c4b0a407"
305306
integrity sha512-O+6Gs8UeDbyFpbSh2CPEz/UOrrdWPTBYNblZK5CxxLisYt4kGX3Sc+czffFonyjiGSq3jWLwJS/CCJc7tBr4sQ==
306307

307-
"@nervosnetwork/ckb-sdk-utils@^0.109.2":
308-
version "0.109.3"
309-
resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-utils/-/ckb-sdk-utils-0.109.3.tgz#19dafa7608d703456043d1f24cce8256ff1bc28d"
310-
integrity sha512-sV3WXlZmd765qtFsXpwl0Bl3hOgGev15Og810acO6iC0cVHEVvv/Uiabd8a2xkqyfziRDI0tfWC0DewOJB28rg==
308+
"@nervosnetwork/ckb-sdk-utils@^0.109.5":
309+
version "0.109.5"
310+
resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-sdk-utils/-/ckb-sdk-utils-0.109.5.tgz#5f760cf2a4ec8f76d5ee42ce7408c8859646073b"
311+
integrity sha512-Tx642hcJWbN8W3KzCIhIo49yzJ8LMqWopQCSBDKuRmwHesO/bvJqYojCVwfrOyROtFOPhgjyiGm5RXBuxm0KpQ==
311312
dependencies:
312-
"@nervosnetwork/ckb-types" "0.109.3"
313+
"@nervosnetwork/ckb-types" "0.109.5"
313314
bech32 "2.0.0"
314-
elliptic "6.5.4"
315+
elliptic "6.6.1"
315316
jsbi "3.1.3"
316317
tslib "2.3.1"
317318

318-
"@nervosnetwork/[email protected].3":
319-
version "0.109.3"
320-
resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-types/-/ckb-types-0.109.3.tgz#730bd21d2b90dc3cfb491639381b93a82ea2ae54"
321-
integrity sha512-i9EVTXCT0bTLpAQXAoF5zHGLWYCXNE5AP4Zl0Niwl3ZplaVAZHNU6ygsh2O3EGmCFv5qlkoY2DuLmsjysEaNLA==
319+
"@nervosnetwork/[email protected].5":
320+
version "0.109.5"
321+
resolved "https://registry.yarnpkg.com/@nervosnetwork/ckb-types/-/ckb-types-0.109.5.tgz#c302eb3149513dc22fe3905265a397d37088c7cd"
322+
integrity sha512-5jQNjFw76YCd+Ppl+0RvBWzxwvWaKfWC5wjVFFdNAieX7xksCHfZFIeow8je7AF8uVypwe56WlLBlblxw9NBBQ==
322323

323324
"@noble/ciphers@^0.5.3":
324325
version "0.5.3"
@@ -349,6 +350,11 @@
349350
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0"
350351
integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==
351352

353+
"@noble/hashes@^1.2.0":
354+
version "1.7.1"
355+
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f"
356+
integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==
357+
352358
353359
version "2.11.0"
354360
resolved "https://registry.yarnpkg.com/@parcel/bundler-default/-/bundler-default-2.11.0.tgz#b682185ed93b1d977f4174779cbe426a4876cfc2"
@@ -1257,6 +1263,11 @@ base-x@^4.0.0:
12571263
resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a"
12581264
integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==
12591265

1266+
base-x@^5.0.0:
1267+
version "5.0.0"
1268+
resolved "https://registry.yarnpkg.com/base-x/-/base-x-5.0.0.tgz#6d835ceae379130e1a4cb846a70ac4746f28ea9b"
1269+
integrity sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ==
1270+
12601271
base64-js@^1.3.1:
12611272
version "1.5.1"
12621273
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
@@ -1419,6 +1430,13 @@ bs58@^5.0.0:
14191430
dependencies:
14201431
base-x "^4.0.0"
14211432

1433+
bs58@^6.0.0:
1434+
version "6.0.0"
1435+
resolved "https://registry.yarnpkg.com/bs58/-/bs58-6.0.0.tgz#a2cda0130558535dd281a2f8697df79caaf425d8"
1436+
integrity sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==
1437+
dependencies:
1438+
base-x "^5.0.0"
1439+
14221440
bs58check@^2.1.2:
14231441
version "2.1.2"
14241442
resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc"
@@ -1428,6 +1446,14 @@ bs58check@^2.1.2:
14281446
create-hash "^1.1.0"
14291447
safe-buffer "^5.1.2"
14301448

1449+
bs58check@^4.0.0:
1450+
version "4.0.0"
1451+
resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-4.0.0.tgz#46cda52a5713b7542dcb78ec2efdf78f5bf1d23c"
1452+
integrity sha512-FsGDOnFg9aVI9erdriULkd/JjEWONV/lQE5aYziB5PoBsXRind56lh8doIZIc9X4HoxT5x4bLjMWN1/NB8Zp5g==
1453+
dependencies:
1454+
"@noble/hashes" "^1.2.0"
1455+
bs58 "^6.0.0"
1456+
14311457
buffer-equals@^1.0.3:
14321458
version "1.0.4"
14331459
resolved "https://registry.yarnpkg.com/buffer-equals/-/buffer-equals-1.0.4.tgz#0353b54fd07fd9564170671ae6f66b9cf10d27f5"
@@ -1721,10 +1747,10 @@ electron-to-chromium@^1.4.668:
17211747
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.681.tgz#5f23fad8aa7e1f64cbb7dd9d15c7e39a1cd7e6e3"
17221748
integrity sha512-1PpuqJUFWoXZ1E54m8bsLPVYwIVCRzvaL+n5cjigGga4z854abDnFRc+cTa2th4S79kyGqya/1xoR7h+Y5G5lg==
17231749

1724-
elliptic@6.5.4:
1725-
version "6.5.4"
1726-
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
1727-
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
1750+
elliptic@6.6.1:
1751+
version "6.6.1"
1752+
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.1.tgz#3b8ffb02670bf69e382c7f65bf524c97c5405c06"
1753+
integrity sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==
17281754
dependencies:
17291755
bn.js "^4.11.9"
17301756
brorand "^1.1.0"

examples/simple-lock/Cargo.lock

Lines changed: 39 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/simple-lock/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TOP := $(cur_dir)
66
# RUSTFLAGS that are likely to be tweaked by developers. For example,
77
# while we enable debug logs by default here, some might want to strip them
88
# for minimal code size / consumed cycles.
9-
CUSTOM_RUSTFLAGS := --cfg debug_assertions
9+
CUSTOM_RUSTFLAGS := -C debug_assertions
1010
# Additional cargo args to append here. For example, one can use
1111
# make test CARGO_ARGS="-- --nocapture" so as to inspect data emitted to
1212
# stdout in unit tests

examples/simple-lock/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ If you want to test them in devnet/testnet blockchain, then `offckb` might be th
9696

9797
```sh
9898
cd frontend
99-
offckb deploy --network devnet
99+
offckb deploy -t --network devnet
100100
```
101101

102102
If successfully deployed, you will see the deploy script info for your smart contract recorded in the `offckb.config.ts` file. You can then directly import and use your smart contract in your frontend Dapp like this:

examples/simple-lock/contracts/hash-lock/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
ckb-std = "0.15.1"
7+
ckb-std = "0.16.4"
88
ckb-hash = {version = "0.114.0", default-features = false, features = ["ckb-contract"] }

examples/simple-lock/contracts/hash-lock/src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ pub enum Error {
2121
ItemMissing,
2222
LengthNotEnough,
2323
Encoding,
24+
WaitFailure,
25+
InvalidFd,
26+
OtherEndClosed,
27+
MaxVmsSpawned,
28+
MaxFdsCreated,
2429
// Add customized errors here...
2530
CheckError,
2631
UnMatch,
@@ -33,6 +38,11 @@ impl From<SysError> for Error {
3338
SysError::ItemMissing => Self::ItemMissing,
3439
SysError::LengthNotEnough(_) => Self::LengthNotEnough,
3540
SysError::Encoding => Self::Encoding,
41+
SysError::WaitFailure => Self::WaitFailure,
42+
SysError::InvalidFd => Self::InvalidFd,
43+
SysError::OtherEndClosed => Self::OtherEndClosed,
44+
SysError::MaxVmsSpawned => Self::MaxVmsSpawned,
45+
SysError::MaxFdsCreated => Self::MaxFdsCreated,
3646
SysError::Unknown(err_code) => panic!("unexpected sys error {}", err_code),
3747
}
3848
}

0 commit comments

Comments
 (0)