tx · 1mwDNRjPUUtnMap7NSr7BcMyk7rW9ByCpyhBAVeo4rC

3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2:  -0.01400000 Waves

2019.08.12 16:14 [627888] smart account 3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2 > SELF 0.00000000 Waves

{ "type": 13, "id": "1mwDNRjPUUtnMap7NSr7BcMyk7rW9ByCpyhBAVeo4rC", "fee": 1400000, "feeAssetId": null, "timestamp": 1565615666733, "version": 1, "sender": "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2", "senderPublicKey": "F3vhYapU4NBzfM2X4KNkoFcxj3UbYnJjqituG6KE7ZPG", "proofs": [ "VrXebxPoKLLdSG27Koov5Dn5FzJwzwYs9UszxxhMAzVG8dAjCVBiGoevnhvdZEbRkxwc5suMPdHDVrTdxnQAHCG" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAJREFQUE9XTkVSAgAAACMzTjROUGl2b1RodHNrcjdKeG5OcktMN3M4QnptUkd4OXJUMgAAAAAFV0FWRVMCAAAABVdBVkVTAAAAAAROT05FAgAAAAROT05FAQAAAAtnZXROdW1CeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAEGdldENvbnRlc3RTdGF0dXMA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29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24GBpHfg1g=", "chainId": 84, "height": 627888, "spentComplexity": 0 } View: original | compacted Prev: GzYaSUPcanMEvj4kpnZA1zeXLyLbj4g3CH7JWy6qZeVS Next: BjTa2ngwYnLJ3XK9pmP8qVFYVfFvaBCY2PASEcGfn4HK Diff:
OldNewDifferences
9696 let v = f((("contest_" + toString(n)) + "_startheight"))
9797 let y = f((("contest_" + toString(n)) + "_finishheight"))
9898 let s = k((("contest_" + toString(n)) + "_status"))
99- let B = o(p)
99+ let B = k(((("bet_" + toString(n)) + "_") + p))
100100 if (true)
101101 then throw(((("bet_" + toString(n)) + "_") + p))
102102 else if ((height > (y - (2 * 1440))))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "RUNNING"
55
66 let b = "CLOSED"
77
88 let c = "3N4NPivoThtskr7JxnNrKL7s8BzmRGx9rT2"
99
1010 let d = "WAVES"
1111
1212 let e = "NONE"
1313
1414 func f (g) = {
1515 let h = {
1616 let i = getInteger(this, g)
1717 if ($isInstanceOf(i, "Int"))
1818 then {
1919 let j = i
2020 j
2121 }
2222 else 0
2323 }
2424 h
2525 }
2626
2727
2828 func k (g) = {
2929 let l = {
3030 let i = getString(this, g)
3131 if ($isInstanceOf(i, "String"))
3232 then {
3333 let j = i
3434 j
3535 }
3636 else e
3737 }
3838 l
3939 }
4040
4141
4242 func m () = {
4343 let n = f("contest_currentnumber")
4444 k((("contest_" + toString(n)) + "_status"))
4545 }
4646
4747
4848 func o (p) = {
4949 let n = f("contest_currentnumber")
5050 k(((("bet_" + toString(n)) + "_") + p))
5151 }
5252
5353
5454 @Callable(q)
5555 func setContestStatus (r,s) = {
5656 let t = toBase58String(q.caller.bytes)
5757 if ((t != c))
5858 then throw("Only dAPP Owner can set Contest Status.")
5959 else if (if ((s != a))
6060 then (s != b)
6161 else false)
6262 then throw(("Invalid status: " + s))
6363 else WriteSet([DataEntry((("contest_" + toString(r)) + "_status"), s)])
6464 }
6565
6666
6767
6868 @Callable(q)
6969 func setContestConfiguration (u,v) = {
7070 let t = toBase58String(q.caller.bytes)
7171 let w = f("contest_currentnumber")
7272 let x = k((("contest_" + toString(w)) + "_status"))
7373 let n = (w + 1)
7474 if ((t != c))
7575 then throw("Only dAPP Owner can Configure Contest.")
7676 else if ((height >= v))
7777 then throw(("Start Height must be greater than current Blockchain height: " + toString(height)))
7878 else if ((x == a))
7979 then throw(("You cannot configure a new Contest while old Contest status is: " + x))
8080 else if ((u != d))
8181 then throw((("dAPP does not support currency: " + u) + " yet."))
8282 else {
8383 let y = (v + (7 * 1440))
8484 WriteSet([DataEntry("contest_currentnumber", n), DataEntry((("contest_" + toString(n)) + "_currency"), u), DataEntry((("contest_" + toString(n)) + "_startheight"), v), DataEntry((("contest_" + toString(n)) + "_finishheight"), y), DataEntry((("contest_" + toString(n)) + "_status"), a)])
8585 }
8686 }
8787
8888
8989
9090 @Callable(q)
9191 func bet (p) = {
9292 let z = base58'FaA6njrtReYVacBjgj36X8gGwydDYQKrthrt3hufhMZh'
9393 let t = toBase58String(q.caller.bytes)
9494 let A = extract(q.payment)
9595 let n = f("contest_currentnumber")
9696 let v = f((("contest_" + toString(n)) + "_startheight"))
9797 let y = f((("contest_" + toString(n)) + "_finishheight"))
9898 let s = k((("contest_" + toString(n)) + "_status"))
99- let B = o(p)
99+ let B = k(((("bet_" + toString(n)) + "_") + p))
100100 if (true)
101101 then throw(((("bet_" + toString(n)) + "_") + p))
102102 else if ((height > (y - (2 * 1440))))
103103 then throw("You cannot bet anymore at this height.")
104104 else if ((s != a))
105105 then throw("Invalid status: you cannot bet now.")
106106 else if (if ((A.assetId != z))
107107 then true
108108 else (A.amount != 500000))
109109 then throw("You must pay 5 WLT to bet.")
110110 else if (if (if ((B != e))
111111 then (B != t)
112112 else false)
113113 then true
114114 else true)
115115 then throw(((("Address: " + B) + " already did bet on value:") + p))
116116 else WriteSet([DataEntry(((("bet_" + toString(n)) + "_") + p), t)])
117117 }
118118
119119
120120 @Verifier(C)
121121 func D () = {
122122 let i = C
123123 if (if ($isInstanceOf(i, "SetScriptTransaction"))
124124 then true
125125 else $isInstanceOf(i, "DataTransaction"))
126126 then sigVerify(C.bodyBytes, C.proofs[0], C.senderPublicKey)
127127 else if ($isInstanceOf(i, "InvokeScriptTransaction"))
128128 then true
129129 else true
130130 }
131131

github/deemru/w8io/169f3d6 
36.91 ms