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+3WMuNgvHvyYRPNpTXmmUBAAAAC2dldE51bUJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTd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AACBQAAAAdhY2NvdW50BQAAAAlEQVBQT1dORVIJAAACAAAAAQIAAAAiT25seSBkQVBQIE93bmVyIGNhbiBDbG9zZSBDb250ZXN0LgkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAAD3dyaXRlU3RhdGlzdGljcwUAAAALd2luVHJhbnNmZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24JAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgYGx0XiFA==", "chainId": 84, "height": 631880, "spentComplexity": 0 } View: original | compacted Prev: F1HLuWBJoz7RdmWjrf4bmD5mGPTEGkJKve4XDWK6UQV5 Next: Cs5tpMFExCyvrYrqNjqMVsxjVmLieAgVPtbJGko9Nybb Diff:
OldNewDifferences
9494 then throw((("dAPP does not support currency: " + x) + " yet."))
9595 else {
9696 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"), 1)])
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)])
9898 }
9999 }
100100
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 = "3N7Wiiso7vo69pqWfLtpzT3tbzMUGahqpgo"
99
1010 let d = "WAVES"
1111
1212 let e = "NONE"
1313
1414 let f = 900000
1515
1616 let g = base58'DXWNi4KTciwBKCqMoK9jHmesmAVRbM47dmD3jsiBhEMA'
1717
1818 func h (i) = {
1919 let j = {
2020 let k = getInteger(this, i)
2121 if ($isInstanceOf(k, "Int"))
2222 then {
2323 let l = k
2424 l
2525 }
2626 else 0
2727 }
2828 j
2929 }
3030
3131
3232 func m (i) = {
3333 let n = {
3434 let k = getString(this, i)
3535 if ($isInstanceOf(k, "String"))
3636 then {
3737 let l = k
3838 l
3939 }
4040 else e
4141 }
4242 n
4343 }
4444
4545
4646 func o () = {
4747 let p = h("contest_currentnumber")
4848 m((("contest_" + toString(p)) + "_status"))
4949 }
5050
5151
5252 func q () = {
5353 let r = extract(addressFromString("3PPTrTo3AzR56N7ArzbU3Bpq9zYMgcf39Mk"))
5454 let s = {
5555 let k = getInteger(r, "waves_usd_2")
5656 if ($isInstanceOf(k, "Int"))
5757 then {
5858 let l = k
5959 l
6060 }
6161 else 0
6262 }
6363 s
6464 }
6565
6666
6767 @Callable(t)
6868 func setContestStatus (u,v) = {
6969 let w = toBase58String(t.caller.bytes)
7070 if ((w != c))
7171 then throw("Only dAPP Owner can set Contest Status.")
7272 else if (if ((v != a))
7373 then (v != b)
7474 else false)
7575 then throw(("Invalid status: " + v))
7676 else WriteSet([DataEntry((("contest_" + toString(u)) + "_status"), v)])
7777 }
7878
7979
8080
8181 @Callable(t)
8282 func setContestConfiguration (x,y) = {
8383 let w = toBase58String(t.caller.bytes)
8484 let p = h("contest_currentnumber")
8585 let z = m((("contest_" + toString(p)) + "_status"))
8686 let A = (p + 1)
8787 if ((w != c))
8888 then throw("Only dAPP Owner can Configure Contest.")
8989 else if ((height >= y))
9090 then throw(("Start Height must be greater than current Blockchain height: " + toString(height)))
9191 else if ((z == a))
9292 then throw(("You cannot configure a new Contest while old Contest status is: " + z))
9393 else if ((x != d))
9494 then throw((("dAPP does not support currency: " + x) + " yet."))
9595 else {
9696 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"), 1)])
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)])
9898 }
9999 }
100100
101101
102102
103103 @Callable(t)
104104 func bet (C) = {
105105 let w = toBase58String(t.caller.bytes)
106106 let D = extract(t.payment)
107107 let p = h("contest_currentnumber")
108108 let y = h((("contest_" + toString(p)) + "_startheight"))
109109 let B = h((("contest_" + toString(p)) + "_finishheight"))
110110 let E = h((("contest_" + toString(p)) + "_votecounter"))
111111 let F = (E + 1)
112112 let i = ((("bet_" + toString(p)) + "_") + C)
113113 let v = m((("contest_" + toString(p)) + "_status"))
114114 let G = m(((("bet_" + toString(p)) + "_") + C))
115115 if ((height > (B - (2 * 1440))))
116116 then throw("You cannot bet anymore at this height.")
117117 else if ((v != a))
118118 then throw("Invalid status: you cannot bet now.")
119119 else if (if ((D.assetId != g))
120120 then true
121121 else (D.amount != 500000))
122122 then throw("You must pay 5 WLT to bet.")
123123 else if (if ((G != e))
124124 then (G != w)
125125 else false)
126126 then throw(((((((("Key: " + i) + " Account:") + w) + " Existing Bet Account: ") + G) + " Currency Value:") + C))
127127 else WriteSet([DataEntry((((("bet_" + toString(p)) + "_") + toString(F)) + "_owner"), w), DataEntry(((("bet_" + toString(p)) + "_") + toString(F)), C), DataEntry((("contest_" + toString(p)) + "_votecounter"), F)])
128128 }
129129
130130
131131
132132 @Callable(t)
133133 func closecontest (H) = {
134134 let p = h("contest_currentnumber")
135135 let i = ((("bet_" + toString(p)) + "_") + H)
136136 let I = m(i)
137137 let w = toBase58String(t.caller.bytes)
138138 let J = wavesBalance(this)
139139 let K = TransferSet([ScriptTransfer(extract(addressFromString(I)), (wavesBalance(this) - f), unit)])
140140 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)])
141141 if ((w != c))
142142 then throw("Only dAPP Owner can Close Contest.")
143143 else ScriptResult(L, K)
144144 }
145145
146146
147147 @Verifier(M)
148148 func N () = {
149149 let k = M
150150 if (if ($isInstanceOf(k, "SetScriptTransaction"))
151151 then true
152152 else $isInstanceOf(k, "DataTransaction"))
153153 then sigVerify(M.bodyBytes, M.proofs[0], M.senderPublicKey)
154154 else if ($isInstanceOf(k, "InvokeScriptTransaction"))
155155 then true
156156 else true
157157 }
158158

github/deemru/w8io/026f985 
34.53 ms