tx · 5sCYrwv8f74mmBzdB8CbZkTfJP9R6t45foMZSH8D4khP 3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2: -0.01400000 Waves 2019.08.10 20:22 [625213] smart account 3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2 > SELF 0.00000000 Waves
{ "type": 13, "id": "5sCYrwv8f74mmBzdB8CbZkTfJP9R6t45foMZSH8D4khP", "fee": 1400000, "feeAssetId": null, "timestamp": 1565457746599, "version": 1, "sender": "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2", "senderPublicKey": "F3vhYapU4NBzfM2X4KNkoFcxj3UbYnJjqituG6KE7ZPG", "proofs": [ "2MQEJWWexXoa6q1ayE7WrnHKzAH7bdwf5VVwrHrTpgo1PF9Pg8vR8u64ah7AnKYkzi1rsTEMAD9jncTi3zoxiMJC" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAABBDTE9TRURGT1JCRVRUSU5HAgAAABBDTE9TRURGT1JCRVRUSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAJREFQUE9XTkVSAgAAACMzTjROUGl2b1RodHNrcjdKeG5OcktMN3M4QnptUkd4OXJUMgAAAAAFV0FWRVMCAAAABVdBVkVTAAAAAAROT05FAgAAAAROT05FAQAAAAtnZXROdW1CeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAA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AAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24JAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgYGi5kkGg==", "chainId": 84, "height": 625213, "spentComplexity": 0 } View: original | compacted Prev: 7nzjChksjw9bSAc4PP7EvfG6bWUf4rKHfsKSUbpnGfh2 Next: 5TphYTuR64FLpasmp8CY2JjV2DWcfLvAysHDVDi486zJ Diff:
Old | New | Differences | |
---|---|---|---|
64 | 64 | func setContestConfiguration (r,s) = { | |
65 | 65 | let q = toBase58String(o.caller.bytes) | |
66 | 66 | let p = n() | |
67 | - | let t = height | |
68 | - | let u = t | |
67 | + | let t = (s + (7 * 1440)) | |
69 | 68 | if ((q != d)) | |
70 | 69 | then throw("Only dAPP Owner can Configure Contest.") | |
71 | - | else if (( | |
72 | - | then throw(("Start Height must be greater than current Blockchain height: " + toString( | |
70 | + | else if ((height >= s)) | |
71 | + | then throw(("Start Height must be greater than current Blockchain height: " + toString(height))) | |
73 | 72 | else if ((p != a)) | |
74 | 73 | then throw(("You cannot configure Contest while status is: " + p)) | |
75 | 74 | else if ((r != e)) | |
76 | 75 | then throw((("dAPP does not support currency: " + r) + "yet.")) | |
77 | - | else WriteSet([DataEntry("contest_currency", r), DataEntry("contest_startheight", s), DataEntry("contest_finishheight", | |
76 | + | else WriteSet([DataEntry("contest_currency", r), DataEntry("contest_startheight", s), DataEntry("contest_finishheight", t), DataEntry("contest_status", a)]) | |
78 | 77 | } | |
79 | 78 | ||
80 | 79 | ||
81 | - | @Verifier( | |
82 | - | func | |
83 | - | let j = | |
80 | + | @Verifier(u) | |
81 | + | func v () = { | |
82 | + | let j = u | |
84 | 83 | if (if ($isInstanceOf(j, "SetScriptTransaction")) | |
85 | 84 | then true | |
86 | 85 | else $isInstanceOf(j, "DataTransaction")) | |
87 | - | then sigVerify( | |
86 | + | then sigVerify(u.bodyBytes, u.proofs[0], u.senderPublicKey) | |
88 | 87 | else if ($isInstanceOf(j, "InvokeScriptTransaction")) | |
89 | 88 | then true | |
90 | 89 | else true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "RUNNING" | |
5 | 5 | ||
6 | 6 | let b = "CLOSEDFORBETTING" | |
7 | 7 | ||
8 | 8 | let c = "CLOSED" | |
9 | 9 | ||
10 | 10 | let d = "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2" | |
11 | 11 | ||
12 | 12 | let e = "WAVES" | |
13 | 13 | ||
14 | 14 | let f = "NONE" | |
15 | 15 | ||
16 | 16 | func g (h) = { | |
17 | 17 | let i = { | |
18 | 18 | let j = getInteger(this, h) | |
19 | 19 | if ($isInstanceOf(j, "Int")) | |
20 | 20 | then { | |
21 | 21 | let k = j | |
22 | 22 | k | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | i | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func l (h) = { | |
31 | 31 | let m = { | |
32 | 32 | let j = getString(this, h) | |
33 | 33 | if ($isInstanceOf(j, "String")) | |
34 | 34 | then { | |
35 | 35 | let k = j | |
36 | 36 | k | |
37 | 37 | } | |
38 | 38 | else f | |
39 | 39 | } | |
40 | 40 | m | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func n () = l("contest_status") | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | @Callable(o) | |
48 | 48 | func setContestStatus (p) = { | |
49 | 49 | let q = toBase58String(o.caller.bytes) | |
50 | 50 | if ((q != d)) | |
51 | 51 | then throw("Only dAPP Owner can set Contest Status.") | |
52 | 52 | else if (if (if ((p != a)) | |
53 | 53 | then (p != b) | |
54 | 54 | else false) | |
55 | 55 | then (p != c) | |
56 | 56 | else false) | |
57 | 57 | then throw(("Invalid status: " + p)) | |
58 | 58 | else WriteSet([DataEntry("contest_status", p)]) | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(o) | |
64 | 64 | func setContestConfiguration (r,s) = { | |
65 | 65 | let q = toBase58String(o.caller.bytes) | |
66 | 66 | let p = n() | |
67 | - | let t = height | |
68 | - | let u = t | |
67 | + | let t = (s + (7 * 1440)) | |
69 | 68 | if ((q != d)) | |
70 | 69 | then throw("Only dAPP Owner can Configure Contest.") | |
71 | - | else if (( | |
72 | - | then throw(("Start Height must be greater than current Blockchain height: " + toString( | |
70 | + | else if ((height >= s)) | |
71 | + | then throw(("Start Height must be greater than current Blockchain height: " + toString(height))) | |
73 | 72 | else if ((p != a)) | |
74 | 73 | then throw(("You cannot configure Contest while status is: " + p)) | |
75 | 74 | else if ((r != e)) | |
76 | 75 | then throw((("dAPP does not support currency: " + r) + "yet.")) | |
77 | - | else WriteSet([DataEntry("contest_currency", r), DataEntry("contest_startheight", s), DataEntry("contest_finishheight", | |
76 | + | else WriteSet([DataEntry("contest_currency", r), DataEntry("contest_startheight", s), DataEntry("contest_finishheight", t), DataEntry("contest_status", a)]) | |
78 | 77 | } | |
79 | 78 | ||
80 | 79 | ||
81 | - | @Verifier( | |
82 | - | func | |
83 | - | let j = | |
80 | + | @Verifier(u) | |
81 | + | func v () = { | |
82 | + | let j = u | |
84 | 83 | if (if ($isInstanceOf(j, "SetScriptTransaction")) | |
85 | 84 | then true | |
86 | 85 | else $isInstanceOf(j, "DataTransaction")) | |
87 | - | then sigVerify( | |
86 | + | then sigVerify(u.bodyBytes, u.proofs[0], u.senderPublicKey) | |
88 | 87 | else if ($isInstanceOf(j, "InvokeScriptTransaction")) | |
89 | 88 | then true | |
90 | 89 | else true | |
91 | 90 | } | |
92 | 91 |
github/deemru/w8io/026f985 36.13 ms ◑