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