tx · G5PSBQmHKn7GtBsjFyD2csr1eHZyXnQjMnAyMT4QMg7N

3MuUn2xUZELpmnEaHvCCZ16ppwonqSfD1UD:  -0.01400000 Waves

2019.08.23 19:12 [644002] smart account 3MuUn2xUZELpmnEaHvCCZ16ppwonqSfD1UD > SELF 0.00000000 Waves

{ "type": 13, "id": "G5PSBQmHKn7GtBsjFyD2csr1eHZyXnQjMnAyMT4QMg7N", "fee": 1400000, "feeAssetId": null, "timestamp": 1566576832928, "version": 1, "sender": "3MuUn2xUZELpmnEaHvCCZ16ppwonqSfD1UD", "senderPublicKey": "FEngg164m8DD6zconE15dGjmW7DN4axV4voE3CMUvwFp", "proofs": [ "4NNQozJBYmhXMvHUbgY61sr4cfzUikFkwGacirqn61MEji5LZxSE3opaQHs1FdTg6wvVmtLsU7mkE3iyL7yyLW7a" ], "script": "base64:AAIDAAAAAAAAAAAAAAAIAAAAAAdSVU5OSU5HAgAAAAdSVU5OSU5HAAAAAAZDTE9TRUQCAAAABkNMT1NFRAAAAAAIQ0FOQ0VMRUQCAAAACENBTkNFTEVEAAAAAAlEQVBQT1dORVICAAAAIzNNdVVuMnhVWkVMcG1uRWFIdkNDWjE2cHB3b25xU2ZEMVVEAAAAABBEQVBQQVVUSE9SV0FMTEVUAgAAACMzTkM3SzJEZmtya3BHSGZHaFN2b3NRblczcWNmYnNtUGZUVAAAAAAETk9ORQIAAAAETk9ORQEAAAALZ2V0TnVtQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABl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AFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBgYxrO11", "chainId": 84, "height": 644002, "spentComplexity": 0 } View: original | compacted Prev: GuTKWXYSEkRe86P8TGnxdyavpTzj8DsRuXFiEAktSP5Q Next: ErYZ112buUqZKXyCPz9s8ciisX1nCsxDf1w5DntQ8xYv Diff:
OldNewDifferences
6161
6262
6363 @Callable(n)
64-func bet (o,w) = {
64+func bet (w) = {
6565 let q = toBase58String(n.caller.bytes)
6666 let x = extract(n.payment)
6767 let r = g("contest_currentnumber")
8080 let v = wavesBalance(this)
8181 let z = ((v * 5) / 100)
8282 let A = ((v * 94) / 100)
83- ScriptResult(WriteSet([DataEntry(((("guess_" + toString(r)) + "_") + w), q), DataEntry((("contest_" + toString(r)) + "_winner"), q), DataEntry((("contest_" + toString(r)) + "_status"), b), DataEntry((("contest_" + toString(r)) + "_moviename"), o)]), TransferSet([ScriptTransfer(extract(addressFromString(e)), z, unit), ScriptTransfer(extract(addressFromString(q)), A, unit)]))
83+ ScriptResult(WriteSet([DataEntry(((("guess_" + toString(r)) + "_") + w), q), DataEntry((("contest_" + toString(r)) + "_winner"), q), DataEntry((("contest_" + toString(r)) + "_status"), b)]), TransferSet([ScriptTransfer(extract(addressFromString(e)), z, unit), ScriptTransfer(extract(addressFromString(q)), A, unit)]))
8484 }
85+ }
86+
87+
88+
89+@Callable(n)
90+func reveal (o) = {
91+ let q = toBase58String(n.caller.bytes)
92+ let r = g("contest_currentnumber")
93+ if ((q != d))
94+ then throw(((("Only dAPP Owner can Reveal the movie namet. Caller account: " + q) + " dapp owner: ") + d))
95+ else WriteSet([DataEntry((("contest_" + toString(r)) + "_moviename"), o)])
8596 }
8697
8798
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 = "CANCELED"
99
1010 let d = "3MuUn2xUZELpmnEaHvCCZ16ppwonqSfD1UD"
1111
1212 let e = "3NC7K2DfkrkpGHfGhSvosQnW3qcfbsmPfTT"
1313
1414 let f = "NONE"
1515
1616 func g (h) = {
1717 let i = {
1818 let j = getInteger(this, h)
1919 if ($isInstanceOf(j, "Int"))
2020 then {
2121 let k = j
2222 k
2323 }
2424 else 0
2525 }
2626 i
2727 }
2828
2929
3030 func l (h) = {
3131 let m = {
3232 let j = getString(this, h)
3333 if ($isInstanceOf(j, "String"))
3434 then {
3535 let k = j
3636 k
3737 }
3838 else f
3939 }
4040 m
4141 }
4242
4343
4444 @Callable(n)
4545 func setContestConfiguration (o,p) = {
4646 let q = toBase58String(n.caller.bytes)
4747 let r = g("contest_currentnumber")
4848 let s = l((("contest_" + toString(r)) + "_status"))
4949 let t = (r + 1)
5050 let u = 0
5151 let v = wavesBalance(this)
5252 if ((q != d))
5353 then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + q) + " dapp owner: ") + d))
5454 else if ((s == a))
5555 then throw(("You cannot configure a new Contest while old Contest status is: " + s))
5656 else if ((500000000 > v))
5757 then throw("Balance too low, cannot start a contest.")
5858 else WriteSet([DataEntry("contest_currentnumber", t), DataEntry((("contest_" + toString(t)) + "_status"), a), DataEntry((("contest_" + toString(t)) + "_contestguessnumber"), 0), DataEntry((("contest_" + toString(t)) + "_moviename"), o), DataEntry((("contest_" + toString(t)) + "_movieimage"), p)])
5959 }
6060
6161
6262
6363 @Callable(n)
64-func bet (o,w) = {
64+func bet (w) = {
6565 let q = toBase58String(n.caller.bytes)
6666 let x = extract(n.payment)
6767 let r = g("contest_currentnumber")
6868 let s = l((("contest_" + toString(r)) + "_status"))
6969 let y = 10000000
7070 let u = g((("contest_" + toString(r)) + "_contestguessnumber"))
7171 if ((s != a))
7272 then throw(("Invalid status: you cannot bet now, contest status is: " + s))
7373 else if ((x.amount != y))
7474 then throw(((("You must pay at least: " + toString(y)) + " WAVES to bet. You paid: ") + toString(x.amount)))
7575 else if ((u > 50))
7676 then throw("Sorry but the max number of guesses for this movie has been reached.")
7777 else if ((w != l((("contest_" + toString(r)) + "_moviename"))))
7878 then WriteSet([DataEntry(((("guess_" + toString(r)) + "_") + w), q), DataEntry((("contest_" + toString(r)) + "_contestguessnumber"), (u + 1))])
7979 else {
8080 let v = wavesBalance(this)
8181 let z = ((v * 5) / 100)
8282 let A = ((v * 94) / 100)
83- ScriptResult(WriteSet([DataEntry(((("guess_" + toString(r)) + "_") + w), q), DataEntry((("contest_" + toString(r)) + "_winner"), q), DataEntry((("contest_" + toString(r)) + "_status"), b), DataEntry((("contest_" + toString(r)) + "_moviename"), o)]), TransferSet([ScriptTransfer(extract(addressFromString(e)), z, unit), ScriptTransfer(extract(addressFromString(q)), A, unit)]))
83+ ScriptResult(WriteSet([DataEntry(((("guess_" + toString(r)) + "_") + w), q), DataEntry((("contest_" + toString(r)) + "_winner"), q), DataEntry((("contest_" + toString(r)) + "_status"), b)]), TransferSet([ScriptTransfer(extract(addressFromString(e)), z, unit), ScriptTransfer(extract(addressFromString(q)), A, unit)]))
8484 }
85+ }
86+
87+
88+
89+@Callable(n)
90+func reveal (o) = {
91+ let q = toBase58String(n.caller.bytes)
92+ let r = g("contest_currentnumber")
93+ if ((q != d))
94+ then throw(((("Only dAPP Owner can Reveal the movie namet. Caller account: " + q) + " dapp owner: ") + d))
95+ else WriteSet([DataEntry((("contest_" + toString(r)) + "_moviename"), o)])
8596 }
8697
8798
8899 @Verifier(B)
89100 func C () = {
90101 let j = B
91102 if (if ($isInstanceOf(j, "SetScriptTransaction"))
92103 then true
93104 else $isInstanceOf(j, "DataTransaction"))
94105 then sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
95106 else if ($isInstanceOf(j, "InvokeScriptTransaction"))
96107 then true
97108 else true
98109 }
99110

github/deemru/w8io/169f3d6 
47.62 ms