From a472de2fb96a6a3b638ded3b4db6deb2d78cbaa5 Mon Sep 17 00:00:00 2001 From: RetricSu Date: Thu, 20 Mar 2025 15:47:06 +0800 Subject: [PATCH 1/3] chore: rm legacy v2 templates --- package.json | 4 +- templates/next-js-template/.gitignore | 3 - templates/next-js-template/Cargo.lock | 1390 -- templates/next-js-template/Cargo.toml | 15 - templates/next-js-template/Makefile | 123 - templates/next-js-template/README.md | 118 - .../contracts/hello-world/.gitignore | 2 - .../contracts/hello-world/Cargo.toml | 7 - .../contracts/hello-world/Makefile | 77 - .../contracts/hello-world/README.md | 7 - .../contracts/hello-world/src/main.rs | 18 - templates/next-js-template/frontend/.env | 1 - .../next-js-template/frontend/.eslintrc.json | 3 - .../next-js-template/frontend/.gitignore | 36 - templates/next-js-template/frontend/README.md | 44 - .../next-js-template/frontend/app/favicon.ico | Bin 25931 -> 0 bytes .../next-js-template/frontend/app/globals.css | 7 - .../next-js-template/frontend/app/layout.tsx | 22 - .../next-js-template/frontend/app/page.tsx | 116 - .../frontend/app/wallet-client.ts | 98 - .../next-js-template/frontend/app/wallet.tsx | 207 - .../next-js-template/frontend/next.config.mjs | 17 - .../frontend/offckb.config.ts | 220 - .../frontend/package-lock.json | 6585 ------- .../next-js-template/frontend/package.json | 29 - .../frontend/postcss.config.mjs | 8 - .../next-js-template/frontend/public/next.svg | 1 - .../frontend/public/vercel.svg | 1 - .../frontend/tailwind.config.ts | 19 - .../next-js-template/frontend/tsconfig.json | 26 - templates/next-js-template/scripts/find_clang | 32 - .../scripts/reproducible_build_docker | 66 - templates/next-js-template/tests/Cargo.toml | 8 - templates/next-js-template/tests/src/lib.rs | 112 - templates/next-js-template/tests/src/tests.rs | 63 - templates/offckb.config.ts | 220 - templates/readme.md | 2 - templates/remix-vite-template/.gitignore | 3 - templates/remix-vite-template/Cargo.lock | 1368 -- templates/remix-vite-template/Cargo.toml | 15 - templates/remix-vite-template/Makefile | 123 - templates/remix-vite-template/README.md | 123 - .../contracts/hello-world/.gitignore | 2 - .../contracts/hello-world/Cargo.toml | 7 - .../contracts/hello-world/Makefile | 77 - .../contracts/hello-world/README.md | 7 - .../contracts/hello-world/src/main.rs | 18 - .../frontend/.eslintrc.cjs | 84 - .../remix-vite-template/frontend/.gitignore | 5 - .../remix-vite-template/frontend/README.md | 36 - .../frontend/app/components/home.client.tsx | 114 - .../app/components/wallet-client.client.ts | 96 - .../frontend/app/components/wallet.client.tsx | 201 - .../frontend/app/entry.client.tsx | 18 - .../frontend/app/entry.server.tsx | 122 - .../remix-vite-template/frontend/app/root.css | 7 - .../remix-vite-template/frontend/app/root.tsx | 45 - .../frontend/app/routes/_index.tsx | 15 - .../frontend/offckb.config.ts | 224 - .../frontend/package-lock.json | 15276 ---------------- .../remix-vite-template/frontend/package.json | 46 - .../frontend/postcss.config.js | 6 - .../frontend/public/favicon.ico | Bin 16958 -> 0 bytes .../frontend/tailwind.config.js | 8 - .../frontend/tsconfig.json | 32 - .../frontend/vite.config.ts | 10 - .../remix-vite-template/scripts/find_clang | 32 - .../scripts/reproducible_build_docker | 66 - .../remix-vite-template/tests/Cargo.toml | 8 - .../remix-vite-template/tests/src/lib.rs | 112 - .../remix-vite-template/tests/src/tests.rs | 63 - templates/template.json | 16 - 72 files changed, 2 insertions(+), 28090 deletions(-) delete mode 100644 templates/next-js-template/.gitignore delete mode 100644 templates/next-js-template/Cargo.lock delete mode 100644 templates/next-js-template/Cargo.toml delete mode 100644 templates/next-js-template/Makefile delete mode 100644 templates/next-js-template/README.md delete mode 100644 templates/next-js-template/contracts/hello-world/.gitignore delete mode 100644 templates/next-js-template/contracts/hello-world/Cargo.toml delete mode 100644 templates/next-js-template/contracts/hello-world/Makefile delete mode 100644 templates/next-js-template/contracts/hello-world/README.md delete mode 100644 templates/next-js-template/contracts/hello-world/src/main.rs delete mode 100644 templates/next-js-template/frontend/.env delete mode 100644 templates/next-js-template/frontend/.eslintrc.json delete mode 100644 templates/next-js-template/frontend/.gitignore delete mode 100644 templates/next-js-template/frontend/README.md delete mode 100644 templates/next-js-template/frontend/app/favicon.ico delete mode 100644 templates/next-js-template/frontend/app/globals.css delete mode 100644 templates/next-js-template/frontend/app/layout.tsx delete mode 100644 templates/next-js-template/frontend/app/page.tsx delete mode 100644 templates/next-js-template/frontend/app/wallet-client.ts delete mode 100644 templates/next-js-template/frontend/app/wallet.tsx delete mode 100644 templates/next-js-template/frontend/next.config.mjs delete mode 100644 templates/next-js-template/frontend/offckb.config.ts delete mode 100644 templates/next-js-template/frontend/package-lock.json delete mode 100644 templates/next-js-template/frontend/package.json delete mode 100644 templates/next-js-template/frontend/postcss.config.mjs delete mode 100644 templates/next-js-template/frontend/public/next.svg delete mode 100644 templates/next-js-template/frontend/public/vercel.svg delete mode 100644 templates/next-js-template/frontend/tailwind.config.ts delete mode 100644 templates/next-js-template/frontend/tsconfig.json delete mode 100755 templates/next-js-template/scripts/find_clang delete mode 100755 templates/next-js-template/scripts/reproducible_build_docker delete mode 100644 templates/next-js-template/tests/Cargo.toml delete mode 100644 templates/next-js-template/tests/src/lib.rs delete mode 100644 templates/next-js-template/tests/src/tests.rs delete mode 100644 templates/offckb.config.ts delete mode 100644 templates/remix-vite-template/.gitignore delete mode 100644 templates/remix-vite-template/Cargo.lock delete mode 100644 templates/remix-vite-template/Cargo.toml delete mode 100644 templates/remix-vite-template/Makefile delete mode 100644 templates/remix-vite-template/README.md delete mode 100644 templates/remix-vite-template/contracts/hello-world/.gitignore delete mode 100644 templates/remix-vite-template/contracts/hello-world/Cargo.toml delete mode 100644 templates/remix-vite-template/contracts/hello-world/Makefile delete mode 100644 templates/remix-vite-template/contracts/hello-world/README.md delete mode 100644 templates/remix-vite-template/contracts/hello-world/src/main.rs delete mode 100644 templates/remix-vite-template/frontend/.eslintrc.cjs delete mode 100644 templates/remix-vite-template/frontend/.gitignore delete mode 100644 templates/remix-vite-template/frontend/README.md delete mode 100644 templates/remix-vite-template/frontend/app/components/home.client.tsx delete mode 100644 templates/remix-vite-template/frontend/app/components/wallet-client.client.ts delete mode 100644 templates/remix-vite-template/frontend/app/components/wallet.client.tsx delete mode 100644 templates/remix-vite-template/frontend/app/entry.client.tsx delete mode 100644 templates/remix-vite-template/frontend/app/entry.server.tsx delete mode 100644 templates/remix-vite-template/frontend/app/root.css delete mode 100644 templates/remix-vite-template/frontend/app/root.tsx delete mode 100644 templates/remix-vite-template/frontend/app/routes/_index.tsx delete mode 100644 templates/remix-vite-template/frontend/offckb.config.ts delete mode 100644 templates/remix-vite-template/frontend/package-lock.json delete mode 100644 templates/remix-vite-template/frontend/package.json delete mode 100644 templates/remix-vite-template/frontend/postcss.config.js delete mode 100644 templates/remix-vite-template/frontend/public/favicon.ico delete mode 100644 templates/remix-vite-template/frontend/tailwind.config.js delete mode 100644 templates/remix-vite-template/frontend/tsconfig.json delete mode 100644 templates/remix-vite-template/frontend/vite.config.ts delete mode 100755 templates/remix-vite-template/scripts/find_clang delete mode 100755 templates/remix-vite-template/scripts/reproducible_build_docker delete mode 100644 templates/remix-vite-template/tests/Cargo.toml delete mode 100644 templates/remix-vite-template/tests/src/lib.rs delete mode 100644 templates/remix-vite-template/tests/src/tests.rs delete mode 100644 templates/template.json diff --git a/package.json b/package.json index 8c57e56..576eaed 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "build": "tsc", "start": "ts-node-dev --transpile-only src/cli.ts", "clean": "rm -rf ./target", - "lint": "eslint \"src/**/*.ts\" \"templates/*.ts\" --ignore-pattern 'node_modules/'", - "lint:fix": "eslint \"src/**/*.ts\" \"templates/*.ts\" --ignore-pattern 'node_modules/' --fix", + "lint": "eslint \"src/**/*.ts\" \"templates/**/*.ts\" --ignore-pattern 'node_modules/'", + "lint:fix": "eslint \"src/**/*.ts\" \"templates/**/*.ts\" --ignore-pattern 'node_modules/' --fix", "fmt": "prettier --write '{src,templates,account}/**/*.{js,jsx,ts,tsx,md,json}'" }, "husky": { diff --git a/templates/next-js-template/.gitignore b/templates/next-js-template/.gitignore deleted file mode 100644 index 0ff4f2f..0000000 --- a/templates/next-js-template/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/build -/target -/tests/failed_txs diff --git a/templates/next-js-template/Cargo.lock b/templates/next-js-template/Cargo.lock deleted file mode 100644 index 6cdf93c..0000000 --- a/templates/next-js-template/Cargo.lock +++ /dev/null @@ -1,1390 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.15", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "anyhow" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "blake2b-ref" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "294d17c72e0ba59fad763caa112368d0672083779cdebbb97164f4bb4c1e339a" - -[[package]] -name = "blake2b-rs" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89a8565807f21b913288968e391819e7f9b2f0f46c7b89549c051cccf3a2771" -dependencies = [ - "cc", - "cty", -] - -[[package]] -name = "buddy-alloc" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f0d2da64a6a895d5a7e0724882825d50f83c13396b1b9f1878e19a024bab395" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -dependencies = [ - "serde", -] - -[[package]] -name = "cc" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "ckb-always-success-script" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b3b72a38c9920a29990df12002c4d069a147c8782f0c211f8a01b2df8f42bfd" - -[[package]] -name = "ckb-chain-spec" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9b89cadf419c220fa8e1c655af73540bbc010e8c0e177127644848a25830c2" -dependencies = [ - "ckb-constant", - "ckb-crypto", - "ckb-dao-utils", - "ckb-error", - "ckb-hash", - "ckb-jsonrpc-types", - "ckb-pow", - "ckb-rational", - "ckb-resource", - "ckb-traits", - "ckb-types", - "ckb-util", - "serde", - "toml", -] - -[[package]] -name = "ckb-channel" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c904fe3e29474e4d09e8e2775a472456242f8faf18edeeb8c71502710daa38" -dependencies = [ - "crossbeam-channel", -] - -[[package]] -name = "ckb-constant" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d562e7156216f00c5bf55c8f4c86bc25f9ec0603fcfa6df9b66747462a031a" - -[[package]] -name = "ckb-crypto" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abac585cec6f1562e374d66b369c55a52357b33a632d30d2e45cbc455183b22d" -dependencies = [ - "ckb-fixed-hash", - "faster-hex", - "lazy_static", - "rand 0.7.3", - "secp256k1", - "thiserror", -] - -[[package]] -name = "ckb-dao" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c6b5b85ebe6e02bebcc1f1a4db28f1594e1a9e43e8922c05175459f798e844" -dependencies = [ - "byteorder", - "ckb-chain-spec", - "ckb-dao-utils", - "ckb-traits", - "ckb-types", -] - -[[package]] -name = "ckb-dao-utils" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff55485163b842c94061b755c9e6230d1a4bb092b6bc81d8387358911c750e70" -dependencies = [ - "byteorder", - "ckb-error", - "ckb-types", -] - -[[package]] -name = "ckb-error" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8418901ea0d15a8e26255bec0b71be5c59056858f51968894796f77f7eefa3e" -dependencies = [ - "anyhow", - "ckb-occupied-capacity", - "derive_more", - "thiserror", -] - -[[package]] -name = "ckb-fixed-hash" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1254aafda84e9abc85301e9e4c5b920c00a9bff0d42248fccf921b340ec5f13e" -dependencies = [ - "ckb-fixed-hash-core", - "ckb-fixed-hash-macros", -] - -[[package]] -name = "ckb-fixed-hash-core" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffc2850ac8b5643c65913185020de747b290b447d1ee1fd59a2cfdf1a7ceb4f" -dependencies = [ - "faster-hex", - "serde", - "thiserror", -] - -[[package]] -name = "ckb-fixed-hash-macros" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa5a19a7d18caa5a3a65e66506e28943e95696e286df44457a77692319de429" -dependencies = [ - "ckb-fixed-hash-core", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ckb-gen-types" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a12020d50dd3757cde0fdc88d3837b7a2ab503fe38bd11be86ddace11318c77" -dependencies = [ - "cfg-if", - "ckb-error", - "ckb-fixed-hash", - "ckb-hash", - "ckb-occupied-capacity", - "molecule", - "numext-fixed-uint", -] - -[[package]] -name = "ckb-hash" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25af660fc8746f7c756444e6aa47ede9a874206563b6a1ce1b230a5b86519392" -dependencies = [ - "blake2b-ref", - "blake2b-rs", -] - -[[package]] -name = "ckb-jsonrpc-types" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06798b5bacd7fd4125a34f1c9ebf45be59d50aff0ada003bb8b1c6634a447c73" -dependencies = [ - "ckb-types", - "faster-hex", - "serde", - "serde_json", -] - -[[package]] -name = "ckb-logger" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8d8de618d1dbc59ba9e6338a55d17f370f89aa009064dcbdd7eb0c8e8782fe" -dependencies = [ - "log", -] - -[[package]] -name = "ckb-merkle-mountain-range" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ccb671c5921be8a84686e6212ca184cb1d7c51cadcdbfcbd1cc3f042f5dfb8" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "ckb-mock-tx-types" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabfa378c927109844630e4c90e0d7e7e6d6a9174c232f194f490b09e4b757" -dependencies = [ - "ckb-jsonrpc-types", - "ckb-traits", - "ckb-types", - "serde", -] - -[[package]] -name = "ckb-occupied-capacity" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be7132362f12a0495b3b24218afb4e774f9dc0d9254173d2444ec4ac1447461e" -dependencies = [ - "ckb-occupied-capacity-core", - "ckb-occupied-capacity-macros", -] - -[[package]] -name = "ckb-occupied-capacity-core" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4ebe8725d6ee4feb9d376e9a600b2c78cc1dbde5aa754c9a47de871ab917635" -dependencies = [ - "serde", -] - -[[package]] -name = "ckb-occupied-capacity-macros" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201a21d35a377b76440ce12ca62b39e548d019a6330fbdcb40ac0f73fe976cb3" -dependencies = [ - "ckb-occupied-capacity-core", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ckb-pow" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5895b4799fbb7e537ef0a778493b8f8678284c2bb20b476edce3f3375d1c4aa1" -dependencies = [ - "byteorder", - "ckb-hash", - "ckb-types", - "eaglesong", - "log", - "serde", -] - -[[package]] -name = "ckb-rational" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5134dae6f59b1c10457d2a5def081865407e756dd42dd4c7aaf5d6c6bc92b6d1" -dependencies = [ - "numext-fixed-uint", - "serde", -] - -[[package]] -name = "ckb-resource" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c79b7c1586ca652d150b2cfdc5ec8594055659f04e30f832178a14313cfff4" -dependencies = [ - "ckb-system-scripts", - "ckb-types", - "includedir", - "includedir_codegen", - "phf", - "serde", - "walkdir", -] - -[[package]] -name = "ckb-script" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058cb8c72a706bfc95c9b90f7c0256abbc4f44e9c5cabcbf7d1d882df977e82b" -dependencies = [ - "byteorder", - "ckb-chain-spec", - "ckb-error", - "ckb-hash", - "ckb-logger", - "ckb-traits", - "ckb-types", - "ckb-vm", - "faster-hex", - "serde", -] - -[[package]] -name = "ckb-std" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9357d9464ed36a8e542a7d588e894aff25ccb0cdd66221ac94e76bc69ca3ad55" -dependencies = [ - "buddy-alloc", - "cc", - "ckb-gen-types", - "gcd", -] - -[[package]] -name = "ckb-system-scripts" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa5c59063142de7a68cfad4449c6b3863563856219a2925dfb8c5f019ec2aa47" -dependencies = [ - "blake2b-rs", - "faster-hex", - "includedir", - "includedir_codegen", - "phf", -] - -[[package]] -name = "ckb-systemtime" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace369d09f2a4d5d0e0b97359cf34e3282a5a90171f685e8bbab1aa21e80cd54" - -[[package]] -name = "ckb-testtool" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed25ee2af0e899736bb95e4fd1dd4c89f03dd8ae0061ae708b83e405d394431" -dependencies = [ - "ckb-always-success-script", - "ckb-chain-spec", - "ckb-crypto", - "ckb-error", - "ckb-hash", - "ckb-jsonrpc-types", - "ckb-mock-tx-types", - "ckb-resource", - "ckb-script", - "ckb-traits", - "ckb-types", - "ckb-verification", - "lazy_static", - "rand 0.8.5", -] - -[[package]] -name = "ckb-traits" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3396b8f328bc76bdfd9bc14ddd984a07d08120cd4e661ba1dc23fecb3a7607a3" -dependencies = [ - "ckb-types", -] - -[[package]] -name = "ckb-types" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2df7c7410664bc917f1b663c574ec7c0e25711fe4f63eb0043c47c197afb0875" -dependencies = [ - "bit-vec", - "bytes", - "ckb-channel", - "ckb-constant", - "ckb-error", - "ckb-fixed-hash", - "ckb-gen-types", - "ckb-hash", - "ckb-merkle-mountain-range", - "ckb-occupied-capacity", - "ckb-rational", - "derive_more", - "golomb-coded-set", - "merkle-cbt", - "molecule", - "numext-fixed-uint", - "once_cell", - "paste", -] - -[[package]] -name = "ckb-util" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6326a9adcfe1f4afa14f1a0da267e5718873e28cc271a5e03fc57ff02ce233" -dependencies = [ - "linked-hash-map", - "once_cell", - "parking_lot", - "regex", -] - -[[package]] -name = "ckb-verification" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d157e70aea7d47af07b96415c952a7d97810572c659f8da2e9ecb6f98a1c7c" -dependencies = [ - "ckb-chain-spec", - "ckb-dao", - "ckb-dao-utils", - "ckb-error", - "ckb-pow", - "ckb-script", - "ckb-systemtime", - "ckb-traits", - "ckb-types", - "ckb-verification-traits", - "derive_more", - "lru", -] - -[[package]] -name = "ckb-verification-traits" -version = "0.112.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43456c274b362c89a18388a95418f18adfebb3ab25950a09e267f00284e66fd" -dependencies = [ - "bitflags 1.3.2", - "ckb-error", -] - -[[package]] -name = "ckb-vm" -version = "0.24.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc004a826b9bc9319ffae0b8415690e1b5f1482266d55fbd43843aa40ddcd63" -dependencies = [ - "byteorder", - "bytes", - "cc", - "ckb-vm-definitions", - "derive_more", - "goblin 0.2.3", - "goblin 0.4.0", - "rand 0.7.3", - "scroll", - "serde", -] - -[[package]] -name = "ckb-vm-definitions" -version = "0.24.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ced3ff9d79b53d93c106720f6c1f855694290e33581850e05c859500eee83f" -dependencies = [ - "paste", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "eaglesong" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d978bd5d343e8ab9b5c0fc8d93ff9c602fdc96616ffff9c05ac7a155419b824" - -[[package]] -name = "faster-hex" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" - -[[package]] -name = "flate2" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "gcd" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "goblin" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884" -dependencies = [ - "log", - "plain", - "scroll", -] - -[[package]] -name = "goblin" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532a09cd3df2c6bbfc795fb0434bff8f22255d1d07328180e918a2e6ce122d4d" -dependencies = [ - "log", - "plain", - "scroll", -] - -[[package]] -name = "golomb-coded-set" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812f314a99fb5b7f0f9d0a8388539578f83f3aca6a65f588b8dbeefb731e2f98" -dependencies = [ - "siphasher", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] - -[[package]] -name = "heapsize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" -dependencies = [ - "winapi", -] - -[[package]] -name = "hello-world" -version = "0.1.0" -dependencies = [ - "ckb-std", -] - -[[package]] -name = "includedir" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd126bd778c00c43a9dc76d1609a0894bf4222088088b2217ccc0ce9e816db7" -dependencies = [ - "flate2", - "phf", -] - -[[package]] -name = "includedir_codegen" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ac1500c9780957c9808c4ec3b94002f35aab01483833f5a8bce7dfb243e3148" -dependencies = [ - "flate2", - "phf_codegen", - "walkdir", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.154" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -dependencies = [ - "serde", -] - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown", -] - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "merkle-cbt" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171d2f700835121c3b04ccf0880882987a050fd5c7ae88148abf537d33dd3a56" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "molecule" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd9767ab5e5f2ea40f71ff4c8bdb633c50509052e093c2fdd0e390a749dfa3" -dependencies = [ - "bytes", - "cfg-if", - "faster-hex", -] - -[[package]] -name = "numext-constructor" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "621fe0f044729f810c6815cdd77e8f5e0cd803ce4f6a38380ebfc1322af98661" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "numext-fixed-uint" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c68c76f96d589d1009a666c5072f37f3114d682696505f2cf445f27766c7d70" -dependencies = [ - "numext-fixed-uint-core", - "numext-fixed-uint-hack", -] - -[[package]] -name = "numext-fixed-uint-core" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aab1d6457b97b49482f22a92f0f58a2f39bdd7f3b2f977eae67e8bc206aa980" -dependencies = [ - "heapsize", - "numext-constructor", - "rand 0.7.3", - "serde", - "thiserror", -] - -[[package]] -name = "numext-fixed-uint-hack" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200f8d55c36ec1b6a8cf810115be85d4814f045e0097dfd50033ba25adb4c9e" -dependencies = [ - "numext-fixed-uint-core", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "parking_lot" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared", - "rand 0.7.3", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro2" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", -] - -[[package]] -name = "regex" -version = "1.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scroll" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "secp256k1" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" -dependencies = [ - "secp256k1-sys", -] - -[[package]] -name = "secp256k1-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" -dependencies = [ - "cc", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "serde" -version = "1.0.202" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.202" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "serde_json" -version = "1.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tests" -version = "0.1.0" -dependencies = [ - "ckb-testtool", - "serde_json", -] - -[[package]] -name = "thiserror" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" diff --git a/templates/next-js-template/Cargo.toml b/templates/next-js-template/Cargo.toml deleted file mode 100644 index b62def2..0000000 --- a/templates/next-js-template/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[workspace] -resolver = "2" - -members = [ - # Please don't remove the following line, we use it to automatically - # detect insertion point for newly generated crates. - # @@INSERTION_POINT@@ - "contracts/hello-world", - "tests", -] - -[profile.release] -overflow-checks = true -strip = true -codegen-units = 1 diff --git a/templates/next-js-template/Makefile b/templates/next-js-template/Makefile deleted file mode 100644 index 4e101a8..0000000 --- a/templates/next-js-template/Makefile +++ /dev/null @@ -1,123 +0,0 @@ -# We cannot use $(shell pwd), which will return unix path format on Windows, -# making it hard to use. -cur_dir = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) - -TOP := $(cur_dir) -# RUSTFLAGS that are likely to be tweaked by developers. For example, -# while we enable debug logs by default here, some might want to strip them -# for minimal code size / consumed cycles. -CUSTOM_RUSTFLAGS := --cfg debug_assertions -# Additional cargo args to append here. For example, one can use -# make test CARGO_ARGS="-- --nocapture" so as to inspect data emitted to -# stdout in unit tests -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. -CLANG := $(shell $(TOP)/scripts/find_clang) -# When this is set, a single contract will be built instead of all contracts -CONTRACT := -# By default, we would clean build/{release,debug} folder first, in case old -# contracts are mixed together with new ones, if for some reason you want to -# revert this behavior, you can change this to anything other than true -CLEAN_BUILD_DIR_FIRST := true -BUILD_DIR := build/$(MODE) - -# Pass setups to child make processes -export CUSTOM_RUSTFLAGS -export TOP -export CARGO_ARGS -export MODE -export CLANG -export BUILD_DIR - -default: build test - -build: - @if [ "x$(CLEAN_BUILD_DIR_FIRST)" = "xtrue" ]; then \ - echo "Cleaning $(BUILD_DIR) directory..."; \ - rm -rf $(BUILD_DIR); \ - fi - mkdir -p $(BUILD_DIR) - @set -eu; \ - if [ "x$(CONTRACT)" = "x" ]; then \ - for contract in $(wildcard contracts/*); do \ - $(MAKE) -e -C $$contract build; \ - done; \ - else \ - $(MAKE) -e -C contracts/$(CONTRACT) build; \ - fi - -# Run a single make task for a specific contract. For example: -# -# make run CONTRACT=stack-reorder TASK=adjust_stack_size STACK_SIZE=0x200000 -TASK := -run: - $(MAKE) -e -C contracts/$(CONTRACT) $(TASK) - -# test, check, clippy and fmt here are provided for completeness, -# there is nothing wrong invoking cargo directly instead of make. -test: - cargo test $(CARGO_ARGS) - -check: - cargo check $(CARGO_ARGS) - -clippy: - cargo clippy $(CARGO_ARGS) - -fmt: - cargo fmt $(CARGO_ARGS) - -# Arbitrary cargo command is supported here. For example: -# -# make cargo CARGO_CMD=expand CARGO_ARGS="--ugly" -# -# Invokes: -# cargo expand --ugly -CARGO_CMD := -cargo: - cargo $(CARGO_CMD) $(CARGO_ARGS) - -clean: - rm -rf build - cargo clean - -TEMPLATE_TYPE := --git -TEMPLATE_REPO := https://github.com/cryptape/ckb-script-templates -CRATE := -TEMPLATE := contract -DESTINATION := contracts -generate: - @set -eu; \ - if [ "x$(CRATE)" = "x" ]; then \ - cargo generate $(TEMPLATE_TYPE) $(TEMPLATE_REPO) $(TEMPLATE) \ - --destination $(DESTINATION); \ - GENERATED_DIR=$$(ls -dt $(DESTINATION)/* | head -n 1); \ - if [ -f "$$GENERATED_DIR/.cargo-generate/tests.rs" ]; then \ - cat $$GENERATED_DIR/.cargo-generate/tests.rs >> tests/src/tests.rs; \ - rm -rf $$GENERATED_DIR/.cargo-generate/; \ - fi; \ - sed "s,@@INSERTION_POINT@@,@@INSERTION_POINT@@\n \"$$GENERATED_DIR\"\,," Cargo.toml > Cargo.toml.new; \ - mv Cargo.toml.new Cargo.toml; \ - else \ - cargo generate $(TEMPLATE_TYPE) $(TEMPLATE_REPO) $(TEMPLATE) \ - --destination $(DESTINATION) \ - --name $(CRATE); \ - if [ -f "$(DESTINATION)/$(CRATE)/.cargo-generate/tests.rs" ]; then \ - cat $(DESTINATION)/$(CRATE)/.cargo-generate/tests.rs >> tests/src/tests.rs; \ - rm -rf $(DESTINATION)/$(CRATE)/.cargo-generate/; \ - fi; \ - sed '/@@INSERTION_POINT@@/s/$$/\n "$(DESTINATION)\/$(CRATE)",/' Cargo.toml > Cargo.toml.new; \ - mv Cargo.toml.new Cargo.toml; \ - fi - -prepare: - rustup target add riscv64imac-unknown-none-elf - -# Generate checksum info for reproducible build -CHECKSUM_FILE := build/checksums-$(MODE).txt -checksum: build - shasum -a 256 build/$(MODE)/* > $(CHECKSUM_FILE) - -.PHONY: build test check clippy fmt cargo clean prepare checksum diff --git a/templates/next-js-template/README.md b/templates/next-js-template/README.md deleted file mode 100644 index 36529bd..0000000 --- a/templates/next-js-template/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# offckb-template - -This is a Minimal Template for CKB Full-Stack Dapps generated by [offckb](https://github.com/RetricSu/offckb). - -Offckb does not do the magic. It just wraps the new CKB smart contract template and the CKB javascript Dapp framework into one mono-repo. Under the hook, it uses: - -- [ckb-scripts-template](https://github.com/cryptape/ckb-script-templates) for smart contract development -- [next-js](https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app) and [Lumos](https://github.com/ckb-js/lumos) for frontend development - -## Smart contract development - -By default, this template comes with a single simple smart contract `hello-world`: `contracts/hello-world/src/main.rs`. - -The smart contract is written in Rust lang. In order to develop, the following dependencies are required: - -- `git`, `make`, `sed`, `bash`, `sha256sum` and others Unix utilities. -- `Rust` with `riscv64 target`: `rustup target add riscv64imac-unknown-none-elf` -- `Clang 16+` -- `cargo-generate` - -Check out the ckb-script-templates for more [detail](https://github.com/cryptape/ckb-script-templates/blob/main/README.md#dependencies) - -### Usage - -add a new smart-contract: - -```sh -make generate -``` - -build smart-contract: - -```sh -make build -``` - -run test: - -```sh -make test -``` - -For more detail, check out [ckb-script-templates](https://github.com/cryptape/ckb-script-templates) - -## dApp frontend development - -first, enter the frontend workspace: - -```sh -cd frontend -``` - -start the app: - -```sh -npm i && npm run dev -``` - -change the CKB blockchain network: - -edit `.env` file: - -```bash -NEXT_PUBLIC_NETWORK=devnet # devnet, testnet or mainnet -``` - -## Deploy to devnet/testnet with offckb - -Once you build your smart contracts, you can deploy them to CKB blockchain with [ckb-cli](https://github.com/nervosnetwork/ckb-cli) or any other tools. - -If you want to test them in devnet/testnet blockchain, then `offckb` might be the ideal selection. - -`offckb` will look for the `offckb.config.ts` file to read config information. so you will need to enter the frontend workspace to do the instruction: - -```sh -cd frontend -offckb deploy --network devnet -``` - -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: - -```ts -import offckb from 'offckb.config'; -import { CellDep } from '@ckb-lumos/lumos'; - -const lumosConfig = offckb.lumosConfig; -const myContractDep: CellDep = { - outPoint: { - txHash: lumosConfig.SCRIPTS.YOUR_SCRIPT_NAME!.TX_HASH, - index: lumosConfig.SCRIPTS.YOUR_SCRIPT_NAME!.INDEX, - }, - depType: lumosConfig.SCRIPTS.YOUR_SCRIPT_NAME!.DEP_TYPE, -}; -``` - -Every time you deploy a new version of your smart contracts, those script infos will be updated by `offckb` in the `offckb.config.ts` and work out-of-box in your frontend. - -You can also deploy smart contracts to the CKB Testnet like this: - -```sh -cd frontend -offckb deploy --network testnet -``` - -and start your frontend Dapp targeting Testnet: - -edit `.env` file: - -```bash -NEXT_PUBLIC_NETWORK=testnet # devnet, testnet or mainnet -``` - -```bash -cd frontend -npm run dev -``` - -Note that the `mainnet` network is not supported in `offckb` since `offckb` is focusing on building a friendly development environment for CKB. To gain better security, it is recommended to use production tools like [ckb-cli](https://github.com/nervosnetwork/ckb-cli) to deploy smart contracts and do transactions for the CKB mainnet. diff --git a/templates/next-js-template/contracts/hello-world/.gitignore b/templates/next-js-template/contracts/hello-world/.gitignore deleted file mode 100644 index c3dca1b..0000000 --- a/templates/next-js-template/contracts/hello-world/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/build -/target diff --git a/templates/next-js-template/contracts/hello-world/Cargo.toml b/templates/next-js-template/contracts/hello-world/Cargo.toml deleted file mode 100644 index a2dd49c..0000000 --- a/templates/next-js-template/contracts/hello-world/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "hello-world" -version = "0.1.0" -edition = "2021" - -[dependencies] -ckb-std = "0.15.1" diff --git a/templates/next-js-template/contracts/hello-world/Makefile b/templates/next-js-template/contracts/hello-world/Makefile deleted file mode 100644 index 579f431..0000000 --- a/templates/next-js-template/contracts/hello-world/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# We cannot use $(shell pwd), which will return unix path format on Windows, -# making it hard to use. -cur_dir = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) - -TOP := $(cur_dir) -# RUSTFLAGS that are likely to be tweaked by developers. For example, -# while we enable debug logs by default here, some might want to strip them -# for minimal code size / consumed cycles. -CUSTOM_RUSTFLAGS := --cfg debug_assertions -# RUSTFLAGS that are less likely to be tweaked by developers. Most likely -# one would want to keep the default values here. -FULL_RUSTFLAGS := -C target-feature=+zba,+zbb,+zbc,+zbs $(CUSTOM_RUSTFLAGS) -# Additional cargo args to append here. For example, one can use -# make test CARGO_ARGS="-- --nocapture" so as to inspect data emitted to -# stdout in unit tests -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. -CLANG := $(shell $(TOP)/scripts/find_clang) -AR := $(subst clang,llvm-ar,$(CLANG)) -# When this is set to some value, the generated binaries will be copied over -BUILD_DIR := -# Generated binaries to copy. By convention, a Rust crate's directory name will -# likely match the crate name, which is also the name of the final binary. -# However if this is not the case, you can tweak this variable. As the name hints, -# more than one binary is supported here. -BINARIES := $(notdir $(shell pwd)) - -ifeq (release,$(MODE)) - MODE_ARGS := --release -endif - -default: build test - -build: - RUSTFLAGS="$(FULL_RUSTFLAGS)" TARGET_CC="$(CLANG)" TARGET_AR="$(AR)" \ - cargo build --target=riscv64imac-unknown-none-elf $(MODE_ARGS) $(CARGO_ARGS) - @set -eu; \ - if [ "x$(BUILD_DIR)" != "x" ]; then \ - for binary in $(BINARIES); do \ - echo "Copying binary $$binary to build directory"; \ - cp $(TOP)/target/riscv64imac-unknown-none-elf/$(MODE)/$$binary $(TOP)/$(BUILD_DIR); \ - done \ - fi - -# test, check, clippy and fmt here are provided for completeness, -# there is nothing wrong invoking cargo directly instead of make. -test: - cargo test $(CARGO_ARGS) - -check: - cargo check $(CARGO_ARGS) - -clippy: - cargo clippy $(CARGO_ARGS) - -fmt: - cargo fmt $(CARGO_ARGS) - -# Arbitrary cargo command is supported here. For example: -# -# make cargo CARGO_CMD=expand CARGO_ARGS="--ugly" -# -# Invokes: -# cargo expand --ugly -CARGO_CMD := -cargo: - cargo $(CARGO_CMD) $(CARGO_ARGS) - -clean: - cargo clean - -prepare: - rustup target add riscv64imac-unknown-none-elf - -.PHONY: build test check clippy fmt cargo clean prepare diff --git a/templates/next-js-template/contracts/hello-world/README.md b/templates/next-js-template/contracts/hello-world/README.md deleted file mode 100644 index 05a435b..0000000 --- a/templates/next-js-template/contracts/hello-world/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# hello-world - -TODO: Write this readme - -_This contract was bootstrapped with [ckb-script-templates]._ - -[ckb-script-templates]: https://github.com/cryptape/ckb-script-templates diff --git a/templates/next-js-template/contracts/hello-world/src/main.rs b/templates/next-js-template/contracts/hello-world/src/main.rs deleted file mode 100644 index 8d2a69b..0000000 --- a/templates/next-js-template/contracts/hello-world/src/main.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![no_std] -#![cfg_attr(not(test), no_main)] - -#[cfg(test)] -extern crate alloc; - -#[cfg(not(test))] -use ckb_std::default_alloc; -#[cfg(not(test))] -ckb_std::entry!(program_entry); -#[cfg(not(test))] -default_alloc!(); - -pub fn program_entry() -> i8 { - ckb_std::debug!("Hello world! This is a sample contract!"); - - 0 -} diff --git a/templates/next-js-template/frontend/.env b/templates/next-js-template/frontend/.env deleted file mode 100644 index fdea672..0000000 --- a/templates/next-js-template/frontend/.env +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_NETWORK=devnet diff --git a/templates/next-js-template/frontend/.eslintrc.json b/templates/next-js-template/frontend/.eslintrc.json deleted file mode 100644 index bffb357..0000000 --- a/templates/next-js-template/frontend/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/templates/next-js-template/frontend/.gitignore b/templates/next-js-template/frontend/.gitignore deleted file mode 100644 index fd3dbb5..0000000 --- a/templates/next-js-template/frontend/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js -.yarn/install-state.gz - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts diff --git a/templates/next-js-template/frontend/README.md b/templates/next-js-template/frontend/README.md deleted file mode 100644 index 788b31b..0000000 --- a/templates/next-js-template/frontend/README.md +++ /dev/null @@ -1,44 +0,0 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Targeting on Different CKB Networks - -edit `.env` file: - -```bash -NEXT_PUBLIC_NETWORK=devnet # devnet, testnet or mainnet -``` - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/templates/next-js-template/frontend/app/favicon.ico b/templates/next-js-template/frontend/app/favicon.ico deleted file mode 100644 index 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbD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lzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/templates/next-js-template/frontend/app/globals.css b/templates/next-js-template/frontend/app/globals.css deleted file mode 100644 index 2ac8372..0000000 --- a/templates/next-js-template/frontend/app/globals.css +++ /dev/null @@ -1,7 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -a { - @apply underline text-blue-600 hover:text-blue-800 visited:text-purple-600; -} diff --git a/templates/next-js-template/frontend/app/layout.tsx b/templates/next-js-template/frontend/app/layout.tsx deleted file mode 100644 index 637a925..0000000 --- a/templates/next-js-template/frontend/app/layout.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { Metadata } from 'next'; -import { Inter } from 'next/font/google'; -import './globals.css'; - -const inter = Inter({ subsets: ['latin'] }); - -export const metadata: Metadata = { - title: 'CKB Next APP', - description: 'Generated by create next app', -}; - -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - {children} - - ); -} diff --git a/templates/next-js-template/frontend/app/page.tsx b/templates/next-js-template/frontend/app/page.tsx deleted file mode 100644 index 9320485..0000000 --- a/templates/next-js-template/frontend/app/page.tsx +++ /dev/null @@ -1,116 +0,0 @@ -'use client'; - -import offckb from '@/offckb.config'; -import { ccc } from '@ckb-ccc/connector-react'; -import Wallet from './wallet'; - -offckb.initializeLumosConfig(); - -export default function Home() { - const isScriptDeployed = offckb.lumosConfig.SCRIPTS['HELLO_WORLD'] != null; - return ( - -
-
Minimal Template for CKB DApp
- - -
-
Tech Stack
-
  • - - ckb-scripts-template - {' '} - for smart contract development in Rust -
  • -
  • - - Next.js - {' '} - and{' '} - - Lumos - {' '} - for off-chain Javascript frontend framework -
  • -
  • - - CCC - {' '} - for CKB wallet connector -
  • -
    - -
    -
    CKB Blockchain
    -
  • - Current Network: {offckb.currentNetwork}, Address Prefix: {offckb.addressPrefix} -
  • -
  • - CKB RPC URL:{' '} - - {offckb.rpcUrl} - -
  • -
  • - Switch different networks with .env{' '} - - NEXT_PUBLIC_NETWORK - -
  • -
    - -
    -
    Smart Contract
    -
    - HELLO_WORLD Script{' '} - {isScriptDeployed ? ( -
    -
  • code_hash: {offckb.lumosConfig.SCRIPTS['HELLO_WORLD']?.CODE_HASH}
  • -
  • hash_type: {offckb.lumosConfig.SCRIPTS['HELLO_WORLD']?.HASH_TYPE}
  • -
  • - outpoint: {offckb.lumosConfig.SCRIPTS['HELLO_WORLD']?.TX_HASH}: - {offckb.lumosConfig.SCRIPTS['HELLO_WORLD']?.INDEX} -
  • -
    - ) : ( - - Not Found,{' '} - - deploy - {' '} - it first. - - )} -
    -
    - -
    -
    Wallet Connector
    -
    - -
    -
    - -
    -
    - This template is created by{' '} - - offckb - -
    -
    -
    - ); -} diff --git a/templates/next-js-template/frontend/app/wallet-client.ts b/templates/next-js-template/frontend/app/wallet-client.ts deleted file mode 100644 index 933ea83..0000000 --- a/templates/next-js-template/frontend/app/wallet-client.ts +++ /dev/null @@ -1,98 +0,0 @@ -'use client'; - -import { ccc, CellDepInfoLike, KnownScript, Script } from '@ckb-ccc/connector-react'; -import offCKBConfig, { Network } from '@/offckb.config'; - -export const DEVNET_SCRIPTS: Record & { cellDeps: CellDepInfoLike[] }> = { - [KnownScript.Secp256k1Blake160]: { - codeHash: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160']!.CODE_HASH as `0x${string}`, - hashType: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160']!.HASH_TYPE, - cellDeps: [ - { - cellDep: { - outPoint: { - txHash: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160']!.TX_HASH, - index: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160']!.INDEX, - }, - depType: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160']!.DEP_TYPE, - }, - }, - ], - }, - [KnownScript.Secp256k1Multisig]: { - codeHash: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160_MULTISIG']!.CODE_HASH as `0x{string}`, - hashType: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160_MULTISIG']!.HASH_TYPE, - cellDeps: [ - { - cellDep: { - outPoint: { - txHash: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160_MULTISIG']!.TX_HASH, - index: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160_MULTISIG']!.INDEX, - }, - depType: offCKBConfig.lumosConfig.SCRIPTS['SECP256K1_BLAKE160_MULTISIG']!.DEP_TYPE, - }, - }, - ], - }, - [KnownScript.AnyoneCanPay]: { - codeHash: offCKBConfig.lumosConfig.SCRIPTS['ANYONE_CAN_PAY']!.CODE_HASH as `0x{string}`, - hashType: offCKBConfig.lumosConfig.SCRIPTS['ANYONE_CAN_PAY']!.HASH_TYPE, - cellDeps: [ - { - cellDep: { - outPoint: { - txHash: offCKBConfig.lumosConfig.SCRIPTS['ANYONE_CAN_PAY']!.TX_HASH, - index: offCKBConfig.lumosConfig.SCRIPTS['ANYONE_CAN_PAY']!.INDEX, - }, - depType: offCKBConfig.lumosConfig.SCRIPTS['ANYONE_CAN_PAY']!.DEP_TYPE, - }, - }, - ], - }, - [KnownScript.OmniLock]: { - codeHash: offCKBConfig.lumosConfig.SCRIPTS['OMNILOCK']!.CODE_HASH as `0x{string}`, - hashType: offCKBConfig.lumosConfig.SCRIPTS['OMNILOCK']!.HASH_TYPE, - cellDeps: [ - { - cellDep: { - outPoint: { - txHash: offCKBConfig.lumosConfig.SCRIPTS['OMNILOCK']!.TX_HASH, - index: offCKBConfig.lumosConfig.SCRIPTS['OMNILOCK']!.INDEX, - }, - depType: offCKBConfig.lumosConfig.SCRIPTS['OMNILOCK']!.DEP_TYPE, - }, - }, - ], - }, - [KnownScript.TypeId]: { - codeHash: '0x00000000000000000000000000000000000000000000000000545950455f4944', - hashType: 'type', - cellDeps: [], - }, - [KnownScript.XUdt]: { - codeHash: offCKBConfig.lumosConfig.SCRIPTS['XUDT']!.CODE_HASH as `0x{string}`, - hashType: offCKBConfig.lumosConfig.SCRIPTS['XUDT']!.HASH_TYPE, - cellDeps: [ - { - cellDep: { - outPoint: { - txHash: offCKBConfig.lumosConfig.SCRIPTS['XUDT']!.TX_HASH, - index: offCKBConfig.lumosConfig.SCRIPTS['XUDT']!.INDEX, - }, - depType: offCKBConfig.lumosConfig.SCRIPTS['XUDT']!.DEP_TYPE, - }, - }, - ], - }, -}; - -export function buildCccClient(network: Network) { - const client = - network === 'mainnet' - ? new ccc.ClientPublicMainnet() - : network === 'testnet' - ? new ccc.ClientPublicTestnet() - : new ccc.ClientPublicTestnet(offCKBConfig.rpcUrl, undefined, DEVNET_SCRIPTS); - - return client; -} diff --git a/templates/next-js-template/frontend/app/wallet.tsx b/templates/next-js-template/frontend/app/wallet.tsx deleted file mode 100644 index 19a5932..0000000 --- a/templates/next-js-template/frontend/app/wallet.tsx +++ /dev/null @@ -1,207 +0,0 @@ -'use client'; - -import { ccc } from '@ckb-ccc/connector-react'; -import React, { useEffect, useState } from 'react'; -import { common } from '@ckb-lumos/common-scripts'; -import { TransactionSkeleton } from '@ckb-lumos/helpers'; -import offckb, { readEnvNetwork } from '@/offckb.config'; -import { buildCccClient } from './wallet-client'; -import { registerCustomLockScriptInfos } from '@ckb-lumos/common-scripts/lib/common'; -import { generateDefaultScriptInfos } from '@ckb-ccc/lumos-patches'; - -const { indexer } = offckb; - -function WalletIcon({ wallet, className }: { wallet: ccc.Wallet; className?: string }) { - return ( - // eslint-disable-next-line @next/next/no-img-element - {wallet.name} - ); -} - -function Button(props: React.ButtonHTMLAttributes) { - return ( - - - - ); -} - -function Transfer() { - const signer = ccc.useSigner(); - const [transferTo, setTransferTo] = useState(''); - const [amount, setAmount] = useState(''); - const [hash, setHash] = useState(''); - const [data, setData] = useState(''); - - return ( -
    - {hash !== '' ?

    {hash}

    : <>} -
    -
    - setTransferTo(e.currentTarget.value)} - placeholder="Enter address to transfer to" - /> - setAmount(e.currentTarget.value)} - placeholder="Enter amount in CKB to transfer" - /> -