tx · C95vdanRioqn1eMLPV3xAoQHhZeRieH4qCdwde9ArHFy 3N9hj5xjfQdmxFKgztzxsQY9FSGSRM2RNTr: -0.05000000 Waves 2019.10.31 18:01 [744495] smart account 3N9hj5xjfQdmxFKgztzxsQY9FSGSRM2RNTr > SELF 0.00000000 Waves
{ "type": 13, "id": "C95vdanRioqn1eMLPV3xAoQHhZeRieH4qCdwde9ArHFy", "fee": 5000000, "feeAssetId": null, "timestamp": 1572533733907, "version": 1, "sender": "3N9hj5xjfQdmxFKgztzxsQY9FSGSRM2RNTr", "senderPublicKey": "456duGZMs5yvsHurjiNQi2JtHjKtMj4WyRRRcVHzKWrb", "proofs": [ "7eoWHZXLnk4hWeyQ5XwZPfLQBYZU2D6us9MZiQqdLbZ2vytMm4DxpTP4SFiefexh1KVuWh5qxZr4nJDFhgMX7dv" ], "script": "base64:AAIDAAAAAAAAAA0IARIDCgEIEgQKAggIAAAAEgAAAAAEWUVBUgAAAAAHWPDfwAAAAAAFTU9OVEgJAABpAAAAAgUAAAAEWUVBUgAAAAAAAAAADAAAAAAFQURNSU4CAAAAIzNOQkRnUjhoVTZXODZTc3RuM0VHaWQ4azl1eGtxaUpqeFQ2AAAAAAVUT0tFTgEAAAAgxYrQlOWMQVAQFV8+63OMRt4C+0j9Xrs6Q7YHkRdAWuYAAAAABHdFVVIBAAAAIOwWYQRfe5EhQQY7N/Pn19T489PGDqqAl/OQv9D6FbqZAAAAAANXVlMAAAAAAAX14QAAAAAAC1BSSUNFeEJBU0lDAAAAAAAAAAA8AAAAAA5QUklDRXhBRFZBTkNFRAAAAAAAAAAAMgAAAAAFQkFTSUMCAAAABWJhc2ljAAAAAAhBRFZBTkNFRAIAAAAIYWR2YW5jZWQAAAAABE5PTkUCAAAABG5vbmUBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJ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gFAAAAAWkAAAAGY2FsbGVyBQAAAAZwZXJpb2QFAAAABHBsYW4FAAAACWlzUmVuZXdhbAAAAAABtkcm", "chainId": 84, "height": 744495, "spentComplexity": 0 } View: original | compacted Prev: 4YXsjdkUxU8EwYweskZ2ZMEFVW5ED2hTGsPdPfpZ1ey9 Next: AZhF2jY54pgJgrUdu24hiP4zztaXNJUmQ4o5wDigMGDd Diff:
Old | New | Differences | |
---|---|---|---|
73 | 73 | else { | |
74 | 74 | let v = toBase58String(C.caller.bytes) | |
75 | 75 | let E = l(r(v)) | |
76 | - | let B = (E | |
76 | + | let B = (E != 0) | |
77 | 77 | if ((y == i)) | |
78 | 78 | then if ((g > D.amount)) | |
79 | 79 | then throw("unsufficient payment amount for basic plan") | |
98 | 98 | then throw("only admins can do that") | |
99 | 99 | else { | |
100 | 100 | let E = l(r(F)) | |
101 | - | let B = (E | |
101 | + | let B = (E != 0) | |
102 | 102 | let x = if ((y == i)) | |
103 | 103 | then a | |
104 | 104 | else if ((y == j)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 31556952000 | |
5 | 5 | ||
6 | 6 | let b = (a / 12) | |
7 | 7 | ||
8 | 8 | let c = "3NBDgR8hU6W86Sstn3EGid8k9uxkqiJjxT6" | |
9 | 9 | ||
10 | 10 | let d = base58'EJ85vmBXWEtV4yHLPRTxex4q4s9mC8jKUhheyjZxwnPw' | |
11 | 11 | ||
12 | 12 | let e = base58'Gtb1WRznfchDnTh37ezoDTJ4wcoKaRsKqKjJjy7nm2zU' | |
13 | 13 | ||
14 | 14 | let f = 100000000 | |
15 | 15 | ||
16 | 16 | let g = 60 | |
17 | 17 | ||
18 | 18 | let h = 50 | |
19 | 19 | ||
20 | 20 | let i = "basic" | |
21 | 21 | ||
22 | 22 | let j = "advanced" | |
23 | 23 | ||
24 | 24 | let k = "none" | |
25 | 25 | ||
26 | 26 | func l (m) = { | |
27 | 27 | let n = getInteger(this, m) | |
28 | 28 | if ($isInstanceOf(n, "Int")) | |
29 | 29 | then { | |
30 | 30 | let o = n | |
31 | 31 | o | |
32 | 32 | } | |
33 | 33 | else 0 | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func p (m) = { | |
38 | 38 | let n = getString(this, m) | |
39 | 39 | if ($isInstanceOf(n, "String")) | |
40 | 40 | then { | |
41 | 41 | let q = n | |
42 | 42 | q | |
43 | 43 | } | |
44 | 44 | else k | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func r (s) = (("member_" + s) + "_subscription_end") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func t (s) = (("member_" + s) + "_plan") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func u (v) = TransferSet([ScriptTransfer(v, 1, d)]) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func w (v,x,y) = WriteSet([DataEntry(r(v), (lastBlock.timestamp + x)), DataEntry(t(v), y)]) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func z (A,x,y,B) = { | |
61 | 61 | let v = toBase58String(A.bytes) | |
62 | 62 | if (B) | |
63 | 63 | then w(v, x, y) | |
64 | 64 | else ScriptResult(w(v, x, y), u(A)) | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | @Callable(C) | |
69 | 69 | func subscribe (y) = { | |
70 | 70 | let D = extract(C.payment) | |
71 | 71 | if ((D.assetId != e)) | |
72 | 72 | then throw("can use only wEUR token at the moment") | |
73 | 73 | else { | |
74 | 74 | let v = toBase58String(C.caller.bytes) | |
75 | 75 | let E = l(r(v)) | |
76 | - | let B = (E | |
76 | + | let B = (E != 0) | |
77 | 77 | if ((y == i)) | |
78 | 78 | then if ((g > D.amount)) | |
79 | 79 | then throw("unsufficient payment amount for basic plan") | |
80 | 80 | else z(C.caller, a, y, B) | |
81 | 81 | else if ((y == j)) | |
82 | 82 | then if ((h > D.amount)) | |
83 | 83 | then throw("unsufficient payment amount for advanced plan") | |
84 | 84 | else z(C.caller, b, y, B) | |
85 | 85 | else throw(("subscription to an unknown plan: " + y)) | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | ||
91 | 91 | @Callable(C) | |
92 | 92 | func subscribeUser (F,y) = { | |
93 | 93 | let v = toBase58String(C.caller.bytes) | |
94 | 94 | let G = toBase58String(this.bytes) | |
95 | 95 | if (if ((v != c)) | |
96 | 96 | then (v != G) | |
97 | 97 | else false) | |
98 | 98 | then throw("only admins can do that") | |
99 | 99 | else { | |
100 | 100 | let E = l(r(F)) | |
101 | - | let B = (E | |
101 | + | let B = (E != 0) | |
102 | 102 | let x = if ((y == i)) | |
103 | 103 | then a | |
104 | 104 | else if ((y == j)) | |
105 | 105 | then b | |
106 | 106 | else throw(("subscription to an unknown plan: " + y)) | |
107 | 107 | z(C.caller, x, y, B) | |
108 | 108 | } | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 |
github/deemru/w8io/169f3d6 40.65 ms ◑