Ran
|
Jobs
4
|
Files
238
|
Run time
1min
|
Badge
README BADGES
|
github
txscript: add new ScriptTemplate DSL for writing Scripts In this commit, we add a new function, `ScriptTemplate` to make the process of making custom Bitcoin scripts a bit less verbose. ScriptTemplate processes a script template with parameters and returns the corresponding script bytes. This functions allows Bitcoin scripts to be created using a DSL-like syntax, based on Go's templating system. An example of a simple p2pkh template would be: `OP_DUP OP_HASH160 0x14e8948c7 OP_EQUALVERIFY OP_CHECKSIG` Strings that have the `0x` prefix are assumed to byte strings to be pushed ontop of the stack. Integers can be passed as normal. If a value can't be parsed as an integer, then it's assume that it's a byte slice without the 0x prefix. Normal go template operations can be used as well. The params argument houses paramters to pass into the script, for example a local variable storing a computed public key.
0 of 133 new or added lines in 1 file covered. (0.0%)
12 existing lines in 3 files now uncovered.29826 of 52271 relevant lines covered (57.06%)
477431.16 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
133 |
0.0 |
txscript/template.go |
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
66.67 |
-0.1% | mempool/mempool.go |
2 |
90.44 |
-0.47% | btcec/schnorr/musig2/sign.go |
9 |
73.94 |
-0.22% | peer/peer.go |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | btcutilpsbt - 9984164707.1 | 13 |
76.48 |
GitHub Action Run | |
2 | btcutil - 9984164707.2 | 21 |
87.22 |
GitHub Action Run | |
3 | btcec - 9984164707.3 | 15 |
86.38 |
GitHub Action Run | |
4 | btcd - 9984164707.4 | 189 |
53.24 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|