tx · 8UKuwDKizTP6yhvBa7mpM46HSeHuRRCb97VaP5euNHdV
3N5P6L87h3JMKWjKNSfu2VQDgr4epK1wEhK: -0.01400000 Waves
2021.05.14 05:12 [1524734] smart account 3N5P6L87h3JMKWjKNSfu2VQDgr4epK1wEhK > SELF 0.00000000 Waves
{
"type": 13,
"id": "8UKuwDKizTP6yhvBa7mpM46HSeHuRRCb97VaP5euNHdV",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1620958364262,
"version": 2,
"chainId": 84,
"sender": "3N5P6L87h3JMKWjKNSfu2VQDgr4epK1wEhK",
"senderPublicKey": "G3vBmhh2RzDJL3uZhsxK27NHV3hcZpqpNs1k3UPPMe4e",
"proofs": [
"ng51FkjZmTFE2cKxnFnLrHtEE64SynVTR3w17SdgHb3V2PvcRHNjYAbM3xdZQBt1rQp6xLe44bTbxu28Zm7wJ92"
],
"script": "base64:AAIEAAAAAAAAAA4IAhIDCgEIEgUKAwgBCAAAAAIBAAAAB2N1cnJlbnQAAAABAAAAAWkEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkAgAAAAVXQVZFUwEAAAAJaWRDb252ZXJ0AAAAAQAAAAhzdHJpbmdJZAMJAAAAAAAAAgUAAAAIc3RyaW5nSWQCAAAABVdBVkVTBQAAAAR1bml0CQACWQAAAAEFAAAACHN0cmluZ0lkAAAAAgAAAAFpAQAAABVyYW5raW5nU3BvbnNvckRlcG9zaXQAAAABAAAADm1vbnRoVGltZXN0YW1wBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAACWN1cnJlbnRJZAkBAAAAB2N1cnJlbnQAAAABBQAAAAFpBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAA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XRoZHJhdyBuZWdhdGl2ZSBhbW91bnQDCQAAZgAAAAIAAAAAAAAAAAAFAAAACW5ld0Ftb3VudAkAAAIAAAABAgAAABtOb3QgZW5vdWdoIHNwb25zb3JkIGJhbGFuY2UDCQAAZgAAAAIAAAAAAAAAAAAFAAAAEHJhbmtpbmdOZXdBbW91bnQJAAACAAAAAQIAAAAfTm90IGVub3VnaCB0b3RhbCBib3VudHkgYmFsYW5jZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAEHJhbmtpbmctc3BvbnNvcl8FAAAACmN1cnJlbnRLZXkCAAAAAV8FAAAAB2Fzc2V0SWQCAAAAAV8FAAAADm1vbnRoVGltZXN0YW1wBQAAAAluZXdBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAEHJhbmtpbmctc3BvbnNvcl8FAAAAB2Fzc2V0SWQCAAAAAV8FAAAADm1vbnRoVGltZXN0YW1wBQAAABByYW5raW5nTmV3QW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAA5jdXJyZW50QXNzZXRJZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmjhtI7",
"height": 1524734,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BJzAk9ZEmUUgp1MLASmFZZDzkNvrr5bvNxxPfKJ7r33F
Next: none
Diff:
Old | New | | Differences |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
| 12 | + | func d (e) = if ((e == "WAVES")) |
---|
| 13 | + | then unit |
---|
| 14 | + | else fromBase58String(e) |
---|
| 15 | + | |
---|
| 16 | + | |
---|
12 | 17 | | @Callable(b) |
---|
13 | | - | func rankingSponsorDeposit (d) = { |
---|
| 18 | + | func rankingSponsorDeposit (f) = { |
---|
14 | 19 | | let c = b.payments[0] |
---|
15 | | - | let e = a(b) |
---|
16 | | - | let f = toBase58String(b.caller.bytes) |
---|
17 | | - | let g = { |
---|
18 | | - | let h = getInteger(this, ((((("ranking-sponsor_" + f) + "_") + e) + "_") + d)) |
---|
19 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 20 | + | let g = a(b) |
---|
| 21 | + | let h = toBase58String(b.caller.bytes) |
---|
| 22 | + | let i = { |
---|
| 23 | + | let j = getInteger(this, ((((("ranking-sponsor_" + h) + "_") + g) + "_") + f)) |
---|
| 24 | + | if ($isInstanceOf(j, "Int")) |
---|
20 | 25 | | then { |
---|
21 | | - | let i = h |
---|
22 | | - | i |
---|
| 26 | + | let k = j |
---|
| 27 | + | k |
---|
23 | 28 | | } |
---|
24 | 29 | | else 0 |
---|
25 | 30 | | } |
---|
26 | | - | let j = (g + c.amount) |
---|
27 | | - | let k = { |
---|
28 | | - | let h = getInteger(this, ((("ranking-sponsor_" + e) + "_") + d)) |
---|
29 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 31 | + | let l = (i + c.amount) |
---|
| 32 | + | let m = { |
---|
| 33 | + | let j = getInteger(this, ((("ranking-sponsor_" + g) + "_") + f)) |
---|
| 34 | + | if ($isInstanceOf(j, "Int")) |
---|
30 | 35 | | then { |
---|
31 | | - | let i = h |
---|
32 | | - | i |
---|
| 36 | + | let k = j |
---|
| 37 | + | k |
---|
33 | 38 | | } |
---|
34 | 39 | | else 0 |
---|
35 | 40 | | } |
---|
36 | | - | let l = (k + c.amount) |
---|
37 | | - | [IntegerEntry(((((("ranking-sponsor_" + f) + "_") + e) + "_") + d), j), IntegerEntry(((("ranking-sponsor_" + e) + "_") + d), l)] |
---|
| 41 | + | let n = (m + c.amount) |
---|
| 42 | + | [IntegerEntry(((((("ranking-sponsor_" + h) + "_") + g) + "_") + f), l), IntegerEntry(((("ranking-sponsor_" + g) + "_") + f), n)] |
---|
38 | 43 | | } |
---|
39 | 44 | | |
---|
40 | 45 | | |
---|
41 | 46 | | |
---|
42 | 47 | | @Callable(b) |
---|
43 | | - | func rankingSponsorWithdraw (d,m,n) = { |
---|
44 | | - | let f = toBase58String(b.caller.bytes) |
---|
45 | | - | let o = fromBase58String(n) |
---|
46 | | - | let g = { |
---|
47 | | - | let h = getInteger(this, ((((("ranking-sponsor_" + f) + "_") + n) + "_") + d)) |
---|
48 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 48 | + | func rankingSponsorWithdraw (f,o,p) = { |
---|
| 49 | + | let h = toBase58String(b.caller.bytes) |
---|
| 50 | + | let q = d(p) |
---|
| 51 | + | let i = { |
---|
| 52 | + | let j = getInteger(this, ((((("ranking-sponsor_" + h) + "_") + p) + "_") + f)) |
---|
| 53 | + | if ($isInstanceOf(j, "Int")) |
---|
49 | 54 | | then { |
---|
50 | | - | let i = h |
---|
51 | | - | i |
---|
| 55 | + | let k = j |
---|
| 56 | + | k |
---|
52 | 57 | | } |
---|
53 | 58 | | else 0 |
---|
54 | 59 | | } |
---|
55 | | - | let j = (g - m) |
---|
56 | | - | let p = { |
---|
57 | | - | let h = getInteger(this, ((("ranking-sponsor_" + n) + "_") + d)) |
---|
58 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 60 | + | let l = (i - o) |
---|
| 61 | + | let r = { |
---|
| 62 | + | let j = getInteger(this, ((("ranking-sponsor_" + p) + "_") + f)) |
---|
| 63 | + | if ($isInstanceOf(j, "Int")) |
---|
59 | 64 | | then { |
---|
60 | | - | let i = h |
---|
61 | | - | i |
---|
| 65 | + | let k = j |
---|
| 66 | + | k |
---|
62 | 67 | | } |
---|
63 | 68 | | else 0 |
---|
64 | 69 | | } |
---|
65 | | - | let l = (p - m) |
---|
66 | | - | if ((0 > m)) |
---|
| 70 | + | let n = (r - o) |
---|
| 71 | + | if ((0 > o)) |
---|
67 | 72 | | then throw("Can't withdraw negative amount") |
---|
68 | | - | else if ((0 > j)) |
---|
| 73 | + | else if ((0 > l)) |
---|
69 | 74 | | then throw("Not enough sponsord balance") |
---|
70 | | - | else if ((0 > l)) |
---|
| 75 | + | else if ((0 > n)) |
---|
71 | 76 | | then throw("Not enough total bounty balance") |
---|
72 | | - | else [IntegerEntry(((((("ranking-sponsor_" + f) + "_") + n) + "_") + d), j), IntegerEntry(((("ranking-sponsor_" + n) + "_") + d), l), ScriptTransfer(b.caller, m, o)] |
---|
| 77 | + | else [IntegerEntry(((((("ranking-sponsor_" + h) + "_") + p) + "_") + f), l), IntegerEntry(((("ranking-sponsor_" + p) + "_") + f), n), ScriptTransfer(b.caller, o, q)] |
---|
73 | 78 | | } |
---|
74 | 79 | | |
---|
75 | 80 | | |
---|
76 | | - | @Verifier(q) |
---|
77 | | - | func r () = sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) |
---|
| 81 | + | @Verifier(s) |
---|
| 82 | + | func t () = sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey) |
---|
78 | 83 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func a (b) = { |
---|
5 | 5 | | let c = b.payments[0] |
---|
6 | 6 | | if (isDefined(c.assetId)) |
---|
7 | 7 | | then toBase58String(value(c.assetId)) |
---|
8 | 8 | | else "WAVES" |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
| 12 | + | func d (e) = if ((e == "WAVES")) |
---|
| 13 | + | then unit |
---|
| 14 | + | else fromBase58String(e) |
---|
| 15 | + | |
---|
| 16 | + | |
---|
12 | 17 | | @Callable(b) |
---|
13 | | - | func rankingSponsorDeposit (d) = { |
---|
| 18 | + | func rankingSponsorDeposit (f) = { |
---|
14 | 19 | | let c = b.payments[0] |
---|
15 | | - | let e = a(b) |
---|
16 | | - | let f = toBase58String(b.caller.bytes) |
---|
17 | | - | let g = { |
---|
18 | | - | let h = getInteger(this, ((((("ranking-sponsor_" + f) + "_") + e) + "_") + d)) |
---|
19 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 20 | + | let g = a(b) |
---|
| 21 | + | let h = toBase58String(b.caller.bytes) |
---|
| 22 | + | let i = { |
---|
| 23 | + | let j = getInteger(this, ((((("ranking-sponsor_" + h) + "_") + g) + "_") + f)) |
---|
| 24 | + | if ($isInstanceOf(j, "Int")) |
---|
20 | 25 | | then { |
---|
21 | | - | let i = h |
---|
22 | | - | i |
---|
| 26 | + | let k = j |
---|
| 27 | + | k |
---|
23 | 28 | | } |
---|
24 | 29 | | else 0 |
---|
25 | 30 | | } |
---|
26 | | - | let j = (g + c.amount) |
---|
27 | | - | let k = { |
---|
28 | | - | let h = getInteger(this, ((("ranking-sponsor_" + e) + "_") + d)) |
---|
29 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 31 | + | let l = (i + c.amount) |
---|
| 32 | + | let m = { |
---|
| 33 | + | let j = getInteger(this, ((("ranking-sponsor_" + g) + "_") + f)) |
---|
| 34 | + | if ($isInstanceOf(j, "Int")) |
---|
30 | 35 | | then { |
---|
31 | | - | let i = h |
---|
32 | | - | i |
---|
| 36 | + | let k = j |
---|
| 37 | + | k |
---|
33 | 38 | | } |
---|
34 | 39 | | else 0 |
---|
35 | 40 | | } |
---|
36 | | - | let l = (k + c.amount) |
---|
37 | | - | [IntegerEntry(((((("ranking-sponsor_" + f) + "_") + e) + "_") + d), j), IntegerEntry(((("ranking-sponsor_" + e) + "_") + d), l)] |
---|
| 41 | + | let n = (m + c.amount) |
---|
| 42 | + | [IntegerEntry(((((("ranking-sponsor_" + h) + "_") + g) + "_") + f), l), IntegerEntry(((("ranking-sponsor_" + g) + "_") + f), n)] |
---|
38 | 43 | | } |
---|
39 | 44 | | |
---|
40 | 45 | | |
---|
41 | 46 | | |
---|
42 | 47 | | @Callable(b) |
---|
43 | | - | func rankingSponsorWithdraw (d,m,n) = { |
---|
44 | | - | let f = toBase58String(b.caller.bytes) |
---|
45 | | - | let o = fromBase58String(n) |
---|
46 | | - | let g = { |
---|
47 | | - | let h = getInteger(this, ((((("ranking-sponsor_" + f) + "_") + n) + "_") + d)) |
---|
48 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 48 | + | func rankingSponsorWithdraw (f,o,p) = { |
---|
| 49 | + | let h = toBase58String(b.caller.bytes) |
---|
| 50 | + | let q = d(p) |
---|
| 51 | + | let i = { |
---|
| 52 | + | let j = getInteger(this, ((((("ranking-sponsor_" + h) + "_") + p) + "_") + f)) |
---|
| 53 | + | if ($isInstanceOf(j, "Int")) |
---|
49 | 54 | | then { |
---|
50 | | - | let i = h |
---|
51 | | - | i |
---|
| 55 | + | let k = j |
---|
| 56 | + | k |
---|
52 | 57 | | } |
---|
53 | 58 | | else 0 |
---|
54 | 59 | | } |
---|
55 | | - | let j = (g - m) |
---|
56 | | - | let p = { |
---|
57 | | - | let h = getInteger(this, ((("ranking-sponsor_" + n) + "_") + d)) |
---|
58 | | - | if ($isInstanceOf(h, "Int")) |
---|
| 60 | + | let l = (i - o) |
---|
| 61 | + | let r = { |
---|
| 62 | + | let j = getInteger(this, ((("ranking-sponsor_" + p) + "_") + f)) |
---|
| 63 | + | if ($isInstanceOf(j, "Int")) |
---|
59 | 64 | | then { |
---|
60 | | - | let i = h |
---|
61 | | - | i |
---|
| 65 | + | let k = j |
---|
| 66 | + | k |
---|
62 | 67 | | } |
---|
63 | 68 | | else 0 |
---|
64 | 69 | | } |
---|
65 | | - | let l = (p - m) |
---|
66 | | - | if ((0 > m)) |
---|
| 70 | + | let n = (r - o) |
---|
| 71 | + | if ((0 > o)) |
---|
67 | 72 | | then throw("Can't withdraw negative amount") |
---|
68 | | - | else if ((0 > j)) |
---|
| 73 | + | else if ((0 > l)) |
---|
69 | 74 | | then throw("Not enough sponsord balance") |
---|
70 | | - | else if ((0 > l)) |
---|
| 75 | + | else if ((0 > n)) |
---|
71 | 76 | | then throw("Not enough total bounty balance") |
---|
72 | | - | else [IntegerEntry(((((("ranking-sponsor_" + f) + "_") + n) + "_") + d), j), IntegerEntry(((("ranking-sponsor_" + n) + "_") + d), l), ScriptTransfer(b.caller, m, o)] |
---|
| 77 | + | else [IntegerEntry(((((("ranking-sponsor_" + h) + "_") + p) + "_") + f), l), IntegerEntry(((("ranking-sponsor_" + p) + "_") + f), n), ScriptTransfer(b.caller, o, q)] |
---|
73 | 78 | | } |
---|
74 | 79 | | |
---|
75 | 80 | | |
---|
76 | | - | @Verifier(q) |
---|
77 | | - | func r () = sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) |
---|
| 81 | + | @Verifier(s) |
---|
| 82 | + | func t () = sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey) |
---|
78 | 83 | | |
---|