tx · Hku3UNMeQaGQ4pZdTnXnr5schyymfJB55eAfUeVMsiUQ
3Mvbw1Sx9xtM6akJrBPorkPpp4B3sJRFPFX: -0.10000000 Waves
2020.11.13 03:37 [1262841] smart account 3Mvbw1Sx9xtM6akJrBPorkPpp4B3sJRFPFX > SELF 0.00000000 Waves
{
"type": 13,
"id": "Hku3UNMeQaGQ4pZdTnXnr5schyymfJB55eAfUeVMsiUQ",
"fee": 10000000,
"feeAssetId": null,
"timestamp": 1605227846576,
"version": 2,
"chainId": 84,
"sender": "3Mvbw1Sx9xtM6akJrBPorkPpp4B3sJRFPFX",
"senderPublicKey": "EFfb2ZQ2kJQnnQeHgudF4Fu2ksNzAhonmzpG5RvJdKE4",
"proofs": [
"4A1mktBiPoq6jRUV3P6qMMU58YEX7DHEy1YbLojUwFxz7A3vGo7MiyR8vhm9KRji598QqnNQ7mCHvvdnjSgevx84"
],
"script": "base64:AAIDAAAAAAAAADQIARIECgIICBIDCgEIEgMKAQgSBwoFCAgICAgSBAoCCAgSBAoCCAgSBQoDCAgBEgQKAggIAAAACAEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAAFAAAAA3ZhbAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAABQAAAAN2YWwBAAAAB2lzT3duZXIAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwEAAAAIZ2V0R3JvdXAAAAAABAAAAAN2Y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b3JlCQABLAAAAAIJAAEsAAAAAgIAAAAJdGVtcGxhdGVfBQAAAAp0ZW1wbGF0ZUlkAgAAAApfbWluX3Njb3JlBAAAABJ0ZWFtU2NvcmVBbW91bnRLZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAJdGVtcGxhdGVfBQAAAAp0ZW1wbGF0ZUlkAgAAAAtfYXBwbGljYW50XwUAAAAJYXBwbGljYW50AgAAAAZfc2NvcmUEAAAACXRlYW1TY29yZQkBAAAADXRyeUdldEludGVnZXIAAAABBQAAABJ0ZWFtU2NvcmVBbW91bnRLZXkDCQAAZgAAAAIFAAAACXRlYW1TY29yZQAAAAAAAAAAAAYJAAACAAAAAQkAASwAAAACAgAAACVub3QgZW5vdWdoIHZvdGVzIHRvIG1ha2UgZGVjaXNpb24gb24gBQAAAAlhcHBsaWNhbnQDCQEAAAABIQAAAAEJAQAAABZpc0FwcGxpY2FudFZvdGVkRW5vdWdoAAAAAgUAAAAKdGVtcGxhdGVJZAUAAAAJYXBwbGljYW50CQAAAgAAAAECAAAALW5vdCBlbm91Z2ggZXhwZXJ0cyB2b3RlZCB0byBpc3N1ZSBjZXJ0aWZpY2F0ZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAl0ZW1wbGF0ZV8FAAAACnRlbXBsYXRlSWQCAAAAC19hcHBsaWNhbnRfBQAAAAlhcHBsaWNhbnQCAAAAB19zdGF0dXMCAAAACGFwcHJvdmVkBQAAAANuaWwAAAAA39qltA==",
"height": 1262841,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: CsHX5iLp8QwrQtzxyHrUtArQJ1qjrEaXKhaNh5oCLuiF
Next: GqVyAygt5iyztNYsoZ1b4rYDVPB1rMxGEW7L8pkApN9H
Diff:
Old | New | | Differences |
---|
34 | 34 | | |
---|
35 | 35 | | func i () = { |
---|
36 | 36 | | let c = { |
---|
37 | | - | let d = getString(this, "working_group") |
---|
| 37 | + | let d = getString(this, "working_members") |
---|
38 | 38 | | if ($isInstanceOf(d, "String")) |
---|
39 | 39 | | then { |
---|
40 | 40 | | let e = d |
---|
|
46 | 46 | | } |
---|
47 | 47 | | |
---|
48 | 48 | | |
---|
49 | | - | func j () = { |
---|
| 49 | + | func j (k) = { |
---|
50 | 50 | | let c = { |
---|
51 | | - | let d = getString(this, "dao_members") |
---|
| 51 | + | let d = getString(this, (("center_" + k) + "_members")) |
---|
52 | 52 | | if ($isInstanceOf(d, "String")) |
---|
53 | 53 | | then { |
---|
54 | 54 | | let e = d |
---|
|
60 | 60 | | } |
---|
61 | 61 | | |
---|
62 | 62 | | |
---|
63 | | - | func k (l) = (a(("group_member_" + toString(l))) > 0) |
---|
| 63 | + | func l (m,n) = (f((("template_" + n) + "_proposed")) == toString(m)) |
---|
64 | 64 | | |
---|
65 | 65 | | |
---|
66 | | - | func m (n,o) = { |
---|
67 | | - | let p = f((("template_" + o) + "_center")) |
---|
68 | | - | (a(((("center_" + p) + "_member_") + toString(n.caller))) > 0) |
---|
| 66 | + | func o (m) = (a(("working_member_" + toString(m))) > 0) |
---|
| 67 | + | |
---|
| 68 | + | |
---|
| 69 | + | func p (q,n) = { |
---|
| 70 | + | let k = f((("template_" + n) + "_center")) |
---|
| 71 | + | (a(((("center_" + k) + "_member_") + toString(q.caller))) > 0) |
---|
69 | 72 | | } |
---|
70 | 73 | | |
---|
71 | 74 | | |
---|
72 | | - | @Callable(n) |
---|
73 | | - | func addDAOMember (q,p) = if (!(g(n.caller))) |
---|
| 75 | + | @Callable(q) |
---|
| 76 | + | func addDAOMember (r,k) = if (!(g(q.caller))) |
---|
74 | 77 | | then throw("access only to the DAO owner") |
---|
75 | 78 | | else { |
---|
76 | | - | let r = j() |
---|
77 | | - | let s = ((r + ";") + q) |
---|
78 | | - | let t = a("dao_size") |
---|
79 | | - | let u = (t + 1) |
---|
80 | | - | WriteSet([DataEntry("dao_members", s), DataEntry("dao_size", u), DataEntry(((("center_" + p) + "_member_") + q), 1)]) |
---|
| 79 | + | let s = j(k) |
---|
| 80 | + | let t = ((s + ";") + r) |
---|
| 81 | + | let u = a((("center_" + k) + "_size")) |
---|
| 82 | + | let v = (u + 1) |
---|
| 83 | + | WriteSet([DataEntry((("center_" + k) + "_members"), t), DataEntry((("center_" + k) + "_size"), v), DataEntry(((("center_" + k) + "_member_") + r), 1)]) |
---|
81 | 84 | | } |
---|
82 | 85 | | |
---|
83 | 86 | | |
---|
84 | 87 | | |
---|
85 | | - | @Callable(n) |
---|
86 | | - | func addGroupMember (q) = if (!(g(n.caller))) |
---|
| 88 | + | @Callable(q) |
---|
| 89 | + | func addGroupMember (r) = if (!(g(q.caller))) |
---|
87 | 90 | | then throw("access only to the DAO owner") |
---|
88 | 91 | | else { |
---|
89 | | - | let r = i() |
---|
90 | | - | let s = ((r + ";") + q) |
---|
91 | | - | let t = a("working_group_size") |
---|
92 | | - | let u = (t + 1) |
---|
93 | | - | WriteSet([DataEntry("working_group", s), DataEntry("working_group_size", u), DataEntry(("group_member_" + q), 1)]) |
---|
| 92 | + | let s = i() |
---|
| 93 | + | let t = ((s + ";") + r) |
---|
| 94 | + | let u = a("working_size") |
---|
| 95 | + | let v = (u + 1) |
---|
| 96 | + | WriteSet([DataEntry("working_members", t), DataEntry("working_size", v), DataEntry(("working_member_" + r), 1)]) |
---|
94 | 97 | | } |
---|
95 | 98 | | |
---|
96 | 99 | | |
---|
97 | 100 | | |
---|
98 | | - | @Callable(n) |
---|
99 | | - | func proposeTemplate (v) = WriteSet([DataEntry((("template_" + toBase58String(n.transactionId)) + "_title"), v), DataEntry((("template_" + toBase58String(n.transactionId)) + "_status"), "proposed"), DataEntry((("template_" + toBase58String(n.transactionId)) + "_proposed_by"), toString(n.caller))]) |
---|
| 101 | + | @Callable(q) |
---|
| 102 | + | func proposeTemplate (w) = WriteSet([DataEntry((("template_" + toBase58String(q.transactionId)) + "_title"), w), DataEntry((("template_" + toBase58String(q.transactionId)) + "_status"), "proposed"), DataEntry((("template_" + toBase58String(q.transactionId)) + "_proposed"), toString(q.caller))]) |
---|
100 | 103 | | |
---|
101 | 104 | | |
---|
102 | 105 | | |
---|
103 | | - | @Callable(n) |
---|
104 | | - | func acceptTemplate (o,w) = if (!(k(n.caller))) |
---|
105 | | - | then throw("government working group access only") |
---|
106 | | - | else WriteSet([DataEntry((("template_" + o) + "_center"), w), DataEntry((("template_" + o) + "_status"), "accepted")]) |
---|
| 106 | + | @Callable(q) |
---|
| 107 | + | func addTemplateDetails (n,x,y,z,A) = if (!(l(q.caller, n))) |
---|
| 108 | + | then throw("author access only") |
---|
| 109 | + | else WriteSet([DataEntry((("template_" + n) + "_description"), x), DataEntry((("template_" + n) + "_author"), y), DataEntry((("template_" + n) + "_company"), z), DataEntry((("template_" + n) + "_link"), A)]) |
---|
107 | 110 | | |
---|
108 | 111 | | |
---|
109 | 112 | | |
---|
110 | | - | @Callable(n) |
---|
111 | | - | func requestCertificate (o,x) = { |
---|
112 | | - | let y = (("template_" + o) + "_applicants") |
---|
113 | | - | let z = { |
---|
114 | | - | let d = getString(this, y) |
---|
| 113 | + | @Callable(q) |
---|
| 114 | + | func acceptTemplate (n,B) = if (!(o(q.caller))) |
---|
| 115 | + | then throw("government working group access only") |
---|
| 116 | + | else WriteSet([DataEntry((("template_" + n) + "_center"), B), DataEntry((("template_" + n) + "_status"), "accepted")]) |
---|
| 117 | + | |
---|
| 118 | + | |
---|
| 119 | + | |
---|
| 120 | + | @Callable(q) |
---|
| 121 | + | func requestCertificate (n,C) = { |
---|
| 122 | + | let D = (("template_" + n) + "_applicants") |
---|
| 123 | + | let E = { |
---|
| 124 | + | let d = getString(this, D) |
---|
115 | 125 | | if ($isInstanceOf(d, "String")) |
---|
116 | 126 | | then { |
---|
117 | 127 | | let e = d |
---|
|
119 | 129 | | } |
---|
120 | 130 | | else "" |
---|
121 | 131 | | } |
---|
122 | | - | let A = ((z + ";") + toString(n.caller)) |
---|
123 | | - | ScriptResult(WriteSet([DataEntry((((("template_" + o) + "_applicant_") + toString(n.caller)) + "_status"), "requested"), DataEntry((((("template_" + o) + "_applicant_") + toString(n.caller)) + "_details"), x), DataEntry(y, A)]), TransferSet([ScriptTransfer(n.caller, 500000, unit)])) |
---|
| 132 | + | let F = ((E + ";") + toString(q.caller)) |
---|
| 133 | + | ScriptResult(WriteSet([DataEntry((((("template_" + n) + "_applicant_") + toString(q.caller)) + "_status"), "requested"), DataEntry((((("template_" + n) + "_applicant_") + toString(q.caller)) + "_details"), C), DataEntry(D, F)]), TransferSet([ScriptTransfer(q.caller, 500000, unit)])) |
---|
124 | 134 | | } |
---|
125 | 135 | | |
---|
126 | 136 | | |
---|
127 | 137 | | |
---|
128 | | - | @Callable(n) |
---|
129 | | - | func voteForApplicant (o,B,C) = if (if ((C != -1)) |
---|
130 | | - | then (C != 1) |
---|
| 138 | + | @Callable(q) |
---|
| 139 | + | func voteForApplicant (n,G,H) = if (if ((H != -1)) |
---|
| 140 | + | then (H != 1) |
---|
131 | 141 | | else false) |
---|
132 | 142 | | then throw("vote value needs to be 1 or -1") |
---|
133 | | - | else if (!(m(n, o))) |
---|
| 143 | + | else if (!(p(q, n))) |
---|
134 | 144 | | then throw("this member is not certified to vote") |
---|
135 | 145 | | else { |
---|
136 | | - | let D = ((((("template_" + o) + "_applicant_") + B) + "_vote_") + toString(n.caller)) |
---|
137 | | - | let E = a(D) |
---|
138 | | - | if ((E != 0)) |
---|
| 146 | + | let I = ((((("template_" + n) + "_applicant_") + G) + "_vote_") + toString(q.caller)) |
---|
| 147 | + | let J = a(I) |
---|
| 148 | + | if ((J != 0)) |
---|
139 | 149 | | then throw("this member has already voted on this applicant") |
---|
140 | 150 | | else { |
---|
141 | | - | let F = (((("template_" + o) + "_applicant_") + B) + "_votes") |
---|
142 | | - | let G = (((("template_" + o) + "_applicant_") + B) + "_score") |
---|
143 | | - | let H = (1 + a(F)) |
---|
144 | | - | let I = (C + a(G)) |
---|
145 | | - | WriteSet([DataEntry(D, C), DataEntry(G, I)]) |
---|
| 151 | + | let K = (((("template_" + n) + "_applicant_") + G) + "_votes") |
---|
| 152 | + | let L = (((("template_" + n) + "_applicant_") + G) + "_score") |
---|
| 153 | + | let M = (1 + a(K)) |
---|
| 154 | + | let N = (H + a(L)) |
---|
| 155 | + | WriteSet([DataEntry(I, H), DataEntry(L, N)]) |
---|
146 | 156 | | } |
---|
147 | 157 | | } |
---|
148 | 158 | | |
---|
149 | 159 | | |
---|
150 | 160 | | |
---|
151 | | - | @Callable(n) |
---|
152 | | - | func finishApplicantVoting (o,B) = { |
---|
153 | | - | func J (o,B) = { |
---|
154 | | - | let K = (("template_" + o) + "_min_score") |
---|
155 | | - | let L = (((("template_" + o) + "_applicant_") + B) + "_score") |
---|
156 | | - | let M = a(L) |
---|
157 | | - | if ((M > 0)) |
---|
| 161 | + | @Callable(q) |
---|
| 162 | + | func finishApplicantVoting (n,G) = { |
---|
| 163 | + | func O (n,G) = { |
---|
| 164 | + | let P = (("template_" + n) + "_min_score") |
---|
| 165 | + | let Q = (((("template_" + n) + "_applicant_") + G) + "_score") |
---|
| 166 | + | let R = a(Q) |
---|
| 167 | + | if ((R > 0)) |
---|
158 | 168 | | then true |
---|
159 | | - | else throw(("not enough votes to make decision on " + B)) |
---|
| 169 | + | else throw(("not enough votes to make decision on " + G)) |
---|
160 | 170 | | } |
---|
161 | 171 | | |
---|
162 | | - | if (!(J(o, B))) |
---|
| 172 | + | if (!(O(n, G))) |
---|
163 | 173 | | then throw("not enough experts voted to issue certificate") |
---|
164 | | - | else WriteSet([DataEntry((((("template_" + o) + "_applicant_") + B) + "_status"), "approved")]) |
---|
| 174 | + | else WriteSet([DataEntry((((("template_" + n) + "_applicant_") + G) + "_status"), "approved")]) |
---|
165 | 175 | | } |
---|
166 | 176 | | |
---|
167 | 177 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func a (b) = { |
---|
5 | 5 | | let c = { |
---|
6 | 6 | | let d = getInteger(this, b) |
---|
7 | 7 | | if ($isInstanceOf(d, "Int")) |
---|
8 | 8 | | then { |
---|
9 | 9 | | let e = d |
---|
10 | 10 | | e |
---|
11 | 11 | | } |
---|
12 | 12 | | else 0 |
---|
13 | 13 | | } |
---|
14 | 14 | | c |
---|
15 | 15 | | } |
---|
16 | 16 | | |
---|
17 | 17 | | |
---|
18 | 18 | | func f (b) = { |
---|
19 | 19 | | let c = { |
---|
20 | 20 | | let d = getString(this, b) |
---|
21 | 21 | | if ($isInstanceOf(d, "String")) |
---|
22 | 22 | | then { |
---|
23 | 23 | | let e = d |
---|
24 | 24 | | e |
---|
25 | 25 | | } |
---|
26 | 26 | | else "" |
---|
27 | 27 | | } |
---|
28 | 28 | | c |
---|
29 | 29 | | } |
---|
30 | 30 | | |
---|
31 | 31 | | |
---|
32 | 32 | | func g (h) = (h == this) |
---|
33 | 33 | | |
---|
34 | 34 | | |
---|
35 | 35 | | func i () = { |
---|
36 | 36 | | let c = { |
---|
37 | | - | let d = getString(this, "working_group") |
---|
| 37 | + | let d = getString(this, "working_members") |
---|
38 | 38 | | if ($isInstanceOf(d, "String")) |
---|
39 | 39 | | then { |
---|
40 | 40 | | let e = d |
---|
41 | 41 | | e |
---|
42 | 42 | | } |
---|
43 | 43 | | else "" |
---|
44 | 44 | | } |
---|
45 | 45 | | c |
---|
46 | 46 | | } |
---|
47 | 47 | | |
---|
48 | 48 | | |
---|
49 | | - | func j () = { |
---|
| 49 | + | func j (k) = { |
---|
50 | 50 | | let c = { |
---|
51 | | - | let d = getString(this, "dao_members") |
---|
| 51 | + | let d = getString(this, (("center_" + k) + "_members")) |
---|
52 | 52 | | if ($isInstanceOf(d, "String")) |
---|
53 | 53 | | then { |
---|
54 | 54 | | let e = d |
---|
55 | 55 | | e |
---|
56 | 56 | | } |
---|
57 | 57 | | else "" |
---|
58 | 58 | | } |
---|
59 | 59 | | c |
---|
60 | 60 | | } |
---|
61 | 61 | | |
---|
62 | 62 | | |
---|
63 | | - | func k (l) = (a(("group_member_" + toString(l))) > 0) |
---|
| 63 | + | func l (m,n) = (f((("template_" + n) + "_proposed")) == toString(m)) |
---|
64 | 64 | | |
---|
65 | 65 | | |
---|
66 | | - | func m (n,o) = { |
---|
67 | | - | let p = f((("template_" + o) + "_center")) |
---|
68 | | - | (a(((("center_" + p) + "_member_") + toString(n.caller))) > 0) |
---|
| 66 | + | func o (m) = (a(("working_member_" + toString(m))) > 0) |
---|
| 67 | + | |
---|
| 68 | + | |
---|
| 69 | + | func p (q,n) = { |
---|
| 70 | + | let k = f((("template_" + n) + "_center")) |
---|
| 71 | + | (a(((("center_" + k) + "_member_") + toString(q.caller))) > 0) |
---|
69 | 72 | | } |
---|
70 | 73 | | |
---|
71 | 74 | | |
---|
72 | | - | @Callable(n) |
---|
73 | | - | func addDAOMember (q,p) = if (!(g(n.caller))) |
---|
| 75 | + | @Callable(q) |
---|
| 76 | + | func addDAOMember (r,k) = if (!(g(q.caller))) |
---|
74 | 77 | | then throw("access only to the DAO owner") |
---|
75 | 78 | | else { |
---|
76 | | - | let r = j() |
---|
77 | | - | let s = ((r + ";") + q) |
---|
78 | | - | let t = a("dao_size") |
---|
79 | | - | let u = (t + 1) |
---|
80 | | - | WriteSet([DataEntry("dao_members", s), DataEntry("dao_size", u), DataEntry(((("center_" + p) + "_member_") + q), 1)]) |
---|
| 79 | + | let s = j(k) |
---|
| 80 | + | let t = ((s + ";") + r) |
---|
| 81 | + | let u = a((("center_" + k) + "_size")) |
---|
| 82 | + | let v = (u + 1) |
---|
| 83 | + | WriteSet([DataEntry((("center_" + k) + "_members"), t), DataEntry((("center_" + k) + "_size"), v), DataEntry(((("center_" + k) + "_member_") + r), 1)]) |
---|
81 | 84 | | } |
---|
82 | 85 | | |
---|
83 | 86 | | |
---|
84 | 87 | | |
---|
85 | | - | @Callable(n) |
---|
86 | | - | func addGroupMember (q) = if (!(g(n.caller))) |
---|
| 88 | + | @Callable(q) |
---|
| 89 | + | func addGroupMember (r) = if (!(g(q.caller))) |
---|
87 | 90 | | then throw("access only to the DAO owner") |
---|
88 | 91 | | else { |
---|
89 | | - | let r = i() |
---|
90 | | - | let s = ((r + ";") + q) |
---|
91 | | - | let t = a("working_group_size") |
---|
92 | | - | let u = (t + 1) |
---|
93 | | - | WriteSet([DataEntry("working_group", s), DataEntry("working_group_size", u), DataEntry(("group_member_" + q), 1)]) |
---|
| 92 | + | let s = i() |
---|
| 93 | + | let t = ((s + ";") + r) |
---|
| 94 | + | let u = a("working_size") |
---|
| 95 | + | let v = (u + 1) |
---|
| 96 | + | WriteSet([DataEntry("working_members", t), DataEntry("working_size", v), DataEntry(("working_member_" + r), 1)]) |
---|
94 | 97 | | } |
---|
95 | 98 | | |
---|
96 | 99 | | |
---|
97 | 100 | | |
---|
98 | | - | @Callable(n) |
---|
99 | | - | func proposeTemplate (v) = WriteSet([DataEntry((("template_" + toBase58String(n.transactionId)) + "_title"), v), DataEntry((("template_" + toBase58String(n.transactionId)) + "_status"), "proposed"), DataEntry((("template_" + toBase58String(n.transactionId)) + "_proposed_by"), toString(n.caller))]) |
---|
| 101 | + | @Callable(q) |
---|
| 102 | + | func proposeTemplate (w) = WriteSet([DataEntry((("template_" + toBase58String(q.transactionId)) + "_title"), w), DataEntry((("template_" + toBase58String(q.transactionId)) + "_status"), "proposed"), DataEntry((("template_" + toBase58String(q.transactionId)) + "_proposed"), toString(q.caller))]) |
---|
100 | 103 | | |
---|
101 | 104 | | |
---|
102 | 105 | | |
---|
103 | | - | @Callable(n) |
---|
104 | | - | func acceptTemplate (o,w) = if (!(k(n.caller))) |
---|
105 | | - | then throw("government working group access only") |
---|
106 | | - | else WriteSet([DataEntry((("template_" + o) + "_center"), w), DataEntry((("template_" + o) + "_status"), "accepted")]) |
---|
| 106 | + | @Callable(q) |
---|
| 107 | + | func addTemplateDetails (n,x,y,z,A) = if (!(l(q.caller, n))) |
---|
| 108 | + | then throw("author access only") |
---|
| 109 | + | else WriteSet([DataEntry((("template_" + n) + "_description"), x), DataEntry((("template_" + n) + "_author"), y), DataEntry((("template_" + n) + "_company"), z), DataEntry((("template_" + n) + "_link"), A)]) |
---|
107 | 110 | | |
---|
108 | 111 | | |
---|
109 | 112 | | |
---|
110 | | - | @Callable(n) |
---|
111 | | - | func requestCertificate (o,x) = { |
---|
112 | | - | let y = (("template_" + o) + "_applicants") |
---|
113 | | - | let z = { |
---|
114 | | - | let d = getString(this, y) |
---|
| 113 | + | @Callable(q) |
---|
| 114 | + | func acceptTemplate (n,B) = if (!(o(q.caller))) |
---|
| 115 | + | then throw("government working group access only") |
---|
| 116 | + | else WriteSet([DataEntry((("template_" + n) + "_center"), B), DataEntry((("template_" + n) + "_status"), "accepted")]) |
---|
| 117 | + | |
---|
| 118 | + | |
---|
| 119 | + | |
---|
| 120 | + | @Callable(q) |
---|
| 121 | + | func requestCertificate (n,C) = { |
---|
| 122 | + | let D = (("template_" + n) + "_applicants") |
---|
| 123 | + | let E = { |
---|
| 124 | + | let d = getString(this, D) |
---|
115 | 125 | | if ($isInstanceOf(d, "String")) |
---|
116 | 126 | | then { |
---|
117 | 127 | | let e = d |
---|
118 | 128 | | e |
---|
119 | 129 | | } |
---|
120 | 130 | | else "" |
---|
121 | 131 | | } |
---|
122 | | - | let A = ((z + ";") + toString(n.caller)) |
---|
123 | | - | ScriptResult(WriteSet([DataEntry((((("template_" + o) + "_applicant_") + toString(n.caller)) + "_status"), "requested"), DataEntry((((("template_" + o) + "_applicant_") + toString(n.caller)) + "_details"), x), DataEntry(y, A)]), TransferSet([ScriptTransfer(n.caller, 500000, unit)])) |
---|
| 132 | + | let F = ((E + ";") + toString(q.caller)) |
---|
| 133 | + | ScriptResult(WriteSet([DataEntry((((("template_" + n) + "_applicant_") + toString(q.caller)) + "_status"), "requested"), DataEntry((((("template_" + n) + "_applicant_") + toString(q.caller)) + "_details"), C), DataEntry(D, F)]), TransferSet([ScriptTransfer(q.caller, 500000, unit)])) |
---|
124 | 134 | | } |
---|
125 | 135 | | |
---|
126 | 136 | | |
---|
127 | 137 | | |
---|
128 | | - | @Callable(n) |
---|
129 | | - | func voteForApplicant (o,B,C) = if (if ((C != -1)) |
---|
130 | | - | then (C != 1) |
---|
| 138 | + | @Callable(q) |
---|
| 139 | + | func voteForApplicant (n,G,H) = if (if ((H != -1)) |
---|
| 140 | + | then (H != 1) |
---|
131 | 141 | | else false) |
---|
132 | 142 | | then throw("vote value needs to be 1 or -1") |
---|
133 | | - | else if (!(m(n, o))) |
---|
| 143 | + | else if (!(p(q, n))) |
---|
134 | 144 | | then throw("this member is not certified to vote") |
---|
135 | 145 | | else { |
---|
136 | | - | let D = ((((("template_" + o) + "_applicant_") + B) + "_vote_") + toString(n.caller)) |
---|
137 | | - | let E = a(D) |
---|
138 | | - | if ((E != 0)) |
---|
| 146 | + | let I = ((((("template_" + n) + "_applicant_") + G) + "_vote_") + toString(q.caller)) |
---|
| 147 | + | let J = a(I) |
---|
| 148 | + | if ((J != 0)) |
---|
139 | 149 | | then throw("this member has already voted on this applicant") |
---|
140 | 150 | | else { |
---|
141 | | - | let F = (((("template_" + o) + "_applicant_") + B) + "_votes") |
---|
142 | | - | let G = (((("template_" + o) + "_applicant_") + B) + "_score") |
---|
143 | | - | let H = (1 + a(F)) |
---|
144 | | - | let I = (C + a(G)) |
---|
145 | | - | WriteSet([DataEntry(D, C), DataEntry(G, I)]) |
---|
| 151 | + | let K = (((("template_" + n) + "_applicant_") + G) + "_votes") |
---|
| 152 | + | let L = (((("template_" + n) + "_applicant_") + G) + "_score") |
---|
| 153 | + | let M = (1 + a(K)) |
---|
| 154 | + | let N = (H + a(L)) |
---|
| 155 | + | WriteSet([DataEntry(I, H), DataEntry(L, N)]) |
---|
146 | 156 | | } |
---|
147 | 157 | | } |
---|
148 | 158 | | |
---|
149 | 159 | | |
---|
150 | 160 | | |
---|
151 | | - | @Callable(n) |
---|
152 | | - | func finishApplicantVoting (o,B) = { |
---|
153 | | - | func J (o,B) = { |
---|
154 | | - | let K = (("template_" + o) + "_min_score") |
---|
155 | | - | let L = (((("template_" + o) + "_applicant_") + B) + "_score") |
---|
156 | | - | let M = a(L) |
---|
157 | | - | if ((M > 0)) |
---|
| 161 | + | @Callable(q) |
---|
| 162 | + | func finishApplicantVoting (n,G) = { |
---|
| 163 | + | func O (n,G) = { |
---|
| 164 | + | let P = (("template_" + n) + "_min_score") |
---|
| 165 | + | let Q = (((("template_" + n) + "_applicant_") + G) + "_score") |
---|
| 166 | + | let R = a(Q) |
---|
| 167 | + | if ((R > 0)) |
---|
158 | 168 | | then true |
---|
159 | | - | else throw(("not enough votes to make decision on " + B)) |
---|
| 169 | + | else throw(("not enough votes to make decision on " + G)) |
---|
160 | 170 | | } |
---|
161 | 171 | | |
---|
162 | | - | if (!(J(o, B))) |
---|
| 172 | + | if (!(O(n, G))) |
---|
163 | 173 | | then throw("not enough experts voted to issue certificate") |
---|
164 | | - | else WriteSet([DataEntry((((("template_" + o) + "_applicant_") + B) + "_status"), "approved")]) |
---|
| 174 | + | else WriteSet([DataEntry((((("template_" + n) + "_applicant_") + G) + "_status"), "approved")]) |
---|
165 | 175 | | } |
---|
166 | 176 | | |
---|
167 | 177 | | |
---|