Closed mainnet-pat closed 7 months ago
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 | Dec 7, 2023 9:18am |
Mathieu, Pat and I went over the buildTemplate
function today.
Here's some notes from the call
debug
stuff (mostly to prevent later regressions)buildTemplate
to see if we can remove any
castingThen we also need to do some refactoring of the template generation, mostly because the function is 350 lines of code with a lot of nesting. But before doing significant refactors, it is probably good to double check / extend test coverage so we don't break stuff.
@mainnet-pat if you could write down some areas in the code where you think it would benefit from more tests, that would be great. Then Mathieu and I can work on implementing the tests and refactoring the code.
We can release this functionality in a next
release already, but we need to fix up these points before a full release.
Hey guys, I have refactored buildTemplate somewhat. There is issue with supporting p2sh32 - BCH_SPEC target does not support it, BCH_2023_05 does, but it fails token validation, which BCH_SPEC is good with. Until this libauth internal issue is not resolved I default the template to evaluate the transactions under BCH_SPEC and p2sh20.
Some notes for later refactoring (doesn't need to be addressed now, but just so we don't forget):
buildTemplate()
).cashscript/testing
path rather than from the main cashscript
path. Not a high priority, just something to do at some point.
Hey guys, was nice to chat with you today and to present my work. I am glad, that you liked it!
Sending over the PR.