tx · FJN1tPN1GjZNG3Ny5jc7GKVhsDkqWcsJu3FEVoX3yhMq 3NBkfbAAqPqkY4d3LK36hdDUpDXViEAHfDE: -0.01400000 Waves 2019.09.08 16:54 [667183] smart account 3NBkfbAAqPqkY4d3LK36hdDUpDXViEAHfDE > SELF 0.00000000 Waves
{ "type": 13, "id": "FJN1tPN1GjZNG3Ny5jc7GKVhsDkqWcsJu3FEVoX3yhMq", "fee": 1400000, "feeAssetId": null, "timestamp": 1567950876419, "version": 1, "sender": "3NBkfbAAqPqkY4d3LK36hdDUpDXViEAHfDE", "senderPublicKey": "FUCE44aWkQuFEKpfWRe3zoW8pGN2caDm1vqoK55FTnLP", "proofs": [ "2t9aVc9XeMSgfDK9YvyYHhgeorfZykBwELeM5R1z6LhnEzFsgutRce94bR4T8at58iQpYZDyQiJMQAAzmvqXvYtt" ], "script": "base64:AAIDAAAAAAAAAAAAAAACAQAAABR2b3RlcklzQWxsb3dlZFRvVm90ZQAAAAEAAAAOdm90ZXJQdWJsaWNLZXkEAAAADGF1ZGl0b3Ixb3BlbgEAAAAgTOH7xS01EPXuKJWTnxxjNR2ezIws9jQx04+962nHjyQEAAAADGZhY3Rvcnkxb3BlbgEAAAAgmKQJPfQtwWEG3Uomcd12TJmvXUIMK+zQKCau0mej4h8DAwkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAADGF1ZGl0b3Ixb3BlbgkBAAAAAiE9AAAAAgUAAAAOdm90ZXJQdWJsaWNLZXkFAAAADGZhY3Rvcnkxb3BlbgcHBgEAAAAJaXNBdWRpdG9yAAAAAQAAAA52b3RlclB1YmxpY0tleQQAAAAMYXVkaXRvcjFvcGVuAQAAACBM4fvFLTUQ9e4olZOfHGM1HZ7MjCz2NDHTj73racePJAMJAQAAAAIhPQAAAAIFAAAADnZvdGVyUHVibGljS2V5BQAAAAxhdWRpdG9yMW9wZW4HBgAAAAIAAAABaQEAAAAEdm90ZQAAAAEAAAAHdGhlVm90ZQMJAQ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QvtCx0LDQstC70Y/RgtGMINC00LDQvdC90YvQtSwg0LLRiyDQvdC1INC30LDQutCw0LfRh9C40LoJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAB2F1ZGl0b3IFAAAADGF1ZGl0b3Ixb3BlbgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAHZmFjdG9yeQUAAAAMZmFjdG9yeTFvcGVuBQAAAANuaWwAAAAAIvPqhg==", "chainId": 84, "height": 667183, "spentComplexity": 0 } View: original | compacted Prev: 4sGdn9ccxzz3DX2awKU7kZ7dkNr5mshxTfyzXSfeMH4K Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func voterIsAllowedToVote (voterPublicKey) = { | |
5 | 5 | let auditor1open = base58'6B7r4pWd3dB79ojogTFvQ2tspsav6gsL4iWqzsRG2rhR' | |
6 | 6 | let factory1open = base58'BGr3aRnHxWYKViZ9AKkqE7CdczJtRGk2vCzbGF5mX7dp' | |
7 | 7 | if (if ((voterPublicKey != auditor1open)) | |
8 | 8 | then (voterPublicKey != factory1open) | |
9 | 9 | else false) | |
10 | 10 | then false | |
11 | 11 | else true | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func isAuditor (voterPublicKey) = { | |
16 | 16 | let auditor1open = base58'6B7r4pWd3dB79ojogTFvQ2tspsav6gsL4iWqzsRG2rhR' | |
17 | 17 | if ((voterPublicKey != auditor1open)) | |
18 | 18 | then false | |
19 | 19 | else true | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(i) | |
24 | 24 | func vote (theVote) = if (!(voterIsAllowedToVote(i.callerPublicKey))) | |
25 | 25 | then throw("У вас нет прав доступа") | |
26 | 26 | else { | |
27 | 27 | let dataFromStorage = getInteger(this, toBase58String(i.callerPublicKey)) | |
28 | 28 | let getAuditor = getStringValue(this, "Auditor") | |
29 | 29 | let getFactory = getStringValue(this, "Factory") | |
30 | 30 | if (isDefined(dataFromStorage)) | |
31 | 31 | then throw("Ваша подпись уже поставлена") | |
32 | 32 | else WriteSet([DataEntry(toBase58String(i.callerPublicKey), theVote)]) | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(i) | |
38 | 38 | func record (theInteger) = { | |
39 | 39 | let auditor1open = base58'6B7r4pWd3dB79ojogTFvQ2tspsav6gsL4iWqzsRG2rhR' | |
40 | 40 | let factory1open = base58'BGr3aRnHxWYKViZ9AKkqE7CdczJtRGk2vCzbGF5mX7dp' | |
41 | 41 | let myOpen = base58'FUCE44aWkQuFEKpfWRe3zoW8pGN2caDm1vqoK55FTnLP' | |
42 | 42 | if ((i.callerPublicKey != myOpen)) | |
43 | 43 | then throw("Вы не можете добавлять данные, вы не заказчик") | |
44 | 44 | else WriteSet([DataEntry("auditor", auditor1open), DataEntry("factory", factory1open)]) | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 |
github/deemru/w8io/169f3d6 30.95 ms ◑