tx · H3J4TK7HKprphUT38KnUcvfntcQBXx8RJVGDmfeWCS6a

3NCMVbH9EWZogGDLtS8sf1N4ShcoDUqxrn7:  -0.01400000 Waves

2020.02.03 17:34 [883108] smart account 3NCMVbH9EWZogGDLtS8sf1N4ShcoDUqxrn7 > SELF 0.00000000 Waves

{ "type": 13, "id": "H3J4TK7HKprphUT38KnUcvfntcQBXx8RJVGDmfeWCS6a", "fee": 1400000, "feeAssetId": null, "timestamp": 1580740448248, "version": 1, "sender": "3NCMVbH9EWZogGDLtS8sf1N4ShcoDUqxrn7", "senderPublicKey": "JAAzQjxgzdgjCEdwXpfgpoMVcDpJRs4WgA9eTKxJYitU", "proofs": [ "5sjPa6YJz164bZ21e1kdCP1qrfv7HqEiGD9bcyZZ51WworQTcBfmK89BNhXxutGDQLrubFGuTvxQjTaQDo57sih4" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgECEgAAAAADAAAAABRyb290QWNjb3VudFB1YmxpY0tleQEAAAAaAVT2IQwdZvI4cdfE/aE0KgPNEyFI1dNVNJQBAAAACGlzUGxheWVyAAAAAgAAAAFpAAAABnB1YktleQkAAAAAAAACCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAABnB1YktleQEAAAAGaXNSb290AAAAAQAAAAFpCQAAAAAAAAIIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQUAAAAUcm9vdEFjY291bnRQdWJsaWNLZXkAAAACAAAAAWkBAAAAEXNldEFjY2VwdGVkUGxheWVyAAAAAQAAAA9wbGF5ZXJQdWJsaWNLZXkDCQEAAAACIT0AAAACCQACWAAAAAEFAAAAD3BsYXllclB1YmxpY0tleQkAAlgAAAABBQAAABRyb290QWNjb3VudFB1YmxpY0tleQkAAAIAAAABCQABLAAAAAICAAAAEGVycm9yIG9ubHkgcm9vdCAJAAJYAAAAAQUAAAAPcGxheWVyUHVibGljS2V5CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQACWAAAAAEFAAAAD3BsYXllclB1YmxpY0tleQAAAAAAAAAAAQUAAAADbmlsAAAAAWkBAAAADHBsYXllckludm9rZQAAAAAEAAAAD3BsYXllclB1YmxpY0tleQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQkABBsAAAACBQAAAAR0aGlzCQACWAAAAAEFAAAAD3BsYXllclB1YmxpY0tleQkAAAIAAAABAgAAABhZb3UgYXJlIG5vdCBhbGxvd2VkIGhlcmUJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAPcGxheWVyUHVibGljS2V5AAAAAAAADbugBQAAAAR1bml0BQAAAANuaWwAAAAANnBi7A==", "chainId": 84, "height": 883108, "spentComplexity": 0 } View: original | compacted Prev: 9oEBDYdenY728HvQqRfYP4Ga56nvB2HBU2mbqqdjFiJm Next: QyANuPkjRBFA3hfQ37pQJZ7DMMWNEZbWm4Pqcdg2yjM Diff:
OldNewDifferences
1010
1111
1212 @Callable(i)
13-func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != "52tYm8RpUyEhyRLtVcpms7DP6haMUxiaCzoHyf8qPFt7UUoez45T6CfTiiL8MyU9gq"))
13+func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != toBase58String(rootAccountPublicKey)))
1414 then throw(("error only root " + toBase58String(playerPublicKey)))
1515 else WriteSet([DataEntry(toBase58String(playerPublicKey), 1)])
1616
1919 @Callable(i)
2020 func playerInvoke () = {
2121 let playerPublicKey = i.callerPublicKey
22- ScriptResult(WriteSet(nil), TransferSet([ScriptTransfer(addressFromPublicKey(playerPublicKey), 900000, unit)]))
22+ if (!(isDefined(getBoolean(this, toBase58String(playerPublicKey)))))
23+ then throw("You are not allowed here")
24+ else ScriptResult(WriteSet(nil), TransferSet([ScriptTransfer(addressFromPublicKey(playerPublicKey), 900000, unit)]))
2325 }
2426
2527
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let rootAccountPublicKey = base58'3NCMVbH9EWZogGDLtS8sf1N4ShcoDUqxrn7'
55
66 func isPlayer (i,pubKey) = (i.callerPublicKey == pubKey)
77
88
99 func isRoot (i) = (i.callerPublicKey == rootAccountPublicKey)
1010
1111
1212 @Callable(i)
13-func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != "52tYm8RpUyEhyRLtVcpms7DP6haMUxiaCzoHyf8qPFt7UUoez45T6CfTiiL8MyU9gq"))
13+func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != toBase58String(rootAccountPublicKey)))
1414 then throw(("error only root " + toBase58String(playerPublicKey)))
1515 else WriteSet([DataEntry(toBase58String(playerPublicKey), 1)])
1616
1717
1818
1919 @Callable(i)
2020 func playerInvoke () = {
2121 let playerPublicKey = i.callerPublicKey
22- ScriptResult(WriteSet(nil), TransferSet([ScriptTransfer(addressFromPublicKey(playerPublicKey), 900000, unit)]))
22+ if (!(isDefined(getBoolean(this, toBase58String(playerPublicKey)))))
23+ then throw("You are not allowed here")
24+ else ScriptResult(WriteSet(nil), TransferSet([ScriptTransfer(addressFromPublicKey(playerPublicKey), 900000, unit)]))
2325 }
2426
2527

github/deemru/w8io/169f3d6 
65.66 ms