tx · fcQRuhVrrbT7R4BY6hnzkUhw7EkUFAepqc6zHcuckpY 3MtCto83UgaYLqkeqUVj3apiBt6YzTHgTsf: -0.01500000 Waves 2024.11.09 17:42 [3364044] smart account 3MtCto83UgaYLqkeqUVj3apiBt6YzTHgTsf > SELF 0.00000000 Waves
{ "type": 13, "id": "fcQRuhVrrbT7R4BY6hnzkUhw7EkUFAepqc6zHcuckpY", "fee": 1500000, "feeAssetId": null, "timestamp": 1731163361360, "version": 2, "chainId": 84, "sender": "3MtCto83UgaYLqkeqUVj3apiBt6YzTHgTsf", "senderPublicKey": "7w98hrFimkZ4X8eVspfS6M6P1C8twEuqbXBchKv5zUkn", "proofs": [ "3sEnW6EpqdrTWz2ZcqyyMob6awA6QbWC9opaNs6za6Yaj6gJ6ytdcXNjJwhVRDrdrcSsBZgVmZbUZE8e5fqZJSQc" ], "script": "base64:AAIFAAAAAAAAABcIAhIECgIICBIDCgEIEgMKAQgSAwoBCAAAADABAAAAF3N0YXRpY0tleV9vcmFjbGVBZGRyZXNzAAAAAAIAAAAUc3RhdGljX29yYWNsZUFkZHJlc3MBAAAAFHN0YXRpY0tleV9lZ2dBc3NldElkAAAAAAIAAAARc3RhdGljX2VnZ0Fzc2V0SWQBAAAAGHN0YXRpY0tleV9icmVlZGVyQWRkcmVzcwAAAAACAAAAFXN0YXRpY19icmVlZGVyQWRkcmVzcwEAAAAac3RhdGljS2V5X2luY3ViYXRvckFkZHJlc3MAAAAAAgAAABdzdGF0aWNfaW5jdWJhdG9yQWRkcmVzcwEAAAAZc3RhdGljS2V5X2JhYnlEdWNrQWRkcmVzcwAAAAACAAAAF3N0YXRpY19pbmN1YmF0b3JBZGRyZXNzAQAAABhzdGF0aWNLZXlfZmFybWluZ0FkZHJlc3MAAAAAAgAAABhzdGF0aWNfZmFybWluZ0FkZHJlc3NOZXcBAAAAGXN0YXRpY0tleV9jZk1hc3RlckFkZHJlc3MAAAAAAgAAABZzdGF0aWNfY2ZNYXN0ZXJBZGRyZX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CeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABBQAAAApzZWNvbmRVc2VyAAAAAAAAAAABAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAACnNlY29uZFVzZXIAAAAAAAAAAAEAAAAAAAAAAAAEAAAAD3RoaXJkVXNlclNpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAl0aGlyZFVzZXIAAAAAAAAAAAEDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAJdGhpcmRVc2VyAAAAAAAAAAABAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAACXRoaXJkVXNlcgAAAAAAAAAAAQAAAAAAAAAAAAQAAAAPc2lnbmF0dXJlc0NvdW50CQAAZAAAAAIJAABkAAAAAgUAAAAPZmlyc3RVc2VyU2lnbmVkBQAAABBzZWNvbmRVc2VyU2lnbmVkBQAAAA90aGlyZFVzZXJTaWduZWQEAAAAByRtYXRjaDAFAAAAAnR4CQAAZwAAAAIFAAAAD3NpZ25hdHVyZXNDb3VudAAAAAAAAAAAArui+T4=", "height": 3364044, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7SfjurDbC1RKwS3TZkCSa5x5kHSuxrscbvDxFR7NhxTg Next: Cy3BQQPnEamPa6eW5X2CWLdPfhoBv8FkZUEDBfr72jRy Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | func staticKey_incubatorAddress () = "static_incubatorAddress" | |
14 | 14 | ||
15 | 15 | ||
16 | - | func staticKey_babyDuckAddress () = "static_ | |
16 | + | func staticKey_babyDuckAddress () = "static_incubatorAddress" | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func staticKey_farmingAddress () = "static_farmingAddressNew" | |
156 | 156 | func getFelineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineBreederAddress()))) | |
157 | 157 | ||
158 | 158 | ||
159 | - | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress()] | |
159 | + | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getMutantFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress()] | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func masterTryGetBoolean (key) = match getBoolean(getCfMasterAddress(), key) { | |
191 | 191 | ||
192 | 192 | @Callable(i) | |
193 | 193 | func refPayment (refererKey) = { | |
194 | - | let dao = " | |
194 | + | let dao = "3PEwRcYNAUtoFvKpBhKoiwajnZfdoDR6h4h" | |
195 | 195 | let alreadySend = tryGetInteger("dao_refund") | |
196 | 196 | let sendFundsToDao = $Tuple2([ScriptTransfer(addressFromStringValue(dao), i.payments[0].amount, i.payments[0].assetId), IntegerEntry("dao_refund", (alreadySend + i.payments[0].amount))], true) | |
197 | 197 | let referalAddress = toString(i.originCaller) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func staticKey_oracleAddress () = "static_oracleAddress" | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func staticKey_eggAssetId () = "static_eggAssetId" | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func staticKey_breederAddress () = "static_breederAddress" | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func staticKey_incubatorAddress () = "static_incubatorAddress" | |
14 | 14 | ||
15 | 15 | ||
16 | - | func staticKey_babyDuckAddress () = "static_ | |
16 | + | func staticKey_babyDuckAddress () = "static_incubatorAddress" | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func staticKey_farmingAddress () = "static_farmingAddressNew" | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func staticKey_cfMasterAddress () = "static_cfMasterAddress" | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func staticKey_huntAddress () = "static_huntAddress" | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func staticKey_rebirthAddress () = "static_rebirthAddress" | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func staticKey_turtleBreederAddress () = "static_turtleBreederAddress" | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func staticKey_turtleIncubatorAddress () = "static_turtleIncubatorAddress" | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func staticKey_turtleStakingAddress () = "static_turtleStakingAddress" | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func staticKey_turtleRebirthAddress () = "static_turtleRebirthAddress" | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func staticKey_capacityAddress () = "static_capacityAddress" | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func staticKey_veggFarmingAddress () = "static_veggFarmingAddress" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func staticKey_mutantFarmingAddress () = "static_mutantFarmingAddress" | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func staticKey_felineFarmingAddress () = "static_felineStakingAddress" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func staticKey_canineFarmingAddress () = "static_canineStakingAddress" | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func staticKey_canineBreederAddress () = "static_canineBreederAddress" | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func staticKey_felineBreederAddress () = "static_felineBreederAddress" | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
65 | 65 | case b: Boolean => | |
66 | 66 | b | |
67 | 67 | case _ => | |
68 | 68 | false | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func tryGetInteger (key) = match getInteger(this, key) { | |
73 | 73 | case b: Int => | |
74 | 74 | b | |
75 | 75 | case _ => | |
76 | 76 | 0 | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func isValidAddress (address) = match addressFromString(address) { | |
81 | 81 | case a: Address => | |
82 | 82 | true | |
83 | 83 | case _ => | |
84 | 84 | false | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
89 | 89 | case a: String => | |
90 | 90 | a | |
91 | 91 | case _ => | |
92 | 92 | "" | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func tryGetString (key) = tryGetStringExternal(this, key) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress()))) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress()))) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_babyDuckAddress()))) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_farmingAddress()))) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getCfMasterAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_cfMasterAddress()))) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getHuntAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_huntAddress()))) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_rebirthAddress()))) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getTurtleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleBreederAddress()))) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getTurtleIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleIncubatorAddress()))) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getTurtleStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleStakingAddress()))) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getTurtleRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleRebirthAddress()))) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func getCapacityAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_capacityAddress()))) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func getVeggFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_veggFarmingAddress()))) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func getMutantFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_mutantFarmingAddress()))) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func getFelineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineFarmingAddress()))) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func getCanineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineFarmingAddress()))) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getCanineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress()))) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func getFelineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineBreederAddress()))) | |
157 | 157 | ||
158 | 158 | ||
159 | - | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress()] | |
159 | + | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getMutantFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress()] | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func masterTryGetBoolean (key) = match getBoolean(getCfMasterAddress(), key) { | |
163 | 163 | case b: Boolean => | |
164 | 164 | b | |
165 | 165 | case _ => | |
166 | 166 | false | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func isTestEnv () = tryGetBoolean("TESTENV") | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(i) | |
174 | 174 | func addRefKey (refererAddress,refererKey) = if ((i.caller != this)) | |
175 | 175 | then throw("admin only") | |
176 | 176 | else { | |
177 | 177 | let refStateKey = (("key_" + refererKey) + "_refererAddress") | |
178 | 178 | if ((tryGetString(refStateKey) == "")) | |
179 | 179 | then [StringEntry(refStateKey, refererAddress), StringEntry(((("address_" + refererAddress) + "_refererKey_") + refererKey), refererKey)] | |
180 | 180 | else throw((("The ref key \"" + refererKey) + "\" is already registered")) | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | ||
185 | 185 | @Callable(i) | |
186 | 186 | func whitelistAddress (refererAddress) = if ((i.caller != this)) | |
187 | 187 | then throw("RF: Only for admin!") | |
188 | 188 | else [BooleanEntry((refererAddress + "_whitelisted"), true)] | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | ||
192 | 192 | @Callable(i) | |
193 | 193 | func refPayment (refererKey) = { | |
194 | - | let dao = " | |
194 | + | let dao = "3PEwRcYNAUtoFvKpBhKoiwajnZfdoDR6h4h" | |
195 | 195 | let alreadySend = tryGetInteger("dao_refund") | |
196 | 196 | let sendFundsToDao = $Tuple2([ScriptTransfer(addressFromStringValue(dao), i.payments[0].amount, i.payments[0].assetId), IntegerEntry("dao_refund", (alreadySend + i.payments[0].amount))], true) | |
197 | 197 | let referalAddress = toString(i.originCaller) | |
198 | 198 | if ((indexOf(getTrustedAddress(), i.caller) == unit)) | |
199 | 199 | then throw("RC: This method can be called only by farming and incubator dApps") | |
200 | 200 | else if (if ((refererKey == "")) | |
201 | 201 | then (tryGetString((("address_" + referalAddress) + "_referedBy")) == "") | |
202 | 202 | else false) | |
203 | 203 | then sendFundsToDao | |
204 | 204 | else if (masterTryGetBoolean(("farm_" + referalAddress))) | |
205 | 205 | then sendFundsToDao | |
206 | 206 | else { | |
207 | 207 | let givenReferer = match getString(this, (("key_" + refererKey) + "_refererAddress")) { | |
208 | 208 | case x: String => | |
209 | 209 | x | |
210 | 210 | case _ => | |
211 | 211 | refererKey | |
212 | 212 | } | |
213 | 213 | let refererAddress = match getString(this, (("address_" + referalAddress) + "_referedBy")) { | |
214 | 214 | case x: String => | |
215 | 215 | x | |
216 | 216 | case _ => | |
217 | 217 | givenReferer | |
218 | 218 | } | |
219 | 219 | let refAmount = i.payments[0].amount | |
220 | 220 | if ((i.payments[0].assetId != getEggAssetId())) | |
221 | 221 | then throw("Don't try to cheat the system!") | |
222 | 222 | else if ((tryGetBoolean((refererAddress + "_whitelisted")) == false)) | |
223 | 223 | then sendFundsToDao | |
224 | 224 | else if ((addressFromString(refererAddress) == unit)) | |
225 | 225 | then sendFundsToDao | |
226 | 226 | else { | |
227 | 227 | let refererAddressValue = addressFromStringValue(refererAddress) | |
228 | 228 | let referalAddressValue = addressFromStringValue(referalAddress) | |
229 | 229 | let paymentForReferer = refAmount | |
230 | 230 | let refererEarnedReward = (("address_" + refererAddress) + "_earnedReward") | |
231 | 231 | let referalDeliveredReward = (((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_deliveredReward") | |
232 | 232 | if ((refererAddress == referalAddress)) | |
233 | 233 | then sendFundsToDao | |
234 | 234 | else $Tuple2([StringEntry((("address_" + referalAddress) + "_referedBy"), refererAddress), IntegerEntry(refererEarnedReward, (tryGetInteger(refererEarnedReward) + paymentForReferer)), IntegerEntry(referalDeliveredReward, (tryGetInteger(referalDeliveredReward) + paymentForReferer)), IntegerEntry((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount"), (tryGetInteger((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount")) + 1)), ScriptTransfer(refererAddressValue, paymentForReferer, getEggAssetId())], true) | |
235 | 235 | } | |
236 | 236 | } | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | ||
241 | 241 | @Callable(i) | |
242 | 242 | func configureOracle (oracle) = if ((i.caller != this)) | |
243 | 243 | then throw("RCCO: admin only") | |
244 | 244 | else [StringEntry(staticKey_oracleAddress(), oracle)] | |
245 | 245 | ||
246 | 246 | ||
247 | 247 | @Verifier(tx) | |
248 | 248 | func verify () = if (isTestEnv()) | |
249 | 249 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
250 | 250 | else { | |
251 | 251 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
252 | 252 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
253 | 253 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
254 | 254 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
255 | 255 | then 1 | |
256 | 256 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
257 | 257 | then 1 | |
258 | 258 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
259 | 259 | then 1 | |
260 | 260 | else 0 | |
261 | 261 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
262 | 262 | then 1 | |
263 | 263 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
264 | 264 | then 1 | |
265 | 265 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
266 | 266 | then 1 | |
267 | 267 | else 0 | |
268 | 268 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
269 | 269 | then 1 | |
270 | 270 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
271 | 271 | then 1 | |
272 | 272 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
273 | 273 | then 1 | |
274 | 274 | else 0 | |
275 | 275 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
276 | 276 | match tx { | |
277 | 277 | case _ => | |
278 | 278 | (signaturesCount >= 2) | |
279 | 279 | } | |
280 | 280 | } | |
281 | 281 |
github/deemru/w8io/026f985 45.47 ms ◑