cashscript icon indicating copy to clipboard operation
cashscript copied to clipboard

Add support for placeholder-based artifacts

Open mainnet-pat opened this issue 6 months ago • 2 comments

Placeholder-based artifacts are those which might be produced elsewhere or contain raw bitcoin script. Placeholders are used to insert the properly encoded variables at certain places in the script to produce a valid contract.

This pattern first emerged in our work for bch-xmr atomic swaps, now in another project where I had to support the EC-compatible 2 of 3 multisig contract.

Also add a sample 2 of 3 multisig contract and tests to highlight the feature and demonstrate the usage patterns.

mainnet-pat avatar Jun 26 '25 12:06 mainnet-pat

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

Name Status Preview Comments Updated (UTC)
cashscript ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 2:30pm

vercel[bot] avatar Jun 26 '25 12:06 vercel[bot]

Codecov Report

Attention: Patch coverage is 98.05825% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.41%. Comparing base (47a9dbc) to head (7428e37). Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
packages/cashscript/src/Argument.ts 96.07% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #321      +/-   ##
==========================================
+ Coverage   97.35%   97.41%   +0.06%     
==========================================
  Files          76       79       +3     
  Lines       17440    17743     +303     
  Branches     1274     1317      +43     
==========================================
+ Hits        16978    17285     +307     
+ Misses        455      447       -8     
- Partials        7       11       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jul 14 '25 14:07 codecov[bot]