tx · Buapt4Y8hQds49duX211UexFvSLzeYP4FquMfoDYFzt8
3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4: -0.01400000 Waves
2020.11.18 16:58 [1270872] smart account 3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4 > SELF 0.00000000 Waves
{
"type": 13,
"id": "Buapt4Y8hQds49duX211UexFvSLzeYP4FquMfoDYFzt8",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1605707937804,
"version": 2,
"chainId": 84,
"sender": "3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4",
"senderPublicKey": "2qjcWuL7QitmuhkSTM7CnNxurCYXuqJ9ubswLBGmXfDv",
"proofs": [
"2BCvLJdrcKv9VBDqjyBu8PR5GjJjg8jtnojfNck7338C91rqm1drdNbMuz9fVr9ki4A9du1jkp9PVfvHrCNfY8w"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAwAAAAARYWNjb3VudDFQdWJsaWNLZXkBAAAAIPeNeDDs4TWVhR1bzOk94lFsHOraL9B/FRj0XfVMj0hOAAAAABFhY2NvdW50MlB1YmxpY0tleQEAAAAgG1e/aEwKrtMkcq9WyiLLAHtKPJgLd/oAoUXcKuUDIhUAAAAADm90aGVyUHVibGljS2V5AQAAACDnblGJprjxGAm9jEz8V5M0TOEG6bhNvbMQquBNrx0dWgAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEIBQAAAAFpAAAACHBheW1lbnRzAwkBAAAACWlzRGVmaW5lZAAAAAEICQABkQAAAAIFAAAAA3BtdAAAAAAAAAAAAAAAAAdhc3NldElkCQAAAgAAAAECAAAACG9ubHkgd3dzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAAB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dGNoMAYDAwUAAAAQYWNjb3VudDFhY2NvdW50MgYFAAAADWFjY291bnQxb3RoZXIGBQAAAA1hY2NvdW50Mm90aGVyKpsx/w==",
"height": 1270872,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 5YnQ2pv7QKAbgYMjPDEmWGWoNHPFYeXDqBSmL9HR6GCu
Next: AvT16XRz5LeDDDYmFhfPZnVEeeoA3VgVrB8wgrF8BCW1
Diff:
Old | New | | Differences |
---|
7 | 7 | | |
---|
8 | 8 | | let c = base58'GaQkBG6yLLAarb8wvPrEKnQhFqWomD2ZGT1T4vVx24qw' |
---|
9 | 9 | | |
---|
| 10 | + | @Callable(d) |
---|
| 11 | + | func purchase () = { |
---|
| 12 | + | let e = value(d.payments) |
---|
| 13 | + | if (isDefined(e[0].assetId)) |
---|
| 14 | + | then throw("only wws") |
---|
| 15 | + | else { |
---|
| 16 | + | let f = toBase58String(d.caller.bytes) |
---|
| 17 | + | let g = { |
---|
| 18 | + | let h = getInteger(this, "item_A_coupon_price") |
---|
| 19 | + | if ($isInstanceOf(h, "Int")) |
---|
| 20 | + | then { |
---|
| 21 | + | let i = h |
---|
| 22 | + | i |
---|
| 23 | + | } |
---|
| 24 | + | else 0 |
---|
| 25 | + | } |
---|
| 26 | + | if ((g > e[0].amount)) |
---|
| 27 | + | then throw("moar moeny") |
---|
| 28 | + | else if ((e[0].amount > g)) |
---|
| 29 | + | then throw("tu macz money") |
---|
| 30 | + | else if ((size(e) > 1)) |
---|
| 31 | + | then throw("single item only") |
---|
| 32 | + | else [StringEntry(("status:purchase_item_A_customer_" + f), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + f), g)] |
---|
| 33 | + | } |
---|
| 34 | + | } |
---|
10 | 35 | | |
---|
11 | | - | @Verifier(d) |
---|
12 | | - | func e () = { |
---|
13 | | - | let f = if (if (sigVerify(d.bodyBytes, d.proofs[0], a)) |
---|
| 36 | + | |
---|
| 37 | + | @Verifier(j) |
---|
| 38 | + | func k () = { |
---|
| 39 | + | let l = if (if (sigVerify(j.bodyBytes, j.proofs[0], a)) |
---|
14 | 40 | | then true |
---|
15 | | - | else sigVerify(d.bodyBytes, d.proofs[1], a)) |
---|
| 41 | + | else sigVerify(j.bodyBytes, j.proofs[1], a)) |
---|
16 | 42 | | then true |
---|
17 | | - | else sigVerify(d.bodyBytes, d.proofs[2], a) |
---|
18 | | - | let g = if (if (sigVerify(d.bodyBytes, d.proofs[0], b)) |
---|
| 43 | + | else sigVerify(j.bodyBytes, j.proofs[2], a) |
---|
| 44 | + | let m = if (if (sigVerify(j.bodyBytes, j.proofs[0], b)) |
---|
19 | 45 | | then true |
---|
20 | | - | else sigVerify(d.bodyBytes, d.proofs[1], b)) |
---|
| 46 | + | else sigVerify(j.bodyBytes, j.proofs[1], b)) |
---|
21 | 47 | | then true |
---|
22 | | - | else sigVerify(d.bodyBytes, d.proofs[2], b) |
---|
23 | | - | let h = if (if (sigVerify(d.bodyBytes, d.proofs[0], c)) |
---|
| 48 | + | else sigVerify(j.bodyBytes, j.proofs[2], b) |
---|
| 49 | + | let n = if (if (sigVerify(j.bodyBytes, j.proofs[0], c)) |
---|
24 | 50 | | then true |
---|
25 | | - | else sigVerify(d.bodyBytes, d.proofs[1], c)) |
---|
| 51 | + | else sigVerify(j.bodyBytes, j.proofs[1], c)) |
---|
26 | 52 | | then true |
---|
27 | | - | else sigVerify(d.bodyBytes, d.proofs[2], c) |
---|
28 | | - | let i = if (f) |
---|
29 | | - | then g |
---|
| 53 | + | else sigVerify(j.bodyBytes, j.proofs[2], c) |
---|
| 54 | + | let o = if (l) |
---|
| 55 | + | then m |
---|
30 | 56 | | else false |
---|
31 | | - | let j = if (f) |
---|
32 | | - | then h |
---|
| 57 | + | let p = if (l) |
---|
| 58 | + | then n |
---|
33 | 59 | | else false |
---|
34 | | - | let k = if (h) |
---|
35 | | - | then g |
---|
| 60 | + | let q = if (n) |
---|
| 61 | + | then m |
---|
36 | 62 | | else false |
---|
37 | | - | let l = d |
---|
38 | | - | if ($isInstanceOf(l, "SetScriptTransaction")) |
---|
| 63 | + | let h = j |
---|
| 64 | + | if ($isInstanceOf(h, "SetScriptTransaction")) |
---|
39 | 65 | | then { |
---|
40 | | - | let m = l |
---|
| 66 | + | let r = h |
---|
41 | 67 | | true |
---|
42 | 68 | | } |
---|
43 | | - | else if ($isInstanceOf(l, "DataTransaction")) |
---|
| 69 | + | else if ($isInstanceOf(h, "DataTransaction")) |
---|
44 | 70 | | then { |
---|
45 | | - | let m = l |
---|
| 71 | + | let r = h |
---|
46 | 72 | | true |
---|
47 | 73 | | } |
---|
48 | | - | else if (if (i) |
---|
| 74 | + | else if (if (o) |
---|
49 | 75 | | then true |
---|
50 | | - | else j) |
---|
| 76 | + | else p) |
---|
51 | 77 | | then true |
---|
52 | | - | else k |
---|
| 78 | + | else q |
---|
53 | 79 | | } |
---|
54 | 80 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'HfLpRhXtnuCabRyNT6z7soaXcbUpwLUhjyBCVQ4szwzd' |
---|
5 | 5 | | |
---|
6 | 6 | | let b = base58'2qjcWuL7QitmuhkSTM7CnNxurCYXuqJ9ubswLBGmXfDv' |
---|
7 | 7 | | |
---|
8 | 8 | | let c = base58'GaQkBG6yLLAarb8wvPrEKnQhFqWomD2ZGT1T4vVx24qw' |
---|
9 | 9 | | |
---|
| 10 | + | @Callable(d) |
---|
| 11 | + | func purchase () = { |
---|
| 12 | + | let e = value(d.payments) |
---|
| 13 | + | if (isDefined(e[0].assetId)) |
---|
| 14 | + | then throw("only wws") |
---|
| 15 | + | else { |
---|
| 16 | + | let f = toBase58String(d.caller.bytes) |
---|
| 17 | + | let g = { |
---|
| 18 | + | let h = getInteger(this, "item_A_coupon_price") |
---|
| 19 | + | if ($isInstanceOf(h, "Int")) |
---|
| 20 | + | then { |
---|
| 21 | + | let i = h |
---|
| 22 | + | i |
---|
| 23 | + | } |
---|
| 24 | + | else 0 |
---|
| 25 | + | } |
---|
| 26 | + | if ((g > e[0].amount)) |
---|
| 27 | + | then throw("moar moeny") |
---|
| 28 | + | else if ((e[0].amount > g)) |
---|
| 29 | + | then throw("tu macz money") |
---|
| 30 | + | else if ((size(e) > 1)) |
---|
| 31 | + | then throw("single item only") |
---|
| 32 | + | else [StringEntry(("status:purchase_item_A_customer_" + f), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + f), g)] |
---|
| 33 | + | } |
---|
| 34 | + | } |
---|
10 | 35 | | |
---|
11 | | - | @Verifier(d) |
---|
12 | | - | func e () = { |
---|
13 | | - | let f = if (if (sigVerify(d.bodyBytes, d.proofs[0], a)) |
---|
| 36 | + | |
---|
| 37 | + | @Verifier(j) |
---|
| 38 | + | func k () = { |
---|
| 39 | + | let l = if (if (sigVerify(j.bodyBytes, j.proofs[0], a)) |
---|
14 | 40 | | then true |
---|
15 | | - | else sigVerify(d.bodyBytes, d.proofs[1], a)) |
---|
| 41 | + | else sigVerify(j.bodyBytes, j.proofs[1], a)) |
---|
16 | 42 | | then true |
---|
17 | | - | else sigVerify(d.bodyBytes, d.proofs[2], a) |
---|
18 | | - | let g = if (if (sigVerify(d.bodyBytes, d.proofs[0], b)) |
---|
| 43 | + | else sigVerify(j.bodyBytes, j.proofs[2], a) |
---|
| 44 | + | let m = if (if (sigVerify(j.bodyBytes, j.proofs[0], b)) |
---|
19 | 45 | | then true |
---|
20 | | - | else sigVerify(d.bodyBytes, d.proofs[1], b)) |
---|
| 46 | + | else sigVerify(j.bodyBytes, j.proofs[1], b)) |
---|
21 | 47 | | then true |
---|
22 | | - | else sigVerify(d.bodyBytes, d.proofs[2], b) |
---|
23 | | - | let h = if (if (sigVerify(d.bodyBytes, d.proofs[0], c)) |
---|
| 48 | + | else sigVerify(j.bodyBytes, j.proofs[2], b) |
---|
| 49 | + | let n = if (if (sigVerify(j.bodyBytes, j.proofs[0], c)) |
---|
24 | 50 | | then true |
---|
25 | | - | else sigVerify(d.bodyBytes, d.proofs[1], c)) |
---|
| 51 | + | else sigVerify(j.bodyBytes, j.proofs[1], c)) |
---|
26 | 52 | | then true |
---|
27 | | - | else sigVerify(d.bodyBytes, d.proofs[2], c) |
---|
28 | | - | let i = if (f) |
---|
29 | | - | then g |
---|
| 53 | + | else sigVerify(j.bodyBytes, j.proofs[2], c) |
---|
| 54 | + | let o = if (l) |
---|
| 55 | + | then m |
---|
30 | 56 | | else false |
---|
31 | | - | let j = if (f) |
---|
32 | | - | then h |
---|
| 57 | + | let p = if (l) |
---|
| 58 | + | then n |
---|
33 | 59 | | else false |
---|
34 | | - | let k = if (h) |
---|
35 | | - | then g |
---|
| 60 | + | let q = if (n) |
---|
| 61 | + | then m |
---|
36 | 62 | | else false |
---|
37 | | - | let l = d |
---|
38 | | - | if ($isInstanceOf(l, "SetScriptTransaction")) |
---|
| 63 | + | let h = j |
---|
| 64 | + | if ($isInstanceOf(h, "SetScriptTransaction")) |
---|
39 | 65 | | then { |
---|
40 | | - | let m = l |
---|
| 66 | + | let r = h |
---|
41 | 67 | | true |
---|
42 | 68 | | } |
---|
43 | | - | else if ($isInstanceOf(l, "DataTransaction")) |
---|
| 69 | + | else if ($isInstanceOf(h, "DataTransaction")) |
---|
44 | 70 | | then { |
---|
45 | | - | let m = l |
---|
| 71 | + | let r = h |
---|
46 | 72 | | true |
---|
47 | 73 | | } |
---|
48 | | - | else if (if (i) |
---|
| 74 | + | else if (if (o) |
---|
49 | 75 | | then true |
---|
50 | | - | else j) |
---|
| 76 | + | else p) |
---|
51 | 77 | | then true |
---|
52 | | - | else k |
---|
| 78 | + | else q |
---|
53 | 79 | | } |
---|
54 | 80 | | |
---|