tx · FvkTZ5ffkKNcfHEwQKJKWcNnkj74waEmvwq9wu1kYoG4

3N2m5zUFbp8tCsZ8Y9bUM3HiPMvBytyniQ8:  -0.01000000 Waves

2020.02.03 12:12 [882781] smart account 3N2m5zUFbp8tCsZ8Y9bUM3HiPMvBytyniQ8 > SELF 0.00000000 Waves

{ "type": 13, "id": "FvkTZ5ffkKNcfHEwQKJKWcNnkj74waEmvwq9wu1kYoG4", "fee": 1000000, "feeAssetId": null, "timestamp": 1580720871380, "version": 1, "sender": "3N2m5zUFbp8tCsZ8Y9bUM3HiPMvBytyniQ8", "senderPublicKey": "84GuTks6x9xJDXtGj15xntfjxAgDEo5j7P8hnboXjznP", "proofs": [ "2ccR2bBCyF6NbBHL5KYuVVLgfMBCYsEu5BtJwAEE7EUtzkMniJtkhdmcWHfCwCEhbg6bZRf4YEt5yhoFxXgtbUwc" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEBAAAAAQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABAAAADnZvdGVyUHVibGljS2V5BAAAAA1hbGVrc2VpUHViS2V5AQAAACBtHS7cNfKCugui7QzG+NELSBNpIZTAfbmDWT8IF1azPQQAAAAKYW5uYVB1YktleQEAAAAgWHY/FybtJKSdrNTrAXzT/hrAmjDMXfQyCEIRsm1bz1YDAwkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAADWFsZWtzZWlQdWJLZXkJAQAAAAIhPQAAAAIFAAAADnZvdGVyUHVibGljS2V5BQAAAAphbm5hUHViS2V5BwcGAAAAAQAAAAFpAQAAAAR2b3RlAAAAAQAAAAd0aGVWb3RlAwkBAAAAASEAAAABCQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAA7WW91IGNhbiBub3Qgdm90ZSBiZWNhdXNlIHlvdSBhcmUgbm90IGluIHRoZSBsaXN0IG9mIHZvdGVycyEEAAAAD2RhdGFGcm9tU3RvcmFnZQkABBoAAAACBQAAAAR0aGlzCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAAlpc0RlZmluZWQAAAABBQAAAA9kYXRhRnJvbVN0b3JhZ2UJAAACAAAAAQIAAAA+WW91IGhhdmUgYWxyZWFkeSB2b3RlZCEgVm90aW5nIHRoZSBzZWNvbmQgdGltZSBpcyBub3QgYWxsb3dlZC4JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAd0aGVWb3RlBQAAAANuaWwAAAAA4OCj3w==", "chainId": 84, "height": 882781, "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'8LwFRbecbXEmapM89Vh4JkCRXf2KibGLzmrXoW1zGtua'
6+ let annaPubKey = base58'6xKTQADGnUBrb97pfuftgd9r1G7YvandMX4EGwpBzTk9'
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 
14.29 ms