tx · 6vCCnx7EmHHiUChdnvB9QNKf7qxGrsXFyMYf9ZbMhykF

3MwSJgFMD4tFTL7cqMJEdRDzEYZqj1xSq1P:  -0.01000000 Waves

2021.01.01 18:23 [1334500] smart account 3MwSJgFMD4tFTL7cqMJEdRDzEYZqj1xSq1P > SELF 0.00000000 Waves

{ "type": 13, "id": "6vCCnx7EmHHiUChdnvB9QNKf7qxGrsXFyMYf9ZbMhykF", "fee": 1000000, "feeAssetId": null, "timestamp": 1609514628114, "version": 2, "chainId": 84, "sender": "3MwSJgFMD4tFTL7cqMJEdRDzEYZqj1xSq1P", "senderPublicKey": "5Q1GULhNpKLtRuKHN2AooNEuXcS6zA1wjLuwiuHpgbfU", "proofs": [ "2nm6M72MpDgfNzm8tFmNnXaq3qi956Qj1fE1n1HVHtPC1BnYn7Rv99xwPJchgGwm1y5nb63NMX7UkGjYsEmhnS8Y" ], "script": "base64:AAIDAAAAAAAAAAoIARIAEgQKAggCAAAAAwAAAAAJUlNBUFVCTElDCQACWwAAAAECAAABj2Jhc2U2NDpNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXhYSXVxbWZ4RE5rVjVKbzlheG51RnBBaktIMmN5R3FRY2tqd0JwRnoydFlKWE4vTXNEdVJraC90WkJ0bm5RVEczRUsrWGJ3V0ZjWUhzNEJvSHpoYUtGb2c0eEtyVDRudFViY1RFMkFxUHNoWGlPc0llSnZlR2RJVDdoL0gySmRBVUZNdXIzdGxQVlhBMWZScGxWMVc2NTFPSWFFOEYrQ252QjlZV2NBVEJxcVVLM1lZaHc3VmErRG96dHZKd3ZOcXVjb1ltZG5uaTZ6NXYwckNsSm1pZk9IQlhGczBVUW83UnFqV2gzTDkrZkdqT2pxUUxzQ2VtYklRYmwvU0lxUm1YMUhZZW1CMUdRQlNsM3U1TGlNOU43aEdTT3V2N01GSWYyZXpReWFnU2JxK3YvM3dBRHZQL1d3K3FTbHhpa0pOYmp4WHBMYUxMSl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ABWJ5dGVzBAAAAARyYW5kCQEAAAAPR2VuZXJhdGVSYW5kSW50AAAAAgUAAAAGZ2FtZUlkBQAAAAdyc2FTaWduCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADWNhbGxlckFkZHJlc3MCAAAAAl9yBQAAAARyYW5kBQAAAANuaWwAAAAA0gBKFw==", "height": 1334500, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxXIuqmfxDNkV5Jo9axnuFpAjKH2cyGqQckjwBpFz2tYJXN/MsDuRkh/tZBtnnQTG3EK+XbwWFcYHs4BoHzhaKFog4xKrT4ntUbcTE2AqPshXiOsIeJveGdIT7h/H2JdAUFMur3tlPVXA1fRplV1W651OIaE8F+CnvB9YWcATBqqUK3YYhw7Va+DoztvJwvNqucoYmdnni6z5v0rClJmifOHBXFs0UQo7RqjWh3L9+fGjOjqQLsCembIQbl/SIqRmX1HYemB1GQBSl3u5LiM9N7hGSOuv7MFIf2ezQyagSbq+v/3wADvP/Ww+qSlxikJNbjxXpLaLLJXzTyeJD+kt4wIDAQAB")
5+
6+func GenerateRandInt (gameId,rsaSign) = {
7+ let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC)
8+ if (rsaSigValid)
9+ then {
10+ let rand = (toInt(sha256(rsaSign)) % 5)
11+ if ((0 > rand))
12+ then ((-1 * rand) + 1)
13+ else (rand + 1)
14+ }
15+ else throw("Invalid RSA signature")
16+ }
17+
18+
19+func getIndata (address) = match getString(this, (address + "_g")) {
20+ case a: String =>
21+ a
22+ case _ =>
23+ address
24+}
25+
26+
27+@Callable(i)
28+func randspin () = {
29+ let callerAddress = toBase58String(i.caller.bytes)
30+ let gameId = toBase58String(i.transactionId)
31+ WriteSet([DataEntry((callerAddress + "_g"), gameId)])
32+ }
33+
34+
35+
36+@Callable(i)
37+func readspin (gameId,rsaSign) = {
38+ let callerAddress = toBase58String(i.caller.bytes)
39+ let rand = GenerateRandInt(gameId, rsaSign)
40+ WriteSet([DataEntry((callerAddress + "_r"), rand)])
41+ }
42+
43+

github/deemru/w8io/169f3d6 
28.52 ms