tx · J41wckgn6FnamjafMku7bpqqpp61fCtGmGNfn6mfqbvt 3N2ewmJdcFYwdM3mPpRapXZ1aaSWTpTGuE5: -0.10000000 Waves 2021.05.11 18:03 [1521175] smart account 3N2ewmJdcFYwdM3mPpRapXZ1aaSWTpTGuE5 > SELF 0.00000000 Waves
{ "type": 13, "id": "J41wckgn6FnamjafMku7bpqqpp61fCtGmGNfn6mfqbvt", "fee": 10000000, "feeAssetId": null, "timestamp": 1620745413728, "version": 2, "chainId": 84, "sender": "3N2ewmJdcFYwdM3mPpRapXZ1aaSWTpTGuE5", "senderPublicKey": "2icPa3y8k81CaH7dsVJZZjVYGYkD35waVbs6YAzU1oaL", "proofs": [ "3SYVfdmEYkL2MNceMz3tjkzpuuPWMfL4iZ8UqRgqc5QKmT1jUkFMFxA5dmdFtRtNZkDdLDAzNuzNpMocfczjmNpB" ], "script": "base64:AAIDAAAAAAAAABcIARIDCgEIEgMKAQgSAwoBCBIECgIICAAAAAYBAAAAB2lzT3duZXIAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAAFAAAAA3ZhbAEAAAAIZ2V0R3JvdXAAAAAABAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwIAAAAVd29ya2luZ19ncm91cF9tZW1iZXJzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAA1pc0dyb3VwTWVtYmVyAAAAAQAAAAFhCQAAZgAAAAIJAQAAAA10cnlHZXRJbnRlZ2VyAA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tYmVyQWRkcmVzcwIAAAAHX3dlaWdodAAAAAAAAAAAAQkAAAIAAAABAgAAABhUaGlzIHVzZXIgYWxyZWFkeSBleGlzdHMEAAAABWdyb3VwCQEAAAAIZ2V0R3JvdXAAAAAABAAAAAhuZXdHcm91cAkAASwAAAACCQABLAAAAAIFAAAABWdyb3VwAgAAAAE7BQAAAA1tZW1iZXJBZGRyZXNzCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAABV3b3JraW5nX2dyb3VwX21lbWJlcnMFAAAACG5ld0dyb3VwCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAVd29ya2luZ19ncm91cF9tZW1iZXJfBQAAAA1tZW1iZXJBZGRyZXNzAgAAAAdfd2VpZ2h0AAAAAAAAAAABBQAAAANuaWwAAAABaQEAAAAQZGVjaXNpb25Pbk1lbWJlcgAAAAIAAAANbWVtYmVyQWRkcmVzcwAAAA1kZWNpc2lvblZhbHVlAwkBAAAAASEAAAABCQEAAAAHaXNPd25lcgAAAAEIBQAAAAFpAAAABmNhbGxlcgkAAAIAAAABAgAAABhhY2Nlc3Mgb25seSB0byB0aGUgb3duZXIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAALZGFvX21lbWJlcl8FAAAADW1lbWJlckFkZHJlc3MJAQAAABBnZXREZWNpc2lvblZhbHVlAAAAAQUAAAANZGVjaXNpb25WYWx1ZQUAAAADbmlsAAAAAKqKgeI=", "height": 1521175, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EJ4gHxD333XTKq6HgkPLh4dea2xP298voC6tDBopeEGU Next: EJ2Y6VgYqkZyUgrPfspvCV54ffLPDXjPnnkbMQeMFq7i Diff:
Old | New | Differences | |
---|---|---|---|
50 | 50 | let p = (("dao_member_" + o) + "_voting_state") | |
51 | 51 | let q = (c(p) + 1) | |
52 | 52 | let r = toString(n.caller) | |
53 | - | if (if (!(i(n.caller))) | |
54 | - | then (c(((r + "_voted_working_group_members_for_") + o)) != 1) | |
55 | - | else false) | |
53 | + | if (!(i(n.caller))) | |
56 | 54 | then if ((c(((r + "_voted_working_group_members_for_") + o)) != 1)) | |
57 | 55 | then WriteSet([DataEntry(p, q), DataEntry(((r + "_voted_working_group_members_for_") + o), 1)]) | |
58 | 56 | else throw("You have already voted") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = (b == this) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func c (d) = { | |
8 | 8 | let e = { | |
9 | 9 | let f = getInteger(this, d) | |
10 | 10 | if ($isInstanceOf(f, "Int")) | |
11 | 11 | then { | |
12 | 12 | let g = f | |
13 | 13 | g | |
14 | 14 | } | |
15 | 15 | else 0 | |
16 | 16 | } | |
17 | 17 | e | |
18 | 18 | } | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func h () = { | |
22 | 22 | let e = { | |
23 | 23 | let f = getString(this, "working_group_members") | |
24 | 24 | if ($isInstanceOf(f, "String")) | |
25 | 25 | then { | |
26 | 26 | let g = f | |
27 | 27 | g | |
28 | 28 | } | |
29 | 29 | else "" | |
30 | 30 | } | |
31 | 31 | e | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func i (j) = (c((("working_group_member_" + toString(j)) + "_weight")) > 0) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func k (j) = (c((("working_group_member_" + toString(j)) + "_weight")) > 0) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func l (m) = if ((m == "rejected")) | |
42 | 42 | then "rejected" | |
43 | 43 | else if ((m == "approved")) | |
44 | 44 | then "approved" | |
45 | 45 | else throw("you need to vote with 'approved' or 'rejected' value") | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(n) | |
49 | 49 | func votesOnMember (o) = { | |
50 | 50 | let p = (("dao_member_" + o) + "_voting_state") | |
51 | 51 | let q = (c(p) + 1) | |
52 | 52 | let r = toString(n.caller) | |
53 | - | if (if (!(i(n.caller))) | |
54 | - | then (c(((r + "_voted_working_group_members_for_") + o)) != 1) | |
55 | - | else false) | |
53 | + | if (!(i(n.caller))) | |
56 | 54 | then if ((c(((r + "_voted_working_group_members_for_") + o)) != 1)) | |
57 | 55 | then WriteSet([DataEntry(p, q), DataEntry(((r + "_voted_working_group_members_for_") + o), 1)]) | |
58 | 56 | else throw("You have already voted") | |
59 | 57 | else throw("You have no rights") | |
60 | 58 | } | |
61 | 59 | ||
62 | 60 | ||
63 | 61 | ||
64 | 62 | @Callable(n) | |
65 | 63 | func proposeMember (o) = { | |
66 | 64 | let r = toString(n.caller) | |
67 | 65 | if ((c(("dao_member_" + o)) == 1)) | |
68 | 66 | then throw("This user already exists") | |
69 | 67 | else WriteSet([DataEntry(("dao_member_" + o), "proposed")]) | |
70 | 68 | } | |
71 | 69 | ||
72 | 70 | ||
73 | 71 | ||
74 | 72 | @Callable(n) | |
75 | 73 | func addGroupMember (o) = if (!(a(n.caller))) | |
76 | 74 | then throw("access only to the owner") | |
77 | 75 | else if ((c((("working_group_member_" + o) + "_weight")) == 1)) | |
78 | 76 | then throw("This user already exists") | |
79 | 77 | else { | |
80 | 78 | let s = h() | |
81 | 79 | let t = ((s + ";") + o) | |
82 | 80 | WriteSet([DataEntry("working_group_members", t), DataEntry((("working_group_member_" + o) + "_weight"), 1)]) | |
83 | 81 | } | |
84 | 82 | ||
85 | 83 | ||
86 | 84 | ||
87 | 85 | @Callable(n) | |
88 | 86 | func decisionOnMember (o,u) = if (!(a(n.caller))) | |
89 | 87 | then throw("access only to the owner") | |
90 | 88 | else WriteSet([DataEntry(("dao_member_" + o), l(u))]) | |
91 | 89 | ||
92 | 90 |
github/deemru/w8io/169f3d6 166.46 ms ◑