tx · EdzjEi9Tyr3j4npz6bQ5hFTuDfttFqfpcwqnckJGFPXu

3PMZXEJXC7LEJh75ZgGmuB8rKc74kZvecro:  -0.01400000 Waves

2019.04.04 15:46 [1467689] smart account 3PMZXEJXC7LEJh75ZgGmuB8rKc74kZvecro > SELF 0.00000000 Waves

{ "type": 13, "id": "EdzjEi9Tyr3j4npz6bQ5hFTuDfttFqfpcwqnckJGFPXu", "fee": 1400000, "feeAssetId": null, "timestamp": 1554381982258, "version": 1, "sender": "3PMZXEJXC7LEJh75ZgGmuB8rKc74kZvecro", "senderPublicKey": "7iVcq9EbiExo1t2pgUgpqnKEcofjv7Qdo7oJdnAxqsBB", "proofs": [ "2NkXK9gR8cLojceX3ntmEiWJN6upR2vvrR62QHSVRxMZDGTWU5sftcqNmVPsqFm33YcS4D2WkhJEkpjV6FVHRcs9" ], "script": "base64:AgQAAAAOdmVjcm9QdWJsaWNLZXkIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAADnRyaWdnZXJNaW5Db3N0AAAAAAAAB6EgBAAAAA50cmlnZ2VyTWF4Q29zdAAAAAAABfXhAAQAAAAJYWxpYXNJbml0CQEAAAAFQWxpYXMAAAABAgAAAAppbml0QHZlY3JvBAAAAAthbGlhc1JhbmRvbQkBAAAABUFsaWFzAAAAAQIAAAAMcmFuZG9tQHZlY3JvBAAAAAlhc3NldEluaXQBAAAAIFcz645aGmqhfJXFcLAaD0aUSr3pdr4EjX4Dd9KlhemaBAAAAAthc3NldFJhbmRvbQEAAAAg1ltcvwUjf6JxWTqOCXNYOkAK30my6IzLQpkhWsB0YeEEAAAABWNvZGVSCQABmwAAAAECAAAAAVIEAAAABWNvZGVTCQABmwAAAAECAAAAAVMEAAAACGNvZGVTaXplAAAAAAAAAAAtBAAAAARpU2lnAAAAAAAAAAAABAAAAARpUmF3AAAAAAAAAAABBAAAAAVpVHJpZwAAAAAAAAAAAgQAAAAFaUluaXQAAAAAAAAAAAMEAAAAByRtYXRjaDAF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EAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAABmluaXRUeAAAAApmZWVBc3NldElkBwMJAAAAAAAAAggFAAAABmluaXRUeAAAAANmZWUFAAAADnRyaWdnZXJNYXhDb3N0BgkAAAAAAAACCAUAAAAGaW5pdFR4AAAAA2ZlZQgFAAAADXRyaWdnZXJJbml0VHgAAAAGYW1vdW50BwkAAAAAAAACCAUAAAAGaW5pdFR4AAAAB2Fzc2V0SWQFAAAACWFzc2V0SW5pdAcJAAAAAAAAAggFAAAABmluaXRUeAAAAAZhbW91bnQAAAAAAAAAAAEHCQAAAAAAAAIJAADIAAAAAQgFAAAABmluaXRUeAAAAAphdHRhY2htZW50BQAAAAhjb2RlU2l6ZQcJAAAAAAAAAggFAAAABmluaXRUeAAAAAphdHRhY2htZW50CQABmwAAAAEJAAJYAAAAAQkAAMsAAAACBQAAAAVjb2RlUgUAAAABUgcJAAH0AAAAAwUAAAAPaW5pdFR4Ym9keUJ5dGVzCQABkQAAAAIIBQAAAAZpbml0VHgAAAAGcHJvb2ZzBQAAAARpU2lnBQAAAA52ZWNyb1B1YmxpY0tleQcHBwcHBwdOOcLa", "chainId": 87, "height": 1467689, "spentComplexity": 0 } View: original | compacted Prev: HwDv2m8NYiJde59s8oFoMcWDLFbJ4Jj2WQ9VigWHwTPQ Next: none Diff:
OldNewDifferences
1616 let iInit = 3
1717 match tx {
1818 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)
19+ if (if (!(isDefined(thisTx.assetId)))
20+ then true
21+ else if ((thisTx.assetId != assetInit))
22+ then (thisTx.assetId != assetRandom)
23+ else false)
24+ then sigVerify(tx.bodyBytes, tx.proofs[iSig], vecroPublicKey)
25+ else match transactionById(thisTx.proofs[iTrig]) {
26+ case triggerTx: TransferTransaction =>
27+ if ((triggerTx.recipient == aliasInit))
28+ then {
29+ let initTx = thisTx
30+ let triggerInitTx = triggerTx
31+ let initTxbodyBytes = (initTx.bodyBytes + initTx.proofs[iTrig])
32+ let R = initTx.proofs[iRaw]
33+ if (if (if (if (if (if (if (if (if (!(isDefined(triggerInitTx.assetId)))
34+ then (triggerInitTx.amount >= triggerMinCost)
35+ else false)
36+ then (triggerInitTx.sender == initTx.recipient)
37+ else false)
38+ then !(isDefined(initTx.feeAssetId))
39+ else false)
40+ then if ((initTx.fee == triggerMaxCost))
41+ then true
42+ else (initTx.fee == triggerInitTx.amount)
43+ else false)
44+ then (initTx.assetId == assetInit)
45+ else false)
46+ then (initTx.amount == 1)
47+ else false)
48+ then (size(initTx.attachment) == codeSize)
49+ else false)
50+ then (initTx.attachment == toBytes(toBase58String((codeR + R))))
51+ else false)
52+ then sigVerify(initTxbodyBytes, initTx.proofs[iSig], vecroPublicKey)
53+ else false
54+ }
55+ else if ((triggerTx.recipient == aliasRandom))
56+ then match transactionById(thisTx.proofs[iInit]) {
57+ case initTx: TransferTransaction =>
58+ match transactionById(initTx.proofs[iTrig]) {
59+ case triggerInitTx: TransferTransaction =>
60+ if ((triggerInitTx.recipient == aliasInit))
61+ then {
62+ let randomTx = thisTx
63+ let triggerRandomTx = triggerTx
64+ let initTxbodyBytes = (initTx.bodyBytes + initTx.proofs[iTrig])
65+ let randomTxbodyBytes = ((randomTx.bodyBytes + randomTx.proofs[iTrig]) + randomTx.proofs[iInit])
66+ let R = initTx.proofs[iRaw]
67+ let S = thisTx.proofs[iRaw]
68+ let sig = (R + S)
69+ let msg = triggerRandomTx.attachment
70+ 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))
71+ then (take(msg, codeSize) == initTx.attachment)
72+ else false)
73+ then sigVerify(msg, sig, vecroPublicKey)
74+ else false)
75+ then !(isDefined(triggerRandomTx.assetId))
76+ else false)
77+ then (triggerRandomTx.amount >= triggerMinCost)
78+ else false)
79+ then (triggerRandomTx.sender == randomTx.recipient)
80+ else false)
81+ then !(isDefined(randomTx.feeAssetId))
82+ else false)
83+ then if ((randomTx.fee == triggerMaxCost))
84+ then true
85+ else (randomTx.fee == triggerRandomTx.amount)
86+ else false)
87+ then (randomTx.assetId == assetRandom)
88+ else false)
89+ then (randomTx.amount == 1)
90+ else false)
91+ then (size(randomTx.attachment) == codeSize)
92+ else false)
93+ then (randomTx.attachment == toBytes(toBase58String((codeS + S))))
94+ else false)
95+ then sigVerify(randomTxbodyBytes, randomTx.proofs[iSig], vecroPublicKey)
96+ else false)
97+ then !(isDefined(triggerInitTx.assetId))
98+ else false)
99+ then (triggerInitTx.amount >= triggerMinCost)
100+ else false)
101+ then (triggerInitTx.sender == initTx.recipient)
102+ else false)
103+ then !(isDefined(initTx.feeAssetId))
104+ else false)
105+ then if ((initTx.fee == triggerMaxCost))
106+ then true
107+ else (initTx.fee == triggerInitTx.amount)
108+ else false)
109+ then (initTx.assetId == assetInit)
110+ else false)
111+ then (initTx.amount == 1)
112+ else false)
113+ then (size(initTx.attachment) == codeSize)
114+ else false)
115+ then (initTx.attachment == toBytes(toBase58String((codeR + R))))
116+ else false)
117+ then sigVerify(initTxbodyBytes, initTx.proofs[iSig], vecroPublicKey)
118+ else false
119+ }
120+ else false
121+ case _ =>
122+ false
123+ }
124+ case _ =>
125+ false
126+ }
47127 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- }
128+ case _ =>
129+ false
130+ }
125131 case _ =>
126- sigVerify(tx.bodyBytes, tx.proofs[iSig], vecroPublicKey)
132+ false
127133 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 2 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let vecroPublicKey = tx.senderPublicKey
44 let triggerMinCost = 500000
55 let triggerMaxCost = 100000000
66 let aliasInit = Alias("init@vecro")
77 let aliasRandom = Alias("random@vecro")
88 let assetInit = base58'6sQPWhyFc3yE1pHUsTvQKn9yLjtDx6GTPk5VPwFukxH7'
99 let assetRandom = base58'FRm3pU6cM6zmMWC1KGafHweGNg8Ag7gS9NX3FsZFMEGg'
1010 let codeR = toBytes("R")
1111 let codeS = toBytes("S")
1212 let codeSize = 45
1313 let iSig = 0
1414 let iRaw = 1
1515 let iTrig = 2
1616 let iInit = 3
1717 match tx {
1818 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)
19+ if (if (!(isDefined(thisTx.assetId)))
20+ then true
21+ else if ((thisTx.assetId != assetInit))
22+ then (thisTx.assetId != assetRandom)
23+ else false)
24+ then sigVerify(tx.bodyBytes, tx.proofs[iSig], vecroPublicKey)
25+ else match transactionById(thisTx.proofs[iTrig]) {
26+ case triggerTx: TransferTransaction =>
27+ if ((triggerTx.recipient == aliasInit))
28+ then {
29+ let initTx = thisTx
30+ let triggerInitTx = triggerTx
31+ let initTxbodyBytes = (initTx.bodyBytes + initTx.proofs[iTrig])
32+ let R = initTx.proofs[iRaw]
33+ if (if (if (if (if (if (if (if (if (!(isDefined(triggerInitTx.assetId)))
34+ then (triggerInitTx.amount >= triggerMinCost)
35+ else false)
36+ then (triggerInitTx.sender == initTx.recipient)
37+ else false)
38+ then !(isDefined(initTx.feeAssetId))
39+ else false)
40+ then if ((initTx.fee == triggerMaxCost))
41+ then true
42+ else (initTx.fee == triggerInitTx.amount)
43+ else false)
44+ then (initTx.assetId == assetInit)
45+ else false)
46+ then (initTx.amount == 1)
47+ else false)
48+ then (size(initTx.attachment) == codeSize)
49+ else false)
50+ then (initTx.attachment == toBytes(toBase58String((codeR + R))))
51+ else false)
52+ then sigVerify(initTxbodyBytes, initTx.proofs[iSig], vecroPublicKey)
53+ else false
54+ }
55+ else if ((triggerTx.recipient == aliasRandom))
56+ then match transactionById(thisTx.proofs[iInit]) {
57+ case initTx: TransferTransaction =>
58+ match transactionById(initTx.proofs[iTrig]) {
59+ case triggerInitTx: TransferTransaction =>
60+ if ((triggerInitTx.recipient == aliasInit))
61+ then {
62+ let randomTx = thisTx
63+ let triggerRandomTx = triggerTx
64+ let initTxbodyBytes = (initTx.bodyBytes + initTx.proofs[iTrig])
65+ let randomTxbodyBytes = ((randomTx.bodyBytes + randomTx.proofs[iTrig]) + randomTx.proofs[iInit])
66+ let R = initTx.proofs[iRaw]
67+ let S = thisTx.proofs[iRaw]
68+ let sig = (R + S)
69+ let msg = triggerRandomTx.attachment
70+ 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))
71+ then (take(msg, codeSize) == initTx.attachment)
72+ else false)
73+ then sigVerify(msg, sig, vecroPublicKey)
74+ else false)
75+ then !(isDefined(triggerRandomTx.assetId))
76+ else false)
77+ then (triggerRandomTx.amount >= triggerMinCost)
78+ else false)
79+ then (triggerRandomTx.sender == randomTx.recipient)
80+ else false)
81+ then !(isDefined(randomTx.feeAssetId))
82+ else false)
83+ then if ((randomTx.fee == triggerMaxCost))
84+ then true
85+ else (randomTx.fee == triggerRandomTx.amount)
86+ else false)
87+ then (randomTx.assetId == assetRandom)
88+ else false)
89+ then (randomTx.amount == 1)
90+ else false)
91+ then (size(randomTx.attachment) == codeSize)
92+ else false)
93+ then (randomTx.attachment == toBytes(toBase58String((codeS + S))))
94+ else false)
95+ then sigVerify(randomTxbodyBytes, randomTx.proofs[iSig], vecroPublicKey)
96+ else false)
97+ then !(isDefined(triggerInitTx.assetId))
98+ else false)
99+ then (triggerInitTx.amount >= triggerMinCost)
100+ else false)
101+ then (triggerInitTx.sender == initTx.recipient)
102+ else false)
103+ then !(isDefined(initTx.feeAssetId))
104+ else false)
105+ then if ((initTx.fee == triggerMaxCost))
106+ then true
107+ else (initTx.fee == triggerInitTx.amount)
108+ else false)
109+ then (initTx.assetId == assetInit)
110+ else false)
111+ then (initTx.amount == 1)
112+ else false)
113+ then (size(initTx.attachment) == codeSize)
114+ else false)
115+ then (initTx.attachment == toBytes(toBase58String((codeR + R))))
116+ else false)
117+ then sigVerify(initTxbodyBytes, initTx.proofs[iSig], vecroPublicKey)
118+ else false
119+ }
120+ else false
121+ case _ =>
122+ false
123+ }
124+ case _ =>
125+ false
126+ }
47127 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- }
128+ case _ =>
129+ false
130+ }
125131 case _ =>
126- sigVerify(tx.bodyBytes, tx.proofs[iSig], vecroPublicKey)
132+ false
127133 }

github/deemru/w8io/3ef1775 
88.90 ms