cashscript icon indicating copy to clipboard operation
cashscript copied to clipboard

Add SLP support

Open cgcardona opened this issue 5 years ago • 4 comments

CashScript is a leap forward in expressiveness for creating scripts. Now we need to be able to create advanced scripts for SLP tokens.

What would this look like in CashScript?

cgcardona avatar Aug 23 '19 18:08 cgcardona

It's currently possible to manually inject the SLP OP_RETURN opcodes via creating a dedicated tx outout. Not sure if the compiler can do it on it's own, but should definitely be possible if combined with the SDK

lightswarm124 avatar Sep 30 '19 19:09 lightswarm124

It's currently possible to manually inject the SLP OP_RETURN opcodes via creating a dedicated tx outout. Not sure if the compiler can do it on it's own, but should definitely be possible if combined with the SDK

It does seem SLP requires a fundingWIF, which I'm not sure cashscript can generate, especially if it's a P2SH address and not the usual P2PKH address

lightswarm124 avatar Oct 02 '19 15:10 lightswarm124

Is the scope of this issue limited to being able to support an SLP transaction or some implementation details that are not defined here? Here is a working code reference for the SLP Genesis transaction for Type1 and NFT1 (Group + Child). Including multiple OP_RETURNS: https://github.com/cashkit/cashscript-slp

kiok46 avatar Jun 24 '21 04:06 kiok46

Nice, that's a great example! I think this issue is just a sort of placeholder for some form of better SLP support. I don't have a very clear idea on what that would look like. I added the OutputNullData feature as a sort of first step towards this. I personally haven't really worked with SLP a lot, so I don't know what better support would look like. If you have any ideas, I'd love to hear them.

rkalis avatar Jun 24 '21 09:06 rkalis

I think this issue can be closed with the upcoming CashTokens upgrade.

mr-zwets avatar Jan 03 '23 08:01 mr-zwets

Yep, I agree 👍

rkalis avatar Jan 03 '23 10:01 rkalis