tx · 3v8VURZcPDpU5hFaUqSi89vtqMrWjfqqEjwGVjSjng3e 3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo: -0.01400000 Waves 2019.08.15 10:37 [631880] smart account 3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo > SELF 0.00000000 Waves
{ "type": 13, "id": "3v8VURZcPDpU5hFaUqSi89vtqMrWjfqqEjwGVjSjng3e", "fee": 1400000, "feeAssetId": null, "timestamp": 1565854624518, "version": 1, "sender": "3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo", "senderPublicKey": "5GQSFwNMkJFTT3FeLT3KENqoSr42yiJP3Av5qAYq1F7f", "proofs": [ "4eEYDyiY1t2WSdLmCMsbw6QbZoPNDRJUTTLS1sroaU7EF4KgF9KRKS6PXW7upqw9u3ajQ8fdzRMGCq4bcPqRSDkr" ], "script": "base64:AAIDAAAAAAAAAAAAAAALAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAJREFQUE9XTkVSAgAAACMzTjdXaWlzbzd2bzY5cHFXZkx0cHpUM3Riek1VR2FocXBnbwAAAAAFV0FWRVMCAAAABVdBVkVTAAAAAAROT05FAgAAAAROT05FAAAAAANGRUUAAAAAAAANu6AAAAAAA1dMVAEAAAAguhzhiEkXRAZBdFhaB2FMQW+3WMuNgvHvyYRPNpTXmmUBAAAAC2dldE51bUJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdH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ACBQAAAAdhY2NvdW50BQAAAAlEQVBQT1dORVIJAAACAAAAAQIAAAAiT25seSBkQVBQIE93bmVyIGNhbiBDbG9zZSBDb250ZXN0LgkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAAD3dyaXRlU3RhdGlzdGljcwUAAAALd2luVHJhbnNmZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24JAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgYGx0XiFA==", "chainId": 84, "height": 631880, "spentComplexity": 0 } View: original | compacted Prev: F1HLuWBJoz7RdmWjrf4bmD5mGPTEGkJKve4XDWK6UQV5 Next: Cs5tpMFExCyvrYrqNjqMVsxjVmLieAgVPtbJGko9Nybb Diff:
Old | New | Differences | |
---|---|---|---|
94 | 94 | then throw((("dAPP does not support currency: " + x) + " yet.")) | |
95 | 95 | else { | |
96 | 96 | let B = (y + (7 * 1440)) | |
97 | - | WriteSet([DataEntry("contest_currentnumber", A), DataEntry((("contest_" + toString(A)) + "_currency"), x), DataEntry((("contest_" + toString(A)) + "_startheight"), y), DataEntry((("contest_" + toString(A)) + "_finishheight"), B), DataEntry((("contest_" + toString(A)) + "_status"), a), DataEntry((("contest_" + toString(A)) + "_votecounter"), | |
97 | + | WriteSet([DataEntry("contest_currentnumber", A), DataEntry((("contest_" + toString(A)) + "_currency"), x), DataEntry((("contest_" + toString(A)) + "_startheight"), y), DataEntry((("contest_" + toString(A)) + "_finishheight"), B), DataEntry((("contest_" + toString(A)) + "_status"), a), DataEntry((("contest_" + toString(A)) + "_votecounter"), 0)]) | |
98 | 98 | } | |
99 | 99 | } | |
100 | 100 |
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 = "CLOSED" | |
7 | 7 | ||
8 | 8 | let c = "3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo" | |
9 | 9 | ||
10 | 10 | let d = "WAVES" | |
11 | 11 | ||
12 | 12 | let e = "NONE" | |
13 | 13 | ||
14 | 14 | let f = 900000 | |
15 | 15 | ||
16 | 16 | let g = base58'DXWNi4KTciwBKCqMoK9jHmesmAVRbM47dmD3jsiBhEMA' | |
17 | 17 | ||
18 | 18 | func h (i) = { | |
19 | 19 | let j = { | |
20 | 20 | let k = getInteger(this, i) | |
21 | 21 | if ($isInstanceOf(k, "Int")) | |
22 | 22 | then { | |
23 | 23 | let l = k | |
24 | 24 | l | |
25 | 25 | } | |
26 | 26 | else 0 | |
27 | 27 | } | |
28 | 28 | j | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func m (i) = { | |
33 | 33 | let n = { | |
34 | 34 | let k = getString(this, i) | |
35 | 35 | if ($isInstanceOf(k, "String")) | |
36 | 36 | then { | |
37 | 37 | let l = k | |
38 | 38 | l | |
39 | 39 | } | |
40 | 40 | else e | |
41 | 41 | } | |
42 | 42 | n | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func o () = { | |
47 | 47 | let p = h("contest_currentnumber") | |
48 | 48 | m((("contest_" + toString(p)) + "_status")) | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func q () = { | |
53 | 53 | let r = extract(addressFromString("3PPTrTo3AzR56N7ArzbU3Bpq9zYMgcf39Mk")) | |
54 | 54 | let s = { | |
55 | 55 | let k = getInteger(r, "waves_usd_2") | |
56 | 56 | if ($isInstanceOf(k, "Int")) | |
57 | 57 | then { | |
58 | 58 | let l = k | |
59 | 59 | l | |
60 | 60 | } | |
61 | 61 | else 0 | |
62 | 62 | } | |
63 | 63 | s | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | @Callable(t) | |
68 | 68 | func setContestStatus (u,v) = { | |
69 | 69 | let w = toBase58String(t.caller.bytes) | |
70 | 70 | if ((w != c)) | |
71 | 71 | then throw("Only dAPP Owner can set Contest Status.") | |
72 | 72 | else if (if ((v != a)) | |
73 | 73 | then (v != b) | |
74 | 74 | else false) | |
75 | 75 | then throw(("Invalid status: " + v)) | |
76 | 76 | else WriteSet([DataEntry((("contest_" + toString(u)) + "_status"), v)]) | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | ||
81 | 81 | @Callable(t) | |
82 | 82 | func setContestConfiguration (x,y) = { | |
83 | 83 | let w = toBase58String(t.caller.bytes) | |
84 | 84 | let p = h("contest_currentnumber") | |
85 | 85 | let z = m((("contest_" + toString(p)) + "_status")) | |
86 | 86 | let A = (p + 1) | |
87 | 87 | if ((w != c)) | |
88 | 88 | then throw("Only dAPP Owner can Configure Contest.") | |
89 | 89 | else if ((height >= y)) | |
90 | 90 | then throw(("Start Height must be greater than current Blockchain height: " + toString(height))) | |
91 | 91 | else if ((z == a)) | |
92 | 92 | then throw(("You cannot configure a new Contest while old Contest status is: " + z)) | |
93 | 93 | else if ((x != d)) | |
94 | 94 | then throw((("dAPP does not support currency: " + x) + " yet.")) | |
95 | 95 | else { | |
96 | 96 | let B = (y + (7 * 1440)) | |
97 | - | WriteSet([DataEntry("contest_currentnumber", A), DataEntry((("contest_" + toString(A)) + "_currency"), x), DataEntry((("contest_" + toString(A)) + "_startheight"), y), DataEntry((("contest_" + toString(A)) + "_finishheight"), B), DataEntry((("contest_" + toString(A)) + "_status"), a), DataEntry((("contest_" + toString(A)) + "_votecounter"), | |
97 | + | WriteSet([DataEntry("contest_currentnumber", A), DataEntry((("contest_" + toString(A)) + "_currency"), x), DataEntry((("contest_" + toString(A)) + "_startheight"), y), DataEntry((("contest_" + toString(A)) + "_finishheight"), B), DataEntry((("contest_" + toString(A)) + "_status"), a), DataEntry((("contest_" + toString(A)) + "_votecounter"), 0)]) | |
98 | 98 | } | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | ||
103 | 103 | @Callable(t) | |
104 | 104 | func bet (C) = { | |
105 | 105 | let w = toBase58String(t.caller.bytes) | |
106 | 106 | let D = extract(t.payment) | |
107 | 107 | let p = h("contest_currentnumber") | |
108 | 108 | let y = h((("contest_" + toString(p)) + "_startheight")) | |
109 | 109 | let B = h((("contest_" + toString(p)) + "_finishheight")) | |
110 | 110 | let E = h((("contest_" + toString(p)) + "_votecounter")) | |
111 | 111 | let F = (E + 1) | |
112 | 112 | let i = ((("bet_" + toString(p)) + "_") + C) | |
113 | 113 | let v = m((("contest_" + toString(p)) + "_status")) | |
114 | 114 | let G = m(((("bet_" + toString(p)) + "_") + C)) | |
115 | 115 | if ((height > (B - (2 * 1440)))) | |
116 | 116 | then throw("You cannot bet anymore at this height.") | |
117 | 117 | else if ((v != a)) | |
118 | 118 | then throw("Invalid status: you cannot bet now.") | |
119 | 119 | else if (if ((D.assetId != g)) | |
120 | 120 | then true | |
121 | 121 | else (D.amount != 500000)) | |
122 | 122 | then throw("You must pay 5 WLT to bet.") | |
123 | 123 | else if (if ((G != e)) | |
124 | 124 | then (G != w) | |
125 | 125 | else false) | |
126 | 126 | then throw(((((((("Key: " + i) + " Account:") + w) + " Existing Bet Account: ") + G) + " Currency Value:") + C)) | |
127 | 127 | else WriteSet([DataEntry((((("bet_" + toString(p)) + "_") + toString(F)) + "_owner"), w), DataEntry(((("bet_" + toString(p)) + "_") + toString(F)), C), DataEntry((("contest_" + toString(p)) + "_votecounter"), F)]) | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | 132 | @Callable(t) | |
133 | 133 | func closecontest (H) = { | |
134 | 134 | let p = h("contest_currentnumber") | |
135 | 135 | let i = ((("bet_" + toString(p)) + "_") + H) | |
136 | 136 | let I = m(i) | |
137 | 137 | let w = toBase58String(t.caller.bytes) | |
138 | 138 | let J = wavesBalance(this) | |
139 | 139 | let K = TransferSet([ScriptTransfer(extract(addressFromString(I)), (wavesBalance(this) - f), unit)]) | |
140 | 140 | let L = WriteSet([DataEntry((("contest_" + toString(p)) + "_status"), b), DataEntry((("contest_" + toString(p)) + "_winner"), I), DataEntry((("contest_" + toString(p)) + "_currencyrate"), H), DataEntry((("contest_" + toString(p)) + "_height"), height)]) | |
141 | 141 | if ((w != c)) | |
142 | 142 | then throw("Only dAPP Owner can Close Contest.") | |
143 | 143 | else ScriptResult(L, K) | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Verifier(M) | |
148 | 148 | func N () = { | |
149 | 149 | let k = M | |
150 | 150 | if (if ($isInstanceOf(k, "SetScriptTransaction")) | |
151 | 151 | then true | |
152 | 152 | else $isInstanceOf(k, "DataTransaction")) | |
153 | 153 | then sigVerify(M.bodyBytes, M.proofs[0], M.senderPublicKey) | |
154 | 154 | else if ($isInstanceOf(k, "InvokeScriptTransaction")) | |
155 | 155 | then true | |
156 | 156 | else true | |
157 | 157 | } | |
158 | 158 |
github/deemru/w8io/026f985 34.53 ms ◑