tx · 8LX6Z6mcnEsFq8ZpSh2aPhyGDo8NManaFmc6w5146yD5 3N2Q9TfYZcenz5a3on97GLEAasz21EkKMAa: -0.01400000 Waves 2021.11.17 18:59 [1795250] smart account 3N2Q9TfYZcenz5a3on97GLEAasz21EkKMAa > SELF 0.00000000 Waves
{ "type": 13, "id": "8LX6Z6mcnEsFq8ZpSh2aPhyGDo8NManaFmc6w5146yD5", "fee": 1400000, "feeAssetId": null, "timestamp": 1637164798321, "version": 2, "chainId": 84, "sender": "3N2Q9TfYZcenz5a3on97GLEAasz21EkKMAa", "senderPublicKey": "7xnAFC7PqCyLRjzmjyaTmSK7H1bEBfSx6qnj7JBj6XJe", "proofs": [ "31yeS7xEDmNuGJt9qLHmhPmNTFEVBUL2beyf6WU4RAaX9ckBwzNjpWrcjVfGGu6wA2gvgsZtiBXT5o8rLtKy8gDx" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAABAAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIGdwIMDn68lL32eMqLRKIY/1dabJUxYb0aJsAxWhhGsfAAAAAAtwdWJLZXlBbGljZQEAAAAg43aQ2X2IK64P51H6+dKHLdjpoqHmimQbk8Z25XKt9W0AAAAACXB1YktleUJvYgEAAAAgNrVlZpnvdQ+1qDkZiyYl7tYcfEQCJS/tSw0Pasaz0EsAAAAADHB1YktleUNvb3BlcgEAAAAgf2hr0H2+2FrVR7cV2FEQTxxMcXc6Hp1IgaaqWMLFTH4AAAABAAAAAWkBAAAACHB1cmNoYXNlAAAAAAQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAHEF0dGFjaGVkIHBheW1lbnQgaXMgcmVxdWlyZWQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIGNhbiB1c2UgV0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AABkAAAAAgkAAGQAAAACBQAAAAFhBQAAAAFiBQAAAAFjAAAAAAAAAAACTpACqg==", "height": 1795250, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AJPffQNZA4DYJk2cX3KHiaZem7wrmy4CVaV1Xwebwtun Next: JDH7UDHE9VE5ZfLegcztk1VU9whE6ec2q6GkZS6aoYzK Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'7xnAFC7PqCyLRjzmjyaTmSK7H1bEBfSx6qnj7JBj6XJe' | |
5 | 5 | ||
6 | - | @Callable(b) | |
6 | + | let b = base58'GJvQeBDAzLZepewd7B4tjh4xxDTZ3jJjGAgLu61GpiEp' | |
7 | + | ||
8 | + | let c = base58'4gZSiHTXLqvVnQHqBYUXzF6WzhsRjKtmrDsE16qzqhwY' | |
9 | + | ||
10 | + | let d = base58'9aM8SJLh6kk8WtQgpXNSsyER2AhHSuTc84bAyuKGcmtR' | |
11 | + | ||
12 | + | @Callable(e) | |
7 | 13 | func purchase () = { | |
8 | - | let | |
9 | - | then | |
14 | + | let f = if ((size(e.payments) == 1)) | |
15 | + | then e.payments[0] | |
10 | 16 | else throw("Attached payment is required") | |
11 | - | if (isDefined( | |
17 | + | if (isDefined(f.assetId)) | |
12 | 18 | then throw("can use WAVES only as the moment") | |
13 | 19 | else { | |
14 | - | let | |
15 | - | let | |
16 | - | let | |
17 | - | if ($isInstanceOf( | |
20 | + | let g = toBase58String(e.caller.bytes) | |
21 | + | let h = { | |
22 | + | let i = getInteger(this, "item_A_coupon_price") | |
23 | + | if ($isInstanceOf(i, "Int")) | |
18 | 24 | then { | |
19 | - | let | |
20 | - | | |
25 | + | let j = i | |
26 | + | j | |
21 | 27 | } | |
22 | 28 | else 0 | |
23 | 29 | } | |
24 | - | if (( | |
30 | + | if ((h > f.amount)) | |
25 | 31 | then throw("purchase amoun cannot be less than item price") | |
26 | - | else if (( | |
32 | + | else if ((f.amount > h)) | |
27 | 33 | then throw("purchase amoun cannot be higher than item price") | |
28 | - | else [StringEntry(("status:purchase_item_A_customer_" + | |
34 | + | else [StringEntry(("status:purchase_item_A_customer_" + g), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + g), h)] | |
29 | 35 | } | |
30 | 36 | } | |
31 | 37 | ||
32 | 38 | ||
33 | - | @Verifier(h) | |
34 | - | func i () = { | |
35 | - | let f = h | |
36 | - | if ($isInstanceOf(f, "SetScriptTransaction")) | |
39 | + | @Verifier(k) | |
40 | + | func l () = { | |
41 | + | let j = if (if (if (sigVerify(k.bodyBytes, k.proofs[0], b)) | |
42 | + | then true | |
43 | + | else sigVerify(k.bodyBytes, k.proofs[1], b)) | |
44 | + | then true | |
45 | + | else sigVerify(k.bodyBytes, k.proofs[2], b)) | |
46 | + | then 1 | |
47 | + | else 0 | |
48 | + | let m = if (if (if (sigVerify(k.bodyBytes, k.proofs[0], c)) | |
49 | + | then true | |
50 | + | else sigVerify(k.bodyBytes, k.proofs[1], c)) | |
51 | + | then true | |
52 | + | else sigVerify(k.bodyBytes, k.proofs[2], c)) | |
53 | + | then 1 | |
54 | + | else 0 | |
55 | + | let n = if (if (sigVerify(k.bodyBytes, k.proofs[0], d)) | |
56 | + | then true | |
57 | + | else sigVerify(k.bodyBytes, k.proofs[2], d)) | |
58 | + | then 1 | |
59 | + | else 0 | |
60 | + | let i = k | |
61 | + | if ($isInstanceOf(i, "SetScriptTransaction")) | |
37 | 62 | then { | |
38 | - | let | |
39 | - | sigVerify( | |
63 | + | let o = i | |
64 | + | sigVerify(k.bodyBytes, k.proofs[0], a) | |
40 | 65 | } | |
41 | - | else if ($isInstanceOf( | |
66 | + | else if ($isInstanceOf(i, "DataTransaction")) | |
42 | 67 | then { | |
43 | - | let | |
68 | + | let o = i | |
44 | 69 | true | |
45 | 70 | } | |
46 | - | else | |
71 | + | else (((j + m) + n) >= 2) | |
47 | 72 | } | |
48 | 73 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'7xnAFC7PqCyLRjzmjyaTmSK7H1bEBfSx6qnj7JBj6XJe' | |
5 | 5 | ||
6 | - | @Callable(b) | |
6 | + | let b = base58'GJvQeBDAzLZepewd7B4tjh4xxDTZ3jJjGAgLu61GpiEp' | |
7 | + | ||
8 | + | let c = base58'4gZSiHTXLqvVnQHqBYUXzF6WzhsRjKtmrDsE16qzqhwY' | |
9 | + | ||
10 | + | let d = base58'9aM8SJLh6kk8WtQgpXNSsyER2AhHSuTc84bAyuKGcmtR' | |
11 | + | ||
12 | + | @Callable(e) | |
7 | 13 | func purchase () = { | |
8 | - | let | |
9 | - | then | |
14 | + | let f = if ((size(e.payments) == 1)) | |
15 | + | then e.payments[0] | |
10 | 16 | else throw("Attached payment is required") | |
11 | - | if (isDefined( | |
17 | + | if (isDefined(f.assetId)) | |
12 | 18 | then throw("can use WAVES only as the moment") | |
13 | 19 | else { | |
14 | - | let | |
15 | - | let | |
16 | - | let | |
17 | - | if ($isInstanceOf( | |
20 | + | let g = toBase58String(e.caller.bytes) | |
21 | + | let h = { | |
22 | + | let i = getInteger(this, "item_A_coupon_price") | |
23 | + | if ($isInstanceOf(i, "Int")) | |
18 | 24 | then { | |
19 | - | let | |
20 | - | | |
25 | + | let j = i | |
26 | + | j | |
21 | 27 | } | |
22 | 28 | else 0 | |
23 | 29 | } | |
24 | - | if (( | |
30 | + | if ((h > f.amount)) | |
25 | 31 | then throw("purchase amoun cannot be less than item price") | |
26 | - | else if (( | |
32 | + | else if ((f.amount > h)) | |
27 | 33 | then throw("purchase amoun cannot be higher than item price") | |
28 | - | else [StringEntry(("status:purchase_item_A_customer_" + | |
34 | + | else [StringEntry(("status:purchase_item_A_customer_" + g), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + g), h)] | |
29 | 35 | } | |
30 | 36 | } | |
31 | 37 | ||
32 | 38 | ||
33 | - | @Verifier(h) | |
34 | - | func i () = { | |
35 | - | let f = h | |
36 | - | if ($isInstanceOf(f, "SetScriptTransaction")) | |
39 | + | @Verifier(k) | |
40 | + | func l () = { | |
41 | + | let j = if (if (if (sigVerify(k.bodyBytes, k.proofs[0], b)) | |
42 | + | then true | |
43 | + | else sigVerify(k.bodyBytes, k.proofs[1], b)) | |
44 | + | then true | |
45 | + | else sigVerify(k.bodyBytes, k.proofs[2], b)) | |
46 | + | then 1 | |
47 | + | else 0 | |
48 | + | let m = if (if (if (sigVerify(k.bodyBytes, k.proofs[0], c)) | |
49 | + | then true | |
50 | + | else sigVerify(k.bodyBytes, k.proofs[1], c)) | |
51 | + | then true | |
52 | + | else sigVerify(k.bodyBytes, k.proofs[2], c)) | |
53 | + | then 1 | |
54 | + | else 0 | |
55 | + | let n = if (if (sigVerify(k.bodyBytes, k.proofs[0], d)) | |
56 | + | then true | |
57 | + | else sigVerify(k.bodyBytes, k.proofs[2], d)) | |
58 | + | then 1 | |
59 | + | else 0 | |
60 | + | let i = k | |
61 | + | if ($isInstanceOf(i, "SetScriptTransaction")) | |
37 | 62 | then { | |
38 | - | let | |
39 | - | sigVerify( | |
63 | + | let o = i | |
64 | + | sigVerify(k.bodyBytes, k.proofs[0], a) | |
40 | 65 | } | |
41 | - | else if ($isInstanceOf( | |
66 | + | else if ($isInstanceOf(i, "DataTransaction")) | |
42 | 67 | then { | |
43 | - | let | |
68 | + | let o = i | |
44 | 69 | true | |
45 | 70 | } | |
46 | - | else | |
71 | + | else (((j + m) + n) >= 2) | |
47 | 72 | } | |
48 | 73 |
github/deemru/w8io/169f3d6 61.70 ms ◑