cashscript
cashscript copied to clipboard
⚖️ Easily write and interact with Bitcoin Cash smart contracts
will be useful for producing optimized [libraries](https://github.com/CashScript/cashscript/issues/153) or just to save bytes by forcing some checks or ops to be carried out in a particular manner
Should result in more maintainable code.
Replace the `interface` docs with actual docusaurus docs.
In [this BCR post](https://bitcoincashresearch.org/t/the-need-for-additional-math-opcodes/1087) OP_MULDIV is mentioned as a possible solution for overflowing intermediate values when multiplying and dividing after each other. For example: ``` 2^63 * 2^50 / 2^63...
It would be clean if cashscript allowed to redefine variables in tuples, for example: ``` bytes variableA = 0x00; bytes variableB = 0x00; if(condition){ variableA,variableB = bytesequence.split(index); } ``` Currently...
Right now, this is what a Next.js config file has to look like for CashScript to work with it: ```js /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true,...
Since the beginning, the low level language of Bitcoin has been called "Script". ([wiki](https://en.bitcoin.it/wiki/Script)). In the hallways its called" Bitcoin Script". Obviously the term we use to differentiate between the...
[[In ](bitcoincash:pr0qgla00u9rq34pael3ayjf7tuqm2p3kyyrvzcsak)](https://github.com/CashScript/cashscript/blob/123e45ae3456da2010b18c844ee6a2f705627b88/packages/cashscript/src/Transaction.ts#L325) the following line can sometimes lead to an incorrect fee as it does a `Math.ceil` on the value. This means that if JS's Math engine, for example, gave...
We can remove a separate bip39 dependency from CashScript now that libauth v2.1.0 has bip39 functionality built-in.
Currently, if the final "require" statement in a function happens within a branch, we do not remove it, instead we leave it as `OP_VERIFY OP_1` to ensure that the "implicit...