tx · AGdg8QUH2NV7KEeMJ69foxd9amBJwPbH2anwdrfFTivW 3N2Hc2anzwUbrEVoUt5nPErtjQtbErnncKi: -0.01000000 Waves 2019.07.08 00:21 [575715] smart account 3N2Hc2anzwUbrEVoUt5nPErtjQtbErnncKi > SELF 0.00000000 Waves
{ "type": 13, "id": "AGdg8QUH2NV7KEeMJ69foxd9amBJwPbH2anwdrfFTivW", "fee": 1000000, "feeAssetId": null, "timestamp": 1562534476720, "version": 1, "sender": "3N2Hc2anzwUbrEVoUt5nPErtjQtbErnncKi", "senderPublicKey": "C74H6ppf3Y6annzGq3p8mXFQEBaNNYwWfDkZyyGkw4LP", "proofs": [ "56kpknLqo3bR5tRdTPw4uLUTM7z8Pr67Px2XiehZiomobySWhV9FsndRNfqi6d4KTp1jLWRP76xn5vHHxKXHwGMr" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAQAAABR2b3RlcklzQWxsb3dlZFRvVm90ZQAAAAEAAAAOdm90ZXJQdWJsaWNLZXkEAAAADWFsZWtzZWlQdWJLZXkBAAAAIEbC+Y7QKUE1aAVqNFGdiM3kWwwhGlqG1JEiNWTw2hY4BAAAAAphbm5hUHViS2V5AQAAACDHNoEhz1I+z798w+UzpPlDkuIZ/3pwSrv6onSqnWwWFAMDCQEAAAACIT0AAAACBQAAAA52b3RlclB1YmxpY0tleQUAAAANYWxla3NlaVB1YktleQkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAACmFubmFQdWJLZXkHBwYAAAABAAAAAWkBAAAABHZvdGUAAAABAAAAB3RoZVZvdGUDCQEAAAABIQAAAAEJAQAAABR2b3RlcklzQWxsb3dlZFRvVm90ZQAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkAAAIAAAABAgAAADtZb3UgY2FuIG5vdCB2b3RlIGJlY2F1c2UgeW91IGFyZSBub3QgaW4gdGhlIGxpc3Qgb2Ygdm90ZXJzIQQAAAAPZGF0YUZyb21TdG9yYWdlCQAEGgAAAAIFAAAABHRoaXMJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkBAAAACWlzRGVmaW5lZAAAAAEFAAAAD2RhdGFGcm9tU3RvcmFnZQkAAAIAAAABAgAAAD5Zb3UgaGF2ZSBhbHJlYWR5IHZvdGVkISBWb3RpbmcgdGhlIHNlY29uZCB0aW1lIGlzIG5vdCBhbGxvd2VkLgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAAB3RoZVZvdGUFAAAAA25pbAAAAACv1VMz", "chainId": 84, "height": 575715, "spentComplexity": 0 } View: original | compacted Prev: none Next: GbvJ5YBzZf5raC6EYEXHhTEmgSvyZXs3aLha4nFXRug2 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'5mDyaqcH1Bq5eizenaqwBnUTot2v34KuCV3PXtPEXN2B' | |
6 | + | let annaPubKey = base58'EQeLUmkhTb6ZT9ZVy6uKcmSowYAxL7yNzgM2pxG9Axfu' | |
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 38.18 ms ◑