tx · 2YEa5TGcyCfqPw2GEdWNgpP3icGAcbZvWHJahR3RLFuC 3NBaYzWT2odsyrZ2u1ghsrHinBm4xFRAgLX: -0.01000000 Waves 2019.03.03 22:45 [520131] smart account 3NBaYzWT2odsyrZ2u1ghsrHinBm4xFRAgLX > SELF 0.00000000 Waves
{ "type": 13, "id": "2YEa5TGcyCfqPw2GEdWNgpP3icGAcbZvWHJahR3RLFuC", "fee": 1000000, "feeAssetId": null, "timestamp": 1551642383722, "version": 1, "sender": "3NBaYzWT2odsyrZ2u1ghsrHinBm4xFRAgLX", "senderPublicKey": "HBqhfdFASRQ5eBBpu2y6c6KKi1az6bMx8v1JxX4iW1Q8", "proofs": [ "b4kxBN9fvcsCi1ZJxE97o9Gdzn3y4S9E6Sryc62aX4a1HiaWSFdZ5vGSrLJgqJXKhT42YVnM5LZTzzaxcEXPYgf" ], "script": "base64:AQQAAAAOdmVjcm9QdWJsaWNLZXkIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAADnRyaWdnZXJNaW5Db3N0AAAAAAAAB6EgBAAAAA50cmlnZ2VyTWF4Q29zdAAAAAAABfXhAAQAAAAJYWxpYXNJbml0CQEAAAAFQWxpYXMAAAABAgAAABBpbml0QHNhbXBsZXZlY3JvBAAAAAthbGlhc1JhbmRvbQkBAAAABUFsaWFzAAAAAQIAAAAScmFuZG9tQHNhbXBsZXZlY3JvBAAAAAlhc3NldEluaXQBAAAAILCS1qbXJDVJEbtk2NiJzxA0IOk8plnuYBkMre2Nf86uBAAAAAthc3NldFJhbmRvbQEAAAAg4RXZNyGh60CHdHId2SY7xZIs8KBgx7BKZaYZsXp1OgcEAAAABWNvZGVSCQABmwAAAAECAAAAAVIEAAAABWNvZGVTCQABmwAAAAECAAAAAVMEAAAACGNvZGVTaXplAAAAAAAAAAAtBAAAAARpU2lnAAAAAAAAAAAABAAAAARpUmF3AAAAAAAAAAABBAAAAAVpVHJpZwAAAAAAAAAAAgQAAAAFaUluaXQAAAAA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bml0BwkAAAAAAAACCAUAAAAGaW5pdFR4AAAABmFtb3VudAAAAAAAAAAAAQcJAAAAAAAAAgkAAMgAAAABCAUAAAAGaW5pdFR4AAAACmF0dGFjaG1lbnQFAAAACGNvZGVTaXplBwkAAAAAAAACCAUAAAAGaW5pdFR4AAAACmF0dGFjaG1lbnQJAAGbAAAAAQkAAlgAAAABCQAAywAAAAIFAAAABWNvZGVSBQAAAAFSBwkAAfQAAAADBQAAAA9pbml0VHhib2R5Qnl0ZXMJAAGRAAAAAggFAAAABmluaXRUeAAAAAZwcm9vZnMFAAAABGlTaWcFAAAADnZlY3JvUHVibGljS2V5BwcHBwcHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwUAAAAEaVNpZwUAAAAOdmVjcm9QdWJsaWNLZXkkq7fL", "chainId": 84, "height": 520131, "spentComplexity": 0 } View: original | compacted Prev: none Next: F7YfXWQMiYF9f7yHS2zphiBh6gZjxQT7nb7QB27q36JB Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let vecroPublicKey = tx.senderPublicKey | |
4 | + | let triggerMinCost = 500000 | |
5 | + | let triggerMaxCost = 100000000 | |
6 | + | let aliasInit = Alias("init@samplevecro") | |
7 | + | let aliasRandom = Alias("random@samplevecro") | |
8 | + | let assetInit = base58'CtGcw1rZxdCjVpFUexfPo4ERKD72f7LuHN44RvamMwiD' | |
9 | + | let assetRandom = base58'G9e4BkCnpbHFSPo7T9CfnYqdakZ9WRm4Z7j65GM3f9tA' | |
10 | + | let codeR = toBytes("R") | |
11 | + | let codeS = toBytes("S") | |
12 | + | let codeSize = 45 | |
13 | + | let iSig = 0 | |
14 | + | let iRaw = 1 | |
15 | + | let iTrig = 2 | |
16 | + | let iInit = 3 | |
17 | + | match tx { | |
18 | + | case thisTx: TransferTransaction => | |
19 | + | match transactionById(thisTx.proofs[iTrig]) { | |
20 | + | case triggerTx: TransferTransaction => | |
21 | + | if ((triggerTx.recipient == aliasInit)) | |
22 | + | then { | |
23 | + | let initTx = thisTx | |
24 | + | let triggerInitTx = triggerTx | |
25 | + | let initTxbodyBytes = (initTx.bodyBytes + initTx.proofs[iTrig]) | |
26 | + | let R = initTx.proofs[iRaw] | |
27 | + | if (if (if (if (if (if (if (if (if (!(isDefined(triggerInitTx.assetId))) | |
28 | + | then (triggerInitTx.amount >= triggerMinCost) | |
29 | + | else false) | |
30 | + | then (triggerInitTx.sender == initTx.recipient) | |
31 | + | else false) | |
32 | + | then !(isDefined(initTx.feeAssetId)) | |
33 | + | else false) | |
34 | + | then if ((initTx.fee == triggerMaxCost)) | |
35 | + | then true | |
36 | + | else (initTx.fee == triggerInitTx.amount) | |
37 | + | else false) | |
38 | + | then (initTx.assetId == assetInit) | |
39 | + | else false) | |
40 | + | then (initTx.amount == 1) | |
41 | + | else false) | |
42 | + | then (size(initTx.attachment) == codeSize) | |
43 | + | else false) | |
44 | + | then (initTx.attachment == toBytes(toBase58String((codeR + R)))) | |
45 | + | else false) | |
46 | + | then sigVerify(initTxbodyBytes, initTx.proofs[iSig], vecroPublicKey) | |
47 | + | else false | |
48 | + | } | |
49 | + | else if ((triggerTx.recipient == aliasRandom)) | |
50 | + | then match transactionById(thisTx.proofs[iInit]) { | |
51 | + | case initTx: TransferTransaction => | |
52 | + | match transactionById(initTx.proofs[iTrig]) { | |
53 | + | case triggerInitTx: TransferTransaction => | |
54 | + | if ((triggerInitTx.recipient == aliasInit)) | |
55 | + | then { | |
56 | + | let randomTx = thisTx | |
57 | + | let triggerRandomTx = triggerTx | |
58 | + | let initTxbodyBytes = (initTx.bodyBytes + initTx.proofs[iTrig]) | |
59 | + | let randomTxbodyBytes = ((randomTx.bodyBytes + randomTx.proofs[iTrig]) + randomTx.proofs[iInit]) | |
60 | + | let R = initTx.proofs[iRaw] | |
61 | + | let S = thisTx.proofs[iRaw] | |
62 | + | let sig = (R + S) | |
63 | + | let msg = triggerRandomTx.attachment | |
64 | + | if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((triggerRandomTx.sender == triggerInitTx.sender)) | |
65 | + | then (take(msg, codeSize) == initTx.attachment) | |
66 | + | else false) | |
67 | + | then sigVerify(msg, sig, vecroPublicKey) | |
68 | + | else false) | |
69 | + | then !(isDefined(triggerRandomTx.assetId)) | |
70 | + | else false) | |
71 | + | then (triggerRandomTx.amount >= triggerMinCost) | |
72 | + | else false) | |
73 | + | then (triggerRandomTx.sender == randomTx.recipient) | |
74 | + | else false) | |
75 | + | then !(isDefined(randomTx.feeAssetId)) | |
76 | + | else false) | |
77 | + | then if ((randomTx.fee == triggerMaxCost)) | |
78 | + | then true | |
79 | + | else (randomTx.fee == triggerRandomTx.amount) | |
80 | + | else false) | |
81 | + | then (randomTx.assetId == assetRandom) | |
82 | + | else false) | |
83 | + | then (randomTx.amount == 1) | |
84 | + | else false) | |
85 | + | then (size(randomTx.attachment) == codeSize) | |
86 | + | else false) | |
87 | + | then (randomTx.attachment == toBytes(toBase58String((codeS + S)))) | |
88 | + | else false) | |
89 | + | then sigVerify(randomTxbodyBytes, randomTx.proofs[iSig], vecroPublicKey) | |
90 | + | else false) | |
91 | + | then !(isDefined(triggerInitTx.assetId)) | |
92 | + | else false) | |
93 | + | then (triggerInitTx.amount >= triggerMinCost) | |
94 | + | else false) | |
95 | + | then (triggerInitTx.sender == initTx.recipient) | |
96 | + | else false) | |
97 | + | then !(isDefined(initTx.feeAssetId)) | |
98 | + | else false) | |
99 | + | then if ((initTx.fee == triggerMaxCost)) | |
100 | + | then true | |
101 | + | else (initTx.fee == triggerInitTx.amount) | |
102 | + | else false) | |
103 | + | then (initTx.assetId == assetInit) | |
104 | + | else false) | |
105 | + | then (initTx.amount == 1) | |
106 | + | else false) | |
107 | + | then (size(initTx.attachment) == codeSize) | |
108 | + | else false) | |
109 | + | then (initTx.attachment == toBytes(toBase58String((codeR + R)))) | |
110 | + | else false) | |
111 | + | then sigVerify(initTxbodyBytes, initTx.proofs[iSig], vecroPublicKey) | |
112 | + | else false | |
113 | + | } | |
114 | + | else false | |
115 | + | case _ => | |
116 | + | false | |
117 | + | } | |
118 | + | case _ => | |
119 | + | false | |
120 | + | } | |
121 | + | else false | |
122 | + | case _ => | |
123 | + | false | |
124 | + | } | |
125 | + | case _ => | |
126 | + | sigVerify(tx.bodyBytes, tx.proofs[iSig], vecroPublicKey) | |
127 | + | } |
github/deemru/w8io/169f3d6 24.77 ms ◑