tx · DZkAAti8cZWVWSxWyqD6QuEy6iwh4i1zaqb5VuR1texw 3N8ZKUpGjWrV33RteWRJgGVVCCVVgG8WjW9: -0.01000000 Waves 2019.07.31 15:53 [610298] smart account 3N8ZKUpGjWrV33RteWRJgGVVCCVVgG8WjW9 > SELF 0.00000000 Waves
{ "type": 13, "id": "DZkAAti8cZWVWSxWyqD6QuEy6iwh4i1zaqb5VuR1texw", "fee": 1000000, "feeAssetId": null, "timestamp": 1564577511933, "version": 1, "sender": "3N8ZKUpGjWrV33RteWRJgGVVCCVVgG8WjW9", "senderPublicKey": "6W21kS9VoiMjvMtdNSPAiTob1D18a49oWG3Dr2RTf2M8", "proofs": [ "2h1JeFMHkF1ypjwNCC53AKzpjHc12k8Z6eVXSorRU81MPEDVHuMAatGqhewaNpmHrusVkBykYPb6GFJHn4BsoN6Y" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABR2b3RlcklzQWxsb3dlZFRvVm90ZQAAAAEAAAAOdm90ZXJQdWJsaWNLZXkEAAAADWFsZWtzZWlQdWJLZXkBAAAAIPOY3Q0efQoSJ5O0nSunZblfAh0jc5Y+qU4Q7zTBVMA0BAAAAAphbm5hUHViS2V5AQAAACAcZxQD+Qt+8FKHcqXFHZxd0+JitQXCg4f8xBerppY9OQMDCQEAAAACIT0AAAACBQAAAA52b3RlclB1YmxpY0tleQUAAAANYWxla3NlaVB1YktleQkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAACmFubmFQdWJLZXkHBwYAAAABAAAAAWkBAAAABHZvdGUAAAABAAAAB3RoZVZvdGUDCQEAAAABIQAAAAEJAQAAABR2b3RlcklzQWxsb3dlZFRvVm90ZQAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkAAAIAAAABAgAAAG7QktGLINC90LUg0LzQvtC20LXRgtC1INCz0L7Qu9C+0YHQvtCy0LDRgtGMLCDRgtCw0Log0LrQsNC6INCy0LDRgSDQvdC10YIg0LIg0YHQv9C40YHQutC1INCz0L7Qu9C+0YHRg9GO0YnQuNGFIQQAAAAPZGF0YUZyb21TdG9yYWdlCQAEGgAAAAIFAAAABHRoaXMJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkBAAAACWlzRGVmaW5lZAAAAAEFAAAAD2RhdGFGcm9tU3RvcmFnZQkAAAIAAAABAgAAAGHQktGLINGD0LbQtSDQs9C+0LvQvtGB0L7QstCw0LvQuCEg0J/QvtCy0YLQvtGA0L7QvdC+0LUg0LPQvtC70L7RgdC+0LLQsNC90LjQtSDQt9Cw0L/RgNC10YnQtdC90L4uCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQUAAAAHdGhlVm90ZQUAAAADbmlsAAAAAJ7Rtv8=", "chainId": 84, "height": 610298, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func voterIsAllowedToVote (voterPublicKey) = { | |
5 | + | let alekseiPubKey = base58'HPuGJQMSPPywjXPRsjET3ZrJitBY1ZVxZebagDk3GTfR' | |
6 | + | let annaPubKey = base58'2usaYmBzhRXkuZMmcJR7PnxQYiCg6zV7YKUXtXi2rJit' | |
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("Вы не можете голосовать, так как вас нет в списке голосующих!") | |
18 | + | else { | |
19 | + | let dataFromStorage = getInteger(this, toBase58String(i.callerPublicKey)) | |
20 | + | if (isDefined(dataFromStorage)) | |
21 | + | then throw("Вы уже голосовали! Повтороное голосование запрещено.") | |
22 | + | else WriteSet([DataEntry(toBase58String(i.callerPublicKey), theVote)]) | |
23 | + | } | |
24 | + | ||
25 | + |
github/deemru/w8io/026f985 20.51 ms ◑