tx · FrygXG6WQUrVc79G6vSzuDoaTyd3rqrE4mtmkwK5qRbT

3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE:  -0.01400000 Waves

2019.09.08 12:04 [666893] smart account 3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE > SELF 0.00000000 Waves

{ "type": 13, "id": "FrygXG6WQUrVc79G6vSzuDoaTyd3rqrE4mtmkwK5qRbT", "fee": 1400000, "feeAssetId": null, "timestamp": 1567933475704, "version": 1, "sender": "3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE", "senderPublicKey": "ESNVczQiY4oxY2hoRSZcruKNBwsPdXVu1nSCbpprDGJB", "proofs": [ "t7tAsheLqh92J41n2MDiy6Bv58wP8BBKyxToTrWyEYVFJ8jMBDTmTTaDWzjcHUKJ9CR1zoPZ4Hmd9rsnyeHx58q" ], "script": "base64:AAIDAAAAAAAAAAAAAAAKAAAAAA9TZXJ2ZXJQdWJsaWNLZXkJAAJZAAAAAQIAAAAsN2ltOWNhaUNtRTRTTDZqVG00S1RpY0hINGJHUGY1djU5cm5mVUEzY0NSRGoAAAAACUJldFNlcnZlcgkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTjZ5Rko1WjhOVVVRdmZHR01McDVlZm1ldlJSdFRnUXV1bgAAAAAHV0FWRUxFVAkAAGgAAAACCQAAaAAAAAIAAAAAAAAAAGQAAAAAAAAAA+gAAAAAAAAAA+gAAAAACkNPTU1JU1NJT04JAABpAAAAAgkAAGgAAAACAAAAAAAAAAAFBQAAAAdXQVZFTEVUAAAAAAAAAAPoAAAAAA5UaWNrZXRzUGVyV2F2ZQAAAAAAAAAAZAAAAAALQ1VSUkVOVEdBTUUCAAAADSRDVVJSRU5UX0dBTUUAAAAACkxBU1RUSUNLRVQCAAAADCRMQVNUX1RJQ0tFVAEAAAAPR2VuZXJhdGVSYW5kSW50AAAAAgAAAAZnYW1lSWQAAAAHcnNhU2lnbgQAAAAKbG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AAAAECQAAAgAAAAECAAAABUVycm9yCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAEEN1cnJlbnQgR2FtZSBpcyAFAAAAC2N1cnJlbnRHYW1lAgAAAAosIGJ1dCBub3QgBQAAAAZnYW1lSWQAAAAAVJyzfg==", "chainId": 84, "height": 666893, "spentComplexity": 0 } View: original | compacted Prev: 4j8FQcv5Vib3a7s3y8M1L3pjMA85ULsFqCtSCfCbspnS Next: 8z9ntPpH32zATzu2Z5zobFBvJKhJ2Dh2jycwRSAUDaKV Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = fromBase58String("7im9caiCmE4SL6jTm4KTicHH4bGPf5v59rnfUA3cCRDj")
55
66 let b = addressFromStringValue("3N6yFJ5Z8NUUQvfGGMLp5efmevRRtTgQuun")
77
88 let c = ((100 * 1000) * 1000)
99
1010 let d = ((5 * c) / 1000)
1111
1212 let e = 100
1313
1414 let f = "$CURRENT_GAME"
1515
1616 let g = "$LAST_TICKET"
1717
1818 func h (i,j) = {
1919 let k = getIntegerValue(b, g)
2020 let l = sigVerify(toBytes(i), j, a)
2121 if (l)
2222 then {
2323 let m = (toInt(sha256(j)) % k)
2424 if ((0 > m))
2525 then ((-1 * m) + 1)
2626 else (m + 1)
2727 }
2828 else throw("Invalid RSA signature")
2929 }
3030
3131
3232 func n (o,p) = {
3333 let q = split(o, "_")
3434 if (if ((p >= parseIntValue(q[0])))
3535 then (parseIntValue(q[1]) >= p)
3636 else false)
3737 then true
3838 else if (if ((p >= parseIntValue(q[2])))
3939 then (parseIntValue(q[3]) >= p)
4040 else false)
4141 then true
4242 else if (if ((p >= parseIntValue(q[4])))
4343 then (parseIntValue(q[5]) >= p)
4444 else false)
4545 then true
4646 else if (if ((p >= parseIntValue(q[6])))
4747 then (parseIntValue(q[7]) >= p)
4848 else false)
4949 then true
5050 else false
5151 }
5252
5353
5454 func r (i,p,s) = {
5555 let t = getIntegerValue(b, (((i + "_") + s) + "_IfWinsGet"))
5656 let u = [ScriptTransfer(addressFromStringValue(s), t, unit)]
5757 let v = [DataEntry((i + "_result"), toString(p)), DataEntry((i + "_winner"), s), DataEntry((i + "_winAmt"), t)]
5858 ScriptResult(WriteSet(v), TransferSet(u))
5959 }
6060
6161
6262 @Callable(w)
6363 func generateResult (i,x) = {
6464 let y = getStringValue(b, f)
6565 if ((y == i))
6666 then {
6767 let j = fromBase58String(x)
6868 let p = h(i, j)
6969 let z = getStringValue(b, (i + "_players"))
7070 let A = split(z, "_")
7171 if (n(getStringValue(b, (((i + "_") + A[0]) + "_tickets")), p))
7272 then r(i, p, A[0])
7373 else if (n(getStringValue(b, (((i + "_") + A[1]) + "_tickets")), p))
7474 then r(i, p, A[1])
7575 else if (n(getStringValue(b, (((i + "_") + A[2]) + "_tickets")), p))
7676 then r(i, p, A[2])
7777 else if (n(getStringValue(b, (((i + "_") + A[3]) + "_tickets")), p))
7878 then r(i, p, A[3])
7979 else if (n(getStringValue(b, (((i + "_") + A[4]) + "_tickets")), p))
8080 then r(i, p, A[4])
8181 else throw("Error")
8282 }
8383 else throw(((("Current Game is " + y) + ", but not ") + i))
8484 }
8585
8686

github/deemru/w8io/169f3d6 
29.93 ms