tx · De2gqFFLSc4XsrpYtG5NZ315XApq3XQRzmcczwCQfkPF

3N4TEQzMSjr8dNSXeexyKmteC6coHneTydX:  -0.01000000 Waves

2021.06.21 17:13 [1580247] smart account 3N4TEQzMSjr8dNSXeexyKmteC6coHneTydX > SELF 0.00000000 Waves

{ "type": 13, "id": "De2gqFFLSc4XsrpYtG5NZ315XApq3XQRzmcczwCQfkPF", "fee": 1000000, "feeAssetId": null, "timestamp": 1624284745389, "version": 2, "chainId": 84, "sender": "3N4TEQzMSjr8dNSXeexyKmteC6coHneTydX", "senderPublicKey": "BLYPM7pr6zCdxj9zzANneoGVcDEwBnQApCEnR3BkNm68", "proofs": [ "MgNbUJW6dy1RgdWDmLfWgZX9Lpm9n4jY4VRMoZm7jRAQUgVjWh33Wd1VYbJsrAWSrxzvXyJWVmq6YJRmtr9EZtD" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAAAQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABAAAADnZvdGVyUHVibGljS2V5BAAAAA1hbGVrc2VpUHViS2V5AQAAACBuInahc+zI77NTLBZ9cT3D2Q1v1QbENRipjMo7Jw5pYQQAAAAKYW5uYVB1YktleQEAAAAgojwjMQqEXHYTcKAVnrtdi789yzpTaVzCwHOx33ezxjUDAwkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAADWFsZWtzZWlQdWJLZXkJAQAAAAIhPQAAAAIFAAAADnZvdGVyUHVibGljS2V5BQAAAAphbm5hUHViS2V5BwcGAAAAAQAAAAFpAQAAAAR2b3RlAAAAAQAAAAd0aGVWb3RlAwkBAAAAASEAAAABCQEAAAAUdm90ZXJJc0FsbG93ZWRUb1ZvdGUAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAABu0JLRiyDQvdC1INC80L7QttC10YLQtSDQs9C+0LvQvtGB0L7QstCw0YLRjCwg0YLQsNC6INC60LDQuiDQstCw0YEg0L3QtdGCINCyINGB0L/QuNGB0LrQtSDQs9C+0LvQvtGB0YPRjtGJ0LjRhSEEAAAAD2RhdGFGcm9tU3RvcmFnZQkABBoAAAACBQAAAAR0aGlzCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAAlpc0RlZmluZWQAAAABBQAAAA9kYXRhRnJvbVN0b3JhZ2UJAAACAAAAAQIAAABh0JLRiyDRg9C20LUg0LPQvtC70L7RgdC+0LLQsNC70LghINCf0L7QstGC0L7RgNC+0L3QvtC1INCz0L7Qu9C+0YHQvtCy0LDQvdC40LUg0LfQsNC/0YDQtdGJ0LXQvdC+LgkABRQAAAACCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQUAAAAHdGhlVm90ZQUAAAADbmlsBQAAAAR1bml0AAAAAFDD0xY=", "height": 1580247, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EpWK9gSKBCjMfADnL4EAqYSFxevRw9RpghkHoa53Uw7p Next: 3pPtjPc6KGKkBNWzZTjp67Eyi97GiJjpk7cyHqPzXmdt Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let sibantokenId = base58'R9yNZwP1VkUksacNjtLqua6CePGGX9dYwBEj2TyjYkv'
4+func voterIsAllowedToVote (voterPublicKey) = {
5+ let alekseiPubKey = base58'8QvKvspfNF6cUv2DFMCfvT8SrbraERqXpNMEMqBfJZ3e'
6+ let annaPubKey = base58'BvJEWY79uQEFetuyiZAF5U4yjPioMj9J6ZrF9uTNfe3E'
7+ if (if ((voterPublicKey != alekseiPubKey))
8+ then (voterPublicKey != annaPubKey)
9+ else false)
10+ then false
11+ else true
12+ }
13+
514
615 @Callable(i)
7-func vote (voteId,vote) = {
8- let pmt = extract(i.payment)
9- let voter = toBase58String(i.caller.bytes)
10- if ((pmt.amount == 0))
11- then throw("You cannot vote without paying voting fee")
12- else if ((pmt.assetId != sibantokenId))
13- then throw("You can only vote with Siban vote token")
14- else WriteSet([DataEntry(voteId, vote)])
15- }
16+func vote (theVote) = if (!(voterIsAllowedToVote(i.callerPublicKey)))
17+ then throw("Вы не можете голосовать, так как вас нет в списке голосующих!")
18+ else {
19+ let dataFromStorage = getInteger(this, toBase58String(i.callerPublicKey))
20+ if (isDefined(dataFromStorage))
21+ then throw("Вы уже голосовали! Повтороное голосование запрещено.")
22+ else $Tuple2([IntegerEntry(toBase58String(i.callerPublicKey), theVote)], unit)
23+ }
1624
1725

github/deemru/w8io/026f985 
39.49 ms