Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: recommend ccc #740

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@
![license](https://img.shields.io/github/license/ckb-js/lumos)
![Lumos](./assets/lumos.jpg)

> Lumos is still under active development and considered to be a work in progress.

Lumos is a full featured JavaScript/TypeScript based dapp framework for Nervos CKB. It aims to simplify dapp development on Nervos CKB. The [name](https://harrypotter.fandom.com/wiki/Lumos_Maxima) explains what the project is about: the wonderland of CKB, though vast and fertile, still remains dark in most of the parts, lumos tries to shed light upon the land, guiding people into this beautiful new world.
> [!NOTE]
> It’s highly recommended to use the [CCC SDK](https://github.com/ckb-ecofund/ccc) as your primary development tool within the CKB ecosystem. [CCC](https://github.com/ckb-ecofund/ccc) is the latest and most robust JavaScript SDK designed to streamline and enhance your development process. By choosing [CCC](https://github.com/ckb-ecofund/ccc), you'll be leveraging the best practices and most up-to-date features available for CKB development.
> To get started with [CCC](https://github.com/ckb-ecofund/ccc), follow the [installation guide](https://github.com/ckb-ecofund/ccc#installing) and explore the [documentation](https://docs.ckbccc.com/) to integrate it seamlessly into your projects.

As of now, lumos contains the following components:


Unchanged files with check annotations Beta

let previousInputs = Set<string>();
for (const input of txSkeleton.get("inputs")) {
previousInputs = previousInputs.add(
`${input.outPoint!.txHash}_${input.outPoint!.index}`

Check warning on line 172 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion

Check warning on line 172 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion
);
}
for await (const inputCell of cellCollector.collect()) {
if (
previousInputs.has(
`${inputCell.outPoint!.txHash}_${inputCell.outPoint!.index}`

Check warning on line 179 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion

Check warning on line 179 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion
)
)
continue;
witnesses.push("0x")
);
}
let witness: string = txSkeleton.get("witnesses").get(firstIndex)!;

Check warning on line 231 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion
let newWitnessArgs: WitnessArgs;
const SECP_SIGNATURE_PLACEHOLDER =
"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
newWitnessArgs = {
lock: bytes.hexify(
bytes.concat(
multisigScript!,

Check warning on line 240 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion
...new Array((fromInfo as MultisigScript).M).fill(
SECP_SIGNATURE_PLACEHOLDER
)
txSkeleton: TransactionSkeletonType,
outputIndex: number
): ScriptConfig {
const data = txSkeleton.outputs.get(outputIndex)!.data;

Check warning on line 356 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion
const codeHash = utils.ckbHash(bytes.bytify(data));
const txHash = calculateTxHash(txSkeleton);
const scriptConfig: ScriptConfig = {
txSkeleton: TransactionSkeletonType,
outputIndex: number
): ScriptConfig {
const typeScript = txSkeleton.outputs.get(outputIndex)!.cellOutput.type!;

Check warning on line 373 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion

Check warning on line 373 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion
const codeHash = utils.computeScriptHash(typeScript);
const txHash = calculateTxHash(txSkeleton);
const scriptConfig: ScriptConfig = {
if (!resolved) throw new Error(`fromAddress has no live ckb`);
const typeId = utils.generateTypeIdScript(
{ previousOutput: resolved.outPoint!, since: "0x0" },

Check warning on line 513 in packages/common-scripts/src/deploy.ts

GitHub Actions / lint-staged

Forbidden non-null assertion
"0x0"
);
const output: Cell = {