tx · EZxJScqqseu3gGmUZqAvVdXcQ2PTXkaZx68qAXLsdpsB

3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL:  -0.01400000 Waves

2021.02.13 13:06 [1396245] smart account 3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL > SELF 0.00000000 Waves

{ "type": 13, "id": "EZxJScqqseu3gGmUZqAvVdXcQ2PTXkaZx68qAXLsdpsB", "fee": 1400000, "feeAssetId": null, "timestamp": 1613210781727, "version": 2, "chainId": 84, "sender": "3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL", "senderPublicKey": "AwmS57W97dpK3Bs6tsewG3YaYgJukDtmEZFbG1oQTV4T", "proofs": [ "xoWZXwuyu8kAJq5eNqo3Rb2UrcjToDmbcZyuDvRtamyMPRXCfmEQgXgyVb3fYuojvsEnGGBxiDNVxi6MGFEQrdQ" ], "script": "base64:AAIDAAAAAAAAAA4IARIDCgEIEgASAwoBAQAAAAkAAAAAB1JVTk5JTkcCAAAAB1JVTk5JTkcAAAAABkNMT1NFRAIAAAAGQ0xPU0VEAAAAAAhDQU5DRUxFRAIAAAAIQ0FOQ0VMRUQAAAAACURBUFBPV05FUgIAAAAjM05CRWJGVTZkS3BvQWNzYmFFSzJhQzYyVVFNallGVzR4aUwAAAAABVdBVkVTAgAAAAVXQVZFUwAAAAAETk9ORQIAAAAETk9ORQAAAAADRkVFAAAAAAAADbugAQAAAAtnZXROdW1CeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAI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dCAxIGJldC4JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABGJldF8JAAGkAAAAAQUAAAARY29udGVzdEN1cnJOdW1iZXICAAAAAV8JAAGkAAAAAQUAAAANY3VycmVuY3lWYWx1ZQUAAAAHYWNjb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAhjb250ZXN0XwkAAaQAAAABBQAAABFjb250ZXN0Q3Vyck51bWJlcgIAAAABXwUAAAAHYWNjb3VudAIAAAAFX2JldHMJAABkAAAAAgUAAAARYWNjb3VudEJldHNOdW1iZXIAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBgbxjBw8", "height": 1396245, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9eNbgoHtgZe7fbVb3k3pi5Bw1PZDtn5oh7oXcF8uJLi9 Next: ArekSYd3TjA3cAGzHFvyWjxWG8bFGLhcUgT3psaVZ9WJ Diff:
OldNewDifferences
77
88 let CANCELED = "CANCELED"
99
10-let DAPPOWNER = "..."
10+let DAPPOWNER = "3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL"
1111
1212 let WAVES = "WAVES"
1313
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RUNNING = "RUNNING"
55
66 let CLOSED = "CLOSED"
77
88 let CANCELED = "CANCELED"
99
10-let DAPPOWNER = "..."
10+let DAPPOWNER = "3NBEbFU6dKpoAcsbaEK2aC62UQMjYFW4xiL"
1111
1212 let WAVES = "WAVES"
1313
1414 let NONE = "NONE"
1515
1616 let FEE = 900000
1717
1818 func getNumByKey (key) = {
1919 let num = match getInteger(this, key) {
2020 case a: Int =>
2121 a
2222 case _ =>
2323 0
2424 }
2525 num
2626 }
2727
2828
2929 func getStrByKey (key) = {
3030 let str = match getString(this, key) {
3131 case a: String =>
3232 a
3333 case _ =>
3434 NONE
3535 }
3636 str
3737 }
3838
3939
4040 @Callable(i)
4141 func setContestStatus (contestStatus) = {
4242 let account = toBase58String(i.caller.bytes)
4343 let contestCurrNumber = getNumByKey("contest_currentnumber")
4444 if ((account != DAPPOWNER))
4545 then throw("Only dAPP Owner can set Contest Status.")
4646 else if (if ((contestStatus != CANCELED))
4747 then (contestStatus != CLOSED)
4848 else false)
4949 then throw(("Invalid status: " + contestStatus))
5050 else WriteSet([DataEntry((("contest_" + toString(contestCurrNumber)) + "_status"), contestStatus)])
5151 }
5252
5353
5454
5555 @Callable(i)
5656 func setContestConfiguration () = {
5757 let account = toBase58String(i.caller.bytes)
5858 let contestCurrNumber = getNumByKey("contest_currentnumber")
5959 let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status"))
6060 let contestNewNumber = (contestCurrNumber + 1)
6161 let balance = wavesBalance(this)
6262 if ((account != DAPPOWNER))
6363 then throw(((("Only dAPP Owner can Configure Contest. Caller account: " + account) + " dapp owner: ") + DAPPOWNER))
6464 else if ((contestCurrStatus == RUNNING))
6565 then throw(("You cannot configure a new Contest while old Contest status is: " + contestCurrStatus))
6666 else {
6767 let contestFinishHeight = (height + (6 * 1440))
6868 WriteSet([DataEntry("contest_currentnumber", contestNewNumber), DataEntry((("contest_" + toString(contestNewNumber)) + "_finishheight"), contestFinishHeight), DataEntry((("contest_" + toString(contestNewNumber)) + "_status"), RUNNING), DataEntry((("contest_" + toString(contestNewNumber)) + "_betcounter"), 0)])
6969 }
7070 }
7171
7272
7373
7474 @Callable(i)
7575 func bet (currencyValue) = {
7676 let account = toBase58String(i.caller.bytes)
7777 let pmt = extract(i.payment)
7878 let contestCurrNumber = getNumByKey("contest_currentnumber")
7979 let contestStartHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_startheight"))
8080 let contestFinishHeight = getNumByKey((("contest_" + toString(contestCurrNumber)) + "_finishheight"))
8181 let contestCurrStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status"))
8282 let contestStatus = getStrByKey((("contest_" + toString(contestCurrNumber)) + "_status"))
8383 let accountBetsNumber = getNumByKey((((("contest_" + toString(contestCurrNumber)) + "_") + account) + "_bets"))
8484 let existingBetAccount = getStrByKey(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue)))
8585 if ((height > (contestFinishHeight - (2 * 1440))))
8686 then throw("You cannot bet anymore at this height.")
8787 else if ((contestCurrStatus != RUNNING))
8888 then throw(("Invalid status: you cannot bet now, contest status is: " + contestCurrStatus))
8989 else if (if ((existingBetAccount != NONE))
9090 then (existingBetAccount != account)
9191 else false)
9292 then throw((("Another user: " + existingBetAccount) + " did bet already on this rate."))
9393 else if ((accountBetsNumber >= 1))
9494 then throw("You can do at most 1 bet.")
9595 else WriteSet([DataEntry(((("bet_" + toString(contestCurrNumber)) + "_") + toString(currencyValue)), account), DataEntry((((("contest_" + toString(contestCurrNumber)) + "_") + account) + "_bets"), (accountBetsNumber + 1))])
9696 }
9797
9898
9999 @Verifier(tx)
100100 func verify () = match tx {
101101 case _: SetScriptTransaction|DataTransaction =>
102102 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
103103 case _: InvokeScriptTransaction =>
104104 true
105105 case _ =>
106106 true
107107 }
108108

github/deemru/w8io/169f3d6 
66.91 ms