From 4d5a88714b5315e28493acff084918f0c4ba7760 Mon Sep 17 00:00:00 2001 From: Philip DiSarro Date: Fri, 20 Dec 2024 17:14:38 -0800 Subject: [PATCH] fix bugs and improve tracing --- compiled/alwaysFail.json | 2 +- compiled/blacklistSpending.json | 5 + compiled/directoryNodeMintingPolicy.json | 2 +- compiled/directorySpending.json | 2 +- compiled/permissionedMinting.json | 2 +- compiled/programmableTokenMinting.json | 2 +- compiled/protocolParametersNFTMinting.json | 2 +- src/SmartTokens/Core/Scripts.hs | 18 +++ src/exe/export-smart-tokens/Main.hs | 40 +++--- src/lib/SmartTokens/Contracts/Issuance.hs | 38 +++--- .../SmartTokens/Contracts/ProtocolParams.hs | 56 +++----- src/lib/SmartTokens/LinkedList/Common.hs | 125 ++++++------------ .../SmartTokens/LinkedList/MintDirectory.hs | 2 +- .../SmartTokens/LinkedList/SpendBlacklist.hs | 28 ++++ .../SmartTokens/LinkedList/SpendDirectory.hs | 69 ++++------ src/lib/SmartTokens/Types/PTokenDirectory.hs | 66 +++------ src/wst-poc.cabal | 80 +++++++---- 17 files changed, 248 insertions(+), 291 deletions(-) create mode 100644 compiled/blacklistSpending.json create mode 100644 src/SmartTokens/Core/Scripts.hs create mode 100644 src/lib/SmartTokens/LinkedList/SpendBlacklist.hs diff --git a/compiled/alwaysFail.json b/compiled/alwaysFail.json index 93e4082..e781131 100644 --- a/compiled/alwaysFail.json +++ b/compiled/alwaysFail.json @@ -1,5 +1,5 @@ { - "cborHex": "5840583e010000225335738921314c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f50726f746f636f6c506172616d732e68733a36395d001601", + "cborHex": "5840583e010000225335738921314c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f50726f746f636f6c506172616d732e68733a37315d001601", "description": "Always Fail", "type": "PlutusScriptV3" } \ No newline at end of file diff --git a/compiled/blacklistSpending.json b/compiled/blacklistSpending.json new file mode 100644 index 0000000..c3cbe9d --- /dev/null +++ b/compiled/blacklistSpending.json @@ -0,0 +1,5 @@ +{ + "cborHex": "59030f59030c010000225335738921324c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f5370656e64426c61636b6c6973742e68733a32345d00132533357346644a66ae712401194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940c94ccd5cd0008800899ab9c4901164d757374206d696e7420626c61636b6c697374206373000013253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437365d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437375d0013375e6aae74004014004dd59aba13253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004c94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100132533357340022002266ae7124011845787065637473207370656e64696e6720707572706f7365000013370e6aae74dd51aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae880052002149858c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", + "description": "Blacklist Spending", + "type": "PlutusScriptV3" +} \ No newline at end of file diff --git a/compiled/directoryNodeMintingPolicy.json b/compiled/directoryNodeMintingPolicy.json index eb58b69..d5deb95 100644 --- a/compiled/directoryNodeMintingPolicy.json +++ b/compiled/directoryNodeMintingPolicy.json @@ -1,5 +1,5 @@ { - "cborHex": "5925a35925a0010000225335738921314c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f4d696e744469726563746f72792e68733a34325d00132323232323232323232323253335734a666aae7c0085288999299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3239375d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294454cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3133395d00133357340040022940c00cd5d0800898011aba2001322533573892012a4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a39345d0013253357389201194c5b2e2f506c7574617263682f426f6f6c2e68733a3137305d0013375e6e9cc94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800400cdd399299ab9c491264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040054cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004c94cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004d5d0801000899191919192999ab9a3370e90010010992999ab9a4a02a66ae7124012b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3237395d001325333573466e1cdc6800a407026464646464a666ae68cc894cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cdc800100319b90006001153335734a6644a66ae71241194c5b2e2f506c7574617263682f426f6f6c2e68733a3133395d00133357340040022940cc94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001333322222533573892012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3231365d0013375e00266664444a66ae7124012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3231315d001374e66ae80010cd5d000199aba000233574000297ae0004005003002375200c6ea4008d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010033574264a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440060162664a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba200133222533573892012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3232385d001323375e00466664444a66ae7124012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3231315d001374e66ae80010cd5d000199aba000233574000297ae000400332325333573466e1cdc69bae3253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026aae78009203815333573466e1c0052000135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100315333573466e1c0052002135742a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003161635573a0026ea8d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100132325333573466e1cdc69bae325335738921214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026aae78009203815333573466e1c005200013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440062a666ae68cdc3800a400426ae84c94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440062c2c6aae74004dd51aba13253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004dd60009ba900637520020162a666ae68cccc88894cd5ce24812b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3130385d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438355d001332225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3532345d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002244a0022a666ae68cdd79aab9d357420020082600a6ae840044c008d5d10008009299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438375d0013222300200337566aae780040040100048cc894cd5ce249294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3135305d0013375e6e98008dd30009991299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3534335d001332253357389201294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3535335d0013322533573892011c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec00080052f5bded8c00046ea000401000c00454cd5ce24815e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3130393a352d31380016012533573892011c4c5b6c69622f54797065732f436f6e7374616e74732e68733a31395d001375200c90010088a4c2a66ae7124119496e636f7272656374206d696e7420666f7220496e73657274001615335738920121496e636f7272656374206e6f6465206f75747075747320666f7220496e736572740016153357389201255370656e74206e6f64652073686f756c6420636f76657220696e73657274696e67206b65790016375c6ae854cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003375c6ae854cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003357440026ae88004dd619299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e00163574400200e2a66ae712412b4b657920746f20696e73657274206d7573742062652076616c69642043757272656e63792053796d626f6c0016375c0022c6ae854cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100115333573464a66ae712401214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931325d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931335d0013375e02aa66ae7124012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004004dd61aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800404854ccd5cd1aba300515333573464a66ae712412f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3139345d0013375e0026e9ccd5d02601014000335740980120581effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00335740980105d8799f40ff00335740980105d8799f40ff004bd7019299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440020082a666ae68cccc88894cd5ce24812b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3130385d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438355d001332225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3532345d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002244a0022a666ae68cdd79aab9d357420020082600a6ae840044c008d5d10008009299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438375d0013222300200337566aae780040040100048cc894cd5ce249294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3135305d0013375e6e98008dd30009991299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3534335d001332253357389201294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3535335d0013322533573892011c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec00080052f5bded8c00046ea000401000c00454cd5ce24815e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3130393a352d3138001600b4c1014000480080285261533573892117496e636f7272656374206d696e7420666f7220496e697400161533573892011e496e6974206f7574707574206f6e65206e6f646520616e6420656d707479001615335738920119496e6974206d757374206e6f74207370656e64204e6f64657300161533573892011a496e6974206d75737420636f6e73756d652054784f7574526566001635573c0046aae74004dd5299ab9c49012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800403ccc94cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3133375d00132323235335738921214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3831345d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200201a264644660020060046eb4d55cf19299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026eacd55cf1aba100235573a64a66ae712401214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026eacd55cf1aba1001130023574400200244646464a666ae68cdc3a400800426464646464a666ae68cdc3a99ab9c491214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3637395d001333253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3235335d001323230022330020020012300223300200200122253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3235345d00153335573e0022004266006660080046ae84004d5d100091299ab9c491214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3638325d00133700004a66ae712401214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3638305d00133323230022330020020012300223300200200122253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3232365d00153335573e002200426600666e0000920023574400290001bab35573c0029000005a40082a666ae68cdc3804a40042a666ae68cdc81bae001375c6ae854cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100315333573466ebc004028401454cd5ce24914496e636f727265637420746f6b656e206e616d650016153357389201134e6f6465206973206e6f74206f72646572656400161533573892011f496e636f7272656374206e756d626572206f66206e6f646520746f6b656e7300161533573892010f546f6f206d616e7920617373657473001635742a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003357440026ae88004dd6000a99ab9c4912c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010011533573892015e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3134313a352d3139001635573c0046aae74004dd51aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440086eacd5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400264a66ae71241264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004008cc94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3132375d0013253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3330315d0013232325333573466e1d2004002153357389212c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001153357389201136e6f7420616e20696e6c696e6520646174756d001635573c0046aae74004dd5000a99ab9c4912c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004c94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800400400854cd5ce2490f616c6c2073616d65206f726967696e001633253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3331365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae0132533357346008002264a66ae712411c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae880084c00cd5d10011aba1001253357389212b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3231355d0013004533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00137566ae84d5d119299ab9c491264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004dd61aba153357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010083332253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3435385d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae013253335734600a002264a66ae712411c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae880084c00cd5d100118019aba1001253357389212b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3231345d0013003533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00137566ae84d5d119299ab9c491264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800400494cd5ce24812b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3231345d001533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004004dd61aba15335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001008253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437365d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437375d0013375e6aae74004010004c94cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3530365d0013325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3338395d0013225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3430315d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297adef6c6013233300535573c6ae840088cc894cd5ce24811c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec0d55ce9aba100300100210013002357440020024a66ae712401294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3338395d00133300237560024644460040066e98004489400494cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3530385d0013253335734a66ae712401294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3432305d00135746002244a00224460040066644a66ae71241294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3430315d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297adef6c6013233300535573c6ae840088cc894cd5ce24811c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec0d55ce9aba100300100210013002357440020024a66ae712401264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3531355d0015333573466ebc004dd424000244a00224460040060020026eacd5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010033232325333573466e1d20000021533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010011533573892015e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3230333a352d3239001635573c0046aae74004dd51aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae88018c94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004d5d10009aba2357440026ae88004d5d100099299ab9c4901264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", + "cborHex": "5925a259259f010000225335738921314c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f4d696e744469726563746f72792e68733a34325d00132323232323232323232323253335734a666aae7c0085288999299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3239375d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294454cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3133395d00133357340040022940c00cd5d0800898011aba2001322533573892012a4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a39355d0013253357389201194c5b2e2f506c7574617263682f426f6f6c2e68733a3137305d0013375e6e9cc94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800400cdd399299ab9c491264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040054cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004c94cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004d5d0801000899191919192999ab9a3370e90000010a999ab9a3253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931325d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931335d0013375e02aa66ae7124012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004004dd61aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800404854ccd5cd1aba300515333573464a66ae712412f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3137345d0013375e0026e9ccd5d02601014000335740980120581effffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00335740980105d8799f40ff00335740980105d8799f40ff004bd7019299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440020082a666ae68cccc88894cd5ce24812b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3130395d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438355d001332225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3532345d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002244a0022a666ae68cdd79aab9d357420020082600a6ae840044c008d5d10008009299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438375d0013222300200337566aae780040040100048cc894cd5ce249294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3135305d0013375e6e98008dd30009991299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3534335d001332253357389201294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3535335d0013322533573892011c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec00080052f5bded8c00046ea000401000c00454cd5ce24815e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3131303a352d3138001600b4c1014000480080285261533573892117496e636f7272656374206d696e7420666f7220496e697400161533573892011e496e6974206f7574707574206f6e65206e6f646520616e6420656d707479001615335738920119496e6974206d757374206e6f74207370656e64204e6f64657300161533573892011a496e6974206d75737420636f6e73756d652054784f757452656600161325333573494454cd5ce2492b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3238305d001325333573466e1cdc6800a407026464646464a666ae68cc894cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cdc800100319b90006001153335734a6644a66ae71241194c5b2e2f506c7574617263682f426f6f6c2e68733a3133395d00133357340040022940cc94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001333322222533573892012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3139385d0013375e00266664444a66ae7124012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3139335d001374e66ae80010cd5d000199aba000233574000297ae0004005003002375200c6ea4008d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010033574264a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440060162664a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba200133222533573892012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3230345d001323375e00466664444a66ae7124012f4c5b6c69622f536d617274546f6b656e732f54797065732f50546f6b656e4469726563746f72792e68733a3139335d001374e66ae80010cd5d000199aba000233574000297ae000400332325333573466e1cdc69bae3253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026aae78009203815333573466e1c0052000135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100315333573466e1c0052002135742a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003161635573a0026ea8d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100132325333573466e1cdc69bae325335738921214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026aae78009203815333573466e1c005200013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440062a666ae68cdc3800a400426ae84c94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440062c2c6aae74004dd51aba13253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004dd60009ba900637520020162a666ae68cccc88894cd5ce24812b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3130395d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438355d001332225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3532345d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002244a0022a666ae68cdd79aab9d357420020082600a6ae840044c008d5d10008009299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3438375d0013222300200337566aae780040040100048cc894cd5ce249294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3135305d0013375e6e98008dd30009991299ab9c4901294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3534335d001332253357389201294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3535335d0013322533573892011c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec00080052f5bded8c00046ea000401000c00454cd5ce24815e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3131303a352d31380016012533573892011c4c5b6c69622f54797065732f436f6e7374616e74732e68733a31395d001375200c90010088a4c2a66ae7124119496e636f7272656374206d696e7420666f7220496e73657274001615335738920121496e636f7272656374206e6f6465206f75747075747320666f7220496e736572740016153357389201255370656e74206e6f64652073686f756c6420636f76657220696e73657274696e67206b65790016375c6ae854cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003375c6ae854cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003357440026ae88004dd619299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e00163574400200e2a66ae712412b4b657920746f20696e73657274206d7573742062652076616c69642043757272656e63792053796d626f6c0016375c0022c6ae854cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100135573c0046aae74004dd5299ab9c49012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800403ccc94cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3133385d00132323235335738921214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3831345d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200201a264644660020060046eb4d55cf19299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026eacd55cf1aba100235573a64a66ae712401214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026eacd55cf1aba1001130023574400200244646464a666ae68cdc3a400800426464646464a666ae68cdc3a99ab9c491214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3637395d001333253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3235335d001323230022330020020012300223300200200122253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3235345d00153335573e0022004266006660080046ae84004d5d100091299ab9c491214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3638325d00133700004a66ae712401214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3638305d00133323230022330020020012300223300200200122253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3232365d00153335573e002200426600666e0000920023574400290001bab35573c0029000005a40082a666ae68cdc3804a40042a666ae68cdc81bae001375c6ae854cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100315333573466ebc004028401454cd5ce24914496e636f727265637420746f6b656e206e616d650016153357389201134e6f6465206973206e6f74206f72646572656400161533573892011f496e636f7272656374206e756d626572206f66206e6f646520746f6b656e7300161533573892010f546f6f206d616e7920617373657473001635742a66ae712401194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001003357440026ae88004dd6000a99ab9c4912c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010011533573892015e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3134323a352d3139001635573c0046aae74004dd51aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440086eacd5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400264a66ae71241264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004008cc94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3132385d0013253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3330315d0013232325333573466e1d2004002153357389212c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001153357389201136e6f7420616e20696e6c696e6520646174756d001635573c0046aae74004dd5000a99ab9c4912c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004c94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800400400854cd5ce2490f616c6c2073616d65206f726967696e001633253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3331365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae0132533357346008002264a66ae712411c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae880084c00cd5d10011aba1001253357389212b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3231365d0013004533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00137566ae84d5d119299ab9c491264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004dd61aba153357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010083332253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3435385d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae013253335734600a002264a66ae712411c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae880084c00cd5d100118019aba1001253357389212b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3231355d0013003533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00137566ae84d5d119299ab9c491264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea800400494cd5ce24812b4c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3231355d001533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004004dd61aba15335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001008253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437365d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437375d0013375e6aae74004010004c94cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3530365d0013325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3338395d0013225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3430315d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297adef6c6013233300535573c6ae840088cc894cd5ce24811c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec0d55ce9aba100300100210013002357440020024a66ae712401294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3338395d00133300237560024644460040066e98004489400494cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3530385d0013253335734a66ae712401294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3432305d00135746002244a00224460040066644a66ae71241294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3430315d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297adef6c6013233300535573c6ae840088cc894cd5ce24811c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400266ec0d55ce9aba100300100210013002357440020024a66ae712401264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3531355d0015333573466ebc004dd424000244a00224460040060020026eacd5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010033232325333573466e1d20000021533573892012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010011533573892015e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f436f6d6d6f6e2e68733a3230343a352d3239001635573c0046aae74004dd51aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae88018c94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004d5d10009aba2357440026ae88004d5d100099299ab9c4901264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", "description": "Directory Node Minting Policy", "type": "PlutusScriptV3" } \ No newline at end of file diff --git a/compiled/directorySpending.json b/compiled/directorySpending.json index ce82d61..b5d0509 100644 --- a/compiled/directorySpending.json +++ b/compiled/directorySpending.json @@ -1,5 +1,5 @@ { - "cborHex": "5906e05906dd010000225335738921324c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f5370656e644469726563746f72792e68733a36385d00132323232325333573466e1d20040021533357346644a66ae71241214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437365d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437375d0013375e6aae7400400c004d5d099299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013758a66ae712412c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100137566ae84c94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004d5d10020a4c2c2a66ae71241655061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f5370656e644469726563746f72792e68733a37393a332d3535001635573c0046aae74004dd519299ab9c49012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004c94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004c94cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004cc94cd5ce2481214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3634375d0013232300223300200200123002233002002001225335738921214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3634375d00153335573e0022c2a666ae68c00cd5d080089aba100113002357440024a66ae71241324c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f5370656e644469726563746f72792e68733a37345d001332253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437365d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437375d0013375e6aae7400400c004014c94cd5ce24812c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00137566ae84d5d119299ab9c491264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040054cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004dd61aba153357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574464a66ae712401264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", + "cborHex": "590709590706010000225335738921324c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f5370656e644469726563746f72792e68733a36395d00132323232325333573466e1d200400215333573464a666ae6800440044cd5ce2491863616e6e6f742066696e64206469726563746f727920435300001332253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437365d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437375d0013375e6aae7400400c004d5d099299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013758a66ae712412c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100137566ae84c94cd5ce249194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004d5d10020a4c2c2a66ae71241655061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f4c696e6b65644c6973742f5370656e644469726563746f72792e68733a38303a332d3535001635573c0046aae74004dd519299ab9c49012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004c94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004c94cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004cc94cd5ce2481214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3634375d0013232300223300200200123002233002002001225335738921214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3634375d00153335573e0022c2a666ae68c00cd5d080089aba100113002357440024a66ae71241324c5b6c69622f536d617274546f6b656e732f4c696e6b65644c6973742f5370656e644469726563746f72792e68733a37355d001332253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437365d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3437375d0013375e6aae7400400c004014dd599299ab9c49012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040054cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d001357426ae88c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004dd61aba153357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574464a66ae712401264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", "description": "Directory Spending", "type": "PlutusScriptV3" } \ No newline at end of file diff --git a/compiled/permissionedMinting.json b/compiled/permissionedMinting.json index 7971941..c6f971e 100644 --- a/compiled/permissionedMinting.json +++ b/compiled/permissionedMinting.json @@ -1,5 +1,5 @@ { - "cborHex": "5902b15902ae010000225335738921314c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f50726f746f636f6c506172616d732e68733a36305d001533357346a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200829444c008d5d100099299ab9c49012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00137586ae84c94cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004c94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040054cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040045261601", + "cborHex": "5902b15902ae010000225335738921314c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f50726f746f636f6c506172616d732e68733a36325d001533357346a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200829444c008d5d100099299ab9c49012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00137586ae84c94cd5ce2481194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004c94cd5ce2481264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040054cd5ce2492c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040045261601", "description": "Permissioned Minting", "type": "PlutusScriptV3" } \ No newline at end of file diff --git a/compiled/programmableTokenMinting.json b/compiled/programmableTokenMinting.json index a85cba8..ff3c736 100644 --- a/compiled/programmableTokenMinting.json +++ b/compiled/programmableTokenMinting.json @@ -1,5 +1,5 @@ { - "cborHex": "591036591033010000222253357389212b4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a38385d00132323232323232325333573466e1d20000021323232323232325333573466e1cd5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100e480004c8c8c94ccd5cd1991299ab9c4901194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cdc3999911299ab9c4901264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634345d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001375a0026eac00400cdd59aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400801400e00c66ebcc94cd5ce24812c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010040163370e6eb400520023325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200629444c008d5d100080a199299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012c4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a3130395d00135573a0026eacd5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae880385261635573c0046aae74004c94cd5ce2481214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026644a66ae71241214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3737305d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200200826eacd55cf1aba1001130023574400200202400c2a666ae68cdc4240000062a666ae68cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cdc3999911299ab9c4901264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634345d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001375a0026eac00400cdd59aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400200e00800666ebcc94cd5ce24812c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010010133325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200629444c008d5d1000808999299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012c4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a3130395d00135573a0026eacd5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae8802c52616153335734664a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200629444c008d5d1000808999299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012c4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a3130395d00135573a0026eacd5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae8802c52616325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d08009bac35742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100a375a6aae78008d55ce80099299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026644a66ae71241214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3737305d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200200826eacd55cf1aba100113002357440020020040026eacd5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100553357389212c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010011533573892015e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a39323a332d3237001635573c0046aae74004dd51aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440086ae88d5d10009aba20013574464a66ae712401264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010023574400264a66ae71241264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", + "cborHex": "5910fb5910f8010000222253357389212b4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a38385d00132323232323232325333573466e1d20000021323232323232325333573466e1cdd69aba153357389201194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100e480004c8c8c94ccd5cd1991299ab9c4901194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940c94ccd5cd000899ab9c4901276669727374206f7574707574206d75737420636f6e7461696e206d696e74656420746f6b656e730000110013370e666444a66ae71241264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634345d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001375a0026eac00400cdd59aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400801400e00c64a666ae680044cd5ce24812270746f6b656e73206d75737420676f20746f2062617365206c6f67696320637265640000110013375e64a66ae712412c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010040163253335734002266ae712411d6d75737420696e73657274206e6f646520696e206469726563746f72790000110013370e6eb400520023253335734002266ae71241196d75737420696e766f6b65206d696e74696e67206c6f6769630000110013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200629444c008d5d100080a199299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012c4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a3130395d00135573a0026eacd5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae880385261635573c0046aae74004c94cd5ce2481214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026644a66ae71241214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3737305d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200200826eacd55cf1aba1001130023574400200202400c2a666ae68cdc4240000062a666ae68cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cdc3999911299ab9c4901264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634345d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001333325335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3536365d001322225335738921294c5b7372632f506c7574617263682f4c65646765724170692f4173736f634d61702e68733a3537385d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002200a2a666ae68cdd79aab9d3574200200c260086aae78d5d0800898011aba20010010010024800094cd5ce249264c5b7372632f506c7574617263682f4c65646765724170692f56616c75652e68733a3634385d001375a0026eac00400cdd59aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010013574400200e00800666ebcc94cd5ce24812c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004d5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010010133325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200629444c008d5d1000808999299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012c4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a3130395d00135573a0026eacd5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae8802c52616153335734664a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3231365d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054ccd5cd19baf3574200200629444c008d5d1000808999299ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3330395d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002297ae01332253357389211c4c5b2e2f506c7574617263682f4275696c74696e2e68733a3231335d00133574000400260066ae84004c008d5d10009299ab9c49012c4c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a3130395d00135573a0026eacd5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae8802c52616325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d08009bac35742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100a375a6aae78008d55ce80099299ab9c4901214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026644a66ae71241214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3737305d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200200826eacd55cf1aba100113002357440020020040026eacd5d0a99ab9c4901194c5b2e2f506c7574617263682f4c6973742e68733a3234345d00100553357389212c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d00135742a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010011533573892015e5061747465726e206d61746368206661696c75726520696e207175616c69666965642027646f2720626c6f636b206174206c69622f536d617274546f6b656e732f436f6e7472616374732f49737375616e63652e68733a39323a332d3237001635573c0046aae74004dd51aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357440086ae88d5d10009aba20013574464a66ae712401264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d0010023574400264a66ae71241264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", "description": "Issuance", "type": "PlutusScriptV3" } \ No newline at end of file diff --git a/compiled/protocolParametersNFTMinting.json b/compiled/protocolParametersNFTMinting.json index 4676151..7dadace 100644 --- a/compiled/protocolParametersNFTMinting.json +++ b/compiled/protocolParametersNFTMinting.json @@ -1,5 +1,5 @@ { - "cborHex": "5904c45904c1010000225335738921314c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f50726f746f636f6c506172616d732e68733a33395d001323232323232323232533357346644a66ae712401194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cdd780126010f4e50726f746f636f6c506172616d73003375e0029801010100325335738921214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931325d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931335d0013375e01aa66ae7124012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004004dd61aba15335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001008149858d55cf0011aab9d0013253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026644a66ae71241214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3737305d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200200826eacd55cf1aba100113002357440020026ae84008004dd59aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004d5d10022999ab9a3370e6aae74009200010011635573c0026ea8d5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae88008c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", + "cborHex": "590537590534010000225335738921314c5b6c69622f536d617274546f6b656e732f436f6e7472616374732f50726f746f636f6c506172616d732e68733a34315d001323232323232323232533357346644a66ae712401194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940cc894cd5ce249194c5b2e2f506c7574617263682f426f6f6c2e68733a3134335d0013335734004002940c94ccd5cd0008800899ab9c490113746f6b656e206e616d65206d69736d61746368000013375e0049810f4e50726f746f636f6c506172616d730032533357340022002266ae71240117696e636f7272656374206d696e74656420616d6f756e74000013375e00298101010032533357340022002266ae71240115696e6974205554784f206e6f742070726573656e74000013253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931325d0013325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3330335d0013232300223300200200123002233002002001225335738921194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e002294054cc94cd5ce2481194c5b2e2f506c7574617263682f426f6f6c2e68733a3134375d0013357340022944c00cd5d0800898011aba2001253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3931335d0013375e01aa66ae7124012c4c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2f4669656c642e68733a3237385d0013574264a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004004004dd61aba15335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001008149858d55cf0011aab9d0013253357389201214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3635365d00153335573e0022a66ae712410e4c69737420697320656d7074792e001613253335573e00226ae8400854cd5ce249244c69737420636f6e7461696e73206d6f7265207468616e206f6e6520656c656d656e742e0016357440026644a66ae71241214c5b6c69622f506c7574617263682f436f72652f5574696c732e68733a3737305d001332323002233002002001230022330020020012253357389201194c5b2e2f506c7574617263682f4c6973742e68733a3139375d00153335573e0022c2a666ae68cdd79aab9d3574200200826eacd55cf1aba100113002357440020026ae84008004dd59aba1325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921194c5b2e2f506c7574617263682f4c6973742e68733a3234365d00135744a66ae71241194c5b2e2f506c7574617263682f4c6973742e68733a3234365d001357446ae88004d5d10022999ab9a3370e6aae74009200010011635573c0026ea8d5d099299ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001357446ae88008c94cd5ce249264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea8004d5d0a99ab9c491194c5b2e2f506c7574617263682f4c6973742e68733a3234345d001001325335738921264c5b2e2f506c7574617263682f44617461526570722f496e7465726e616c2e68733a3431325d00135573c6ea80040041", "description": "Protocol Parameters NFT", "type": "PlutusScriptV3" } \ No newline at end of file diff --git a/src/SmartTokens/Core/Scripts.hs b/src/SmartTokens/Core/Scripts.hs new file mode 100644 index 0000000..6fcad66 --- /dev/null +++ b/src/SmartTokens/Core/Scripts.hs @@ -0,0 +1,18 @@ +module SmartTokens.Core.Scripts ( + tryCompile, + tryCompileTracingAndBinds, + tryCompileNoTracing, +) where + +import Plutarch + +tryCompile :: Config -> ClosedTerm a -> Script +tryCompile cfg x = case compile cfg x of + Left e -> error $ "Compilation failed: " <> show e + Right s -> s + +tryCompileTracingAndBinds :: ClosedTerm a -> Script +tryCompileTracingAndBinds = tryCompile (Tracing LogInfo DoTracingAndBinds) + +tryCompileNoTracing :: ClosedTerm a -> Script +tryCompileNoTracing = tryCompile NoTracing diff --git a/src/exe/export-smart-tokens/Main.hs b/src/exe/export-smart-tokens/Main.hs index 7afb99b..f1e085c 100644 --- a/src/exe/export-smart-tokens/Main.hs +++ b/src/exe/export-smart-tokens/Main.hs @@ -4,37 +4,26 @@ module Main (main) where import Cardano.Binary qualified as CBOR import Data.Aeson (KeyValue ((.=)), object) import Data.Aeson.Encode.Pretty (encodePretty) -import Data.Bifunctor ( - first, - ) +import Data.Bifunctor (first) import Data.ByteString.Base16 qualified as Base16 import Data.ByteString.Lazy qualified as LBS -import Data.Text ( - Text, - pack, - ) +import Data.Text (Text, pack) import Data.Text.Encoding qualified as Text -import Plutarch ( - Config (..), - TracingMode (..), - LogLevel (..), - compile, - ) -import Plutarch.Evaluate ( - evalScript, - applyArguments - ) +import Plutarch (Config (..), LogLevel (..), TracingMode (..), compile) +import Plutarch.Evaluate (applyArguments, evalScript) import Plutarch.Prelude import Plutarch.Script (Script, serialiseScript) -import PlutusLedgerApi.V2 ( - Data, - ExBudget, - ) -import SmartTokens.Contracts.ProgrammableLogicBase (mkProgrammableLogicBase, mkProgrammableLogicGlobal) +import PlutusLedgerApi.V2 (Data, ExBudget) +import SmartTokens.Contracts.ExampleTransferLogic (mkFreezeAndSeizeTransfer, + mkPermissionedTransfer) import SmartTokens.Contracts.Issuance (mkProgrammableLogicMinting) -import SmartTokens.Contracts.ProtocolParams (mkProtocolParametersMinting, alwaysFailScript, mkPermissionedMinting) -import SmartTokens.Contracts.ExampleTransferLogic (mkPermissionedTransfer, mkFreezeAndSeizeTransfer) +import SmartTokens.Contracts.ProgrammableLogicBase (mkProgrammableLogicBase, + mkProgrammableLogicGlobal) +import SmartTokens.Contracts.ProtocolParams (alwaysFailScript, + mkPermissionedMinting, + mkProtocolParametersMinting) import SmartTokens.LinkedList.MintDirectory (mkDirectoryNodeMP) +import SmartTokens.LinkedList.SpendBlacklist (pmkBlacklistSpending) import SmartTokens.LinkedList.SpendDirectory (pmkDirectorySpending) encodeSerialiseCBOR :: Script -> Text @@ -77,4 +66,5 @@ main = do writePlutusScriptTraceBind "Permissioned Transfer" "./compiled/permissionedTransfer.json" mkPermissionedTransfer writePlutusScriptTraceBind "Freeze and Seize Transfer" "./compiled/freezeAndSeizeTransfer.json" mkFreezeAndSeizeTransfer writePlutusScriptTraceBind "Directory Node Minting Policy" "./compiled/directoryNodeMintingPolicy.json" mkDirectoryNodeMP - writePlutusScriptTraceBind "Directory Spending" "./compiled/directorySpending.json" pmkDirectorySpending \ No newline at end of file + writePlutusScriptTraceBind "Directory Spending" "./compiled/directorySpending.json" pmkDirectorySpending + writePlutusScriptTraceBind "Blacklist Spending" "./compiled/blacklistSpending.json" pmkBlacklistSpending diff --git a/src/lib/SmartTokens/Contracts/Issuance.hs b/src/lib/SmartTokens/Contracts/Issuance.hs index 517cf52..5a11556 100644 --- a/src/lib/SmartTokens/Contracts/Issuance.hs +++ b/src/lib/SmartTokens/Contracts/Issuance.hs @@ -1,18 +1,20 @@ -{-# LANGUAGE QualifiedDo #-} -{-# LANGUAGE OverloadedRecordDot #-} -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedRecordDot #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QualifiedDo #-} module SmartTokens.Contracts.Issuance ( mkProgrammableLogicMinting, ) where -import Plutarch.LedgerApi.V3 (PCredential, PScriptContext, PScriptInfo(PMintingScript)) +import Plutarch.Builtin (pdataImpl, pfromDataImpl) +import Plutarch.Core.Utils (pand'List, pheadSingleton, ptryLookupValue, + pvalidateConditions, (#>)) +import Plutarch.Internal.PlutusType (PlutusType (pcon', pmatch')) +import Plutarch.LedgerApi.V3 (PCredential, PScriptContext, + PScriptInfo (PMintingScript)) +import Plutarch.LedgerApi.Value (PCurrencySymbol, pvalueOf) import Plutarch.Monadic qualified as P import Plutarch.Prelude -import Plutarch.Builtin (pfromDataImpl, pdataImpl) -import Plutarch.LedgerApi.Value (PCurrencySymbol, pvalueOf) -import Plutarch.Core.Utils (ptryLookupValue, pheadSingleton, pand'List, (#>), pvalidateConditions) import Plutarch.Unsafe (punsafeCoerce) -import Plutarch.Internal.PlutusType (PlutusType(pcon', pmatch')) --import SmartTokens.Types.PTokenDirectory (PDirectorySetNode) data PSmartTokenMintingAction (s :: S) = PRegisterPToken | PMintPToken @@ -27,7 +29,7 @@ instance PlutusType PSmartTokenMintingAction where pcon' PRegisterPToken = 0 pcon' PMintPToken = 1 - -- redeemer data is untrusted and non-permanent so we can safely decide zero is + -- redeemer data is untrusted and non-permanent so we can safely decide zero is -- PRegisterPToken and anything else we consider PMintPToken. pmatch' x f = pif (x #== 0) (f PRegisterPToken) (f PMintPToken) @@ -41,7 +43,7 @@ instance PIsData PSmartTokenMintingAction where {-| Minting Policy for Programmable Logic Tokens -This minting policy enables the creation and management of programmable tokens with +This minting policy enables the creation and management of programmable tokens with configurable transfer and issuer logic. == Overview @@ -88,7 +90,7 @@ mkProgrammableLogicMinting :: ClosedTerm (PAsData PCredential :--> PAsData PCurr mkProgrammableLogicMinting = plam $ \programmableLogicBase nodeCS mintingLogicCred ctx -> P.do ctxF <- pletFields @'["txInfo", "redeemer", "scriptInfo"] ctx infoF <- pletFields @'["referenceInputs", "outputs", "mint", "wdrl"] ctxF.txInfo - let red = punsafeCoerce @_ @_ @PSmartTokenMintingAction (pto ctxF.redeemer) + let red = punsafeCoerce @_ @_ @(PAsData PSmartTokenMintingAction) (pto ctxF.redeemer) PMintingScript scriptInfo <- pmatch ctxF.scriptInfo ownCS <- plet $ pfield @"_0" # scriptInfo mintedValue <- plet $ pfromData infoF.mint @@ -100,7 +102,7 @@ mkProgrammableLogicMinting = plam $ \programmableLogicBase nodeCS mintingLogicCr ownTokenName <- plet (pfstBuiltin # ownTkPair) ownNumMinted <- plet (pfromData $ psndBuiltin # ownTkPair) txOutputs <- plet $ pfromData infoF.outputs - -- For ease of implementation of the POC we enforce that the first output must contain the minted tokens. + -- For ease of implementation of the POC we enforce that the first output must contain the minted tokens. -- This can be easily changed later. mintingToOutputF <- pletFields @'["value", "address"] (phead # txOutputs) @@ -109,12 +111,12 @@ mkProgrammableLogicMinting = plam $ \programmableLogicBase nodeCS mintingLogicCr # plam (pfstBuiltin #) # pto (pfromData infoF.wdrl) - pmatch red $ \case + pmatch (pfromData red) $ \case -- PRegisterPToken is used to register a new programmable token in the directory -- It creates a permanent association between the currency symbol with a transferLogicScript and issuerLogicScript. -- All transfers of the token will be validated by either the transferLogicScript or the issuerLogicScript. -- This redeemer can only be invoked once per instance of this minting policy since the directory contracts do not permit duplicate - -- entries. + -- entries. PRegisterPToken -> P.do let nodeTkPairs = ptryLookupValue # nodeCS # mintedValue nodeTkPair <- plet (pheadSingleton # nodeTkPairs) @@ -123,11 +125,11 @@ mkProgrammableLogicMinting = plam $ \programmableLogicBase nodeCS mintingLogicCr let checks = pand'List - [ pvalueOf # pfromData mintingToOutputF.value # pfromData ownCS # pfromData ownTokenName #== ownNumMinted - , pfield @"credential" # mintingToOutputF.address #== programmableLogicBase + [ ptraceInfoIfTrue "first output must contain minted tokens" $ pvalueOf # pfromData mintingToOutputF.value # pfromData ownCS # pfromData ownTokenName #== ownNumMinted + , ptraceInfoIfTrue "ptokens must go to base logic cred" $ pfield @"credential" # mintingToOutputF.address #== programmableLogicBase -- The entry for this currency symbol is inserted into the programmable token directory - , pfromData insertedAmount #== pconstant 1 - , pelem # mintingLogicCred # invokedScripts + , ptraceInfoIfTrue "must insert node in directory" $ pfromData insertedAmount #== pconstant 1 + , ptraceInfoIfTrue "must invoke minting logic" $ pelem # mintingLogicCred # invokedScripts ] pif checks (pconstant ()) diff --git a/src/lib/SmartTokens/Contracts/ProtocolParams.hs b/src/lib/SmartTokens/Contracts/ProtocolParams.hs index 8b25b91..c478e9b 100644 --- a/src/lib/SmartTokens/Contracts/ProtocolParams.hs +++ b/src/lib/SmartTokens/Contracts/ProtocolParams.hs @@ -1,37 +1,23 @@ -{-# LANGUAGE QualifiedDo #-} -{-# LANGUAGE OverloadedRecordDot #-} -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedRecordDot #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QualifiedDo #-} module SmartTokens.Contracts.ProtocolParams ( mkProtocolParametersMinting, alwaysFailScript, mkPermissionedMinting, ) where -import Plutarch.LedgerApi.V3 ( PTxOutRef, PScriptContext, PPubKeyHash ) +import Plutarch.Builtin (PAsData, PData, pconstantData, pfromData, pfstBuiltin, + psndBuiltin) +import Plutarch.Core.Utils (phasUTxO, pheadSingleton, pletFieldsMinting, + ptryLookupValue, ptxSignedByPkh, + pvalidateConditions) +import Plutarch.LedgerApi.V3 (PPubKeyHash, PScriptContext, PTxOutRef) import Plutarch.Monadic qualified as P -import Plutarch.Prelude - ( PAsData, - PData, - PEq((#==)), - type (:-->), - (#), - plet, - perror, - pconstantData, - ClosedTerm, - plam, - pfromData, - pfstBuiltin, - psndBuiltin, - pletFields, - PUnit, pfield ) -import Plutarch.Core.Utils - ( pheadSingleton, - ptryLookupValue, - phasUTxO, - pvalidateConditions, - pletFieldsMinting, ptxSignedByPkh ) -import SmartTokens.Types.Constants ( pprotocolParamsTokenData ) +import Plutarch.Prelude (ClosedTerm, PEq ((#==)), PUnit, perror, pfield, plam, + plet, pletFields, type (:-->), (#)) +import Plutarch.Trace (ptraceInfoIfFalse) +import SmartTokens.Types.Constants (pprotocolParamsTokenData) -- | Protocol Parameters minting policy -- This validator allows minting of a single token with a single token name. @@ -40,30 +26,30 @@ mkProtocolParametersMinting = plam $ \oref ctx -> P.do ctxF <- pletFields @'["txInfo", "scriptInfo"] ctx infoF <- pletFields @'["inputs", "mint"] ctxF.txInfo scriptInfoF <- pletFieldsMinting ctxF.scriptInfo - let ownCS = scriptInfoF._0 + let ownCS = scriptInfoF._0 mintedValue <- plet $ pfromData infoF.mint let ownTkPairs = ptryLookupValue # ownCS # mintedValue - -- Enforce that only a single token name is minted for this policy + -- Enforce that only a single token name is minted for this policy ownTkPair <- plet (pheadSingleton # ownTkPairs) ownTokenName <- plet (pfstBuiltin # ownTkPair) ownNumMinted <- plet (psndBuiltin # ownTkPair) pvalidateConditions - [ ownTokenName #== pprotocolParamsTokenData - , ownNumMinted #== pconstantData 1 - , phasUTxO # oref # infoF.inputs + [ ptraceInfoIfFalse "token name mismatch" $ ownTokenName #== pprotocolParamsTokenData + , ptraceInfoIfFalse "incorrect minted amount" $ ownNumMinted #== pconstantData 1 + , ptraceInfoIfFalse "init UTxO not present" $ phasUTxO # oref # pfromData infoF.inputs ] -- | Permissioned Minting Policy -- This minting policy checks for a given permissioned credential in the signatories of the transaction. -- It allows minting of any number of tokens with any token name so long as the credential authorizes the transaction. mkPermissionedMinting :: ClosedTerm (PAsData PPubKeyHash :--> PScriptContext :--> PUnit) -mkPermissionedMinting = plam $ \permissionedCred ctx -> +mkPermissionedMinting = plam $ \permissionedCred ctx -> pvalidateConditions [ ptxSignedByPkh # permissionedCred # (pfield @"signatories" # (pfield @"txInfo" # ctx)) ] -- | A nonced always fails script -- The parameter is used to modify the script hash. --- This is where the protocol parameters UTxO should reside. +-- This is where the protocol parameters UTxO should reside. alwaysFailScript :: ClosedTerm (PData :--> PScriptContext :--> PUnit) -alwaysFailScript = plam $ \_ _ctx -> perror \ No newline at end of file +alwaysFailScript = plam $ \_ _ctx -> perror diff --git a/src/lib/SmartTokens/LinkedList/Common.hs b/src/lib/SmartTokens/LinkedList/Common.hs index b3c72ee..a8b5b22 100644 --- a/src/lib/SmartTokens/LinkedList/Common.hs +++ b/src/lib/SmartTokens/LinkedList/Common.hs @@ -1,9 +1,9 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE OverloadedRecordDot #-} -{-# LANGUAGE QualifiedDo #-} -{-# LANGUAGE NamedFieldPuns #-} -{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE OverloadedRecordDot #-} +{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PartialTypeSignatures #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE QualifiedDo #-} {-# OPTIONS_GHC -Wno-unused-do-bind #-} {-# OPTIONS_GHC -Wno-partial-type-signatures #-} @@ -16,81 +16,34 @@ module SmartTokens.LinkedList.Common ( parseNodeOutputUtxoPair, ) where -import Plutarch.LedgerApi.Value (pnormalize) +import Plutarch.Bool (pand') +import Plutarch.Builtin (pasByteStr, pforgetData) +import Plutarch.Core.Utils (passert, pcountOfUniqueTokens, + pfindCurrencySymbolsByTokenPrefix, phasDataCS, + pheadSingleton, pmapFilter, psingletonOfCS, + ptryFromInlineDatum) import Plutarch.LedgerApi.AssocMap qualified as AssocMap +import Plutarch.LedgerApi.V3 (AmountGuarantees (NonZero, Positive), + KeyGuarantees (Sorted), PAddress, PCurrencySymbol, + POutputDatum (POutputDatum), PScriptContext, + PScriptInfo (PMintingScript), PTokenName, PTxOut, + PValue) +import Plutarch.LedgerApi.Value (pnormalize) import Plutarch.Monadic qualified as P -import Plutarch.Bool (pand') -import Plutarch.Prelude - ( Generic, - (#), - (#$), - phoistAcyclic, - plet, - pto, - pcon, - pmatch, - tcont, - type (:-->), - ClosedTerm, - PType, - S, - Term, - plam, - TermCont, - PByteString, - pconstant, - PEq((#==)), - PBool, - PPartialOrd((#<)), - PInteger, - (#&&), - pdata, - pfromData, - pfield, - pletFields, - pall, - plengthBS, - pany, - pfilter, - pmap, - pguardC, - PAsData, - PBuiltinList, - PListLike(pnull), - PMaybe(PJust), - PPair(..), - PUnit, pelimList ) +import Plutarch.Prelude (ClosedTerm, Generic, PAsData, PBool, PBuiltinList, + PByteString, PEq ((#==)), PInteger, PListLike (pnull), + PMaybe (PJust), PPair (..), PPartialOrd ((#<)), PType, + PUnit, S, Term, TermCont, pall, pany, pcon, pconstant, + pdata, pelimList, pfield, pfilter, pfromData, pguardC, + phoistAcyclic, plam, plengthBS, plet, pletFields, pmap, + pmatch, pto, tcont, type (:-->), (#$), (#&&), (#)) import Plutarch.Unsafe (punsafeCoerce) -import Plutarch.Core.Utils ( - passert, - pcountOfUniqueTokens, - pfindCurrencySymbolsByTokenPrefix, - pheadSingleton, - phasDataCS, - psingletonOfCS, - ptryFromInlineDatum, - pmapFilter, - ) +import SmartTokens.Types.PTokenDirectory (PDirectorySetNode, pisEmptyNode, + pisInsertedNode, pisInsertedOnNode) import Types.Constants (pnodeKeyTN, poriginNodeTN, ptryParseNodeKey) -import SmartTokens.Types.PTokenDirectory - ( PDirectorySetNode, - pisInsertedOnNode, - pisInsertedNode, - pisEmptyNode ) -import Plutarch.LedgerApi.V3 - ( KeyGuarantees(Sorted), - AmountGuarantees(NonZero, Positive), - PCurrencySymbol, - PTokenName, - PValue, - POutputDatum(POutputDatum), - PTxOut, - PScriptContext, - PScriptInfo(PMintingScript), - PAddress ) -import Plutarch.Builtin (pforgetData, pasByteStr) - -paysToAddress :: Term s (PAddress :--> (PAsData PTxOut) :--> PBool) + + +paysToAddress :: Term s (PAddress :--> PAsData PTxOut :--> PBool) paysToAddress = phoistAcyclic $ plam $ \adr txOut -> adr #== (pfield @"address" # txOut) {- | Ensures that the minted amount of the FinSet CS is exactly the specified @@ -111,7 +64,7 @@ correctNodeTokenMinted = phoistAcyclic $ tokenMap #== nodeMint -- Potentially use this in the future if we plan to manage additional --- value in the directory nodes. +-- value in the directory nodes. nodeInputUtxoDatumUnsafePair :: ClosedTerm ( PAsData PTxOut @@ -146,7 +99,7 @@ parseNodeOutputUtxo = phoistAcyclic $ let nodeKey = pasByteStr # nodeKeyData nodeNext = pasByteStr # pforgetData datumF.next - -- The following are checked by `pisInsertedNode` + -- The following are checked by `pisInsertedNode` -- passert "transferLogicScript deserialization" $ pdeserializesToCredential # datumF.transferLogicScript -- passert "issuerLogicScript deserialization" $ pdeserializesToCredential # datumF.issuerLogicScript @@ -158,7 +111,7 @@ parseNodeOutputUtxo = phoistAcyclic $ datum -- Potentially use this in the future if we plan to manage additional --- value in the directory nodes. +-- value in the directory nodes. parseNodeOutputUtxoPair :: ClosedTerm ( PAsData PCurrencySymbol @@ -217,7 +170,7 @@ makeCommon ctx' = do let atNodeValidator = pelimList - ( \firstNodeInput _ -> + ( \firstNodeInput _ -> let isSameAddress = (paysToAddress # (pfield @"address" # firstNodeInput)) in pall # isSameAddress # toNodeValidator ) @@ -244,9 +197,9 @@ makeCommon ctx' = do pure common --- | Initialize the linked list +-- | Initialize the linked list -- Validations: --- - No node inputs should be spent +-- - No node inputs should be spent -- - There should be only a single node token minted (the origin node token) -- - There should be exactly one node output, the key of which should be empty and the next key should be empty pInit :: forall (s :: S). PDirectoryCommon s -> Term s PUnit @@ -290,9 +243,9 @@ pInsert common = plam $ \pkToInsert -> P.do coveringDatumKey <- plet $ pasByteStr # pforgetData coveringDatumF.key coveringDatumNext <- plet $ pasByteStr # pforgetData coveringDatumF.next - -- The key of the spent node is lexographically less than pkToInsert and + -- The key of the spent node is lexographically less than pkToInsert and -- the next key of the spent node is lexographically greater than pkToInsert. - -- Thus the coveringNode is the node upon which we are inserting. + -- Thus the coveringNode is the node upon which we are inserting. passert "Spent node should cover inserting key" $ pand' # (coveringDatumKey #< keyToInsert) # (keyToInsert #< coveringDatumNext) @@ -318,8 +271,8 @@ data PDirectoryCommon (s :: S) = MkCommon , mint :: Term s (PValue 'Sorted 'NonZero) -- ^ value minted in current Tx , nodeInputs :: Term s (PBuiltinList (PAsData PDirectorySetNode)) - -- ^ node inputs in the tx + -- ^ node inputs in the tx , nodeOutputs :: Term s (PBuiltinList (PAsData PDirectorySetNode)) - -- ^ node outputs in the tx + -- ^ node outputs in the tx } deriving stock (Generic) diff --git a/src/lib/SmartTokens/LinkedList/MintDirectory.hs b/src/lib/SmartTokens/LinkedList/MintDirectory.hs index 7fae322..679e2db 100644 --- a/src/lib/SmartTokens/LinkedList/MintDirectory.hs +++ b/src/lib/SmartTokens/LinkedList/MintDirectory.hs @@ -54,7 +54,7 @@ mkDirectoryNodeMP = plam $ \initUTxO ctx -> P.do PInsert action -> P.do act <- pletFields @'["keyToInsert"] action pkToInsert <- plet act.keyToInsert - let mintsProgrammableToken = pconstant False + let mintsProgrammableToken = pconstant True insertChecks = pand'List [ mintsProgrammableToken diff --git a/src/lib/SmartTokens/LinkedList/SpendBlacklist.hs b/src/lib/SmartTokens/LinkedList/SpendBlacklist.hs new file mode 100644 index 0000000..d0fa133 --- /dev/null +++ b/src/lib/SmartTokens/LinkedList/SpendBlacklist.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE OverloadedRecordDot #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QualifiedDo #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE UndecidableInstances #-} + +module SmartTokens.LinkedList.SpendBlacklist (pmkBlacklistSpending) where + +import Plutarch.Builtin (pasConstr, pforgetData) +import Plutarch.Core.Utils (phasDataCS, pvalidateConditions) +import Plutarch.LedgerApi.V3 (PCurrencySymbol, PScriptContext, PScriptInfo) +import Plutarch.Monadic qualified as P +import Plutarch.Prelude + +pisSpendingPurpose :: Term s (PAsData PScriptInfo) -> Term s PBool +pisSpendingPurpose term = (pfstBuiltin # (pasConstr # pforgetData term)) #== 1 + +pmkBlacklistSpending :: ClosedTerm (PAsData PCurrencySymbol :--> PScriptContext :--> PUnit) +pmkBlacklistSpending = plam $ \blacklistMP ctx -> P.do + ctxF <- pletFields @'["txInfo", "scriptInfo"] ctx + infoF <- pletFields @'["mint"] ctxF.txInfo + pvalidateConditions + [ ptraceInfoIfFalse "Must mint blacklist cs" $ phasDataCS # blacklistMP # pfromData infoF.mint + , ptraceInfoIfFalse "Expects spending purpose" $ pisSpendingPurpose ctxF.scriptInfo + ] diff --git a/src/lib/SmartTokens/LinkedList/SpendDirectory.hs b/src/lib/SmartTokens/LinkedList/SpendDirectory.hs index 8629c78..d09bb41 100644 --- a/src/lib/SmartTokens/LinkedList/SpendDirectory.hs +++ b/src/lib/SmartTokens/LinkedList/SpendDirectory.hs @@ -1,44 +1,29 @@ -{-# LANGUAGE AllowAmbiguousTypes #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE UndecidableInstances #-} -{-# LANGUAGE TypeApplications #-} -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedRecordDot #-} -{-# LANGUAGE QualifiedDo #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QualifiedDo #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE UndecidableInstances #-} -module SmartTokens.LinkedList.SpendDirectory (pmkDirectorySpending, pmkDirectorySpendingYielding, pmkDirectoryGlobalLogic) where +module SmartTokens.LinkedList.SpendDirectory (pmkDirectorySpending, pmkDirectorySpendingYielding, pmkDirectoryGlobalLogic) where -import Plutarch.LedgerApi.V3 - ( PCredential, - PCurrencySymbol, - POutputDatum(POutputDatum), - PScriptContext ) +import Plutarch.Core.Utils (phasDataCS, pmustFind, pvalidateConditions) +import Plutarch.LedgerApi.AssocMap qualified as AssocMap +import Plutarch.LedgerApi.V3 (PCredential, PCurrencySymbol, + POutputDatum (POutputDatum), PScriptContext) import Plutarch.Monadic qualified as P -import Plutarch.Prelude - ( (#), - (#$), - perror, - pto, - pmatch, - type (:-->), - ClosedTerm, - plam, - pconstant, - pfromData, - pfield, - pletFields, - PAsData, - PBuiltinList, - PMaybe(PNothing, PJust), - PUnit ) +import Plutarch.Prelude (ClosedTerm, PAsData, PBuiltinList, + PMaybe (PJust, PNothing), PUnit, pconstant, perror, + pfield, pfromData, plam, pletFields, pmatch, pto, + type (:-->), (#$), (#)) +import Plutarch.Trace import Plutarch.Unsafe (punsafeCoerce) -import Plutarch.Core.Utils (pvalidateConditions, phasDataCS, pmustFind) -import Plutarch.LedgerApi.AssocMap qualified as AssocMap import SmartTokens.Types.ProtocolParams (PProgrammableLogicGlobalParams) pmkDirectoryGlobalLogic :: ClosedTerm (PAsData PCurrencySymbol :--> PScriptContext :--> PUnit) -pmkDirectoryGlobalLogic = plam $ \protocolParamsCS ctx -> P.do +pmkDirectoryGlobalLogic = plam $ \protocolParamsCS ctx -> P.do ctxF <- pletFields @'["txInfo", "scriptInfo"] ctx infoF <- pletFields @'["referenceInputs", "mint"] ctxF.txInfo let paramUTxO = @@ -55,17 +40,17 @@ pmkDirectoryGlobalLogic = plam $ \protocolParamsCS ctx -> P.do pmkDirectorySpendingYielding :: ClosedTerm (PAsData PCredential :--> PScriptContext :--> PUnit) -pmkDirectorySpendingYielding = plam $ \globalCred ctx -> P.do +pmkDirectorySpendingYielding = plam $ \globalCred ctx -> P.do ctxF <- pletFields @'["txInfo"] ctx - let stakeCerts = pfield @"wdrl" # ctxF.txInfo + let stakeCerts = pfield @"wdrl" # ctxF.txInfo stakeScript = pfromData globalCred - pmatch (AssocMap.plookup # stakeScript # stakeCerts) $ \case - PJust _ -> (pconstant ()) - PNothing -> perror + pmatch (AssocMap.plookup # stakeScript # stakeCerts) $ \case + PJust _ -> (pconstant ()) + PNothing -> perror pmkDirectorySpending :: ClosedTerm (PAsData PCurrencySymbol :--> PScriptContext :--> PUnit) -pmkDirectorySpending = plam $ \protocolParamsCS ctx -> P.do +pmkDirectorySpending = plam $ \protocolParamsCS ctx -> P.do ctxF <- pletFields @'["txInfo", "scriptInfo"] ctx infoF <- pletFields @'["referenceInputs", "mint"] ctxF.txInfo let paramUTxO = @@ -73,9 +58,9 @@ pmkDirectorySpending = plam $ \protocolParamsCS ctx -> P.do pmustFind @PBuiltinList # plam (\txIn -> let resolvedIn = pfield @"resolved" # txIn - in phasDataCS # protocolParamsCS # (pfield @"value" # resolvedIn) + in phasDataCS # protocolParamsCS # pfromData (pfield @"value" # resolvedIn) ) - # infoF.referenceInputs + # pfromData infoF.referenceInputs POutputDatum ((pfield @"outputDatum" #) -> paramDat') <- pmatch $ pfield @"datum" # paramUTxO protocolParamsF <- pletFields @'["directoryNodeCS"] (pfromData $ punsafeCoerce @_ @_ @(PAsData PProgrammableLogicGlobalParams) (pto paramDat')) - pvalidateConditions [phasDataCS # protocolParamsF.directoryNodeCS # pfromData infoF.mint] \ No newline at end of file + pvalidateConditions [ptraceInfoIfFalse "cannot find directory CS" $ phasDataCS # protocolParamsF.directoryNodeCS # pfromData infoF.mint] diff --git a/src/lib/SmartTokens/Types/PTokenDirectory.hs b/src/lib/SmartTokens/Types/PTokenDirectory.hs index c924a30..ccb4faf 100644 --- a/src/lib/SmartTokens/Types/PTokenDirectory.hs +++ b/src/lib/SmartTokens/Types/PTokenDirectory.hs @@ -24,36 +24,26 @@ module SmartTokens.Types.PTokenDirectory ( BlacklistNode(..), ) where +import Data.Text qualified as T import Generics.SOP qualified as SOP -import Plutarch ( Config(NoTracing), Config(NoTracing) ) -import Plutarch.Builtin - ( pasByteStr, - pasConstr, - pasList, - pforgetData, - plistData, - pforgetData, - plistData ) +import GHC.Stack (HasCallStack) +import Plutarch (Config (NoTracing)) +import Plutarch.Builtin (pasByteStr, pasConstr, pasList, pforgetData, plistData) import Plutarch.Core.PlutusDataList (DerivePConstantViaDataList (..), PlutusTypeDataList, ProductIsData (..)) import Plutarch.Core.Utils (pcond, pheadSingleton, pmkBuiltinList) import Plutarch.DataRepr (PDataFields) +import Plutarch.DataRepr.Internal (DerivePConstantViaData (..)) import Plutarch.DataRepr.Internal.Field (HRec (..), Labeled (Labeled)) import Plutarch.Evaluate (unsafeEvalTerm) +import Plutarch.Internal qualified as PI +import Plutarch.Internal.Other (printScript) import Plutarch.LedgerApi.V3 (PCredential, PCurrencySymbol) import Plutarch.Lift (PConstantDecl, PUnsafeLiftDecl (PLifted)) import Plutarch.Prelude import Plutarch.Unsafe (punsafeCoerce) -import PlutusLedgerApi.V3 - ( Credential, CurrencySymbol, BuiltinByteString ) -import PlutusTx - ( Data(B, Constr), ToData, FromData, UnsafeFromData ) -import Plutarch.DataRepr.Internal - ( DerivePConstantViaData(..) ) -import GHC.Stack (HasCallStack) -import Plutarch.Internal.Other (printScript) -import qualified Data.Text as T -import qualified Plutarch.Internal as PI +import PlutusLedgerApi.V3 (BuiltinByteString, Credential, CurrencySymbol) +import PlutusTx (Data (B, Constr), FromData, ToData, UnsafeFromData) data BlacklistNode = BlacklistNode { @@ -137,30 +127,6 @@ deriving via instance (PConstantDecl DirectorySetNode) --- Optimization: --- Use the following manual instances instead of the deriving via above if so that we can define key and next fields of type ByteString --- We should discuss whether we want to prefer newtypes or primitive types for datum / redeemer fields going forward. --- import Data.ByteString --- import PlutusTx.Builtins qualified as Builtins --- import PlutusTx.Builtins.Internal qualified as BI --- import PlutusTx.Prelude (BuiltinByteString, fromBuiltin, toBuiltin) --- instance PlutusTx.ToData DirectorySetNode where --- toBuiltinData DirectorySetNode{key, next, transferLogicScript, issuerLogicScript} = --- BI.mkList $ BI.mkCons (BI.mkB $ toBuiltin key) $ BI.mkCons (BI.mkB $ toBuiltin next) $ BI.mkCons (PlutusTx.toBuiltinData transferLogicScript) $ BI.mkCons (PlutusTx.toBuiltinData issuerLogicScript) $ BI.mkNilData BI.unitval - --- instance PlutusTx.FromData DirectorySetNode where --- fromBuiltinData builtinData = --- let fields = BI.snd $ BI.unsafeDataAsConstr builtinData --- key = BI.head fields --- fields1 = BI.tail fields --- next = BI.head fields1 --- fields2 = BI.tail fields1 --- transferLogicScript = PlutusTx.unsafeFromBuiltinData $ BI.head fields2 --- fields3 = BI.tail fields2 --- issuerLogicScript = PlutusTx.unsafeFromBuiltinData $ BI.head fields3 --- in Just $ DirectorySetNode (fromBuiltin $ BI.unsafeDataAsB key) (fromBuiltin $ BI.unsafeDataAsB next) transferLogicScript issuerLogicScript - - newtype PDirectorySetNode (s :: S) = PDirectorySetNode ( Term @@ -188,8 +154,12 @@ isHeadNode = plam $ \node -> isTailNode :: ClosedTerm (PAsData PDirectorySetNode :--> PBool) isTailNode = plam $ \node -> - pfield @"next" # node #== pemptyCSData + pfield @"next" # node #== ptailNextData +-- nullTransferLogicCred = pconstant (Constr 0 [PlutusTx.B ""]) +-- nullIssuerLogicCred = pconstant (Constr 0 [PlutusTx.B ""]) +-- >>> _printTerm NoTracing (unsafeEvalTerm NoTracing (plistData #$ pcons # pforgetData pemptyBSData #$ pcons # pforgetData ptailNextData #$ pcons # nullTransferLogicCred #$ pcons # nullIssuerLogicCred # pnil)) +-- "program\n 1.0.0\n (List\n [ B #\n , B #ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n , Constr 0 [B #]\n , Constr 0 [B #] ])" pisEmptyNode :: ClosedTerm (PAsData PDirectorySetNode :--> PBool) pisEmptyNode = plam $ \node -> let nullTransferLogicCred = pconstant (Constr 0 [PlutusTx.B ""]) @@ -203,6 +173,8 @@ pemptyBSData = unsafeEvalTerm NoTracing (punsafeCoerce (pconstant $ PlutusTx.B " pemptyCSData :: ClosedTerm (PAsData PCurrencySymbol) pemptyCSData = unsafeEvalTerm NoTracing (punsafeCoerce (pconstant $ PlutusTx.B "")) +-- >>> _printTerm NoTracing (ptailNextData) +-- "program 1.0.0 (B #ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)" ptailNextData :: ClosedTerm (PAsData PCurrencySymbol) ptailNextData = unsafeEvalTerm NoTracing (punsafeCoerce $ pdata (phexByteStr "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")) @@ -217,12 +189,6 @@ pisInsertedOnNode = phoistAcyclic $ let expectedDirectoryNode = pmkDirectorySetNode # coveringKey # insertedKey # transferLogicCred # issuerLogicCred in outputNode #== expectedDirectoryNode --- pisInsertedNode :: ClosedTerm (PAsData PByteString :--> PAsData PByteString :--> PAsData PCredential :--> PAsData PCredential :--> PAsData PDirectorySetNode :--> PBool) --- pisInsertedNode = phoistAcyclic $ --- plam $ \insertedKey coveringNext transferLogicCred issuerLogicCred outputNode -> --- let expectedDirectoryNode = pmkDirectorySetNode # insertedKey # coveringNext # transferLogicCred # issuerLogicCred --- in outputNode #== expectedDirectoryNode - pisInsertedNode :: ClosedTerm (PAsData PByteString :--> PAsData PByteString :--> PAsData PDirectorySetNode :--> PBool) pisInsertedNode = phoistAcyclic $ plam $ \insertedKey coveringNext outputNode -> diff --git a/src/wst-poc.cabal b/src/wst-poc.cabal index e9fbcac..e91c7e0 100644 --- a/src/wst-poc.cabal +++ b/src/wst-poc.cabal @@ -17,72 +17,96 @@ description: extra-source-files: CHANGELOG.md common lang - default-language: Haskell2010 - default-extensions: ExplicitForAll ScopedTypeVariables MultiParamTypeClasses - DeriveGeneric StandaloneDeriving DeriveLift FlexibleContexts - GeneralizedNewtypeDeriving DeriveFunctor DeriveFoldable - DeriveTraversable ImportQualifiedPost NumericUnderscores - LambdaCase DerivingStrategies KindSignatures TypeApplications - DataKinds TypeOperators GADTs ViewPatterns TypeFamilies - DeriveAnyClass DerivingVia RankNTypes - ghc-options: -Wall -Wnoncanonical-monad-instances -Wunused-packages - -Wincomplete-uni-patterns -Wincomplete-record-updates - -Wredundant-constraints -Widentities + default-language: Haskell2010 + default-extensions: + DataKinds + DeriveAnyClass + DeriveFoldable + DeriveFunctor + DeriveGeneric + DeriveLift + DeriveTraversable + DerivingStrategies + DerivingVia + ExplicitForAll + FlexibleContexts + GADTs + GeneralizedNewtypeDeriving + ImportQualifiedPost + KindSignatures + LambdaCase + MultiParamTypeClasses + NumericUnderscores + RankNTypes + ScopedTypeVariables + StandaloneDeriving + TypeApplications + TypeFamilies + TypeOperators + ViewPatterns + + ghc-options: + -Wall -Wnoncanonical-monad-instances -Wunused-packages + -Wincomplete-uni-patterns -Wincomplete-record-updates + -Wredundant-constraints -Widentities library - import: lang + import: lang exposed-modules: + Profile + SmartTokens.Contracts.ExampleTransferLogic SmartTokens.Contracts.Issuance SmartTokens.Contracts.ProgrammableLogicBase - SmartTokens.Contracts.ExampleTransferLogic SmartTokens.Contracts.ProtocolParams + SmartTokens.LinkedList.Common + SmartTokens.LinkedList.MintDirectory + SmartTokens.LinkedList.SpendBlacklist + SmartTokens.LinkedList.SpendDirectory SmartTokens.Types.Constants SmartTokens.Types.ProtocolParams SmartTokens.Types.PTokenDirectory - SmartTokens.LinkedList.MintDirectory - SmartTokens.LinkedList.SpendDirectory - SmartTokens.LinkedList.Common Types.Constants Wst.Cli Wst.Offchain Wst.Onchain Wst.Server - Profile -- Compile build-depends: , base - , plutarch-onchain-lib , generics-sop , plutarch , plutarch-ledger-api + , plutarch-onchain-lib , plutus-core , plutus-ledger-api , plutus-tx , text - hs-source-dirs: lib + hs-source-dirs: lib + executable wst-poc - import: lang - main-is: Main.hs + import: lang + main-is: Main.hs hs-source-dirs: exe/wst-poc build-depends: - base, - wst-poc + , base + , wst-poc executable export-smart-tokens import: lang main-is: Main.hs - build-depends: - , wst-poc + build-depends: + , aeson , aeson-pretty , base - , cardano-binary - , aeson , base16-bytestring , bytestring - , text + , cardano-binary , plutarch , plutus-ledger-api + , text + , wst-poc + hs-source-dirs: exe/export-smart-tokens