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 | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let marketplaceAddress = base58'3Mra7mjPipcQd5sJaRmXK8xgS4scb8gPF4A' | |
11 | 11 | ||
12 | - | let adminAddress = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
12 | + | let adminWallet = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
13 | + | ||
14 | + | let dailyGameRewardsWallet = addressFromStringValue("3MuSrXTTiwo9bdoD6FeaBpMUYMiU5saDv2U") | |
15 | + | ||
16 | + | let dailyStakingRewardsWallet = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i") | |
13 | 17 | ||
14 | 18 | let BuildStarted = "BUILD_STARTED" | |
15 | 19 | ||
17 | 21 | ||
18 | 22 | let Assets = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"] | |
19 | 23 | ||
20 | - | let assetsCost = [0, | |
24 | + | let assetsCost = [0, 0, 5000000000, 5000000000, 500000000, 10000000000, 100000000] | |
21 | 25 | ||
22 | 26 | let assetsSellPrice = [0, 0, 0, 0, 0, 10000000000, 100000000] | |
23 | 27 | ||
24 | 28 | let assetsDelay = [0, 4, 4, 4, 2, 2, 2] | |
25 | 29 | ||
26 | - | let assetsPower = [0, 1000, | |
30 | + | let assetsPower = [0, 1000, 50, 50, 1, 1, 1] | |
27 | 31 | ||
28 | 32 | func treasuryTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) { | |
29 | 33 | case b: Int => | |
75 | 79 | func getTreasuryKey (nationid) = (nationid + "_Treasury") | |
76 | 80 | ||
77 | 81 | ||
78 | - | func checkAdmin (caller) = if (if (if (if ((caller == | |
82 | + | func checkAdmin (caller) = if (if (if (if ((caller == adminWallet)) | |
79 | 83 | then true | |
80 | 84 | else (caller == this)) | |
81 | 85 | then true | |
93 | 97 | else { | |
94 | 98 | let idx = value(indexOf(Assets, assetStr)) | |
95 | 99 | let assetPower = assetsPower[idx] | |
96 | - | let assetCoins = assetsCost[idx] | |
100 | + | let assetCoins = ((assetsCost[idx] * 20) / 100) | |
97 | 101 | let refCall = invoke(Address(treasuryAddress), "Pay", [caller, assetCoins], nil) | |
98 | 102 | if ((refCall == refCall)) | |
99 | 103 | then if ((assetPower > 0)) | |
151 | 155 | ||
152 | 156 | ||
153 | 157 | @Callable(i) | |
154 | - | func StartBuild (strAssetType,NationKey) = if (!(containsElement(Assets, strAssetType))) | |
155 | - | then throw("This asset is not | |
158 | + | func StartBuild (strAssetType,NationKey,SettlerKey) = if (!(containsElement(Assets, strAssetType))) | |
159 | + | then throw("This asset is not managed by the system") | |
156 | 160 | else { | |
157 | 161 | let ind = value(indexOf(Assets, strAssetType)) | |
158 | 162 | let delayForBuilding = assetsDelay[ind] | |
159 | 163 | let assetBuildCost = assetsCost[ind] | |
164 | + | let ToAdminWallet = ((assetBuildCost * 5) / 100) | |
165 | + | let ToGameRewardsWallet = ((assetBuildCost * 10) / 100) | |
166 | + | let ToStakingRewardsWallet = ((assetBuildCost * 65) / 100) | |
167 | + | let UnitStakeSheg = (((assetBuildCost - ToAdminWallet) - ToGameRewardsWallet) - ToStakingRewardsWallet) | |
160 | 168 | if (isNationReservedAsset(strAssetType)) | |
161 | 169 | then if (if (!(checkAssetOwner(toString(i.caller), NationKey))) | |
162 | 170 | then !(checkAdmin(i.caller)) | |
170 | 178 | let d = invoke(Address(treasuryAddress), "decreaseNationWallet", [NationKey, assetBuildCost], nil) | |
171 | 179 | match d { | |
172 | 180 | case r: Int => | |
173 | - | let pw = invoke(Address(treasuryAddress), "arbitraryAddCoins", [NationKey, | |
181 | + | let pw = invoke(Address(treasuryAddress), "arbitraryAddCoins", [NationKey, UnitStakeSheg], nil) | |
174 | 182 | match pw { | |
175 | 183 | case b: Int => | |
184 | + | let transfer = invoke(Address(treasuryAddress), "distributeNationPayRewards", [assetBuildCost], nil) | |
185 | + | match transfer { | |
186 | + | case t: Int => | |
176 | 187 | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), NationKey), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding))] | |
188 | + | case _ => | |
189 | + | throw("Error Distributing asset rewards") | |
190 | + | } | |
177 | 191 | case _ => | |
178 | 192 | throw("Error Depositing nation funds") | |
179 | 193 | } | |
182 | 196 | } | |
183 | 197 | } | |
184 | 198 | } | |
185 | - | else { | |
186 | - | let amountIn = value(i.payments[0].amount) | |
187 | - | if ((assetBuildCost > amountIn)) | |
188 | - | then throw(("You provided less $heg than the needed cost for building this " + strAssetType)) | |
189 | - | else if ((i.payments[0].assetId != shinywggid)) | |
190 | - | then throw("Only $HEG payments allowed") | |
191 | - | else { | |
192 | - | let pw = invoke(Address(treasuryAddress), "Deposit", nil, i.payments) | |
193 | - | match pw { | |
194 | - | case r: Int => | |
195 | - | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), toString(i.originCaller)), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding))] | |
196 | - | case _ => | |
197 | - | throw("Incorrect invoke result") | |
198 | - | } | |
199 | - | } | |
200 | - | } | |
199 | + | else if ((strAssetType == "City")) | |
200 | + | then if (!(checkAssetOwner(toString(i.caller), SettlerKey))) | |
201 | + | then throw("You don't own the settler or has been destroyed") | |
202 | + | else { | |
203 | + | let settlerSheg = tryGetInteger(SettlerKey) | |
204 | + | let pw = invoke(Address(treasuryAddress), "NoPaymentDeposit", [toString(i.caller), UnitStakeSheg], nil) | |
205 | + | match pw { | |
206 | + | case r: Int => | |
207 | + | let transfer = invoke(Address(treasuryAddress), "distributeNationPayRewards", [assetBuildCost], nil) | |
208 | + | match transfer { | |
209 | + | case t: Int => | |
210 | + | [DeleteEntry(SettlerKey), StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), NationKey), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding))] | |
211 | + | case _ => | |
212 | + | throw("Error Distributing asset rewards") | |
213 | + | } | |
214 | + | case _ => | |
215 | + | throw("Error adding deposit") | |
216 | + | } | |
217 | + | } | |
218 | + | else { | |
219 | + | let amountIn = value(i.payments[0].amount) | |
220 | + | if ((assetBuildCost > amountIn)) | |
221 | + | then throw(("You provided less $heg than the needed cost for building this " + strAssetType)) | |
222 | + | else if ((i.payments[0].assetId != shinywggid)) | |
223 | + | then throw("Only $HEG payments allowed") | |
224 | + | else { | |
225 | + | let pw = invoke(Address(treasuryAddress), "Deposit", nil, [AttachedPayment(shinywggid, UnitStakeSheg)]) | |
226 | + | match pw { | |
227 | + | case r: Int => | |
228 | + | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), toString(i.originCaller)), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding)), ScriptTransfer(adminWallet, ToAdminWallet, shinywggid), ScriptTransfer(dailyGameRewardsWallet, ToGameRewardsWallet, shinywggid), ScriptTransfer(dailyStakingRewardsWallet, ToStakingRewardsWallet, shinywggid)] | |
229 | + | case _ => | |
230 | + | throw("Incorrect invoke result") | |
231 | + | } | |
232 | + | } | |
233 | + | } | |
201 | 234 | } | |
202 | 235 | ||
203 | 236 |
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 nationsAddress = base58'3MvyzDtzWWV5MZ1GP8JfQhhQqiGU4Nbifdy' | |
9 | 9 | ||
10 | 10 | let marketplaceAddress = base58'3Mra7mjPipcQd5sJaRmXK8xgS4scb8gPF4A' | |
11 | 11 | ||
12 | - | let adminAddress = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
12 | + | let adminWallet = addressFromStringValue("3MpNtiPSRSq6NnaQYk38BfWSzZcgAYTyrQ9") | |
13 | + | ||
14 | + | let dailyGameRewardsWallet = addressFromStringValue("3MuSrXTTiwo9bdoD6FeaBpMUYMiU5saDv2U") | |
15 | + | ||
16 | + | let dailyStakingRewardsWallet = addressFromStringValue("3Mv3mr3uNXdpgkVPApbGEJjMQXqau37DY5i") | |
13 | 17 | ||
14 | 18 | let BuildStarted = "BUILD_STARTED" | |
15 | 19 | ||
16 | 20 | let BuildFinished = "BUILD_FINISHED" | |
17 | 21 | ||
18 | 22 | let Assets = ["Nation", "City", "Barrack", "Barn", "Warrior", "Settler", "Explorer"] | |
19 | 23 | ||
20 | - | let assetsCost = [0, | |
24 | + | let assetsCost = [0, 0, 5000000000, 5000000000, 500000000, 10000000000, 100000000] | |
21 | 25 | ||
22 | 26 | let assetsSellPrice = [0, 0, 0, 0, 0, 10000000000, 100000000] | |
23 | 27 | ||
24 | 28 | let assetsDelay = [0, 4, 4, 4, 2, 2, 2] | |
25 | 29 | ||
26 | - | let assetsPower = [0, 1000, | |
30 | + | let assetsPower = [0, 1000, 50, 50, 1, 1, 1] | |
27 | 31 | ||
28 | 32 | func treasuryTryGetInteger (key) = match getInteger(Address(treasuryAddress), key) { | |
29 | 33 | case b: Int => | |
30 | 34 | b | |
31 | 35 | case _ => | |
32 | 36 | 0 | |
33 | 37 | } | |
34 | 38 | ||
35 | 39 | ||
36 | 40 | func nationsTryGetInteger (key) = match getInteger(Address(nationsAddress), key) { | |
37 | 41 | case b: Int => | |
38 | 42 | b | |
39 | 43 | case _ => | |
40 | 44 | 0 | |
41 | 45 | } | |
42 | 46 | ||
43 | 47 | ||
44 | 48 | func tryGetString (key) = match getString(this, key) { | |
45 | 49 | case b: String => | |
46 | 50 | b | |
47 | 51 | case _ => | |
48 | 52 | "" | |
49 | 53 | } | |
50 | 54 | ||
51 | 55 | ||
52 | 56 | func tryGetInteger (key) = match getInteger(this, key) { | |
53 | 57 | case b: Int => | |
54 | 58 | b | |
55 | 59 | case _ => | |
56 | 60 | 0 | |
57 | 61 | } | |
58 | 62 | ||
59 | 63 | ||
60 | 64 | func getAssetIdKey (txId,assetType) = ((assetType + "_") + toBase58String(txId)) | |
61 | 65 | ||
62 | 66 | ||
63 | 67 | func getAssetOwnerKey (txId,assetType) = (getAssetIdKey(txId, assetType) + "_Owner") | |
64 | 68 | ||
65 | 69 | ||
66 | 70 | func getAssetOwnerKeyString (assetId) = (assetId + "_Owner") | |
67 | 71 | ||
68 | 72 | ||
69 | 73 | func getBuildingFinishHeightKey (address,txId,assetType) = (((address + "_") + getAssetIdKey(txId, assetType)) + "_fh") | |
70 | 74 | ||
71 | 75 | ||
72 | 76 | func getBuildingStatusKey (address,txId,assetType) = (((address + "_") + getAssetIdKey(txId, assetType)) + "_status") | |
73 | 77 | ||
74 | 78 | ||
75 | 79 | func getTreasuryKey (nationid) = (nationid + "_Treasury") | |
76 | 80 | ||
77 | 81 | ||
78 | - | func checkAdmin (caller) = if (if (if (if ((caller == | |
82 | + | func checkAdmin (caller) = if (if (if (if ((caller == adminWallet)) | |
79 | 83 | then true | |
80 | 84 | else (caller == this)) | |
81 | 85 | then true | |
82 | 86 | else (caller.bytes == nationsAddress)) | |
83 | 87 | then true | |
84 | 88 | else (caller.bytes == treasuryAddress)) | |
85 | 89 | then true | |
86 | 90 | else (caller.bytes == marketplaceAddress) | |
87 | 91 | ||
88 | 92 | ||
89 | 93 | func internalFinishBuild (caller,assetStr,assetKey,BuildingStatusKey,finishHeightKey) = { | |
90 | 94 | let buildingFinishHeight = getIntegerValue(this, finishHeightKey) | |
91 | 95 | if ((buildingFinishHeight > height)) | |
92 | 96 | then throw((((("Building is not finished yet " + toString((buildingFinishHeight - height))) + " blocks remaining, it will take around ") + toString((buildingFinishHeight - height))) + " minutes")) | |
93 | 97 | else { | |
94 | 98 | let idx = value(indexOf(Assets, assetStr)) | |
95 | 99 | let assetPower = assetsPower[idx] | |
96 | - | let assetCoins = assetsCost[idx] | |
100 | + | let assetCoins = ((assetsCost[idx] * 20) / 100) | |
97 | 101 | let refCall = invoke(Address(treasuryAddress), "Pay", [caller, assetCoins], nil) | |
98 | 102 | if ((refCall == refCall)) | |
99 | 103 | then if ((assetPower > 0)) | |
100 | 104 | then { | |
101 | 105 | let currentPower = nationsTryGetInteger((caller + "_Power")) | |
102 | 106 | let pw = invoke(Address(nationsAddress), "setUserPower", [caller, (currentPower + assetPower)], nil) | |
103 | 107 | if ((pw == pw)) | |
104 | 108 | then [IntegerEntry(assetKey, assetCoins), DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)] | |
105 | 109 | else throw("Strict value is not equal to itself.") | |
106 | 110 | } | |
107 | 111 | else [IntegerEntry(assetKey, assetCoins), DeleteEntry(BuildingStatusKey), DeleteEntry(finishHeightKey)] | |
108 | 112 | else throw("Strict value is not equal to itself.") | |
109 | 113 | } | |
110 | 114 | } | |
111 | 115 | ||
112 | 116 | ||
113 | 117 | func checkAssetOwner (caller,assetKey) = { | |
114 | 118 | let assetOwner = tryGetString((assetKey + "_Owner")) | |
115 | 119 | (assetOwner == caller) | |
116 | 120 | } | |
117 | 121 | ||
118 | 122 | ||
119 | 123 | func isNationReservedAsset (strAssetType) = if ((strAssetType == "Settler")) | |
120 | 124 | then true | |
121 | 125 | else (strAssetType == "Explorer") | |
122 | 126 | ||
123 | 127 | ||
124 | 128 | func internalTrasnferOwnership (assetId,newOwner) = { | |
125 | 129 | let strAssetType = split(assetId, "_")[0] | |
126 | 130 | let oldOwner = tryGetString(getAssetOwnerKeyString(assetId)) | |
127 | 131 | let assetPower = assetsPower[value(indexOf(Assets, strAssetType))] | |
128 | 132 | if ((assetPower > 0)) | |
129 | 133 | then { | |
130 | 134 | let currentPower = nationsTryGetInteger((oldOwner + "_Power")) | |
131 | 135 | let pw = invoke(Address(nationsAddress), "setUserPower", [oldOwner, (currentPower - assetPower)], nil) | |
132 | 136 | if ((pw == pw)) | |
133 | 137 | then if ((pw != (currentPower - assetPower))) | |
134 | 138 | then throw("Incorrect invoke result") | |
135 | 139 | else { | |
136 | 140 | let newcurrentPower = nationsTryGetInteger((newOwner + "_Power")) | |
137 | 141 | let pw2 = invoke(Address(nationsAddress), "setUserPower", [newOwner, (newcurrentPower + assetPower)], nil) | |
138 | 142 | if ((pw2 == pw2)) | |
139 | 143 | then match pw2 { | |
140 | 144 | case r: Int => | |
141 | 145 | [StringEntry(getAssetOwnerKeyString(assetId), newOwner)] | |
142 | 146 | case _ => | |
143 | 147 | throw("Incorrect invoke result") | |
144 | 148 | } | |
145 | 149 | else throw("Strict value is not equal to itself.") | |
146 | 150 | } | |
147 | 151 | else throw("Strict value is not equal to itself.") | |
148 | 152 | } | |
149 | 153 | else [StringEntry(getAssetOwnerKeyString(assetId), newOwner)] | |
150 | 154 | } | |
151 | 155 | ||
152 | 156 | ||
153 | 157 | @Callable(i) | |
154 | - | func StartBuild (strAssetType,NationKey) = if (!(containsElement(Assets, strAssetType))) | |
155 | - | then throw("This asset is not | |
158 | + | func StartBuild (strAssetType,NationKey,SettlerKey) = if (!(containsElement(Assets, strAssetType))) | |
159 | + | then throw("This asset is not managed by the system") | |
156 | 160 | else { | |
157 | 161 | let ind = value(indexOf(Assets, strAssetType)) | |
158 | 162 | let delayForBuilding = assetsDelay[ind] | |
159 | 163 | let assetBuildCost = assetsCost[ind] | |
164 | + | let ToAdminWallet = ((assetBuildCost * 5) / 100) | |
165 | + | let ToGameRewardsWallet = ((assetBuildCost * 10) / 100) | |
166 | + | let ToStakingRewardsWallet = ((assetBuildCost * 65) / 100) | |
167 | + | let UnitStakeSheg = (((assetBuildCost - ToAdminWallet) - ToGameRewardsWallet) - ToStakingRewardsWallet) | |
160 | 168 | if (isNationReservedAsset(strAssetType)) | |
161 | 169 | then if (if (!(checkAssetOwner(toString(i.caller), NationKey))) | |
162 | 170 | then !(checkAdmin(i.caller)) | |
163 | 171 | else false) | |
164 | 172 | then throw("You are not authorized to perform this operation") | |
165 | 173 | else { | |
166 | 174 | let nationsheg = treasuryTryGetInteger(getTreasuryKey(NationKey)) | |
167 | 175 | if ((assetBuildCost > nationsheg)) | |
168 | 176 | then throw("The nation hasn't enough funds") | |
169 | 177 | else { | |
170 | 178 | let d = invoke(Address(treasuryAddress), "decreaseNationWallet", [NationKey, assetBuildCost], nil) | |
171 | 179 | match d { | |
172 | 180 | case r: Int => | |
173 | - | let pw = invoke(Address(treasuryAddress), "arbitraryAddCoins", [NationKey, | |
181 | + | let pw = invoke(Address(treasuryAddress), "arbitraryAddCoins", [NationKey, UnitStakeSheg], nil) | |
174 | 182 | match pw { | |
175 | 183 | case b: Int => | |
184 | + | let transfer = invoke(Address(treasuryAddress), "distributeNationPayRewards", [assetBuildCost], nil) | |
185 | + | match transfer { | |
186 | + | case t: Int => | |
176 | 187 | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), NationKey), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding))] | |
188 | + | case _ => | |
189 | + | throw("Error Distributing asset rewards") | |
190 | + | } | |
177 | 191 | case _ => | |
178 | 192 | throw("Error Depositing nation funds") | |
179 | 193 | } | |
180 | 194 | case _ => | |
181 | 195 | throw("Error Depositing nation funds") | |
182 | 196 | } | |
183 | 197 | } | |
184 | 198 | } | |
185 | - | else { | |
186 | - | let amountIn = value(i.payments[0].amount) | |
187 | - | if ((assetBuildCost > amountIn)) | |
188 | - | then throw(("You provided less $heg than the needed cost for building this " + strAssetType)) | |
189 | - | else if ((i.payments[0].assetId != shinywggid)) | |
190 | - | then throw("Only $HEG payments allowed") | |
191 | - | else { | |
192 | - | let pw = invoke(Address(treasuryAddress), "Deposit", nil, i.payments) | |
193 | - | match pw { | |
194 | - | case r: Int => | |
195 | - | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), toString(i.originCaller)), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding))] | |
196 | - | case _ => | |
197 | - | throw("Incorrect invoke result") | |
198 | - | } | |
199 | - | } | |
200 | - | } | |
199 | + | else if ((strAssetType == "City")) | |
200 | + | then if (!(checkAssetOwner(toString(i.caller), SettlerKey))) | |
201 | + | then throw("You don't own the settler or has been destroyed") | |
202 | + | else { | |
203 | + | let settlerSheg = tryGetInteger(SettlerKey) | |
204 | + | let pw = invoke(Address(treasuryAddress), "NoPaymentDeposit", [toString(i.caller), UnitStakeSheg], nil) | |
205 | + | match pw { | |
206 | + | case r: Int => | |
207 | + | let transfer = invoke(Address(treasuryAddress), "distributeNationPayRewards", [assetBuildCost], nil) | |
208 | + | match transfer { | |
209 | + | case t: Int => | |
210 | + | [DeleteEntry(SettlerKey), StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), NationKey), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding))] | |
211 | + | case _ => | |
212 | + | throw("Error Distributing asset rewards") | |
213 | + | } | |
214 | + | case _ => | |
215 | + | throw("Error adding deposit") | |
216 | + | } | |
217 | + | } | |
218 | + | else { | |
219 | + | let amountIn = value(i.payments[0].amount) | |
220 | + | if ((assetBuildCost > amountIn)) | |
221 | + | then throw(("You provided less $heg than the needed cost for building this " + strAssetType)) | |
222 | + | else if ((i.payments[0].assetId != shinywggid)) | |
223 | + | then throw("Only $HEG payments allowed") | |
224 | + | else { | |
225 | + | let pw = invoke(Address(treasuryAddress), "Deposit", nil, [AttachedPayment(shinywggid, UnitStakeSheg)]) | |
226 | + | match pw { | |
227 | + | case r: Int => | |
228 | + | [StringEntry(getBuildingStatusKey(toString(i.originCaller), i.transactionId, strAssetType), BuildStarted), StringEntry(getAssetOwnerKey(i.transactionId, strAssetType), toString(i.originCaller)), IntegerEntry(getBuildingFinishHeightKey(toString(i.originCaller), i.transactionId, strAssetType), (height + delayForBuilding)), ScriptTransfer(adminWallet, ToAdminWallet, shinywggid), ScriptTransfer(dailyGameRewardsWallet, ToGameRewardsWallet, shinywggid), ScriptTransfer(dailyStakingRewardsWallet, ToStakingRewardsWallet, shinywggid)] | |
229 | + | case _ => | |
230 | + | throw("Incorrect invoke result") | |
231 | + | } | |
232 | + | } | |
233 | + | } | |
201 | 234 | } | |
202 | 235 | ||
203 | 236 | ||
204 | 237 | ||
205 | 238 | @Callable(i) | |
206 | 239 | func FinishBuild (txIdStr,assetStr,NationKey) = { | |
207 | 240 | let txId = fromBase58String(txIdStr) | |
208 | 241 | let BuildingStatusKey = getBuildingStatusKey(toString(i.caller), txId, assetStr) | |
209 | 242 | let finishHeightKey = getBuildingFinishHeightKey(toString(i.caller), txId, assetStr) | |
210 | 243 | let assetKey = getAssetIdKey(txId, assetStr) | |
211 | 244 | let assetOwner = tryGetString(getAssetOwnerKey(txId, assetStr)) | |
212 | 245 | if (isNationReservedAsset(assetStr)) | |
213 | 246 | then if (if (!(checkAssetOwner(toString(i.caller), NationKey))) | |
214 | 247 | then !(checkAdmin(i.caller)) | |
215 | 248 | else false) | |
216 | 249 | then throw("You are not authorized to perform this operation") | |
217 | 250 | else internalFinishBuild(NationKey, assetStr, assetKey, BuildingStatusKey, finishHeightKey) | |
218 | 251 | else if ((assetOwner != toString(i.caller))) | |
219 | 252 | then throw(("You cannot claim other's players " + assetStr)) | |
220 | 253 | else { | |
221 | 254 | let buildingTxStatus = tryGetString(BuildingStatusKey) | |
222 | 255 | if ((buildingTxStatus == "")) | |
223 | 256 | then throw("No pending operations for this asset") | |
224 | 257 | else internalFinishBuild(toString(i.caller), assetStr, assetKey, BuildingStatusKey, finishHeightKey) | |
225 | 258 | } | |
226 | 259 | } | |
227 | 260 | ||
228 | 261 | ||
229 | 262 | ||
230 | 263 | @Callable(i) | |
231 | 264 | func transferOwnership (assetId,newOwner) = { | |
232 | 265 | let strAssetType = split(assetId, "_")[0] | |
233 | 266 | if (!(checkAdmin(i.caller))) | |
234 | 267 | then throw("Only the admin can perform this operation") | |
235 | 268 | else $Tuple2(internalTrasnferOwnership(assetId, newOwner), newOwner) | |
236 | 269 | } | |
237 | 270 | ||
238 | 271 | ||
239 | 272 | ||
240 | 273 | @Callable(i) | |
241 | 274 | func destroyAssetAndTransfer (assetId,toAddress) = { | |
242 | 275 | let strAssetType = split(assetId, "_")[0] | |
243 | 276 | if (!(checkAdmin(i.caller))) | |
244 | 277 | then throw("Only the admin can perform this operation") | |
245 | 278 | else { | |
246 | 279 | let oldOwner = tryGetString(getAssetOwnerKeyString(assetId)) | |
247 | 280 | let assetCoins = tryGetInteger(assetId) | |
248 | 281 | let refCall = invoke(Address(treasuryAddress), "arbitraryAddCoins", [toAddress, assetCoins], nil) | |
249 | 282 | if ((refCall == refCall)) | |
250 | 283 | then { | |
251 | 284 | let currentPower = nationsTryGetInteger((oldOwner + "_Power")) | |
252 | 285 | let assetPower = assetsPower[value(indexOf(Assets, strAssetType))] | |
253 | 286 | let pw = invoke(Address(nationsAddress), "setUserPower", [toString(i.caller), (currentPower - assetPower)], nil) | |
254 | 287 | if ((pw == pw)) | |
255 | 288 | then match pw { | |
256 | 289 | case r: Int => | |
257 | 290 | [DeleteEntry(assetId)] | |
258 | 291 | case _ => | |
259 | 292 | throw("Incorrect invoke result") | |
260 | 293 | } | |
261 | 294 | else throw("Strict value is not equal to itself.") | |
262 | 295 | } | |
263 | 296 | else throw("Strict value is not equal to itself.") | |
264 | 297 | } | |
265 | 298 | } | |
266 | 299 | ||
267 | 300 | ||
268 | 301 | ||
269 | 302 | @Callable(i) | |
270 | 303 | func destroyAssetFromUser (assetId) = { | |
271 | 304 | let strAssetType = split(assetId, "_")[0] | |
272 | 305 | if (!(checkAssetOwner(toString(i.caller), assetId))) | |
273 | 306 | then throw("You don't own this asset") | |
274 | 307 | else { | |
275 | 308 | let assetCoins = tryGetInteger(assetId) | |
276 | 309 | let currentPower = nationsTryGetInteger((toString(i.caller) + "_Power")) | |
277 | 310 | let assetPower = assetsPower[value(indexOf(Assets, strAssetType))] | |
278 | 311 | let pw = invoke(Address(nationsAddress), "setUserPower", [toString(i.caller), (currentPower - assetPower)], nil) | |
279 | 312 | if ((pw == pw)) | |
280 | 313 | then match pw { | |
281 | 314 | case r: Int => | |
282 | 315 | [DeleteEntry(assetId), ScriptTransfer(i.caller, assetCoins, shinywggid)] | |
283 | 316 | case _ => | |
284 | 317 | throw("Incorrect invoke result") | |
285 | 318 | } | |
286 | 319 | else throw("Strict value is not equal to itself.") | |
287 | 320 | } | |
288 | 321 | } | |
289 | 322 | ||
290 | 323 | ||
291 | 324 | ||
292 | 325 | @Callable(i) | |
293 | 326 | func setNationOwner (nationKey,newOwner) = if (checkAdmin(i.caller)) | |
294 | 327 | then $Tuple2([StringEntry((nationKey + "_Owner"), newOwner)], true) | |
295 | 328 | else { | |
296 | 329 | let currentOwner = tryGetString((nationKey + "_Owner")) | |
297 | 330 | if ((currentOwner != toString(i.caller))) | |
298 | 331 | then throw("You are not the nation owner") | |
299 | 332 | else [StringEntry((nationKey + "_Owner"), newOwner)] | |
300 | 333 | } | |
301 | 334 | ||
302 | 335 | ||
303 | 336 | ||
304 | 337 | @Callable(i) | |
305 | 338 | func buyNationItem (assetId,NationKey) = { | |
306 | 339 | let strAssetType = split(assetId, "_")[0] | |
307 | 340 | let n = nationsTryGetInteger(toString(i.caller)) | |
308 | 341 | let nid = nationsTryGetInteger(NationKey) | |
309 | 342 | if ((n != nid)) | |
310 | 343 | then throw("you can buy assets only from your nation") | |
311 | 344 | else if (!(checkAssetOwner(NationKey, assetId))) | |
312 | 345 | then throw("The asset does not belong to the nation") | |
313 | 346 | else if (!(isNationReservedAsset(strAssetType))) | |
314 | 347 | then throw("this asset cannot be sold by the nation") | |
315 | 348 | else { | |
316 | 349 | let ind = value(indexOf(Assets, strAssetType)) | |
317 | 350 | let assetPrice = assetsSellPrice[ind] | |
318 | 351 | let amountIn = value(i.payments[0].amount) | |
319 | 352 | if ((assetPrice > amountIn)) | |
320 | 353 | then throw(("You provided less $heg than the needed cost for buying this " + strAssetType)) | |
321 | 354 | else if ((i.payments[0].assetId != shinywggid)) | |
322 | 355 | then throw("Only $HEG payments allowed") | |
323 | 356 | else { | |
324 | 357 | let a = invoke(Address(treasuryAddress), "increaseNationWallet", [NationKey, amountIn], nil) | |
325 | 358 | match a { | |
326 | 359 | case b: Int => | |
327 | 360 | (internalTrasnferOwnership(assetId, toString(i.caller)) :+ ScriptTransfer(Address(treasuryAddress), amountIn, shinywggid)) | |
328 | 361 | case _ => | |
329 | 362 | throw("Error transferring SHEG to nations wallet") | |
330 | 363 | } | |
331 | 364 | } | |
332 | 365 | } | |
333 | 366 | } | |
334 | 367 | ||
335 | 368 | ||
336 | 369 | ||
337 | 370 | @Callable(i) | |
338 | 371 | func AddAssetFromMarkeplace (assetId,oldOwner,assetSheg) = if (!(checkAdmin(i.caller))) | |
339 | 372 | then throw("You are not allowed to perform this operation") | |
340 | 373 | else $Tuple2([StringEntry(getAssetOwnerKeyString(assetId), oldOwner), IntegerEntry(assetId, assetSheg)], oldOwner) | |
341 | 374 | ||
342 | 375 | ||
343 | 376 | ||
344 | 377 | @Callable(i) | |
345 | 378 | func TransferAssetToMarketplace (assetId,sellprice) = if (!(checkAssetOwner(toString(i.caller), assetId))) | |
346 | 379 | then throw("You are not the owner of this asset") | |
347 | 380 | else { | |
348 | 381 | let assetSheg = tryGetInteger(assetId) | |
349 | 382 | let tr = invoke(Address(marketplaceAddress), "putOnSale", [assetId, assetSheg, sellprice], nil) | |
350 | 383 | match tr { | |
351 | 384 | case t: Int => | |
352 | 385 | [DeleteEntry(getAssetOwnerKeyString(assetId)), DeleteEntry(assetId)] | |
353 | 386 | case _ => | |
354 | 387 | throw("Error putting the item on the marketplace") | |
355 | 388 | } | |
356 | 389 | } | |
357 | 390 | ||
358 | 391 |
github/deemru/w8io/169f3d6 50.76 ms ◑