tx · 37Q5ohmsCNj5zC74uLjtP2xJMoKVkrazLY8zBidUcmoz 3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb: -0.01000000 Waves 2022.05.13 19:25 [2050158] smart account 3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb > SELF 0.00000000 Waves
{ "type": 13, "id": "37Q5ohmsCNj5zC74uLjtP2xJMoKVkrazLY8zBidUcmoz", "fee": 1000000, "feeAssetId": null, "timestamp": 1652459117309, "version": 2, "chainId": 84, "sender": "3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb", "senderPublicKey": "FWSsBbeCwLVkekWhvNKtX6JkrZiruRybKKVuiS3F4bqN", "proofs": [ "39Df4bmd56VTWUKBPgv4VPLPkY3FFYHCNhc9RKBUCK3ngKUFnqLhT55dHGPn7n12vkwn64oHfrbdCTLEp8g2snn8" ], "script": "base64:AAIFAAAAAAAAADoIAhIFCgMICAgSBQoDCAgIEgQKAggIEgQKAggIEgMKAQgSBAoCCAgSBAoCCAgSBQoDCAgBEgQKAggBAAAAHQAAAAAKc2hpbnl3Z2dpZAEAAAAgiWnPAv+2urnUcZbXebiZdiawdNB3efRzbobw9HOfBiYAAAAAD3RyZWFzdXJ5QWRkcmVzcwEAAAAaAVRl+PAWCwTAWUJwGp5IjJf/ftwcYvLdu/0AAAAADm5hdGlvbnNBZGRyZXNzAQAAABoBVE2F6N70+ERrWRA7cF/Dt7llDlH1REZtoAAAAAASbWFya2V0cGxhY2VBZGRyZXNzAQAAABoBVB0huZPx/BjDpxtJcRZDllF066xULiW87wAAAAALYWRtaW5XYWxsZXQJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNcE50aVBTUlNxNk5uYVFZazM4QmZXU3paY2dBWVR5clE5AAAAABZkYWlseUdhbWVSZXdhcmRzV2FsbGV0CQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTXVTclhUVGl3bzliZG9ENkZlYUJwTVVZTWlVNXNhRHYyVQAAAAA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2Fzc2V0SWQJAAACAAAAAQIAAAAjWW91IGFyZSBub3QgdGhlIG93bmVyIG9mIHRoaXMgYXNzZXQEAAAACWFzc2V0U2hlZwkBAAAADXRyeUdldEludGVnZXIAAAABBQAAAAdhc3NldElkBAAAAAJ0cgkAA/wAAAAECQEAAAAHQWRkcmVzcwAAAAEFAAAAEm1hcmtldHBsYWNlQWRkcmVzcwIAAAAJcHV0T25TYWxlCQAETAAAAAIFAAAAB2Fzc2V0SWQJAARMAAAAAgUAAAAJYXNzZXRTaGVnCQAETAAAAAIFAAAACXNlbGxwcmljZQUAAAADbmlsBQAAAANuaWwEAAAAByRtYXRjaDAFAAAAAnRyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAFmdldEFzc2V0T3duZXJLZXlTdHJpbmcAAAABBQAAAAdhc3NldElkCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAAClFcnJvciBwdXR0aW5nIHRoZSBpdGVtIG9uIHRoZSBtYXJrZXRwbGFjZQAAAAAhgcla", "height": 2050158, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FFfGvxM1taiRhZrVSyuWPdVmP3nuuBRmvBXsmBg6VZk2 Next: QAUsTuUi5YBhUwcK7NZCjVGxvaVBAy16uFne2hzxA5P Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | ||
12 | 12 | let e = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = addressFromStringValue("3MuSrXTTiwo9bdoD6FeaBpMUYMiU5saDv2U") | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i") | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = "BUILD_STARTED" | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = "BUILD_FINISHED" | |
21 | 21 | ||
22 | - | let j = [ | |
22 | + | let j = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"] | |
23 | 23 | ||
24 | - | let k = [0, | |
24 | + | let k = [0, 0, 5000000000, 5000000000, 500000000, 10000000000, 100000000] | |
25 | 25 | ||
26 | - | let l = [0, | |
26 | + | let l = [0, 0, 0, 0, 0, 10000000000, 100000000] | |
27 | 27 | ||
28 | - | func m (n) = { | |
29 | - | let o = getInteger(Address(b), n) | |
30 | - | if ($isInstanceOf(o, "Int")) | |
28 | + | let m = [0, 4, 4, 4, 2, 2, 2] | |
29 | + | ||
30 | + | let n = [0, 1000, 50, 50, 1, 1, 1] | |
31 | + | ||
32 | + | func o (p) = { | |
33 | + | let q = getInteger(Address(b), p) | |
34 | + | if ($isInstanceOf(q, "Int")) | |
31 | 35 | then { | |
32 | - | let | |
33 | - | | |
36 | + | let r = q | |
37 | + | r | |
34 | 38 | } | |
35 | 39 | else 0 | |
36 | 40 | } | |
37 | 41 | ||
38 | 42 | ||
39 | - | func | |
40 | - | let | |
41 | - | if ($isInstanceOf( | |
43 | + | func s (p) = { | |
44 | + | let q = getInteger(Address(c), p) | |
45 | + | if ($isInstanceOf(q, "Int")) | |
42 | 46 | then { | |
43 | - | let | |
44 | - | | |
47 | + | let r = q | |
48 | + | r | |
45 | 49 | } | |
46 | 50 | else 0 | |
47 | 51 | } | |
48 | 52 | ||
49 | 53 | ||
50 | - | func | |
51 | - | let | |
52 | - | if ($isInstanceOf( | |
54 | + | func t (p) = { | |
55 | + | let q = getString(this, p) | |
56 | + | if ($isInstanceOf(q, "String")) | |
53 | 57 | then { | |
54 | - | let | |
55 | - | | |
58 | + | let r = q | |
59 | + | r | |
56 | 60 | } | |
57 | 61 | else "" | |
58 | 62 | } | |
59 | 63 | ||
60 | 64 | ||
61 | - | func | |
62 | - | let | |
63 | - | if ($isInstanceOf( | |
65 | + | func u (p) = { | |
66 | + | let q = getInteger(this, p) | |
67 | + | if ($isInstanceOf(q, "Int")) | |
64 | 68 | then { | |
65 | - | let | |
66 | - | | |
69 | + | let r = q | |
70 | + | r | |
67 | 71 | } | |
68 | 72 | else 0 | |
69 | 73 | } | |
70 | 74 | ||
71 | 75 | ||
72 | - | func | |
76 | + | func v (w,x) = ((x + "_") + toBase58String(w)) | |
73 | 77 | ||
74 | 78 | ||
75 | - | func | |
79 | + | func y (w,x) = (v(w, x) + "_Owner") | |
76 | 80 | ||
77 | 81 | ||
78 | - | func | |
82 | + | func z (A) = (A + "_Owner") | |
79 | 83 | ||
80 | 84 | ||
81 | - | func | |
85 | + | func B (C,w,x) = (((C + "_") + v(w, x)) + "_fh") | |
82 | 86 | ||
83 | 87 | ||
84 | - | func | |
88 | + | func D (C,w,x) = (((C + "_") + v(w, x)) + "_status") | |
85 | 89 | ||
86 | 90 | ||
87 | - | func | |
91 | + | func E (F) = (F + "_Treasury") | |
88 | 92 | ||
89 | 93 | ||
90 | - | func | |
94 | + | func G (H) = if (if (if (if ((H == e)) | |
91 | 95 | then true | |
92 | - | else ( | |
96 | + | else (H == this)) | |
93 | 97 | then true | |
94 | - | else ( | |
98 | + | else (H.bytes == c)) | |
95 | 99 | then true | |
96 | - | else ( | |
100 | + | else (H.bytes == b)) | |
97 | 101 | then true | |
98 | - | else ( | |
102 | + | else (H.bytes == d) | |
99 | 103 | ||
100 | 104 | ||
101 | - | func | |
102 | - | let | |
103 | - | if (( | |
104 | - | then throw((((("Building is not finished yet " + toString(( | |
105 | + | func I (H,J,K,L,M) = { | |
106 | + | let N = getIntegerValue(this, M) | |
107 | + | if ((N > height)) | |
108 | + | then throw((((("Building is not finished yet " + toString((N - height))) + " blocks remaining, it will take around ") + toString((N - height))) + " minutes")) | |
105 | 109 | else { | |
106 | - | let | |
107 | - | let | |
108 | - | let | |
109 | - | let | |
110 | - | if (( | |
111 | - | then if (( | |
110 | + | let O = value(indexOf(j, J)) | |
111 | + | let P = n[O] | |
112 | + | let Q = ((k[O] * 20) / 100) | |
113 | + | let R = invoke(Address(b), "Pay", [H, Q], nil) | |
114 | + | if ((R == R)) | |
115 | + | then if ((P > 0)) | |
112 | 116 | then { | |
113 | - | let | |
114 | - | let | |
115 | - | if (( | |
116 | - | then [IntegerEntry( | |
117 | + | let S = s((H + "_Power")) | |
118 | + | let T = invoke(Address(c), "setUserPower", [H, (S + P)], nil) | |
119 | + | if ((T == T)) | |
120 | + | then [IntegerEntry(K, Q), DeleteEntry(L), DeleteEntry(M)] | |
117 | 121 | else throw("Strict value is not equal to itself.") | |
118 | 122 | } | |
119 | - | else [IntegerEntry( | |
123 | + | else [IntegerEntry(K, Q), DeleteEntry(L), DeleteEntry(M)] | |
120 | 124 | else throw("Strict value is not equal to itself.") | |
121 | 125 | } | |
122 | 126 | } | |
123 | 127 | ||
124 | 128 | ||
125 | - | func | |
126 | - | let | |
127 | - | ( | |
129 | + | func U (H,K) = { | |
130 | + | let V = t((K + "_Owner")) | |
131 | + | (V == H) | |
128 | 132 | } | |
129 | 133 | ||
130 | 134 | ||
131 | - | func | |
135 | + | func W (X) = if ((X == "Settler")) | |
132 | 136 | then true | |
133 | - | else ( | |
137 | + | else (X == "Explorer") | |
134 | 138 | ||
135 | 139 | ||
136 | - | func | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | if (( | |
140 | + | func Y (A,Z) = { | |
141 | + | let X = split(A, "_")[0] | |
142 | + | let aa = t(z(A)) | |
143 | + | let P = n[value(indexOf(j, X))] | |
144 | + | if ((P > 0)) | |
141 | 145 | then { | |
142 | - | let | |
143 | - | let | |
144 | - | if (( | |
145 | - | then if (( | |
146 | + | let S = s((aa + "_Power")) | |
147 | + | let T = invoke(Address(c), "setUserPower", [aa, (S - P)], nil) | |
148 | + | if ((T == T)) | |
149 | + | then if ((T != (S - P))) | |
146 | 150 | then throw("Incorrect invoke result") | |
147 | 151 | else { | |
148 | - | let | |
149 | - | let | |
150 | - | if (( | |
152 | + | let ab = s((Z + "_Power")) | |
153 | + | let ac = invoke(Address(c), "setUserPower", [Z, (ab + P)], nil) | |
154 | + | if ((ac == ac)) | |
151 | 155 | then { | |
152 | - | let | |
153 | - | if ($isInstanceOf( | |
156 | + | let q = ac | |
157 | + | if ($isInstanceOf(q, "Int")) | |
154 | 158 | then { | |
155 | - | let | |
156 | - | [StringEntry( | |
159 | + | let ad = q | |
160 | + | [StringEntry(z(A), Z)] | |
157 | 161 | } | |
158 | 162 | else throw("Incorrect invoke result") | |
159 | 163 | } | |
161 | 165 | } | |
162 | 166 | else throw("Strict value is not equal to itself.") | |
163 | 167 | } | |
164 | - | else [StringEntry( | |
168 | + | else [StringEntry(z(A), Z)] | |
165 | 169 | } | |
166 | 170 | ||
167 | 171 | ||
168 | - | @Callable( | |
169 | - | func StartBuild ( | |
170 | - | then throw("This asset is not | |
172 | + | @Callable(ae) | |
173 | + | func StartBuild (X,af,ag) = if (!(containsElement(j, X))) | |
174 | + | then throw("This asset is not managed by the system") | |
171 | 175 | else { | |
172 | - | let ae = value(indexOf(h, V)) | |
173 | - | let af = k[ae] | |
174 | - | let ag = i[ae] | |
175 | - | if (U(V)) | |
176 | - | then if (if (!(S(toString(ac.caller), ad))) | |
177 | - | then !(E(ac.caller)) | |
176 | + | let ah = value(indexOf(j, X)) | |
177 | + | let ai = m[ah] | |
178 | + | let aj = k[ah] | |
179 | + | let ak = ((aj * 5) / 100) | |
180 | + | let al = ((aj * 10) / 100) | |
181 | + | let am = ((aj * 65) / 100) | |
182 | + | let an = (((aj - ak) - al) - am) | |
183 | + | if (W(X)) | |
184 | + | then if (if (!(U(toString(ae.caller), af))) | |
185 | + | then !(G(ae.caller)) | |
178 | 186 | else false) | |
179 | 187 | then throw("You are not authorized to perform this operation") | |
180 | 188 | else { | |
181 | - | let | |
182 | - | if (( | |
189 | + | let ao = o(E(af)) | |
190 | + | if ((aj > ao)) | |
183 | 191 | then throw("The nation hasn't enough funds") | |
184 | 192 | else { | |
185 | - | let | |
186 | - | let | |
187 | - | if ($isInstanceOf( | |
193 | + | let ap = invoke(Address(b), "decreaseNationWallet", [af, aj], nil) | |
194 | + | let q = ap | |
195 | + | if ($isInstanceOf(q, "Int")) | |
188 | 196 | then { | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
197 | + | let ad = q | |
198 | + | let T = invoke(Address(b), "arbitraryAddCoins", [af, an], nil) | |
199 | + | let aq = T | |
200 | + | if ($isInstanceOf(aq, "Int")) | |
193 | 201 | then { | |
194 | - | let p = aj | |
195 | - | [StringEntry(B(toString(ac.originCaller), ac.transactionId, V), f), StringEntry(w(ac.transactionId, V), ad), IntegerEntry(z(toString(ac.originCaller), ac.transactionId, V), (height + af))] | |
202 | + | let r = aq | |
203 | + | let ar = invoke(Address(b), "distributeNationPayRewards", [aj], nil) | |
204 | + | let as = ar | |
205 | + | if ($isInstanceOf(as, "Int")) | |
206 | + | then { | |
207 | + | let at = as | |
208 | + | [StringEntry(D(toString(ae.originCaller), ae.transactionId, X), h), StringEntry(y(ae.transactionId, X), af), IntegerEntry(B(toString(ae.originCaller), ae.transactionId, X), (height + ai))] | |
209 | + | } | |
210 | + | else throw("Error Distributing asset rewards") | |
196 | 211 | } | |
197 | 212 | else throw("Error Depositing nation funds") | |
198 | 213 | } | |
199 | 214 | else throw("Error Depositing nation funds") | |
200 | 215 | } | |
201 | 216 | } | |
202 | - | else { | |
203 | - | let ak = value(ac.payments[0].amount) | |
204 | - | if ((ag > ak)) | |
205 | - | then throw(("You provided less $heg than the needed cost for building this " + V)) | |
206 | - | else if ((ac.payments[0].assetId != a)) | |
207 | - | then throw("Only $HEG payments allowed") | |
208 | - | else { | |
209 | - | let R = invoke(Address(b), "Deposit", nil, ac.payments) | |
210 | - | let o = R | |
211 | - | if ($isInstanceOf(o, "Int")) | |
212 | - | then { | |
213 | - | let ab = o | |
214 | - | [StringEntry(B(toString(ac.originCaller), ac.transactionId, V), f), StringEntry(w(ac.transactionId, V), toString(ac.originCaller)), IntegerEntry(z(toString(ac.originCaller), ac.transactionId, V), (height + af))] | |
215 | - | } | |
216 | - | else throw("Incorrect invoke result") | |
217 | - | } | |
218 | - | } | |
217 | + | else if ((X == "City")) | |
218 | + | then if (!(U(toString(ae.caller), ag))) | |
219 | + | then throw("You don't own the settler or has been destroyed") | |
220 | + | else { | |
221 | + | let au = u(ag) | |
222 | + | let T = invoke(Address(b), "NoPaymentDeposit", [toString(ae.caller), an], nil) | |
223 | + | let q = T | |
224 | + | if ($isInstanceOf(q, "Int")) | |
225 | + | then { | |
226 | + | let ad = q | |
227 | + | let ar = invoke(Address(b), "distributeNationPayRewards", [aj], nil) | |
228 | + | let aq = ar | |
229 | + | if ($isInstanceOf(aq, "Int")) | |
230 | + | then { | |
231 | + | let at = aq | |
232 | + | [DeleteEntry(ag), StringEntry(D(toString(ae.originCaller), ae.transactionId, X), h), StringEntry(y(ae.transactionId, X), af), IntegerEntry(B(toString(ae.originCaller), ae.transactionId, X), (height + ai))] | |
233 | + | } | |
234 | + | else throw("Error Distributing asset rewards") | |
235 | + | } | |
236 | + | else throw("Error adding deposit") | |
237 | + | } | |
238 | + | else { | |
239 | + | let av = value(ae.payments[0].amount) | |
240 | + | if ((aj > av)) | |
241 | + | then throw(("You provided less $heg than the needed cost for building this " + X)) | |
242 | + | else if ((ae.payments[0].assetId != a)) | |
243 | + | then throw("Only $HEG payments allowed") | |
244 | + | else { | |
245 | + | let T = invoke(Address(b), "Deposit", nil, [AttachedPayment(a, an)]) | |
246 | + | let q = T | |
247 | + | if ($isInstanceOf(q, "Int")) | |
248 | + | then { | |
249 | + | let ad = q | |
250 | + | [StringEntry(D(toString(ae.originCaller), ae.transactionId, X), h), StringEntry(y(ae.transactionId, X), toString(ae.originCaller)), IntegerEntry(B(toString(ae.originCaller), ae.transactionId, X), (height + ai)), ScriptTransfer(e, ak, a), ScriptTransfer(f, al, a), ScriptTransfer(g, am, a)] | |
251 | + | } | |
252 | + | else throw("Incorrect invoke result") | |
253 | + | } | |
254 | + | } | |
219 | 255 | } | |
220 | 256 | ||
221 | 257 | ||
222 | 258 | ||
223 | - | @Callable( | |
224 | - | func FinishBuild ( | |
225 | - | let | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | if ( | |
231 | - | then if (if (!( | |
232 | - | then !( | |
259 | + | @Callable(ae) | |
260 | + | func FinishBuild (aw,J,af) = { | |
261 | + | let w = fromBase58String(aw) | |
262 | + | let L = D(toString(ae.caller), w, J) | |
263 | + | let M = B(toString(ae.caller), w, J) | |
264 | + | let K = v(w, J) | |
265 | + | let V = t(y(w, J)) | |
266 | + | if (W(J)) | |
267 | + | then if (if (!(U(toString(ae.caller), af))) | |
268 | + | then !(G(ae.caller)) | |
233 | 269 | else false) | |
234 | 270 | then throw("You are not authorized to perform this operation") | |
235 | - | else | |
236 | - | else if (( | |
237 | - | then throw(("You cannot claim other's players " + | |
271 | + | else I(af, J, K, L, M) | |
272 | + | else if ((V != toString(ae.caller))) | |
273 | + | then throw(("You cannot claim other's players " + J)) | |
238 | 274 | else { | |
239 | - | let | |
240 | - | if (( | |
275 | + | let ax = t(L) | |
276 | + | if ((ax == "")) | |
241 | 277 | then throw("No pending operations for this asset") | |
242 | - | else | |
278 | + | else I(toString(ae.caller), J, K, L, M) | |
243 | 279 | } | |
244 | 280 | } | |
245 | 281 | ||
246 | 282 | ||
247 | 283 | ||
248 | - | @Callable( | |
249 | - | func transferOwnership ( | |
250 | - | let | |
251 | - | if (!( | |
284 | + | @Callable(ae) | |
285 | + | func transferOwnership (A,Z) = { | |
286 | + | let X = split(A, "_")[0] | |
287 | + | if (!(G(ae.caller))) | |
252 | 288 | then throw("Only the admin can perform this operation") | |
253 | - | else $Tuple2( | |
289 | + | else $Tuple2(Y(A, Z), Z) | |
254 | 290 | } | |
255 | 291 | ||
256 | 292 | ||
257 | 293 | ||
258 | - | @Callable( | |
259 | - | func destroyAssetAndTransfer ( | |
260 | - | let | |
261 | - | if (!( | |
294 | + | @Callable(ae) | |
295 | + | func destroyAssetAndTransfer (A,ay) = { | |
296 | + | let X = split(A, "_")[0] | |
297 | + | if (!(G(ae.caller))) | |
262 | 298 | then throw("Only the admin can perform this operation") | |
263 | 299 | else { | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | if (( | |
300 | + | let aa = t(z(A)) | |
301 | + | let Q = u(A) | |
302 | + | let R = invoke(Address(b), "arbitraryAddCoins", [ay, Q], nil) | |
303 | + | if ((R == R)) | |
268 | 304 | then { | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | if (( | |
305 | + | let S = s((aa + "_Power")) | |
306 | + | let P = n[value(indexOf(j, X))] | |
307 | + | let T = invoke(Address(c), "setUserPower", [toString(ae.caller), (S - P)], nil) | |
308 | + | if ((T == T)) | |
273 | 309 | then { | |
274 | - | let | |
275 | - | if ($isInstanceOf( | |
310 | + | let q = T | |
311 | + | if ($isInstanceOf(q, "Int")) | |
276 | 312 | then { | |
277 | - | let | |
278 | - | [DeleteEntry( | |
313 | + | let ad = q | |
314 | + | [DeleteEntry(A)] | |
279 | 315 | } | |
280 | 316 | else throw("Incorrect invoke result") | |
281 | 317 | } | |
287 | 323 | ||
288 | 324 | ||
289 | 325 | ||
290 | - | @Callable( | |
291 | - | func destroyAssetFromUser ( | |
292 | - | let | |
293 | - | if (!( | |
326 | + | @Callable(ae) | |
327 | + | func destroyAssetFromUser (A) = { | |
328 | + | let X = split(A, "_")[0] | |
329 | + | if (!(U(toString(ae.caller), A))) | |
294 | 330 | then throw("You don't own this asset") | |
295 | 331 | else { | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | if (( | |
332 | + | let Q = u(A) | |
333 | + | let S = s((toString(ae.caller) + "_Power")) | |
334 | + | let P = n[value(indexOf(j, X))] | |
335 | + | let T = invoke(Address(c), "setUserPower", [toString(ae.caller), (S - P)], nil) | |
336 | + | if ((T == T)) | |
301 | 337 | then { | |
302 | - | let | |
303 | - | if ($isInstanceOf( | |
338 | + | let q = T | |
339 | + | if ($isInstanceOf(q, "Int")) | |
304 | 340 | then { | |
305 | - | let | |
306 | - | [DeleteEntry( | |
341 | + | let ad = q | |
342 | + | [DeleteEntry(A), ScriptTransfer(ae.caller, Q, a)] | |
307 | 343 | } | |
308 | 344 | else throw("Incorrect invoke result") | |
309 | 345 | } | |
313 | 349 | ||
314 | 350 | ||
315 | 351 | ||
316 | - | @Callable( | |
317 | - | func setNationOwner ( | |
318 | - | then $Tuple2([StringEntry(( | |
352 | + | @Callable(ae) | |
353 | + | func setNationOwner (az,Z) = if (G(ae.caller)) | |
354 | + | then $Tuple2([StringEntry((az + "_Owner"), Z)], true) | |
319 | 355 | else { | |
320 | - | let | |
321 | - | if (( | |
356 | + | let aA = t((az + "_Owner")) | |
357 | + | if ((aA != toString(ae.caller))) | |
322 | 358 | then throw("You are not the nation owner") | |
323 | - | else [StringEntry(( | |
359 | + | else [StringEntry((az + "_Owner"), Z)] | |
324 | 360 | } | |
325 | 361 | ||
326 | 362 | ||
327 | 363 | ||
328 | - | @Callable( | |
329 | - | func buyNationItem ( | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | if (( | |
364 | + | @Callable(ae) | |
365 | + | func buyNationItem (A,af) = { | |
366 | + | let X = split(A, "_")[0] | |
367 | + | let aB = s(toString(ae.caller)) | |
368 | + | let aC = s(af) | |
369 | + | if ((aB != aC)) | |
334 | 370 | then throw("you can buy assets only from your nation") | |
335 | - | else if (!( | |
371 | + | else if (!(U(af, A))) | |
336 | 372 | then throw("The asset does not belong to the nation") | |
337 | - | else if (!( | |
373 | + | else if (!(W(X))) | |
338 | 374 | then throw("this asset cannot be sold by the nation") | |
339 | 375 | else { | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | if (( | |
344 | - | then throw(("You provided less $heg than the needed cost for buying this " + | |
345 | - | else if (( | |
376 | + | let ah = value(indexOf(j, X)) | |
377 | + | let aD = l[ah] | |
378 | + | let av = value(ae.payments[0].amount) | |
379 | + | if ((aD > av)) | |
380 | + | then throw(("You provided less $heg than the needed cost for buying this " + X)) | |
381 | + | else if ((ae.payments[0].assetId != a)) | |
346 | 382 | then throw("Only $HEG payments allowed") | |
347 | 383 | else { | |
348 | - | let | |
349 | - | let | |
350 | - | if ($isInstanceOf( | |
384 | + | let aE = invoke(Address(b), "increaseNationWallet", [af, av], nil) | |
385 | + | let q = aE | |
386 | + | if ($isInstanceOf(q, "Int")) | |
351 | 387 | then { | |
352 | - | let | |
353 | - | ( | |
388 | + | let r = q | |
389 | + | (Y(A, toString(ae.caller)) :+ ScriptTransfer(Address(b), av, a)) | |
354 | 390 | } | |
355 | 391 | else throw("Error transferring SHEG to nations wallet") | |
356 | 392 | } | |
359 | 395 | ||
360 | 396 | ||
361 | 397 | ||
362 | - | @Callable( | |
363 | - | func AddAssetFromMarkeplace ( | |
398 | + | @Callable(ae) | |
399 | + | func AddAssetFromMarkeplace (A,aa,aF) = if (!(G(ae.caller))) | |
364 | 400 | then throw("You are not allowed to perform this operation") | |
365 | - | else $Tuple2([StringEntry( | |
401 | + | else $Tuple2([StringEntry(z(A), aa), IntegerEntry(A, aF)], aa) | |
366 | 402 | ||
367 | 403 | ||
368 | 404 | ||
369 | - | @Callable( | |
370 | - | func TransferAssetToMarketplace ( | |
405 | + | @Callable(ae) | |
406 | + | func TransferAssetToMarketplace (A,aG) = if (!(U(toString(ae.caller), A))) | |
371 | 407 | then throw("You are not the owner of this asset") | |
372 | 408 | else { | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | if ($isInstanceOf( | |
409 | + | let aF = u(A) | |
410 | + | let aH = invoke(Address(d), "putOnSale", [A, aF, aG], nil) | |
411 | + | let q = aH | |
412 | + | if ($isInstanceOf(q, "Int")) | |
377 | 413 | then { | |
378 | - | let | |
379 | - | [DeleteEntry( | |
414 | + | let at = q | |
415 | + | [DeleteEntry(z(A)), DeleteEntry(A)] | |
380 | 416 | } | |
381 | 417 | else throw("Error putting the item on the marketplace") | |
382 | 418 | } |
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 = base58'3Mra7mjPipcQd5sJaRmXK8xgS4scb8gPF4A' | |
11 | 11 | ||
12 | 12 | let e = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = addressFromStringValue("3MuSrXTTiwo9bdoD6FeaBpMUYMiU5saDv2U") | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i") | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = "BUILD_STARTED" | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = "BUILD_FINISHED" | |
21 | 21 | ||
22 | - | let j = [ | |
22 | + | let j = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"] | |
23 | 23 | ||
24 | - | let k = [0, | |
24 | + | let k = [0, 0, 5000000000, 5000000000, 500000000, 10000000000, 100000000] | |
25 | 25 | ||
26 | - | let l = [0, | |
26 | + | let l = [0, 0, 0, 0, 0, 10000000000, 100000000] | |
27 | 27 | ||
28 | - | func m (n) = { | |
29 | - | let o = getInteger(Address(b), n) | |
30 | - | if ($isInstanceOf(o, "Int")) | |
28 | + | let m = [0, 4, 4, 4, 2, 2, 2] | |
29 | + | ||
30 | + | let n = [0, 1000, 50, 50, 1, 1, 1] | |
31 | + | ||
32 | + | func o (p) = { | |
33 | + | let q = getInteger(Address(b), p) | |
34 | + | if ($isInstanceOf(q, "Int")) | |
31 | 35 | then { | |
32 | - | let | |
33 | - | | |
36 | + | let r = q | |
37 | + | r | |
34 | 38 | } | |
35 | 39 | else 0 | |
36 | 40 | } | |
37 | 41 | ||
38 | 42 | ||
39 | - | func | |
40 | - | let | |
41 | - | if ($isInstanceOf( | |
43 | + | func s (p) = { | |
44 | + | let q = getInteger(Address(c), p) | |
45 | + | if ($isInstanceOf(q, "Int")) | |
42 | 46 | then { | |
43 | - | let | |
44 | - | | |
47 | + | let r = q | |
48 | + | r | |
45 | 49 | } | |
46 | 50 | else 0 | |
47 | 51 | } | |
48 | 52 | ||
49 | 53 | ||
50 | - | func | |
51 | - | let | |
52 | - | if ($isInstanceOf( | |
54 | + | func t (p) = { | |
55 | + | let q = getString(this, p) | |
56 | + | if ($isInstanceOf(q, "String")) | |
53 | 57 | then { | |
54 | - | let | |
55 | - | | |
58 | + | let r = q | |
59 | + | r | |
56 | 60 | } | |
57 | 61 | else "" | |
58 | 62 | } | |
59 | 63 | ||
60 | 64 | ||
61 | - | func | |
62 | - | let | |
63 | - | if ($isInstanceOf( | |
65 | + | func u (p) = { | |
66 | + | let q = getInteger(this, p) | |
67 | + | if ($isInstanceOf(q, "Int")) | |
64 | 68 | then { | |
65 | - | let | |
66 | - | | |
69 | + | let r = q | |
70 | + | r | |
67 | 71 | } | |
68 | 72 | else 0 | |
69 | 73 | } | |
70 | 74 | ||
71 | 75 | ||
72 | - | func | |
76 | + | func v (w,x) = ((x + "_") + toBase58String(w)) | |
73 | 77 | ||
74 | 78 | ||
75 | - | func | |
79 | + | func y (w,x) = (v(w, x) + "_Owner") | |
76 | 80 | ||
77 | 81 | ||
78 | - | func | |
82 | + | func z (A) = (A + "_Owner") | |
79 | 83 | ||
80 | 84 | ||
81 | - | func | |
85 | + | func B (C,w,x) = (((C + "_") + v(w, x)) + "_fh") | |
82 | 86 | ||
83 | 87 | ||
84 | - | func | |
88 | + | func D (C,w,x) = (((C + "_") + v(w, x)) + "_status") | |
85 | 89 | ||
86 | 90 | ||
87 | - | func | |
91 | + | func E (F) = (F + "_Treasury") | |
88 | 92 | ||
89 | 93 | ||
90 | - | func | |
94 | + | func G (H) = if (if (if (if ((H == e)) | |
91 | 95 | then true | |
92 | - | else ( | |
96 | + | else (H == this)) | |
93 | 97 | then true | |
94 | - | else ( | |
98 | + | else (H.bytes == c)) | |
95 | 99 | then true | |
96 | - | else ( | |
100 | + | else (H.bytes == b)) | |
97 | 101 | then true | |
98 | - | else ( | |
102 | + | else (H.bytes == d) | |
99 | 103 | ||
100 | 104 | ||
101 | - | func | |
102 | - | let | |
103 | - | if (( | |
104 | - | then throw((((("Building is not finished yet " + toString(( | |
105 | + | func I (H,J,K,L,M) = { | |
106 | + | let N = getIntegerValue(this, M) | |
107 | + | if ((N > height)) | |
108 | + | then throw((((("Building is not finished yet " + toString((N - height))) + " blocks remaining, it will take around ") + toString((N - height))) + " minutes")) | |
105 | 109 | else { | |
106 | - | let | |
107 | - | let | |
108 | - | let | |
109 | - | let | |
110 | - | if (( | |
111 | - | then if (( | |
110 | + | let O = value(indexOf(j, J)) | |
111 | + | let P = n[O] | |
112 | + | let Q = ((k[O] * 20) / 100) | |
113 | + | let R = invoke(Address(b), "Pay", [H, Q], nil) | |
114 | + | if ((R == R)) | |
115 | + | then if ((P > 0)) | |
112 | 116 | then { | |
113 | - | let | |
114 | - | let | |
115 | - | if (( | |
116 | - | then [IntegerEntry( | |
117 | + | let S = s((H + "_Power")) | |
118 | + | let T = invoke(Address(c), "setUserPower", [H, (S + P)], nil) | |
119 | + | if ((T == T)) | |
120 | + | then [IntegerEntry(K, Q), DeleteEntry(L), DeleteEntry(M)] | |
117 | 121 | else throw("Strict value is not equal to itself.") | |
118 | 122 | } | |
119 | - | else [IntegerEntry( | |
123 | + | else [IntegerEntry(K, Q), DeleteEntry(L), DeleteEntry(M)] | |
120 | 124 | else throw("Strict value is not equal to itself.") | |
121 | 125 | } | |
122 | 126 | } | |
123 | 127 | ||
124 | 128 | ||
125 | - | func | |
126 | - | let | |
127 | - | ( | |
129 | + | func U (H,K) = { | |
130 | + | let V = t((K + "_Owner")) | |
131 | + | (V == H) | |
128 | 132 | } | |
129 | 133 | ||
130 | 134 | ||
131 | - | func | |
135 | + | func W (X) = if ((X == "Settler")) | |
132 | 136 | then true | |
133 | - | else ( | |
137 | + | else (X == "Explorer") | |
134 | 138 | ||
135 | 139 | ||
136 | - | func | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
140 | - | if (( | |
140 | + | func Y (A,Z) = { | |
141 | + | let X = split(A, "_")[0] | |
142 | + | let aa = t(z(A)) | |
143 | + | let P = n[value(indexOf(j, X))] | |
144 | + | if ((P > 0)) | |
141 | 145 | then { | |
142 | - | let | |
143 | - | let | |
144 | - | if (( | |
145 | - | then if (( | |
146 | + | let S = s((aa + "_Power")) | |
147 | + | let T = invoke(Address(c), "setUserPower", [aa, (S - P)], nil) | |
148 | + | if ((T == T)) | |
149 | + | then if ((T != (S - P))) | |
146 | 150 | then throw("Incorrect invoke result") | |
147 | 151 | else { | |
148 | - | let | |
149 | - | let | |
150 | - | if (( | |
152 | + | let ab = s((Z + "_Power")) | |
153 | + | let ac = invoke(Address(c), "setUserPower", [Z, (ab + P)], nil) | |
154 | + | if ((ac == ac)) | |
151 | 155 | then { | |
152 | - | let | |
153 | - | if ($isInstanceOf( | |
156 | + | let q = ac | |
157 | + | if ($isInstanceOf(q, "Int")) | |
154 | 158 | then { | |
155 | - | let | |
156 | - | [StringEntry( | |
159 | + | let ad = q | |
160 | + | [StringEntry(z(A), Z)] | |
157 | 161 | } | |
158 | 162 | else throw("Incorrect invoke result") | |
159 | 163 | } | |
160 | 164 | else throw("Strict value is not equal to itself.") | |
161 | 165 | } | |
162 | 166 | else throw("Strict value is not equal to itself.") | |
163 | 167 | } | |
164 | - | else [StringEntry( | |
168 | + | else [StringEntry(z(A), Z)] | |
165 | 169 | } | |
166 | 170 | ||
167 | 171 | ||
168 | - | @Callable( | |
169 | - | func StartBuild ( | |
170 | - | then throw("This asset is not | |
172 | + | @Callable(ae) | |
173 | + | func StartBuild (X,af,ag) = if (!(containsElement(j, X))) | |
174 | + | then throw("This asset is not managed by the system") | |
171 | 175 | else { | |
172 | - | let ae = value(indexOf(h, V)) | |
173 | - | let af = k[ae] | |
174 | - | let ag = i[ae] | |
175 | - | if (U(V)) | |
176 | - | then if (if (!(S(toString(ac.caller), ad))) | |
177 | - | then !(E(ac.caller)) | |
176 | + | let ah = value(indexOf(j, X)) | |
177 | + | let ai = m[ah] | |
178 | + | let aj = k[ah] | |
179 | + | let ak = ((aj * 5) / 100) | |
180 | + | let al = ((aj * 10) / 100) | |
181 | + | let am = ((aj * 65) / 100) | |
182 | + | let an = (((aj - ak) - al) - am) | |
183 | + | if (W(X)) | |
184 | + | then if (if (!(U(toString(ae.caller), af))) | |
185 | + | then !(G(ae.caller)) | |
178 | 186 | else false) | |
179 | 187 | then throw("You are not authorized to perform this operation") | |
180 | 188 | else { | |
181 | - | let | |
182 | - | if (( | |
189 | + | let ao = o(E(af)) | |
190 | + | if ((aj > ao)) | |
183 | 191 | then throw("The nation hasn't enough funds") | |
184 | 192 | else { | |
185 | - | let | |
186 | - | let | |
187 | - | if ($isInstanceOf( | |
193 | + | let ap = invoke(Address(b), "decreaseNationWallet", [af, aj], nil) | |
194 | + | let q = ap | |
195 | + | if ($isInstanceOf(q, "Int")) | |
188 | 196 | then { | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
197 | + | let ad = q | |
198 | + | let T = invoke(Address(b), "arbitraryAddCoins", [af, an], nil) | |
199 | + | let aq = T | |
200 | + | if ($isInstanceOf(aq, "Int")) | |
193 | 201 | then { | |
194 | - | let p = aj | |
195 | - | [StringEntry(B(toString(ac.originCaller), ac.transactionId, V), f), StringEntry(w(ac.transactionId, V), ad), IntegerEntry(z(toString(ac.originCaller), ac.transactionId, V), (height + af))] | |
202 | + | let r = aq | |
203 | + | let ar = invoke(Address(b), "distributeNationPayRewards", [aj], nil) | |
204 | + | let as = ar | |
205 | + | if ($isInstanceOf(as, "Int")) | |
206 | + | then { | |
207 | + | let at = as | |
208 | + | [StringEntry(D(toString(ae.originCaller), ae.transactionId, X), h), StringEntry(y(ae.transactionId, X), af), IntegerEntry(B(toString(ae.originCaller), ae.transactionId, X), (height + ai))] | |
209 | + | } | |
210 | + | else throw("Error Distributing asset rewards") | |
196 | 211 | } | |
197 | 212 | else throw("Error Depositing nation funds") | |
198 | 213 | } | |
199 | 214 | else throw("Error Depositing nation funds") | |
200 | 215 | } | |
201 | 216 | } | |
202 | - | else { | |
203 | - | let ak = value(ac.payments[0].amount) | |
204 | - | if ((ag > ak)) | |
205 | - | then throw(("You provided less $heg than the needed cost for building this " + V)) | |
206 | - | else if ((ac.payments[0].assetId != a)) | |
207 | - | then throw("Only $HEG payments allowed") | |
208 | - | else { | |
209 | - | let R = invoke(Address(b), "Deposit", nil, ac.payments) | |
210 | - | let o = R | |
211 | - | if ($isInstanceOf(o, "Int")) | |
212 | - | then { | |
213 | - | let ab = o | |
214 | - | [StringEntry(B(toString(ac.originCaller), ac.transactionId, V), f), StringEntry(w(ac.transactionId, V), toString(ac.originCaller)), IntegerEntry(z(toString(ac.originCaller), ac.transactionId, V), (height + af))] | |
215 | - | } | |
216 | - | else throw("Incorrect invoke result") | |
217 | - | } | |
218 | - | } | |
217 | + | else if ((X == "City")) | |
218 | + | then if (!(U(toString(ae.caller), ag))) | |
219 | + | then throw("You don't own the settler or has been destroyed") | |
220 | + | else { | |
221 | + | let au = u(ag) | |
222 | + | let T = invoke(Address(b), "NoPaymentDeposit", [toString(ae.caller), an], nil) | |
223 | + | let q = T | |
224 | + | if ($isInstanceOf(q, "Int")) | |
225 | + | then { | |
226 | + | let ad = q | |
227 | + | let ar = invoke(Address(b), "distributeNationPayRewards", [aj], nil) | |
228 | + | let aq = ar | |
229 | + | if ($isInstanceOf(aq, "Int")) | |
230 | + | then { | |
231 | + | let at = aq | |
232 | + | [DeleteEntry(ag), StringEntry(D(toString(ae.originCaller), ae.transactionId, X), h), StringEntry(y(ae.transactionId, X), af), IntegerEntry(B(toString(ae.originCaller), ae.transactionId, X), (height + ai))] | |
233 | + | } | |
234 | + | else throw("Error Distributing asset rewards") | |
235 | + | } | |
236 | + | else throw("Error adding deposit") | |
237 | + | } | |
238 | + | else { | |
239 | + | let av = value(ae.payments[0].amount) | |
240 | + | if ((aj > av)) | |
241 | + | then throw(("You provided less $heg than the needed cost for building this " + X)) | |
242 | + | else if ((ae.payments[0].assetId != a)) | |
243 | + | then throw("Only $HEG payments allowed") | |
244 | + | else { | |
245 | + | let T = invoke(Address(b), "Deposit", nil, [AttachedPayment(a, an)]) | |
246 | + | let q = T | |
247 | + | if ($isInstanceOf(q, "Int")) | |
248 | + | then { | |
249 | + | let ad = q | |
250 | + | [StringEntry(D(toString(ae.originCaller), ae.transactionId, X), h), StringEntry(y(ae.transactionId, X), toString(ae.originCaller)), IntegerEntry(B(toString(ae.originCaller), ae.transactionId, X), (height + ai)), ScriptTransfer(e, ak, a), ScriptTransfer(f, al, a), ScriptTransfer(g, am, a)] | |
251 | + | } | |
252 | + | else throw("Incorrect invoke result") | |
253 | + | } | |
254 | + | } | |
219 | 255 | } | |
220 | 256 | ||
221 | 257 | ||
222 | 258 | ||
223 | - | @Callable( | |
224 | - | func FinishBuild ( | |
225 | - | let | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | if ( | |
231 | - | then if (if (!( | |
232 | - | then !( | |
259 | + | @Callable(ae) | |
260 | + | func FinishBuild (aw,J,af) = { | |
261 | + | let w = fromBase58String(aw) | |
262 | + | let L = D(toString(ae.caller), w, J) | |
263 | + | let M = B(toString(ae.caller), w, J) | |
264 | + | let K = v(w, J) | |
265 | + | let V = t(y(w, J)) | |
266 | + | if (W(J)) | |
267 | + | then if (if (!(U(toString(ae.caller), af))) | |
268 | + | then !(G(ae.caller)) | |
233 | 269 | else false) | |
234 | 270 | then throw("You are not authorized to perform this operation") | |
235 | - | else | |
236 | - | else if (( | |
237 | - | then throw(("You cannot claim other's players " + | |
271 | + | else I(af, J, K, L, M) | |
272 | + | else if ((V != toString(ae.caller))) | |
273 | + | then throw(("You cannot claim other's players " + J)) | |
238 | 274 | else { | |
239 | - | let | |
240 | - | if (( | |
275 | + | let ax = t(L) | |
276 | + | if ((ax == "")) | |
241 | 277 | then throw("No pending operations for this asset") | |
242 | - | else | |
278 | + | else I(toString(ae.caller), J, K, L, M) | |
243 | 279 | } | |
244 | 280 | } | |
245 | 281 | ||
246 | 282 | ||
247 | 283 | ||
248 | - | @Callable( | |
249 | - | func transferOwnership ( | |
250 | - | let | |
251 | - | if (!( | |
284 | + | @Callable(ae) | |
285 | + | func transferOwnership (A,Z) = { | |
286 | + | let X = split(A, "_")[0] | |
287 | + | if (!(G(ae.caller))) | |
252 | 288 | then throw("Only the admin can perform this operation") | |
253 | - | else $Tuple2( | |
289 | + | else $Tuple2(Y(A, Z), Z) | |
254 | 290 | } | |
255 | 291 | ||
256 | 292 | ||
257 | 293 | ||
258 | - | @Callable( | |
259 | - | func destroyAssetAndTransfer ( | |
260 | - | let | |
261 | - | if (!( | |
294 | + | @Callable(ae) | |
295 | + | func destroyAssetAndTransfer (A,ay) = { | |
296 | + | let X = split(A, "_")[0] | |
297 | + | if (!(G(ae.caller))) | |
262 | 298 | then throw("Only the admin can perform this operation") | |
263 | 299 | else { | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | if (( | |
300 | + | let aa = t(z(A)) | |
301 | + | let Q = u(A) | |
302 | + | let R = invoke(Address(b), "arbitraryAddCoins", [ay, Q], nil) | |
303 | + | if ((R == R)) | |
268 | 304 | then { | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | if (( | |
305 | + | let S = s((aa + "_Power")) | |
306 | + | let P = n[value(indexOf(j, X))] | |
307 | + | let T = invoke(Address(c), "setUserPower", [toString(ae.caller), (S - P)], nil) | |
308 | + | if ((T == T)) | |
273 | 309 | then { | |
274 | - | let | |
275 | - | if ($isInstanceOf( | |
310 | + | let q = T | |
311 | + | if ($isInstanceOf(q, "Int")) | |
276 | 312 | then { | |
277 | - | let | |
278 | - | [DeleteEntry( | |
313 | + | let ad = q | |
314 | + | [DeleteEntry(A)] | |
279 | 315 | } | |
280 | 316 | else throw("Incorrect invoke result") | |
281 | 317 | } | |
282 | 318 | else throw("Strict value is not equal to itself.") | |
283 | 319 | } | |
284 | 320 | else throw("Strict value is not equal to itself.") | |
285 | 321 | } | |
286 | 322 | } | |
287 | 323 | ||
288 | 324 | ||
289 | 325 | ||
290 | - | @Callable( | |
291 | - | func destroyAssetFromUser ( | |
292 | - | let | |
293 | - | if (!( | |
326 | + | @Callable(ae) | |
327 | + | func destroyAssetFromUser (A) = { | |
328 | + | let X = split(A, "_")[0] | |
329 | + | if (!(U(toString(ae.caller), A))) | |
294 | 330 | then throw("You don't own this asset") | |
295 | 331 | else { | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | if (( | |
332 | + | let Q = u(A) | |
333 | + | let S = s((toString(ae.caller) + "_Power")) | |
334 | + | let P = n[value(indexOf(j, X))] | |
335 | + | let T = invoke(Address(c), "setUserPower", [toString(ae.caller), (S - P)], nil) | |
336 | + | if ((T == T)) | |
301 | 337 | then { | |
302 | - | let | |
303 | - | if ($isInstanceOf( | |
338 | + | let q = T | |
339 | + | if ($isInstanceOf(q, "Int")) | |
304 | 340 | then { | |
305 | - | let | |
306 | - | [DeleteEntry( | |
341 | + | let ad = q | |
342 | + | [DeleteEntry(A), ScriptTransfer(ae.caller, Q, a)] | |
307 | 343 | } | |
308 | 344 | else throw("Incorrect invoke result") | |
309 | 345 | } | |
310 | 346 | else throw("Strict value is not equal to itself.") | |
311 | 347 | } | |
312 | 348 | } | |
313 | 349 | ||
314 | 350 | ||
315 | 351 | ||
316 | - | @Callable( | |
317 | - | func setNationOwner ( | |
318 | - | then $Tuple2([StringEntry(( | |
352 | + | @Callable(ae) | |
353 | + | func setNationOwner (az,Z) = if (G(ae.caller)) | |
354 | + | then $Tuple2([StringEntry((az + "_Owner"), Z)], true) | |
319 | 355 | else { | |
320 | - | let | |
321 | - | if (( | |
356 | + | let aA = t((az + "_Owner")) | |
357 | + | if ((aA != toString(ae.caller))) | |
322 | 358 | then throw("You are not the nation owner") | |
323 | - | else [StringEntry(( | |
359 | + | else [StringEntry((az + "_Owner"), Z)] | |
324 | 360 | } | |
325 | 361 | ||
326 | 362 | ||
327 | 363 | ||
328 | - | @Callable( | |
329 | - | func buyNationItem ( | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | if (( | |
364 | + | @Callable(ae) | |
365 | + | func buyNationItem (A,af) = { | |
366 | + | let X = split(A, "_")[0] | |
367 | + | let aB = s(toString(ae.caller)) | |
368 | + | let aC = s(af) | |
369 | + | if ((aB != aC)) | |
334 | 370 | then throw("you can buy assets only from your nation") | |
335 | - | else if (!( | |
371 | + | else if (!(U(af, A))) | |
336 | 372 | then throw("The asset does not belong to the nation") | |
337 | - | else if (!( | |
373 | + | else if (!(W(X))) | |
338 | 374 | then throw("this asset cannot be sold by the nation") | |
339 | 375 | else { | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | if (( | |
344 | - | then throw(("You provided less $heg than the needed cost for buying this " + | |
345 | - | else if (( | |
376 | + | let ah = value(indexOf(j, X)) | |
377 | + | let aD = l[ah] | |
378 | + | let av = value(ae.payments[0].amount) | |
379 | + | if ((aD > av)) | |
380 | + | then throw(("You provided less $heg than the needed cost for buying this " + X)) | |
381 | + | else if ((ae.payments[0].assetId != a)) | |
346 | 382 | then throw("Only $HEG payments allowed") | |
347 | 383 | else { | |
348 | - | let | |
349 | - | let | |
350 | - | if ($isInstanceOf( | |
384 | + | let aE = invoke(Address(b), "increaseNationWallet", [af, av], nil) | |
385 | + | let q = aE | |
386 | + | if ($isInstanceOf(q, "Int")) | |
351 | 387 | then { | |
352 | - | let | |
353 | - | ( | |
388 | + | let r = q | |
389 | + | (Y(A, toString(ae.caller)) :+ ScriptTransfer(Address(b), av, a)) | |
354 | 390 | } | |
355 | 391 | else throw("Error transferring SHEG to nations wallet") | |
356 | 392 | } | |
357 | 393 | } | |
358 | 394 | } | |
359 | 395 | ||
360 | 396 | ||
361 | 397 | ||
362 | - | @Callable( | |
363 | - | func AddAssetFromMarkeplace ( | |
398 | + | @Callable(ae) | |
399 | + | func AddAssetFromMarkeplace (A,aa,aF) = if (!(G(ae.caller))) | |
364 | 400 | then throw("You are not allowed to perform this operation") | |
365 | - | else $Tuple2([StringEntry( | |
401 | + | else $Tuple2([StringEntry(z(A), aa), IntegerEntry(A, aF)], aa) | |
366 | 402 | ||
367 | 403 | ||
368 | 404 | ||
369 | - | @Callable( | |
370 | - | func TransferAssetToMarketplace ( | |
405 | + | @Callable(ae) | |
406 | + | func TransferAssetToMarketplace (A,aG) = if (!(U(toString(ae.caller), A))) | |
371 | 407 | then throw("You are not the owner of this asset") | |
372 | 408 | else { | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | if ($isInstanceOf( | |
409 | + | let aF = u(A) | |
410 | + | let aH = invoke(Address(d), "putOnSale", [A, aF, aG], nil) | |
411 | + | let q = aH | |
412 | + | if ($isInstanceOf(q, "Int")) | |
377 | 413 | then { | |
378 | - | let | |
379 | - | [DeleteEntry( | |
414 | + | let at = q | |
415 | + | [DeleteEntry(z(A)), DeleteEntry(A)] | |
380 | 416 | } | |
381 | 417 | else throw("Error putting the item on the marketplace") | |
382 | 418 | } | |
383 | 419 | ||
384 | 420 |
github/deemru/w8io/169f3d6 186.94 ms ◑