tx · 9Jwxe1iYboFa511bbijPCRCXJT98ABHqrT6oDYs7UeKi 3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb: -0.01000000 Waves 2022.05.11 13:48 [2046900] smart account 3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb > SELF 0.00000000 Waves
{ "type": 13, "id": "9Jwxe1iYboFa511bbijPCRCXJT98ABHqrT6oDYs7UeKi", "fee": 1000000, "feeAssetId": null, "timestamp": 1652266145552, "version": 2, "chainId": 84, "sender": "3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb", "senderPublicKey": "FWSsBbeCwLVkekWhvNKtX6JkrZiruRybKKVuiS3F4bqN", "proofs": [ "3vFiejntQwJdF4ttsvrn3w7X5r1Fg5obMgk3WHLvJCMYdoiKpF5bxc1TrF3zP452aH75W1kutii4DaSHikrm1H66" ], "script": "base64:AAIFAAAAAAAAACMIAhIECgIICBIFCgMICAgSBQoDCAgIEgUKAwgICBIECgIICAAAABcAAAAACnNoaW55d2dnaWQBAAAAIIlpzwL/trq51HGW13m4mXYmsHTQd3n0c26G8PRznwYmAAAAAA90cmVhc3VyeUFkZHJlc3MBAAAAGgFUZfjwFgsEwFlCcBqeSIyX/37cHGLy3bv9AAAAAA5uYXRpb25zQWRkcmVzcwEAAAAaAVRNheje9PhEa1kQO3Bfw7e5ZQ5R9URGbaAAAAAADGFkbWluQWRkcmVzcwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQIAAAAjM01wTnRpUFNSU3E2Tm5hUVlrMzhCZldTelpjZ0FZVHlyUTkAAAAADEJ1aWxkU3RhcnRlZAIAAAANQlVJTERfU1RBUlRFRAAAAAANQnVpbGRGaW5pc2hlZAIAAAAOQlVJTERfRklOSVNIRUQAAAAABkFzc2V0cwkABEwAAAACAgAAAAZOYXRpb24JAARMAAAAAgIAAAAEQ2l0eQkABEwAAAACAgAAAAdCYXJyYWNrCQAETAAAAAICAAAABEJhcm4JAARMAAAAAgIAAAAHV2FycmlvcgkABEwA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YXRpb25LZXkAAAAIbmV3T3duZXIDCQEAAAABIQAAAAEJAQAAAApjaGVja0FkbWluAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAFFAAAAAIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAluYXRpb25LZXkCAAAABl9Pd25lcgUAAAAIbmV3T3duZXIFAAAAA25pbAYEAAAADGN1cnJlbnRPd25lcgkBAAAADHRyeUdldFN0cmluZwAAAAEJAAEsAAAAAgUAAAAJbmF0aW9uS2V5AgAAAAZfT3duZXIDCQEAAAACIT0AAAACBQAAAAxjdXJyZW50T3duZXIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAAgAAAAECAAAAHFlvdSBhcmUgbm90IHRoZSBuYXRpb24gb3duZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAluYXRpb25LZXkCAAAABl9Pd25lcgUAAAAIbmV3T3duZXIFAAAAA25pbAAAAACgOXBA", "height": 2046900, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GhTKvW4kjgvmc79URq2qU5mkaddWjT3aafYZF4piqkmY Next: A8et2oNQnuJ8XYKd38qhzmUTW7pcdoJgqVS15ceCie8p Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"] | |
17 | 17 | ||
18 | - | let h = [0, 1000000000, | |
18 | + | let h = [0, 1000000000, 5000000000, 5000000000, 500000000, 10000000000, 100000000] | |
19 | 19 | ||
20 | 20 | let i = [0, 4, 4, 4, 2, 2, 2] | |
21 | 21 | ||
33 | 33 | ||
34 | 34 | ||
35 | 35 | func o (l) = { | |
36 | - | let m = getInteger(Address( | |
36 | + | let m = getInteger(Address(c), l) | |
37 | 37 | if ($isInstanceOf(m, "Int")) | |
38 | 38 | then { | |
39 | 39 | let n = m | |
77 | 77 | func x (w,s,t) = (((w + "_") + r(s, t)) + "_status") | |
78 | 78 | ||
79 | 79 | ||
80 | - | @Callable(y) | |
81 | - | func StartBuild (z) = if (!(containsElement(g, z))) | |
80 | + | func y (z) = (z + "_Treasury") | |
81 | + | ||
82 | + | ||
83 | + | func A (B) = if (if (if ((B == d)) | |
84 | + | then true | |
85 | + | else (B == this)) | |
86 | + | then true | |
87 | + | else (B.bytes == c)) | |
88 | + | then true | |
89 | + | else (B.bytes == b) | |
90 | + | ||
91 | + | ||
92 | + | func C (B,D,E,F,G) = { | |
93 | + | let H = getIntegerValue(this, G) | |
94 | + | if ((H > height)) | |
95 | + | then throw((((("Building is not finished yet " + toString((H - height))) + " blocks remaining, it will take around ") + toString((H - height))) + " minutes")) | |
96 | + | else { | |
97 | + | let I = value(indexOf(g, D)) | |
98 | + | let J = j[I] | |
99 | + | let K = h[I] | |
100 | + | let L = invoke(Address(b), "Pay", [B, K], nil) | |
101 | + | if ((L == L)) | |
102 | + | then if ((J > 0)) | |
103 | + | then { | |
104 | + | let M = o((B + "_Power")) | |
105 | + | let N = invoke(Address(c), "setUserPower", [B, (M + J)], nil) | |
106 | + | if ((N == N)) | |
107 | + | then [IntegerEntry(E, K), DeleteEntry(F), DeleteEntry(G)] | |
108 | + | else throw("Strict value is not equal to itself.") | |
109 | + | } | |
110 | + | else [IntegerEntry(E, K), DeleteEntry(F), DeleteEntry(G)] | |
111 | + | else throw("Strict value is not equal to itself.") | |
112 | + | } | |
113 | + | } | |
114 | + | ||
115 | + | ||
116 | + | func O (B,P) = { | |
117 | + | let Q = p((P + "_Owner")) | |
118 | + | (Q == toString(B)) | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | func R (S) = if ((S == "Settler")) | |
123 | + | then true | |
124 | + | else (S == "Explorer") | |
125 | + | ||
126 | + | ||
127 | + | @Callable(T) | |
128 | + | func StartBuild (S,P) = if (!(containsElement(g, S))) | |
82 | 129 | then throw("This asset is not amanged by the system") | |
83 | 130 | else { | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | | |
88 | - | if (( | |
89 | - | then | |
90 | - | else | |
91 | - | then throw(" | |
131 | + | let U = value(indexOf(g, S)) | |
132 | + | let V = i[U] | |
133 | + | let W = h[U] | |
134 | + | if (R(S)) | |
135 | + | then if (if (!(O(T.caller, P))) | |
136 | + | then !(A(T.caller)) | |
137 | + | else false) | |
138 | + | then throw("You are not authorized to perform this operation") | |
92 | 139 | else { | |
93 | - | let E = invoke(Address(b), "Deposit", nil, y.payments) | |
94 | - | let m = E | |
95 | - | if ($isInstanceOf(m, "Int")) | |
96 | - | then { | |
97 | - | let F = m | |
98 | - | [StringEntry(x(toString(y.originCaller), y.transactionId, z), e), StringEntry(u(y.transactionId, z), toString(y.originCaller)), IntegerEntry(v(toString(y.originCaller), y.transactionId, z), (height + B))] | |
140 | + | let X = k(y(P)) | |
141 | + | if ((W > X)) | |
142 | + | then throw("The nation hasn't enough funds") | |
143 | + | else { | |
144 | + | let Y = invoke(Address(b), "decreaseNationWallet", [P, W], nil) | |
145 | + | let N = invoke(Address(b), "arbitraryAddCoins", [P, W], nil) | |
146 | + | let m = N | |
147 | + | if ($isInstanceOf(m, "Int")) | |
148 | + | then { | |
149 | + | let Z = m | |
150 | + | [StringEntry(x(toString(T.originCaller), T.transactionId, S), e), StringEntry(u(T.transactionId, S), P), IntegerEntry(v(toString(T.originCaller), T.transactionId, S), (height + V))] | |
151 | + | } | |
152 | + | else throw("Incorrect invoke result") | |
99 | 153 | } | |
100 | - | else throw("Incorrect invoke result") | |
101 | 154 | } | |
155 | + | else { | |
156 | + | let aa = value(T.payments[0].amount) | |
157 | + | if ((W > aa)) | |
158 | + | then throw(("You provided less $heg than the needed cost for building this " + S)) | |
159 | + | else if ((T.payments[0].assetId != a)) | |
160 | + | then throw("Only $HEG payments allowed") | |
161 | + | else { | |
162 | + | let N = invoke(Address(b), "Deposit", nil, T.payments) | |
163 | + | let m = N | |
164 | + | if ($isInstanceOf(m, "Int")) | |
165 | + | then { | |
166 | + | let Z = m | |
167 | + | [StringEntry(x(toString(T.originCaller), T.transactionId, S), e), StringEntry(u(T.transactionId, S), toString(T.originCaller)), IntegerEntry(v(toString(T.originCaller), T.transactionId, S), (height + V))] | |
168 | + | } | |
169 | + | else throw("Incorrect invoke result") | |
170 | + | } | |
171 | + | } | |
102 | 172 | } | |
103 | 173 | ||
104 | 174 | ||
105 | 175 | ||
106 | - | @Callable(y) | |
107 | - | func FinishBuild (G,H) = { | |
108 | - | let s = fromBase58String(G) | |
109 | - | let I = x(toString(y.caller), s, H) | |
110 | - | let J = v(toString(y.caller), s, H) | |
111 | - | let K = r(s, H) | |
112 | - | let L = p(u(s, H)) | |
113 | - | if ((L != toString(y.caller))) | |
114 | - | then throw(("You cannot claim other's players " + H)) | |
115 | - | else { | |
116 | - | let M = p(I) | |
117 | - | if ((M == "")) | |
118 | - | then throw("No pending operations for this asset") | |
119 | - | else { | |
120 | - | let N = getIntegerValue(this, J) | |
121 | - | if ((N > height)) | |
122 | - | then throw((((("Building is not finished yet " + toString((N - height))) + " blocks remaining, it will take around ") + toString((N - height))) + " minutes")) | |
123 | - | else { | |
124 | - | let O = value(indexOf(g, H)) | |
125 | - | let P = j[O] | |
126 | - | let Q = h[O] | |
127 | - | let R = invoke(Address(b), "Pay", [toString(y.caller), Q], nil) | |
128 | - | if ((R == R)) | |
129 | - | then { | |
130 | - | let S = o((toString(y.caller) + "_Power")) | |
131 | - | let E = invoke(Address(c), "setUserPower", [toString(y.caller), (S + P)], nil) | |
132 | - | if ((E == E)) | |
133 | - | then { | |
134 | - | let m = E | |
135 | - | if ($isInstanceOf(m, "Int")) | |
136 | - | then { | |
137 | - | let F = m | |
138 | - | [IntegerEntry(K, Q), DeleteEntry(I), DeleteEntry(J)] | |
139 | - | } | |
140 | - | else throw("Incorrect invoke result") | |
141 | - | } | |
142 | - | else throw("Strict value is not equal to itself.") | |
143 | - | } | |
144 | - | else throw("Strict value is not equal to itself.") | |
145 | - | } | |
146 | - | } | |
147 | - | } | |
176 | + | @Callable(T) | |
177 | + | func FinishBuild (ab,D,P) = { | |
178 | + | let s = fromBase58String(ab) | |
179 | + | let F = x(toString(T.caller), s, D) | |
180 | + | let G = v(toString(T.caller), s, D) | |
181 | + | let E = r(s, D) | |
182 | + | let ac = p(u(s, D)) | |
183 | + | if (R(D)) | |
184 | + | then if (if (!(O(T.caller, P))) | |
185 | + | then !(A(T.caller)) | |
186 | + | else false) | |
187 | + | then throw("You are not authorized to perform this operation") | |
188 | + | else C(P, D, E, F, G) | |
189 | + | else if ((ac != toString(T.caller))) | |
190 | + | then throw(("You cannot claim other's players " + D)) | |
191 | + | else { | |
192 | + | let ad = p(F) | |
193 | + | if ((ad == "")) | |
194 | + | then throw("No pending operations for this asset") | |
195 | + | else C(toString(T.caller), D, E, F, G) | |
196 | + | } | |
148 | 197 | } | |
149 | 198 | ||
150 | 199 | ||
151 | 200 | ||
152 | - | @Callable(y) | |
153 | - | func transferOwnership (T,U,z) = if (if (if ((y.caller != d)) | |
154 | - | then (y.caller != this) | |
155 | - | else false) | |
156 | - | then (y.caller.bytes != c) | |
157 | - | else false) | |
201 | + | @Callable(T) | |
202 | + | func transferOwnership (ae,af,S) = if (!(A(T.caller))) | |
158 | 203 | then throw("Only the admin can perform this operation") | |
159 | 204 | else { | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | if (( | |
165 | - | then if (( | |
205 | + | let ag = p((ae + "_Owner")) | |
206 | + | let M = o((ag + "_Power")) | |
207 | + | let J = j[value(indexOf(g, S))] | |
208 | + | let N = invoke(Address(c), "setUserPower", [ag, (M - J)], nil) | |
209 | + | if ((N == N)) | |
210 | + | then if ((N != (M - J))) | |
166 | 211 | then throw("Incorrect invoke result") | |
167 | 212 | else { | |
168 | - | let | |
169 | - | let | |
170 | - | if (( | |
213 | + | let ah = o((af + "_Power")) | |
214 | + | let ai = invoke(Address(c), "setUserPower", [af, (ah + J)], nil) | |
215 | + | if ((ai == ai)) | |
171 | 216 | then { | |
172 | - | let m = | |
217 | + | let m = ai | |
173 | 218 | if ($isInstanceOf(m, "Int")) | |
174 | 219 | then { | |
175 | - | let | |
176 | - | [StringEntry(( | |
220 | + | let Z = m | |
221 | + | [StringEntry((ae + "_Owner"), af)] | |
177 | 222 | } | |
178 | 223 | else throw("Incorrect invoke result") | |
179 | 224 | } | |
184 | 229 | ||
185 | 230 | ||
186 | 231 | ||
187 | - | @Callable(y) | |
188 | - | func destroyAssetAndTransfer (T,Y,z) = if (if ((y.caller != d)) | |
189 | - | then (y.caller != this) | |
190 | - | else false) | |
232 | + | @Callable(T) | |
233 | + | func destroyAssetAndTransfer (ae,aj,S) = if (!(A(T.caller))) | |
191 | 234 | then throw("Only the admin can perform this operation") | |
192 | 235 | else { | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if (( | |
236 | + | let ag = p((ae + "_Owner")) | |
237 | + | let K = q(ae) | |
238 | + | let L = invoke(Address(b), "arbitraryAddCoins", [aj, K], nil) | |
239 | + | if ((L == L)) | |
197 | 240 | then { | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | if (( | |
241 | + | let M = o((ag + "_Power")) | |
242 | + | let J = j[value(indexOf(g, S))] | |
243 | + | let N = invoke(Address(c), "setUserPower", [toString(T.caller), (M - J)], nil) | |
244 | + | if ((N == N)) | |
202 | 245 | then { | |
203 | - | let m = | |
246 | + | let m = N | |
204 | 247 | if ($isInstanceOf(m, "Int")) | |
205 | 248 | then { | |
206 | - | let | |
207 | - | [DeleteEntry( | |
249 | + | let Z = m | |
250 | + | [DeleteEntry(ae)] | |
208 | 251 | } | |
209 | 252 | else throw("Incorrect invoke result") | |
210 | 253 | } | |
215 | 258 | ||
216 | 259 | ||
217 | 260 | ||
218 | - | @Callable(y) | |
219 | - | func setNationOwner (Z,U) = if (if ((y.caller != d)) | |
220 | - | then true | |
221 | - | else (y.caller.bytes != c)) | |
222 | - | then $Tuple2([StringEntry((Z + "_Owner"), U)], true) | |
261 | + | @Callable(T) | |
262 | + | func setNationOwner (ak,af) = if (!(A(T.caller))) | |
263 | + | then $Tuple2([StringEntry((ak + "_Owner"), af)], true) | |
223 | 264 | else { | |
224 | - | let | |
225 | - | if (( | |
265 | + | let al = p((ak + "_Owner")) | |
266 | + | if ((al != toString(T.caller))) | |
226 | 267 | then throw("You are not the nation owner") | |
227 | - | else [StringEntry(( | |
268 | + | else [StringEntry((ak + "_Owner"), af)] | |
228 | 269 | } | |
229 | 270 | ||
230 | 271 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf' | |
5 | 5 | ||
6 | 6 | let b = base58'3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ' | |
7 | 7 | ||
8 | 8 | let c = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy' | |
9 | 9 | ||
10 | 10 | let d = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
11 | 11 | ||
12 | 12 | let e = "BUILD_STARTED" | |
13 | 13 | ||
14 | 14 | let f = "BUILD_FINISHED" | |
15 | 15 | ||
16 | 16 | let g = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"] | |
17 | 17 | ||
18 | - | let h = [0, 1000000000, | |
18 | + | let h = [0, 1000000000, 5000000000, 5000000000, 500000000, 10000000000, 100000000] | |
19 | 19 | ||
20 | 20 | let i = [0, 4, 4, 4, 2, 2, 2] | |
21 | 21 | ||
22 | 22 | let j = [0, 1000, 500, 500, 0, 0, 0] | |
23 | 23 | ||
24 | 24 | func k (l) = { | |
25 | 25 | let m = getInteger(Address(b), l) | |
26 | 26 | if ($isInstanceOf(m, "Int")) | |
27 | 27 | then { | |
28 | 28 | let n = m | |
29 | 29 | n | |
30 | 30 | } | |
31 | 31 | else 0 | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func o (l) = { | |
36 | - | let m = getInteger(Address( | |
36 | + | let m = getInteger(Address(c), l) | |
37 | 37 | if ($isInstanceOf(m, "Int")) | |
38 | 38 | then { | |
39 | 39 | let n = m | |
40 | 40 | n | |
41 | 41 | } | |
42 | 42 | else 0 | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func p (l) = { | |
47 | 47 | let m = getString(this, l) | |
48 | 48 | if ($isInstanceOf(m, "String")) | |
49 | 49 | then { | |
50 | 50 | let n = m | |
51 | 51 | n | |
52 | 52 | } | |
53 | 53 | else "" | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func q (l) = { | |
58 | 58 | let m = getInteger(this, l) | |
59 | 59 | if ($isInstanceOf(m, "Int")) | |
60 | 60 | then { | |
61 | 61 | let n = m | |
62 | 62 | n | |
63 | 63 | } | |
64 | 64 | else 0 | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func r (s,t) = ((t + "_") + toBase58String(s)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func u (s,t) = (r(s, t) + "_Owner") | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func v (w,s,t) = (((w + "_") + r(s, t)) + "_fh") | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func x (w,s,t) = (((w + "_") + r(s, t)) + "_status") | |
78 | 78 | ||
79 | 79 | ||
80 | - | @Callable(y) | |
81 | - | func StartBuild (z) = if (!(containsElement(g, z))) | |
80 | + | func y (z) = (z + "_Treasury") | |
81 | + | ||
82 | + | ||
83 | + | func A (B) = if (if (if ((B == d)) | |
84 | + | then true | |
85 | + | else (B == this)) | |
86 | + | then true | |
87 | + | else (B.bytes == c)) | |
88 | + | then true | |
89 | + | else (B.bytes == b) | |
90 | + | ||
91 | + | ||
92 | + | func C (B,D,E,F,G) = { | |
93 | + | let H = getIntegerValue(this, G) | |
94 | + | if ((H > height)) | |
95 | + | then throw((((("Building is not finished yet " + toString((H - height))) + " blocks remaining, it will take around ") + toString((H - height))) + " minutes")) | |
96 | + | else { | |
97 | + | let I = value(indexOf(g, D)) | |
98 | + | let J = j[I] | |
99 | + | let K = h[I] | |
100 | + | let L = invoke(Address(b), "Pay", [B, K], nil) | |
101 | + | if ((L == L)) | |
102 | + | then if ((J > 0)) | |
103 | + | then { | |
104 | + | let M = o((B + "_Power")) | |
105 | + | let N = invoke(Address(c), "setUserPower", [B, (M + J)], nil) | |
106 | + | if ((N == N)) | |
107 | + | then [IntegerEntry(E, K), DeleteEntry(F), DeleteEntry(G)] | |
108 | + | else throw("Strict value is not equal to itself.") | |
109 | + | } | |
110 | + | else [IntegerEntry(E, K), DeleteEntry(F), DeleteEntry(G)] | |
111 | + | else throw("Strict value is not equal to itself.") | |
112 | + | } | |
113 | + | } | |
114 | + | ||
115 | + | ||
116 | + | func O (B,P) = { | |
117 | + | let Q = p((P + "_Owner")) | |
118 | + | (Q == toString(B)) | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | func R (S) = if ((S == "Settler")) | |
123 | + | then true | |
124 | + | else (S == "Explorer") | |
125 | + | ||
126 | + | ||
127 | + | @Callable(T) | |
128 | + | func StartBuild (S,P) = if (!(containsElement(g, S))) | |
82 | 129 | then throw("This asset is not amanged by the system") | |
83 | 130 | else { | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | | |
88 | - | if (( | |
89 | - | then | |
90 | - | else | |
91 | - | then throw(" | |
131 | + | let U = value(indexOf(g, S)) | |
132 | + | let V = i[U] | |
133 | + | let W = h[U] | |
134 | + | if (R(S)) | |
135 | + | then if (if (!(O(T.caller, P))) | |
136 | + | then !(A(T.caller)) | |
137 | + | else false) | |
138 | + | then throw("You are not authorized to perform this operation") | |
92 | 139 | else { | |
93 | - | let E = invoke(Address(b), "Deposit", nil, y.payments) | |
94 | - | let m = E | |
95 | - | if ($isInstanceOf(m, "Int")) | |
96 | - | then { | |
97 | - | let F = m | |
98 | - | [StringEntry(x(toString(y.originCaller), y.transactionId, z), e), StringEntry(u(y.transactionId, z), toString(y.originCaller)), IntegerEntry(v(toString(y.originCaller), y.transactionId, z), (height + B))] | |
140 | + | let X = k(y(P)) | |
141 | + | if ((W > X)) | |
142 | + | then throw("The nation hasn't enough funds") | |
143 | + | else { | |
144 | + | let Y = invoke(Address(b), "decreaseNationWallet", [P, W], nil) | |
145 | + | let N = invoke(Address(b), "arbitraryAddCoins", [P, W], nil) | |
146 | + | let m = N | |
147 | + | if ($isInstanceOf(m, "Int")) | |
148 | + | then { | |
149 | + | let Z = m | |
150 | + | [StringEntry(x(toString(T.originCaller), T.transactionId, S), e), StringEntry(u(T.transactionId, S), P), IntegerEntry(v(toString(T.originCaller), T.transactionId, S), (height + V))] | |
151 | + | } | |
152 | + | else throw("Incorrect invoke result") | |
99 | 153 | } | |
100 | - | else throw("Incorrect invoke result") | |
101 | 154 | } | |
155 | + | else { | |
156 | + | let aa = value(T.payments[0].amount) | |
157 | + | if ((W > aa)) | |
158 | + | then throw(("You provided less $heg than the needed cost for building this " + S)) | |
159 | + | else if ((T.payments[0].assetId != a)) | |
160 | + | then throw("Only $HEG payments allowed") | |
161 | + | else { | |
162 | + | let N = invoke(Address(b), "Deposit", nil, T.payments) | |
163 | + | let m = N | |
164 | + | if ($isInstanceOf(m, "Int")) | |
165 | + | then { | |
166 | + | let Z = m | |
167 | + | [StringEntry(x(toString(T.originCaller), T.transactionId, S), e), StringEntry(u(T.transactionId, S), toString(T.originCaller)), IntegerEntry(v(toString(T.originCaller), T.transactionId, S), (height + V))] | |
168 | + | } | |
169 | + | else throw("Incorrect invoke result") | |
170 | + | } | |
171 | + | } | |
102 | 172 | } | |
103 | 173 | ||
104 | 174 | ||
105 | 175 | ||
106 | - | @Callable(y) | |
107 | - | func FinishBuild (G,H) = { | |
108 | - | let s = fromBase58String(G) | |
109 | - | let I = x(toString(y.caller), s, H) | |
110 | - | let J = v(toString(y.caller), s, H) | |
111 | - | let K = r(s, H) | |
112 | - | let L = p(u(s, H)) | |
113 | - | if ((L != toString(y.caller))) | |
114 | - | then throw(("You cannot claim other's players " + H)) | |
115 | - | else { | |
116 | - | let M = p(I) | |
117 | - | if ((M == "")) | |
118 | - | then throw("No pending operations for this asset") | |
119 | - | else { | |
120 | - | let N = getIntegerValue(this, J) | |
121 | - | if ((N > height)) | |
122 | - | then throw((((("Building is not finished yet " + toString((N - height))) + " blocks remaining, it will take around ") + toString((N - height))) + " minutes")) | |
123 | - | else { | |
124 | - | let O = value(indexOf(g, H)) | |
125 | - | let P = j[O] | |
126 | - | let Q = h[O] | |
127 | - | let R = invoke(Address(b), "Pay", [toString(y.caller), Q], nil) | |
128 | - | if ((R == R)) | |
129 | - | then { | |
130 | - | let S = o((toString(y.caller) + "_Power")) | |
131 | - | let E = invoke(Address(c), "setUserPower", [toString(y.caller), (S + P)], nil) | |
132 | - | if ((E == E)) | |
133 | - | then { | |
134 | - | let m = E | |
135 | - | if ($isInstanceOf(m, "Int")) | |
136 | - | then { | |
137 | - | let F = m | |
138 | - | [IntegerEntry(K, Q), DeleteEntry(I), DeleteEntry(J)] | |
139 | - | } | |
140 | - | else throw("Incorrect invoke result") | |
141 | - | } | |
142 | - | else throw("Strict value is not equal to itself.") | |
143 | - | } | |
144 | - | else throw("Strict value is not equal to itself.") | |
145 | - | } | |
146 | - | } | |
147 | - | } | |
176 | + | @Callable(T) | |
177 | + | func FinishBuild (ab,D,P) = { | |
178 | + | let s = fromBase58String(ab) | |
179 | + | let F = x(toString(T.caller), s, D) | |
180 | + | let G = v(toString(T.caller), s, D) | |
181 | + | let E = r(s, D) | |
182 | + | let ac = p(u(s, D)) | |
183 | + | if (R(D)) | |
184 | + | then if (if (!(O(T.caller, P))) | |
185 | + | then !(A(T.caller)) | |
186 | + | else false) | |
187 | + | then throw("You are not authorized to perform this operation") | |
188 | + | else C(P, D, E, F, G) | |
189 | + | else if ((ac != toString(T.caller))) | |
190 | + | then throw(("You cannot claim other's players " + D)) | |
191 | + | else { | |
192 | + | let ad = p(F) | |
193 | + | if ((ad == "")) | |
194 | + | then throw("No pending operations for this asset") | |
195 | + | else C(toString(T.caller), D, E, F, G) | |
196 | + | } | |
148 | 197 | } | |
149 | 198 | ||
150 | 199 | ||
151 | 200 | ||
152 | - | @Callable(y) | |
153 | - | func transferOwnership (T,U,z) = if (if (if ((y.caller != d)) | |
154 | - | then (y.caller != this) | |
155 | - | else false) | |
156 | - | then (y.caller.bytes != c) | |
157 | - | else false) | |
201 | + | @Callable(T) | |
202 | + | func transferOwnership (ae,af,S) = if (!(A(T.caller))) | |
158 | 203 | then throw("Only the admin can perform this operation") | |
159 | 204 | else { | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | if (( | |
165 | - | then if (( | |
205 | + | let ag = p((ae + "_Owner")) | |
206 | + | let M = o((ag + "_Power")) | |
207 | + | let J = j[value(indexOf(g, S))] | |
208 | + | let N = invoke(Address(c), "setUserPower", [ag, (M - J)], nil) | |
209 | + | if ((N == N)) | |
210 | + | then if ((N != (M - J))) | |
166 | 211 | then throw("Incorrect invoke result") | |
167 | 212 | else { | |
168 | - | let | |
169 | - | let | |
170 | - | if (( | |
213 | + | let ah = o((af + "_Power")) | |
214 | + | let ai = invoke(Address(c), "setUserPower", [af, (ah + J)], nil) | |
215 | + | if ((ai == ai)) | |
171 | 216 | then { | |
172 | - | let m = | |
217 | + | let m = ai | |
173 | 218 | if ($isInstanceOf(m, "Int")) | |
174 | 219 | then { | |
175 | - | let | |
176 | - | [StringEntry(( | |
220 | + | let Z = m | |
221 | + | [StringEntry((ae + "_Owner"), af)] | |
177 | 222 | } | |
178 | 223 | else throw("Incorrect invoke result") | |
179 | 224 | } | |
180 | 225 | else throw("Strict value is not equal to itself.") | |
181 | 226 | } | |
182 | 227 | else throw("Strict value is not equal to itself.") | |
183 | 228 | } | |
184 | 229 | ||
185 | 230 | ||
186 | 231 | ||
187 | - | @Callable(y) | |
188 | - | func destroyAssetAndTransfer (T,Y,z) = if (if ((y.caller != d)) | |
189 | - | then (y.caller != this) | |
190 | - | else false) | |
232 | + | @Callable(T) | |
233 | + | func destroyAssetAndTransfer (ae,aj,S) = if (!(A(T.caller))) | |
191 | 234 | then throw("Only the admin can perform this operation") | |
192 | 235 | else { | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | if (( | |
236 | + | let ag = p((ae + "_Owner")) | |
237 | + | let K = q(ae) | |
238 | + | let L = invoke(Address(b), "arbitraryAddCoins", [aj, K], nil) | |
239 | + | if ((L == L)) | |
197 | 240 | then { | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | if (( | |
241 | + | let M = o((ag + "_Power")) | |
242 | + | let J = j[value(indexOf(g, S))] | |
243 | + | let N = invoke(Address(c), "setUserPower", [toString(T.caller), (M - J)], nil) | |
244 | + | if ((N == N)) | |
202 | 245 | then { | |
203 | - | let m = | |
246 | + | let m = N | |
204 | 247 | if ($isInstanceOf(m, "Int")) | |
205 | 248 | then { | |
206 | - | let | |
207 | - | [DeleteEntry( | |
249 | + | let Z = m | |
250 | + | [DeleteEntry(ae)] | |
208 | 251 | } | |
209 | 252 | else throw("Incorrect invoke result") | |
210 | 253 | } | |
211 | 254 | else throw("Strict value is not equal to itself.") | |
212 | 255 | } | |
213 | 256 | else throw("Strict value is not equal to itself.") | |
214 | 257 | } | |
215 | 258 | ||
216 | 259 | ||
217 | 260 | ||
218 | - | @Callable(y) | |
219 | - | func setNationOwner (Z,U) = if (if ((y.caller != d)) | |
220 | - | then true | |
221 | - | else (y.caller.bytes != c)) | |
222 | - | then $Tuple2([StringEntry((Z + "_Owner"), U)], true) | |
261 | + | @Callable(T) | |
262 | + | func setNationOwner (ak,af) = if (!(A(T.caller))) | |
263 | + | then $Tuple2([StringEntry((ak + "_Owner"), af)], true) | |
223 | 264 | else { | |
224 | - | let | |
225 | - | if (( | |
265 | + | let al = p((ak + "_Owner")) | |
266 | + | if ((al != toString(T.caller))) | |
226 | 267 | then throw("You are not the nation owner") | |
227 | - | else [StringEntry(( | |
268 | + | else [StringEntry((ak + "_Owner"), af)] | |
228 | 269 | } | |
229 | 270 | ||
230 | 271 |
github/deemru/w8io/169f3d6 70.66 ms ◑