tx · AExETa4jnWybPsvStybpqU23E64Dx3eYyaN1ugeeeepU

3N7oes1Mab9zmCWuTdXSnKvkN6Y2pJc1dDe:  -0.05000000 Waves

2021.04.15 12:47 [1483397] smart account 3N7oes1Mab9zmCWuTdXSnKvkN6Y2pJc1dDe > SELF 0.00000000 Waves

{ "type": 13, "id": "AExETa4jnWybPsvStybpqU23E64Dx3eYyaN1ugeeeepU", "fee": 5000000, "feeAssetId": null, "timestamp": 1618480036293, "version": 2, "chainId": 84, "sender": "3N7oes1Mab9zmCWuTdXSnKvkN6Y2pJc1dDe", "senderPublicKey": "4MMreyp5fK9PfGwiJTaZTXuPjY9Tj3qHt6pHiGJ8uyXJ", "proofs": [ "5BTnb6Bs8VWRPEwarFXoQB5BSrSgARJApQB3DHafbdyBiDf7S1iLBvHpXReJXi2tH9Psyy1PAKUi1U5Y6YDLUGUX" ], "script": "base64:AAIDAAAAAAAAAAoIARIAEgQKAggIAAAABwAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXhYSXVxbWZ4RE5rVjVKbzlheG51RnBBaktIMmN5R3FRY2tqd0JwRnoydFlKWE4vTXNEdVJraC90WkJ0bm5RVEczRUsrWGJ3V0ZjWUhzNEJvSHpoYUtGb2c0eEtyVDRudFViY1RFMkFxUHNoWGlPc0llSnZlR2RJVDdoL0gySmRBVUZNdXIzdGxQVlhBMWZScGxWMVc2NTFPSWFFOEYrQ252QjlZV2NBVEJxcVVLM1lZaHc3VmErRG96dHZKd3ZOcXVjb1ltZG5uaTZ6NXYwckNsSm1pZk9IQlhGczBVUW83UnFqV2gzTDkrZkdqT2pxUUxzQ2VtYklRYmwvU0lxUm1YMUhZZW1CMUdRQlNsM3U1TGlNOU43aEdTT3V2N01GSWYyZXpReWFnU2JxK3YvM3dBRHZQL1d3K3FTbHhpa0pOYmp4WHBMYUxMSlh6VHllSkQra3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A25pbAMJAABmAAAAAgAAAAAAAAAAMAUAAAAEcmFuZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAB3VzZXJpZDoFAAAABnVzZXJpZAkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABXJhbmQ6CQABpAAAAAEFAAAABHJhbmQCAAAABXJpc2s6CQABpAAAAAEFAAAABHJpc2sCAAAABHdvbjoJAAGkAAAAAQkAAGgAAAACBQAAAAZhbW91bnQAAAAAAAAAAAMFAAAAA25pbAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAB3VzZXJpZDoFAAAABnVzZXJpZAkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABXJhbmQ6CQABpAAAAAEFAAAABHJhbmQCAAAABXJpc2s6CQABpAAAAAEFAAAABHJpc2sCAAAABWxvc3Q6CQABpAAAAAEFAAAABmFtb3VudAUAAAADbmlsAAAAAAYMESY=", "height": 1483397, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B7ZfeRuxQMAsVrLUXtU6AKC4wYq4dRsyZpSn51LaKTL5 Next: DuwSWrK3KC1UjUbc7H4L6rhKkyg5LaPHMaGDEr6bdUek Diff:
OldNewDifferences
4848
4949
5050 @Callable(o)
51-func game (q,k,r) = {
52- let l = fromBase64String(r)
51+func game (k,q) = {
52+ let l = fromBase64String(q)
5353 let p = toBase58String(o.caller.bytes)
5454 let n = j(k, l)
55- let s = 10000
56- let t = "12345"
57- if ((q == 2))
55+ let r = 10000
56+ let s = "12345"
57+ let t = 3
58+ if ((t == 2))
5859 then if ((73 > n))
59- then WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "won:") + toString((s * 2))))])
60- else WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "lost:") + toString(s)))])
60+ then WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "won:") + toString((r * 2))))])
61+ else WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "lost:") + toString(r)))])
6162 else if ((48 > n))
62- then WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "won:") + toString((s * 3))))])
63- else WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "lost:") + toString(s)))])
63+ then WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "won:") + toString((r * 3))))])
64+ else WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "lost:") + toString(r)))])
6465 }
6566
6667
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxXIuqmfxDNkV5Jo9axnuFpAjKH2cyGqQckjwBpFz2tYJXN/MsDuRkh/tZBtnnQTG3EK+XbwWFcYHs4BoHzhaKFog4xKrT4ntUbcTE2AqPshXiOsIeJveGdIT7h/H2JdAUFMur3tlPVXA1fRplV1W651OIaE8F+CnvB9YWcATBqqUK3YYhw7Va+DoztvJwvNqucoYmdnni6z5v0rClJmifOHBXFs0UQo7RqjWh3L9+fGjOjqQLsCembIQbl/SIqRmX1HYemB1GQBSl3u5LiM9N7hGSOuv7MFIf2ezQyagSbq+v/3wADvP/Ww+qSlxikJNbjxXpLaLLJXzTyeJD+kt4wIDAQAB")
55
66 let b = "$GAME_NUM"
77
88 let c = "SUBMITTED"
99
1010 let d = "WON"
1111
1212 let e = "LOST"
1313
1414 func f () = {
1515 let g = {
1616 let h = getInteger(this, b)
1717 if ($isInstanceOf(h, "Int"))
1818 then {
1919 let i = h
2020 i
2121 }
2222 else 0
2323 }
2424 (g + 1)
2525 }
2626
2727
2828 func j (k,l) = {
2929 let m = rsaVerify(SHA256, toBytes(k), l, a)
3030 if (m)
3131 then {
3232 let n = (toInt(sha256(l)) % 150)
3333 if ((0 > n))
3434 then ((-1 * n) + 1)
3535 else (n + 1)
3636 }
3737 else throw("Invalid RSA signature")
3838 }
3939
4040
4141 @Callable(o)
4242 func init () = {
4343 let p = toBase58String(o.caller.bytes)
4444 let k = toBase58String(o.transactionId)
4545 WriteSet([DataEntry((p + "_g"), k)])
4646 }
4747
4848
4949
5050 @Callable(o)
51-func game (q,k,r) = {
52- let l = fromBase64String(r)
51+func game (k,q) = {
52+ let l = fromBase64String(q)
5353 let p = toBase58String(o.caller.bytes)
5454 let n = j(k, l)
55- let s = 10000
56- let t = "12345"
57- if ((q == 2))
55+ let r = 10000
56+ let s = "12345"
57+ let t = 3
58+ if ((t == 2))
5859 then if ((73 > n))
59- then WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "won:") + toString((s * 2))))])
60- else WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "lost:") + toString(s)))])
60+ then WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "won:") + toString((r * 2))))])
61+ else WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "lost:") + toString(r)))])
6162 else if ((48 > n))
62- then WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "won:") + toString((s * 3))))])
63- else WriteSet([DataEntry(((p + "userid:") + t), ((((("rand:" + toString(n)) + "risk:") + toString(q)) + "lost:") + toString(s)))])
63+ then WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "won:") + toString((r * 3))))])
64+ else WriteSet([DataEntry(((p + "userid:") + s), ((((("rand:" + toString(n)) + "risk:") + toString(t)) + "lost:") + toString(r)))])
6465 }
6566
6667

github/deemru/w8io/169f3d6 
44.09 ms