tx · 3gpEiVwoquLN6XEAw4jezsV1pgttNrUqkuKs1FpbzCY6

3MshY7ibkF3kzSjNokWnZScR4fcZvQo8dvi:  -0.01000000 Waves

2019.10.25 18:04 [735793] smart account 3MshY7ibkF3kzSjNokWnZScR4fcZvQo8dvi > SELF 0.00000000 Waves

{ "type": 13, "id": "3gpEiVwoquLN6XEAw4jezsV1pgttNrUqkuKs1FpbzCY6", "fee": 1000000, "feeAssetId": null, "timestamp": 1572015686448, "version": 1, "sender": "3MshY7ibkF3kzSjNokWnZScR4fcZvQo8dvi", "senderPublicKey": "Tu1RooNQKdcQUoHJLgJtYm4sWAbMMueQS1tGACsuKux", "proofs": [ "3LN8fF6SebfRx7NzUw3Ce2uPGueZEyqT4FgxaiTJGA7iXWwRFazfgiGXsTUoG8nyCzEZRSbjiWrNzj5NVHjjsRVa" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEBAAAAAQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABAAAADnZvdGVyUHVibGljS2V5BAAAAA1hbGVrc2VpUHViS2V5AQAAACB1FNcvDMCUKOMVNo5d3WKdtrx5qE2n0APfGUrHUKhgBwQAAAAKYW5uYVB1YktleQEAAAAgoPN5cAxjfACq6Zs2/04JbmHvXGmOwuYy4YGVLqi1ARkDAwkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAADWFsZWtzZWlQdWJLZXkJAQAAAAIhPQAAAAIFAAAADnZvdGVyUHVibGljS2V5BQAAAAphbm5hUHViS2V5BwcGAAAAAQAAAAFpAQAAAAR2b3RlAAAAAQAAAAd0aGVWb3RlAwkBAAAAASEAAAABCQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAA7WW91IGNhbiBub3Qgdm90ZSBiZWNhdXNlIHlvdSBhcmUgbm90IGluIHRoZSBsaXN0IG9mIHZvdGVycyEEAAAAD2RhdGFGcm9tU3RvcmFnZQkABBoAAAACBQAAAAR0aGlzCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAAlpc0RlZmluZWQAAAABBQAAAA9kYXRhRnJvbVN0b3JhZ2UJAAACAAAAAQIAAAA+WW91IGhhdmUgYWxyZWFkeSB2b3RlZCEgVm90aW5nIHRoZSBzZWNvbmQgdGltZSBpcyBub3QgYWxsb3dlZC4JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAd0aGVWb3RlBQAAAANuaWwAAAAABibvtQ==", "chainId": 84, "height": 735793, "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+func voterIsAllowedToVote (voterPublicKey) = {
5+ let alekseiPubKey = base58'8t38fWQhrYJsqxXtPpiRCEk1g5RJdq9bG5Rkr2N7mDFC'
6+ let annaPubKey = base58'BqHZaEwUMvoF8HKNC69gkHwQwHnw5FX9i67DJSH78z9E'
7+ if (if ((voterPublicKey != alekseiPubKey))
8+ then (voterPublicKey != annaPubKey)
9+ else false)
10+ then false
11+ else true
12+ }
13+
14+
15+@Callable(i)
16+func vote (theVote) = if (!(voterIsAllowedToVote(i.callerPublicKey)))
17+ then throw("You can not vote because you are not in the list of voters!")
18+ else {
19+ let dataFromStorage = getInteger(this, toBase58String(i.callerPublicKey))
20+ if (isDefined(dataFromStorage))
21+ then throw("You have already voted! Voting the second time is not allowed.")
22+ else WriteSet([DataEntry(toBase58String(i.callerPublicKey), theVote)])
23+ }
24+
25+

github/deemru/w8io/169f3d6 
18.25 ms