tx · 8XmqysgwQm94Qkr29QqrJWTciKCykZ6tVgp5xWu78qjH 3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb: -0.02300000 Waves 2022.06.24 18:23 [2110677] smart account 3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb > SELF 0.00000000 Waves
{ "type": 13, "id": "8XmqysgwQm94Qkr29QqrJWTciKCykZ6tVgp5xWu78qjH", "fee": 2300000, "feeAssetId": null, "timestamp": 1656084296225, "version": 2, "chainId": 84, "sender": "3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb", "senderPublicKey": "FWSsBbeCwLVkekWhvNKtX6JkrZiruRybKKVuiS3F4bqN", "proofs": [ "3WFyDPzTrSjJ68pYUupLw3DMqTms9DWok6BewTgemgtprnPgubs171i34kUWGaLjtj1c7yx7qzifckae7UdrqANj" ], "script": "base64:AAIFAAAAAAAAAD0IAhIGCgQIAQgIEgYKBAgIAQgSBAoCCAgSBAoCCAgSBAoCCAESBAoCCAgSBAoCCAgSBQoDCAgBEgQKAggBAAAAJgAAAAAKc2hpbnl3Z2dpZAEAAAAgiWnPAv+2urnUcZbXebiZdiawdNB3efRzbobw9HOfBiYAAAAAD3RyZWFzdXJ5QWRkcmVzcwEAAAAaAVRl+PAWCwTAWUJwGp5IjJf/ftwcYvLdu/0AAAAADWFzc2V0c0FkZHJlc3MBAAAAGgFUy+a0wXfXHSctaxYQS8qRSOspiwoalaeaAAAAABJtYXJrZXRwbGFjZUFkZHJlc3MBAAAAGgFUHSG5k/H8GMOnG0lxFkOWUXTrrFQuJbzvAAAAABRjb25maWd1cmF0aW9uQWRkcmVzcwEAAAAaAVTbIMuXkVY/Qg5sp2U1gothv7V0cji00C4AAAAADm5hdGlvbnNBZGRyZXNzAQAAABoBVE2F6N70+ERrWRA7cF/Dt7llDlH1REZtoAAAAAALYWRtaW5XYWxsZXQJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNNcE50aVBTUlNxNk5uYVFZazM4QmZXU3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AAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAAClFcnJvciBwdXR0aW5nIHRoZSBpdGVtIG9uIHRoZSBtYXJrZXRwbGFjZQAAAABYXPeZ", "height": 2110677, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A6k1ebbNzaMxRJt1oUp1pt2rAc6WeJDxy9uHLensCESy Next: 9V4rRnjSVvsvhfkaGBXNkPC2KJZKuPCXuGHtTobFXRsN Diff:
Old | New | Differences | |
---|---|---|---|
284 | 284 | } | |
285 | 285 | ||
286 | 286 | ||
287 | - | func CheckAssetBuildable (Name,Level,Caller,NationKey,SacrificeKey) = if ((NationKey | |
287 | + | func CheckAssetBuildable (Name,Level,Caller,NationKey,SacrificeKey) = if ((NationKey != "")) | |
288 | 288 | then CheckAssetBuildableNation(Name, Level, NationKey, SacrificeKey) | |
289 | 289 | else CheckAssetBuildableUser(Name, Level, Caller, SacrificeKey) | |
290 | 290 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let shinywggid = base58'AFQS5E4ELtxex3iANtWtUU2V2oWJZSo8VVnK8z3VFmqf' | |
5 | 5 | ||
6 | 6 | let treasuryAddress = base58'3MyDGEoKp1gF4LSRknk9vSuDEyrwuYXcQEQ' | |
7 | 7 | ||
8 | 8 | let assetsAddress = base58'3N8WDKbqGox5Eky326PHHT7rUyrby5MXdmb' | |
9 | 9 | ||
10 | 10 | let marketplaceAddress = base58'3Mra7mjPipcQd5sJaRmXK8xgS4scb8gPF4A' | |
11 | 11 | ||
12 | 12 | let configurationAddress = base58'3N9tj3b2djcaZozn97VkYchL9S1i6cdEbC1' | |
13 | 13 | ||
14 | 14 | let nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy' | |
15 | 15 | ||
16 | 16 | let adminWallet = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
17 | 17 | ||
18 | 18 | let dailyGameRewardsWallet = addressFromStringValue("3MuSrXTTiwo9bdoD6FeaBpMUYMiU5saDv2U") | |
19 | 19 | ||
20 | 20 | let dailyStakingRewardsWallet = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i") | |
21 | 21 | ||
22 | 22 | func checkAdmin (caller) = if (if (if (if (if ((caller == adminWallet)) | |
23 | 23 | then true | |
24 | 24 | else (caller == this)) | |
25 | 25 | then true | |
26 | 26 | else (caller.bytes == assetsAddress)) | |
27 | 27 | then true | |
28 | 28 | else (caller.bytes == treasuryAddress)) | |
29 | 29 | then true | |
30 | 30 | else (caller.bytes == marketplaceAddress)) | |
31 | 31 | then true | |
32 | 32 | else (caller.bytes == nationsAddress) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func tryGetInteger (key) = match getInteger(this, key) { | |
36 | 36 | case b: Int => | |
37 | 37 | b | |
38 | 38 | case _ => | |
39 | 39 | 0 | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
44 | 44 | case b: Boolean => | |
45 | 45 | b | |
46 | 46 | case _ => | |
47 | 47 | false | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func tryGetString (key) = match getString(this, key) { | |
52 | 52 | case b: String => | |
53 | 53 | b | |
54 | 54 | case _ => | |
55 | 55 | "" | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getALKey (Name,Level) = ((Name + "_lvl") + toString(Level)) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func confTryGetInteger (key) = match getInteger(Address(configurationAddress), key) { | |
63 | 63 | case b: Int => | |
64 | 64 | b | |
65 | 65 | case _ => | |
66 | 66 | 0 | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func confTryGetString (key) = match getString(Address(configurationAddress), key) { | |
71 | 71 | case b: String => | |
72 | 72 | b | |
73 | 73 | case _ => | |
74 | 74 | "" | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func confTryGetBoolean (key) = match getBoolean(Address(configurationAddress), key) { | |
79 | 79 | case b: Boolean => | |
80 | 80 | b | |
81 | 81 | case _ => | |
82 | 82 | false | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getTreasuryKey (nationid) = (nationid + "_Treasury") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func treasuryTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) { | |
90 | 90 | case b: Int => | |
91 | 91 | b | |
92 | 92 | case _ => | |
93 | 93 | 0 | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func nationsTryGetInteger (key) = match getInteger(Address(nationsAddress), key) { | |
98 | 98 | case b: Int => | |
99 | 99 | b | |
100 | 100 | case _ => | |
101 | 101 | 0 | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func nationsTryGetBoolean (key) = match getBoolean(Address(nationsAddress), key) { | |
106 | 106 | case b: Boolean => | |
107 | 107 | b | |
108 | 108 | case _ => | |
109 | 109 | false | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func nationsTryGetString (key) = match getString(Address(nationsAddress), key) { | |
114 | 114 | case b: String => | |
115 | 115 | b | |
116 | 116 | case _ => | |
117 | 117 | "" | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getAssetOwnerKeyString (assetId) = (assetId + "_Owner") | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | let BuildStarted = "BUILD_STARTED" | |
125 | 125 | ||
126 | 126 | let BuildFinished = "BUILD_FINISHED" | |
127 | 127 | ||
128 | 128 | func getAssetIdKey (txId,assetType) = ((assetType + "_") + toBase58String(txId)) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getAssetOwnerKey (txId,assetType) = (getAssetIdKey(txId, assetType) + "_Owner") | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getBuildingFinishHeightKey (address,txId,assetType) = (((address + "_") + getAssetIdKey(txId, assetType)) + "_fh") | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getBuildingStatusKey (address,txId,assetType) = (((address + "_") + getAssetIdKey(txId, assetType)) + "_status") | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getAssetTypeLevel (assetStr) = { | |
141 | 141 | let chunks = split(assetStr, "_") | |
142 | 142 | let strAssetType = chunks[0] | |
143 | 143 | let level = parseIntValue(drop(chunks[1], 3)) | |
144 | 144 | $Tuple2(strAssetType, level) | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func internalFinishBuild (caller,assetStr,assetKey,BuildingStatusKey,finishHeightKey,transactionId) = { | |
149 | 149 | let chunks = getAssetTypeLevel(assetStr) | |
150 | 150 | let strAssetType = chunks._1 | |
151 | 151 | let level = chunks._2 | |
152 | 152 | let buildingFinishHeight = getIntegerValue(this, finishHeightKey) | |
153 | 153 | if ((buildingFinishHeight > height)) | |
154 | 154 | then throw((((("Building is not finished yet " + toString((buildingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((buildingFinishHeight - height))) + " minutes")) | |
155 | 155 | else if ((take(strAssetType, 4) == "TECH")) | |
156 | 156 | then { | |
157 | 157 | let discovered = invoke(Address(nationsAddress), "setTecnhnologyDiscovered", [caller, assetStr], nil) | |
158 | 158 | if ((discovered == true)) | |
159 | 159 | then [DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)] | |
160 | 160 | else throw("error discovering technology") | |
161 | 161 | } | |
162 | 162 | else { | |
163 | 163 | let assetPower = confTryGetInteger((assetStr + "_Power")) | |
164 | 164 | let assetCoins = ((confTryGetInteger((assetStr + "_Cost")) * 20) / 100) | |
165 | 165 | let refCall = invoke(Address(treasuryAddress), "Pay", [caller, assetCoins], nil) | |
166 | 166 | if ((refCall == refCall)) | |
167 | 167 | then if ((assetPower > 0)) | |
168 | 168 | then { | |
169 | 169 | let currentPower = nationsTryGetInteger((caller + "_Power")) | |
170 | 170 | let pw = invoke(Address(nationsAddress), "setUserPower", [caller, (currentPower + assetPower)], nil) | |
171 | 171 | if ((pw == pw)) | |
172 | 172 | then if (confTryGetBoolean((assetStr + "_Aggregated"))) | |
173 | 173 | then { | |
174 | 174 | let aggrAssetkey = ((assetStr + "_") + caller) | |
175 | 175 | let coins = tryGetInteger(aggrAssetkey) | |
176 | 176 | let qty = tryGetInteger((aggrAssetkey + "_Qty")) | |
177 | 177 | [DeleteEntry(getAssetOwnerKey(transactionId, assetStr)), StringEntry((aggrAssetkey + "_Owner"), caller), IntegerEntry(aggrAssetkey, (coins + assetCoins)), IntegerEntry((aggrAssetkey + "_Qty"), (qty + 1)), DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)] | |
178 | 178 | } | |
179 | 179 | else [IntegerEntry(assetKey, assetCoins), DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)] | |
180 | 180 | else throw("Strict value is not equal to itself.") | |
181 | 181 | } | |
182 | 182 | else if (confTryGetBoolean((assetStr + "_Aggregated"))) | |
183 | 183 | then { | |
184 | 184 | let aggrAssetkey = ((assetStr + "_") + caller) | |
185 | 185 | let coins = tryGetInteger(aggrAssetkey) | |
186 | 186 | let qty = tryGetInteger((aggrAssetkey + "_Qty")) | |
187 | 187 | [DeleteEntry(getAssetOwnerKey(transactionId, assetStr)), StringEntry((aggrAssetkey + "_Owner"), caller), IntegerEntry(aggrAssetkey, (coins + assetCoins)), IntegerEntry((aggrAssetkey + "_Qty"), (qty + 1)), DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)] | |
188 | 188 | } | |
189 | 189 | else [IntegerEntry(assetKey, assetCoins), DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)] | |
190 | 190 | else throw("Strict value is not equal to itself.") | |
191 | 191 | } | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func checkAssetOwner (caller,assetKey) = { | |
196 | 196 | let assetOwner = tryGetString(getAssetOwnerKeyString(assetKey)) | |
197 | 197 | (assetOwner == caller) | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func isNationReservedAsset (Name,Level) = { | |
202 | 202 | let k = getALKey(Name, Level) | |
203 | 203 | confTryGetBoolean((k + "_NationReserved")) | |
204 | 204 | } | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func internalTrasnferOwnership (assetId,newOwner) = { | |
208 | 208 | let chunks = getAssetTypeLevel(assetId) | |
209 | 209 | let strAssetType = chunks._1 | |
210 | 210 | let level = chunks._2 | |
211 | 211 | let k = getALKey(strAssetType, level) | |
212 | 212 | let oldOwner = tryGetString(getAssetOwnerKeyString(assetId)) | |
213 | 213 | let assetPower = confTryGetInteger((k + "_Power")) | |
214 | 214 | if ((assetPower > 0)) | |
215 | 215 | then { | |
216 | 216 | let currentPower = nationsTryGetInteger((oldOwner + "_Power")) | |
217 | 217 | let pw = invoke(Address(nationsAddress), "setUserPower", [oldOwner, (currentPower - assetPower)], nil) | |
218 | 218 | if ((pw == pw)) | |
219 | 219 | then if ((pw != (currentPower - assetPower))) | |
220 | 220 | then throw("Incorrect invoke result") | |
221 | 221 | else { | |
222 | 222 | let newcurrentPower = nationsTryGetInteger((newOwner + "_Power")) | |
223 | 223 | let pw2 = invoke(Address(nationsAddress), "setUserPower", [newOwner, (newcurrentPower + assetPower)], nil) | |
224 | 224 | if ((pw2 == pw2)) | |
225 | 225 | then match pw2 { | |
226 | 226 | case r: Int => | |
227 | 227 | [StringEntry(getAssetOwnerKeyString(assetId), newOwner)] | |
228 | 228 | case _ => | |
229 | 229 | throw("Incorrect invoke result") | |
230 | 230 | } | |
231 | 231 | else throw("Strict value is not equal to itself.") | |
232 | 232 | } | |
233 | 233 | else throw("Strict value is not equal to itself.") | |
234 | 234 | } | |
235 | 235 | else [StringEntry(getAssetOwnerKeyString(assetId), newOwner)] | |
236 | 236 | } | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func CheckAssetBuildableSacrifice (ALKey,caller,SacrificeKey) = { | |
240 | 240 | let assetSac = confTryGetString((ALKey + "_SacrificeAsset")) | |
241 | 241 | let assetSaclvl = confTryGetInteger((ALKey + "_SacrificeAssetLevel")) | |
242 | 242 | if ((assetSac == "")) | |
243 | 243 | then true | |
244 | 244 | else if (!(checkAssetOwner(caller, SacrificeKey))) | |
245 | 245 | then throw("you are not the owner of the asset") | |
246 | 246 | else { | |
247 | 247 | let chunks = getAssetTypeLevel(SacrificeKey) | |
248 | 248 | if (if ((assetSac != chunks._1)) | |
249 | 249 | then true | |
250 | 250 | else (assetSaclvl != chunks._2)) | |
251 | 251 | then throw("the sacrificeAsset has the wrong type or level") | |
252 | 252 | else true | |
253 | 253 | } | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func CheckAssetBuildableNation (Name,Level,NationKey,SacrificeKey) = { | |
258 | 258 | let cnfgKey = getALKey(Name, Level) | |
259 | 259 | let tec = confTryGetString((cnfgKey + "_Tecnhology_discovered")) | |
260 | 260 | if ((tec != "")) | |
261 | 261 | then if (nationsTryGetBoolean(((NationKey + "_") + tec))) | |
262 | 262 | then CheckAssetBuildableSacrifice(cnfgKey, NationKey, SacrificeKey) | |
263 | 263 | else false | |
264 | 264 | else CheckAssetBuildableSacrifice(cnfgKey, NationKey, SacrificeKey) | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func CheckAssetBuildableUser (Name,Level,caller,SacrificeKey) = { | |
269 | 269 | let cnfKey = getALKey(Name, Level) | |
270 | 270 | let nationId = nationsTryGetInteger(caller) | |
271 | 271 | if ((nationId == 0)) | |
272 | 272 | then false | |
273 | 273 | else { | |
274 | 274 | let tec = confTryGetString((cnfKey + "_Tecnhology_discovered")) | |
275 | 275 | if ((tec != "")) | |
276 | 276 | then { | |
277 | 277 | let NationKey = nationsTryGetString(toString(nationId)) | |
278 | 278 | if (nationsTryGetBoolean(((NationKey + "_") + tec))) | |
279 | 279 | then CheckAssetBuildableSacrifice(cnfKey, caller, SacrificeKey) | |
280 | 280 | else false | |
281 | 281 | } | |
282 | 282 | else CheckAssetBuildableSacrifice(cnfKey, caller, SacrificeKey) | |
283 | 283 | } | |
284 | 284 | } | |
285 | 285 | ||
286 | 286 | ||
287 | - | func CheckAssetBuildable (Name,Level,Caller,NationKey,SacrificeKey) = if ((NationKey | |
287 | + | func CheckAssetBuildable (Name,Level,Caller,NationKey,SacrificeKey) = if ((NationKey != "")) | |
288 | 288 | then CheckAssetBuildableNation(Name, Level, NationKey, SacrificeKey) | |
289 | 289 | else CheckAssetBuildableUser(Name, Level, Caller, SacrificeKey) | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | @Callable(i) | |
293 | 293 | func StartBuild (strAssetType,Level,NationKey,SacrificeKey) = if (!(CheckAssetBuildable(strAssetType, Level, toString(i.caller), NationKey, SacrificeKey))) | |
294 | 294 | then throw("You cannot build this Item") | |
295 | 295 | else { | |
296 | 296 | let cnfgKey = getALKey(strAssetType, Level) | |
297 | 297 | let delayForBuilding = confTryGetInteger((cnfgKey + "_BuildTime")) | |
298 | 298 | let assetBuildCost = confTryGetInteger((cnfgKey + "_Cost")) | |
299 | 299 | let ToAdminWallet = ((assetBuildCost * 5) / 100) | |
300 | 300 | let ToGameRewardsWallet = ((assetBuildCost * 10) / 100) | |
301 | 301 | let ToStakingRewardsWallet = ((assetBuildCost * 65) / 100) | |
302 | 302 | let UnitStakeSheg = (((assetBuildCost - ToAdminWallet) - ToGameRewardsWallet) - ToStakingRewardsWallet) | |
303 | 303 | if (isNationReservedAsset(strAssetType, Level)) | |
304 | 304 | then if (if (!(checkAssetOwner(toString(i.caller), NationKey))) | |
305 | 305 | then !(checkAdmin(i.caller)) | |
306 | 306 | else false) | |
307 | 307 | then throw("You are not the owner of the nation") | |
308 | 308 | else { | |
309 | 309 | let nationsheg = treasuryTryGetInteger(getTreasuryKey(NationKey)) | |
310 | 310 | if ((assetBuildCost > nationsheg)) | |
311 | 311 | then throw("The nation hasn't enough funds") | |
312 | 312 | else { | |
313 | 313 | let d = invoke(Address(treasuryAddress), "decreaseNationWallet", [NationKey, assetBuildCost], nil) | |
314 | 314 | match d { | |
315 | 315 | case r: Int => | |
316 | 316 | let pw = invoke(Address(treasuryAddress), "arbitraryAddCoins", [NationKey, UnitStakeSheg], nil) | |
317 | 317 | match pw { | |
318 | 318 | case b: Int => | |
319 | 319 | let transfer = invoke(Address(treasuryAddress), "distributeNationPayRewards", [assetBuildCost], nil) | |
320 | 320 | match transfer { | |
321 | 321 | case t: Int => | |
322 | 322 | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, cnfgKey), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, cnfgKey), NationKey), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, cnfgKey), (height + delayForBuilding))] | |
323 | 323 | case _ => | |
324 | 324 | throw("Error Distributing asset rewards") | |
325 | 325 | } | |
326 | 326 | case _ => | |
327 | 327 | throw("Error Depositing nation funds") | |
328 | 328 | } | |
329 | 329 | case _ => | |
330 | 330 | throw("Error Depositing nation funds") | |
331 | 331 | } | |
332 | 332 | } | |
333 | 333 | } | |
334 | 334 | else { | |
335 | 335 | let assetSac = confTryGetString((cnfgKey + "_SacrificeAsset")) | |
336 | 336 | if ((assetSac != "")) | |
337 | 337 | then { | |
338 | 338 | let pw = invoke(Address(treasuryAddress), "NoPaymentDeposit", [toString(i.caller), UnitStakeSheg], nil) | |
339 | 339 | match pw { | |
340 | 340 | case r: Int => | |
341 | 341 | let transfer = invoke(Address(treasuryAddress), "distributeNationPayRewards", [assetBuildCost], nil) | |
342 | 342 | match transfer { | |
343 | 343 | case t: Int => | |
344 | 344 | [DeleteEntry(SacrificeKey), StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, cnfgKey), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, cnfgKey), NationKey), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, cnfgKey), (height + delayForBuilding))] | |
345 | 345 | case _ => | |
346 | 346 | throw("Error Distributing asset rewards") | |
347 | 347 | } | |
348 | 348 | case _ => | |
349 | 349 | throw("Error adding deposit") | |
350 | 350 | } | |
351 | 351 | } | |
352 | 352 | else { | |
353 | 353 | let amountIn = value(i.payments[0].amount) | |
354 | 354 | if ((assetBuildCost > amountIn)) | |
355 | 355 | then throw(("You provided less $heg than the needed cost for building this " + strAssetType)) | |
356 | 356 | else if ((i.payments[0].assetId != shinywggid)) | |
357 | 357 | then throw("Only $HEG payments allowed") | |
358 | 358 | else { | |
359 | 359 | let pw = invoke(Address(treasuryAddress), "Deposit", nil, [AttachedPayment(shinywggid, UnitStakeSheg)]) | |
360 | 360 | match pw { | |
361 | 361 | case r: Int => | |
362 | 362 | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, cnfgKey), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, cnfgKey), toString(i.originCaller)), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, cnfgKey), (height + delayForBuilding)), ScriptTransfer(adminWallet, ToAdminWallet, shinywggid), ScriptTransfer(dailyGameRewardsWallet, ToGameRewardsWallet, shinywggid), ScriptTransfer(dailyStakingRewardsWallet, ToStakingRewardsWallet, shinywggid)] | |
363 | 363 | case _ => | |
364 | 364 | throw("Incorrect invoke result") | |
365 | 365 | } | |
366 | 366 | } | |
367 | 367 | } | |
368 | 368 | } | |
369 | 369 | } | |
370 | 370 | ||
371 | 371 | ||
372 | 372 | ||
373 | 373 | @Callable(i) | |
374 | 374 | func FinishBuild (txIdStr,assetStr,Level,NationKey) = { | |
375 | 375 | let txId = fromBase58String(txIdStr) | |
376 | 376 | let ALKey = getALKey(assetStr, Level) | |
377 | 377 | let BuildingStatusKey = getBuildingStatusKey(toString(i.caller), txId, ALKey) | |
378 | 378 | let finishHeightKey = getBuildingFinishHeightKey(toString(i.caller), txId, ALKey) | |
379 | 379 | let assetKey = getAssetIdKey(txId, ALKey) | |
380 | 380 | let assetOwner = tryGetString(getAssetOwnerKey(txId, ALKey)) | |
381 | 381 | if (isNationReservedAsset(assetStr, Level)) | |
382 | 382 | then if (if (!(checkAssetOwner(toString(i.caller), NationKey))) | |
383 | 383 | then !(checkAdmin(i.caller)) | |
384 | 384 | else false) | |
385 | 385 | then throw("You are not authorized to perform this operation") | |
386 | 386 | else internalFinishBuild(NationKey, ALKey, assetKey, BuildingStatusKey, finishHeightKey, txId) | |
387 | 387 | else if ((assetOwner != toString(i.caller))) | |
388 | 388 | then throw(("You cannot claim other's players " + assetStr)) | |
389 | 389 | else { | |
390 | 390 | let buildingTxStatus = tryGetString(BuildingStatusKey) | |
391 | 391 | if ((buildingTxStatus == "")) | |
392 | 392 | then throw("No pending operations for this asset") | |
393 | 393 | else internalFinishBuild(toString(i.caller), ALKey, assetKey, BuildingStatusKey, finishHeightKey, txId) | |
394 | 394 | } | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | ||
399 | 399 | @Callable(i) | |
400 | 400 | func transferOwnership (assetId,newOwner) = if (!(checkAdmin(i.caller))) | |
401 | 401 | then throw("Only the admin can perform this operation") | |
402 | 402 | else $Tuple2(internalTrasnferOwnership(assetId, newOwner), newOwner) | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | ||
406 | 406 | @Callable(i) | |
407 | 407 | func destroyAssetAndTransfer (assetId,toAddress) = { | |
408 | 408 | let chunks = getAssetTypeLevel(assetId) | |
409 | 409 | let strAssetType = chunks._1 | |
410 | 410 | let level = chunks._2 | |
411 | 411 | let k = getALKey(strAssetType, level) | |
412 | 412 | if (!(checkAdmin(i.caller))) | |
413 | 413 | then throw("Only the admin can perform this operation") | |
414 | 414 | else { | |
415 | 415 | let oldOwner = tryGetString(getAssetOwnerKeyString(assetId)) | |
416 | 416 | let assetCoins = tryGetInteger(assetId) | |
417 | 417 | let refCall = invoke(Address(treasuryAddress), "adminTransfer", [addressFromStringValue(toAddress), assetCoins], nil) | |
418 | 418 | if ((refCall == refCall)) | |
419 | 419 | then { | |
420 | 420 | let currentPower = nationsTryGetInteger((oldOwner + "_Power")) | |
421 | 421 | let assetPower = confTryGetInteger((k + "_Power")) | |
422 | 422 | let pw = invoke(Address(nationsAddress), "setUserPower", [toString(i.caller), (currentPower - assetPower)], nil) | |
423 | 423 | if ((pw == pw)) | |
424 | 424 | then match pw { | |
425 | 425 | case r: Int => | |
426 | 426 | [DeleteEntry(assetId)] | |
427 | 427 | case _ => | |
428 | 428 | throw("Error setting user power") | |
429 | 429 | } | |
430 | 430 | else throw("Strict value is not equal to itself.") | |
431 | 431 | } | |
432 | 432 | else throw("Strict value is not equal to itself.") | |
433 | 433 | } | |
434 | 434 | } | |
435 | 435 | ||
436 | 436 | ||
437 | 437 | ||
438 | 438 | @Callable(i) | |
439 | 439 | func destroyAssetFromUser (assetId,qty) = { | |
440 | 440 | let chunks = getAssetTypeLevel(assetId) | |
441 | 441 | let strAssetType = chunks._1 | |
442 | 442 | let level = chunks._2 | |
443 | 443 | let k = getALKey(strAssetType, level) | |
444 | 444 | if (!(checkAssetOwner(toString(i.caller), assetId))) | |
445 | 445 | then throw("You don't own this asset") | |
446 | 446 | else { | |
447 | 447 | let assetCoins = tryGetInteger(assetId) | |
448 | 448 | let currentPower = nationsTryGetInteger((toString(i.caller) + "_Power")) | |
449 | 449 | let assetPower = confTryGetInteger((k + "_Power")) | |
450 | 450 | if (confTryGetBoolean((k + "_Aggregated"))) | |
451 | 451 | then { | |
452 | 452 | let unitAssetCoins = ((confTryGetInteger((k + "_Cost")) * 20) / 100) | |
453 | 453 | let qtyAsset = tryGetInteger((k + "_Qty")) | |
454 | 454 | if ((0 > (qtyAsset - qty))) | |
455 | 455 | then throw(("you don't have enough " + strAssetType)) | |
456 | 456 | else { | |
457 | 457 | let pw = invoke(Address(nationsAddress), "setUserPower", [toString(i.caller), (currentPower - (assetPower * qty))], nil) | |
458 | 458 | match pw { | |
459 | 459 | case r: Int => | |
460 | 460 | let tr = invoke(Address(treasuryAddress), "adminTransfer", [toString(i.caller), (unitAssetCoins * qty)], nil) | |
461 | 461 | match tr { | |
462 | 462 | case t: Int => | |
463 | 463 | if (((qtyAsset - qty) > 0)) | |
464 | 464 | then [IntegerEntry((k + "_Qty"), (qtyAsset - qty))] | |
465 | 465 | else [DeleteEntry(assetId)] | |
466 | 466 | case _ => | |
467 | 467 | throw("Error transferring coins") | |
468 | 468 | } | |
469 | 469 | case _ => | |
470 | 470 | throw("Error setting user power") | |
471 | 471 | } | |
472 | 472 | } | |
473 | 473 | } | |
474 | 474 | else { | |
475 | 475 | let pw = invoke(Address(nationsAddress), "setUserPower", [toString(i.caller), (currentPower - assetPower)], nil) | |
476 | 476 | match pw { | |
477 | 477 | case r: Int => | |
478 | 478 | let tr = invoke(Address(treasuryAddress), "adminTransfer", [toString(i.caller), assetCoins], nil) | |
479 | 479 | match tr { | |
480 | 480 | case t: Int => | |
481 | 481 | [DeleteEntry(assetId)] | |
482 | 482 | case _ => | |
483 | 483 | throw("Error transferring coins") | |
484 | 484 | } | |
485 | 485 | case _ => | |
486 | 486 | throw("Error setting user power") | |
487 | 487 | } | |
488 | 488 | } | |
489 | 489 | } | |
490 | 490 | } | |
491 | 491 | ||
492 | 492 | ||
493 | 493 | ||
494 | 494 | @Callable(i) | |
495 | 495 | func setNationOwner (nationKey,newOwner) = if (checkAdmin(i.caller)) | |
496 | 496 | then $Tuple2([StringEntry((nationKey + "_Owner"), newOwner)], true) | |
497 | 497 | else { | |
498 | 498 | let currentOwner = tryGetString((nationKey + "_Owner")) | |
499 | 499 | if ((currentOwner != toString(i.caller))) | |
500 | 500 | then throw("You are not the nation owner") | |
501 | 501 | else [StringEntry((nationKey + "_Owner"), newOwner)] | |
502 | 502 | } | |
503 | 503 | ||
504 | 504 | ||
505 | 505 | ||
506 | 506 | @Callable(i) | |
507 | 507 | func buyNationItem (assetId,NationKey) = { | |
508 | 508 | let chunks = getAssetTypeLevel(assetId) | |
509 | 509 | let strAssetType = chunks._1 | |
510 | 510 | let level = chunks._2 | |
511 | 511 | let k = getALKey(strAssetType, level) | |
512 | 512 | let n = nationsTryGetInteger(toString(i.caller)) | |
513 | 513 | let nid = nationsTryGetInteger(NationKey) | |
514 | 514 | if ((n != nid)) | |
515 | 515 | then throw("you can buy assets only from your nation") | |
516 | 516 | else if (!(checkAssetOwner(NationKey, assetId))) | |
517 | 517 | then throw("The asset does not belong to the nation") | |
518 | 518 | else if (!(isNationReservedAsset(strAssetType, level))) | |
519 | 519 | then throw("this asset cannot be sold by the nation") | |
520 | 520 | else { | |
521 | 521 | let assetPrice = confTryGetInteger((getALKey(strAssetType, level) + "_SellPrice")) | |
522 | 522 | let amountIn = value(i.payments[0].amount) | |
523 | 523 | if ((assetPrice > amountIn)) | |
524 | 524 | then throw(("You provided less $heg than the needed cost for buying this " + strAssetType)) | |
525 | 525 | else if ((i.payments[0].assetId != shinywggid)) | |
526 | 526 | then throw("Only $HEG payments allowed") | |
527 | 527 | else { | |
528 | 528 | let a = invoke(Address(treasuryAddress), "increaseNationWallet", [NationKey, amountIn], nil) | |
529 | 529 | match a { | |
530 | 530 | case b: Int => | |
531 | 531 | (internalTrasnferOwnership(assetId, toString(i.caller)) :+ ScriptTransfer(Address(treasuryAddress), amountIn, shinywggid)) | |
532 | 532 | case _ => | |
533 | 533 | throw("Error transferring SHEG to nations wallet") | |
534 | 534 | } | |
535 | 535 | } | |
536 | 536 | } | |
537 | 537 | } | |
538 | 538 | ||
539 | 539 | ||
540 | 540 | ||
541 | 541 | @Callable(i) | |
542 | 542 | func AddAssetFromMarkeplace (assetId,oldOwner,assetSheg) = if (!(checkAdmin(i.caller))) | |
543 | 543 | then throw("You are not allowed to perform this operation") | |
544 | 544 | else $Tuple2([StringEntry(getAssetOwnerKeyString(assetId), oldOwner), IntegerEntry(assetId, assetSheg)], oldOwner) | |
545 | 545 | ||
546 | 546 | ||
547 | 547 | ||
548 | 548 | @Callable(i) | |
549 | 549 | func TransferAssetToMarketplace (assetId,sellprice) = if (!(checkAssetOwner(toString(i.caller), assetId))) | |
550 | 550 | then throw("You are not the owner of this asset") | |
551 | 551 | else { | |
552 | 552 | let assetSheg = tryGetInteger(assetId) | |
553 | 553 | let tr = invoke(Address(marketplaceAddress), "putOnSale", [assetId, assetSheg, sellprice], nil) | |
554 | 554 | match tr { | |
555 | 555 | case t: Int => | |
556 | 556 | [DeleteEntry(getAssetOwnerKeyString(assetId)), DeleteEntry(assetId)] | |
557 | 557 | case _ => | |
558 | 558 | throw("Error putting the item on the marketplace") | |
559 | 559 | } | |
560 | 560 | } | |
561 | 561 | ||
562 | 562 |
github/deemru/w8io/026f985 58.44 ms ◑