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

feat(common-scripts): inject from registered locks in dao #596

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

homura
Copy link
Collaborator

@homura homura commented Jan 3, 2024

Description

Fixes #592

This PR added a flag enableNonSystemScript in dao.deposit and dao.withdraw to enable injecting cells from registered locks from common.registerCustomLockScriptInfos

dao.deposit(    
    txSkeleton,
    fromInfo,
    toAddress,
    parseUnit("10000", "ckb"),
-    { config },
+    { config, enableNonSystemScript: true },
)

txSkeleton = await dao.withdraw(
    txSkeleton, 
    nonSystemLockCell, 
    undefined,
-    { config },
+    { config, enableNonSystemScript: true },
)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • unit tests

Copy link

vercel bot commented Jan 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
lumos-website ✅ Ready (Inspect) Visit Preview Jan 21, 2024 0:55am

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (204184c) 83.84% compared to head (cc86c2c) 83.84%.
Report is 11 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #596   +/-   ##
========================================
  Coverage    83.84%   83.84%           
========================================
  Files          116      116           
  Lines        23583    23640   +57     
  Branches      2223     2230    +7     
========================================
+ Hits         19773    19821   +48     
- Misses        3770     3778    +8     
- Partials        40       41    +1     
Files Coverage Δ
packages/common-scripts/src/from_info.ts 86.39% <91.66%> (+1.04%) ⬆️
packages/common-scripts/src/dao.ts 88.15% <83.33%> (-0.54%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 204184c...cc86c2c. Read the comment docs.

@homura
Copy link
Collaborator Author

homura commented Jan 19, 2024

@Keith-CY please have a review

packages/common-scripts/src/dao.ts Outdated Show resolved Hide resolved
Co-authored-by: Chen Yu <[email protected]>
Signed-off-by: homura <[email protected]>
@homura homura changed the title feat(common-scripts): supports inject from registered locks in dao feat(common-scripts): inject from registered locks in dao Jan 25, 2024
@homura homura merged commit ad483d9 into develop Jan 25, 2024
8 of 9 checks passed
@homura homura deleted the dao-with-registered-lock branch January 25, 2024 13:11
@github-actions github-actions bot mentioned this pull request Jan 25, 2024
@github-actions github-actions bot mentioned this pull request Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CommonScripts DAO should support any registered lock script
2 participants