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:
Old | New | | Differences |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | | - | func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != "52tYm8RpUyEhyRLtVcpms7DP6haMUxiaCzoHyf8qPFt7UUoez45T6CfTiiL8MyU9gq")) |
---|
| 13 | + | func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != toBase58String(rootAccountPublicKey))) |
---|
14 | 14 | | then throw(("error only root " + toBase58String(playerPublicKey))) |
---|
15 | 15 | | else WriteSet([DataEntry(toBase58String(playerPublicKey), 1)]) |
---|
16 | 16 | | |
---|
|
19 | 19 | | @Callable(i) |
---|
20 | 20 | | func playerInvoke () = { |
---|
21 | 21 | | 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)])) |
---|
23 | 25 | | } |
---|
24 | 26 | | |
---|
25 | 27 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let rootAccountPublicKey = base58'3NCMVbH9EWZogGDLtS8sf1N4ShcoDUqxrn7' |
---|
5 | 5 | | |
---|
6 | 6 | | func isPlayer (i,pubKey) = (i.callerPublicKey == pubKey) |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | 9 | | func isRoot (i) = (i.callerPublicKey == rootAccountPublicKey) |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | | - | func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != "52tYm8RpUyEhyRLtVcpms7DP6haMUxiaCzoHyf8qPFt7UUoez45T6CfTiiL8MyU9gq")) |
---|
| 13 | + | func setAcceptedPlayer (playerPublicKey) = if ((toBase58String(playerPublicKey) != toBase58String(rootAccountPublicKey))) |
---|
14 | 14 | | then throw(("error only root " + toBase58String(playerPublicKey))) |
---|
15 | 15 | | else WriteSet([DataEntry(toBase58String(playerPublicKey), 1)]) |
---|
16 | 16 | | |
---|
17 | 17 | | |
---|
18 | 18 | | |
---|
19 | 19 | | @Callable(i) |
---|
20 | 20 | | func playerInvoke () = { |
---|
21 | 21 | | 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)])) |
---|
23 | 25 | | } |
---|
24 | 26 | | |
---|
25 | 27 | | |
---|