tx · D6gbhA39Wfb7w2eRvjkZnXJYgaY762jdt7rK8jh4Fmk1

3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA:  -0.01000000 Waves

2023.06.03 18:24 [2606675] smart account 3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA > SELF 0.00000000 Waves

{ "type": 13, "id": "D6gbhA39Wfb7w2eRvjkZnXJYgaY762jdt7rK8jh4Fmk1", "fee": 1000000, "feeAssetId": null, "timestamp": 1685805919544, "version": 2, "chainId": 84, "sender": "3Mynaio8coZLr58tu2AdBEhmCvB17vTBRkA", "senderPublicKey": "Dx7cJVhpJb4qUDGiDnSjj6Wfjdj5nmzwVLfaggkbjDtv", "proofs": [ "3aB4DAw4eSA3RBcAaU7sy3gifcNxi24rDQnjmrXNb1MFXfHjRTibWW4LjJXVLz7ug15nHvzAvPRWfGA9XBU4BzDg" ], "script": "base64:BgIGCAISABIABgEKbnVtVG9XYXZlcwEDbnVtCQBoAgUDbnVtAIDC1y8BC2lzUGF5bWVudE9rAQFpBBFhY2NlcHRhYmxlQXNzZXRJZAEgIkSm54hUfVEormpXug9p+nbhDnc37ahHq1IfaU2UQkcDCQAAAgkAkAMBCAUBaQhwYXltZW50cwAACQACAQIUUGF5bWVudCBub3QgYXR0YWNoZWQEAXAJAJEDAggFAWkIcGF5bWVudHMAAAQHJG1hdGNoMAgFAXAHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAdhc3NldElkBQckbWF0Y2gwAwkAAAIFB2Fzc2V0SWQFEWFjY2VwdGFibGVBc3NldElkCQBnAggFAXAGYW1vdW50CQEKbnVtVG9XYXZlcwEAAQcJAGcCCAUBcAZhbW91bnQJAQpudW1Ub1dhdmVzAQABARNnZXRMdWNreVdoZWVsQmV0S2V5AQFpCQCsAgICD2JldF9MdWNreVdoZWVsXwkApQgBCAUBaQZjYWxsZXIBE2dldEx1Y2t5V2hlZWxXb25LZXkBAWkJAKwCAgIPd29uX0x1Y2t5V2hlZWx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aWdodAIRdW5leGNwZWN0ZWQgZXJyb3IEA3ZyZgkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCAULcmV2ZWFsQmxvY2sDdnJmAhF1bmV4Y3BlY3RlZCBlcnJvcgQKcmFuZG9tU2VlZAkAsQkBCQD1AwEFA3ZyZgQMcmFuZG9tTnVtYmVyCQBkAgkAagIFCnJhbmRvbVNlZWQJAGQCCQBlAgAMAAEAAQABBA13aW5uaW5nQW1vdW50CQEZZ2FtZUx1Y2t5V2hlZWxXaGF0VXNlcldvbgEFDHJhbmRvbU51bWJlcgMJAGYCBQ13aW5uaW5nQW1vdW50AAAJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBE2dldEx1Y2t5V2hlZWxCZXRLZXkBBQFpCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUNd2lubmluZ0Ftb3VudAUEdW5pdAkAzAgCCQEMSW50ZWdlckVudHJ5AgkBE2dldEx1Y2t5V2hlZWxXb25LZXkBBQFpBQ13aW5uaW5nQW1vdW50CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQEcZ2V0THVja3lXaGVlbFJhbmRvbU51bWJlcktleQEFAWkFDHJhbmRvbU51bWJlcgUDbmlsCQDMCAIJAQtEZWxldGVFbnRyeQEJARNnZXRMdWNreVdoZWVsQmV0S2V5AQUBaQkAzAgCCQEMSW50ZWdlckVudHJ5AgkBE2dldEx1Y2t5V2hlZWxXb25LZXkBBQFpBQ13aW5uaW5nQW1vdW50CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQEcZ2V0THVja3lXaGVlbFJhbmRvbU51bWJlcktleQEFAWkFDHJhbmRvbU51bWJlcgUDbmlsALb5Dzk=", "height": 2606675, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4RG8Fit1vRGWGGHaBKGKsSo1gTuP8cgScYchQXv35yDK Next: 9LXAkVvc73oLyu77La1BUMfDFGdi7Cb11AXxdswNzwRt Diff:
OldNewDifferences
3939 else if ((5 == g))
4040 then a(1)
4141 else if ((7 == g))
42- then a(4)
42+ then a(6)
4343 else if ((11 == g))
4444 then a(1)
4545 else 0
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = (b * 100000000)
55
66
77 func c (d) = {
88 let e = base58'3JmaWyFqWo8YSA8x3DXCBUW7veesxacvKx19dMv7wTMg'
99 if ((size(d.payments) == 0))
1010 then throw("Payment not attached")
1111 else {
1212 let f = d.payments[0]
1313 let g = f.assetId
1414 if ($isInstanceOf(g, "ByteVector"))
1515 then {
1616 let h = g
1717 if ((h == e))
1818 then (f.amount >= a(1))
1919 else false
2020 }
2121 else (f.amount >= a(1))
2222 }
2323 }
2424
2525
2626 func i (d) = ("bet_LuckyWheel_" + toString(d.caller))
2727
2828
2929 func j (d) = ("won_LuckyWheel_" + toString(d.caller))
3030
3131
3232 func k (d) = ("randomNumber_LuckyWheel_" + toString(d.caller))
3333
3434
3535 func l (m) = {
3636 let g = m
3737 if ((1 == g))
3838 then a(2)
3939 else if ((5 == g))
4040 then a(1)
4141 else if ((7 == g))
42- then a(4)
42+ then a(6)
4343 else if ((11 == g))
4444 then a(1)
4545 else 0
4646 }
4747
4848
4949 @Callable(d)
5050 func commitLuckyWheel () = if (!(c(d)))
5151 then throw("Wrong payment amount or asset")
5252 else [IntegerEntry(i(d), (height + 1)), DeleteEntry(k(d)), DeleteEntry(j(d))]
5353
5454
5555
5656 @Callable(d)
5757 func revealLuckyWheel () = {
5858 let n = valueOrErrorMessage(getIntegerValue(i(d)), "Bet not found")
5959 if ((n > height))
6060 then throw((("wait " + toString((n - height))) + " blocks to reveal this id"))
6161 else {
6262 let o = valueOrErrorMessage(blockInfoByHeight(n), "unexcpected error")
6363 let p = valueOrErrorMessage(o.vrf, "unexcpected error")
6464 let q = toInt(keccak256(p))
6565 let r = ((q % ((12 - 1) + 1)) + 1)
6666 let s = l(r)
6767 if ((s > 0))
6868 then [DeleteEntry(i(d)), ScriptTransfer(d.caller, s, unit), IntegerEntry(j(d), s), IntegerEntry(k(d), r)]
6969 else [DeleteEntry(i(d)), IntegerEntry(j(d), s), IntegerEntry(k(d), r)]
7070 }
7171 }
7272
7373

github/deemru/w8io/169f3d6 
30.26 ms