tx · 7A3Ha7iLy3rQuNzYPXZLcqU6AMSMg4Jv1okYXwt2a4YU 3MtCto83UgaYLqkeqUVj3apiBt6YzTHgTsf: -0.01500000 Waves 2025.01.18 01:55 [3463736] smart account 3MtCto83UgaYLqkeqUVj3apiBt6YzTHgTsf > SELF 0.00000000 Waves
{ "type": 13, "id": "7A3Ha7iLy3rQuNzYPXZLcqU6AMSMg4Jv1okYXwt2a4YU", "fee": 1500000, "feeAssetId": null, "timestamp": 1737154561979, "version": 2, "chainId": 84, "sender": "3MtCto83UgaYLqkeqUVj3apiBt6YzTHgTsf", "senderPublicKey": "7w98hrFimkZ4X8eVspfS6M6P1C8twEuqbXBchKv5zUkn", "proofs": [ "7te45ZPsSinzax2QgdS2V9yVeuA8wb6PiMkNgenCnwwaPdfNiz3N8ChAPiFKJcsBRHZ2MgSyC3xEGiF2zRaJac6" ], "script": "base64:AAIFAAAAAAAAABcIAhIECgIICBIDCgEIEgMKAQgSAwoBCAAAADQBAAAAF3N0YXRpY0tleV9vcmFjbGVBZGRyZXNzAAAAAAIAAAAUc3RhdGljX29yYWNsZUFkZHJlc3MBAAAAFHN0YXRpY0tleV9lZ2dBc3NldElkAAAAAAIAAAARc3RhdGljX2VnZ0Fzc2V0SWQBAAAAGHN0YXRpY0tleV9icmVlZGVyQWRkcmVzcwAAAAACAAAAFXN0YXRpY19icmVlZGVyQWRkcmVzcwEAAAAac3RhdGljS2V5X2luY3ViYXRvckFkZHJlc3MAAAAAAgAAABdzdGF0aWNfaW5jdWJhdG9yQWRkcmVzcwEAAAAZc3RhdGljS2V5X2JhYnlEdWNrQWRkcmVzcwAAAAACAAAAFnN0YXRpY19iYWJ5RHVja0FkZHJlc3MBAAAAGHN0YXRpY0tleV9mYXJtaW5nQWRkcmVzcwAAAAACAAAAGHN0YXRpY19mYXJtaW5nQWRkcmVzc05ldwEAAAAZc3RhdGljS2V5X2NmTWFzdGVyQWRkcmVzcwAAAAACAAAAFnN0YXRpY19jZk1hc3RlckFkZHJ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AAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAJdGhpcmRVc2VyAAAAAAAAAAABAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACXRoaXJkVXNlcgAAAAAAAAAAAQMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAl0aGlyZFVzZXIAAAAAAAAAAAEAAAAAAAAAAAAEAAAAD3NpZ25hdHVyZXNDb3VudAkAAGQAAAACCQAAZAAAAAIFAAAAD2ZpcnN0VXNlclNpZ25lZAUAAAAQc2Vjb25kVXNlclNpZ25lZAUAAAAPdGhpcmRVc2VyU2lnbmVkBAAAAAckbWF0Y2gwBQAAAAJ0eAkAAGcAAAACBQAAAA9zaWduYXR1cmVzQ291bnQAAAAAAAAAAAHyOm5D", "height": 3463736, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 28PurJ8i8d4Yid8Go6UAUd8uNaxRP8qbpW8LQLUrwr3t Next: none Diff:
Old | New | Differences | |
---|---|---|---|
59 | 59 | ||
60 | 60 | ||
61 | 61 | func staticKey_felineBreederAddress () = "static_felineBreederAddress" | |
62 | + | ||
63 | + | ||
64 | + | func staticKey_eagleBreederAddress () = "static_eagleBreederAddress" | |
65 | + | ||
66 | + | ||
67 | + | func staticKey_eagleFarmingAddress () = "static_eagleStakingAddress" | |
62 | 68 | ||
63 | 69 | ||
64 | 70 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
156 | 162 | func getFelineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineBreederAddress()))) | |
157 | 163 | ||
158 | 164 | ||
159 | - | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getMutantFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress()] | |
165 | + | func getEagleFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_eagleFarmingAddress()))) | |
166 | + | ||
167 | + | ||
168 | + | func getEagleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_eagleBreederAddress()))) | |
169 | + | ||
170 | + | ||
171 | + | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getMutantFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress(), getEagleFarmingAddress(), getEagleBreederAddress()] | |
160 | 172 | ||
161 | 173 | ||
162 | 174 | func masterTryGetBoolean (key) = match getBoolean(getCfMasterAddress(), key) { |
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 | 16 | func staticKey_babyDuckAddress () = "static_babyDuckAddress" | |
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 | + | ||
63 | + | ||
64 | + | func staticKey_eagleBreederAddress () = "static_eagleBreederAddress" | |
65 | + | ||
66 | + | ||
67 | + | func staticKey_eagleFarmingAddress () = "static_eagleStakingAddress" | |
62 | 68 | ||
63 | 69 | ||
64 | 70 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
65 | 71 | case b: Boolean => | |
66 | 72 | b | |
67 | 73 | case _ => | |
68 | 74 | false | |
69 | 75 | } | |
70 | 76 | ||
71 | 77 | ||
72 | 78 | func tryGetInteger (key) = match getInteger(this, key) { | |
73 | 79 | case b: Int => | |
74 | 80 | b | |
75 | 81 | case _ => | |
76 | 82 | 0 | |
77 | 83 | } | |
78 | 84 | ||
79 | 85 | ||
80 | 86 | func isValidAddress (address) = match addressFromString(address) { | |
81 | 87 | case a: Address => | |
82 | 88 | true | |
83 | 89 | case _ => | |
84 | 90 | false | |
85 | 91 | } | |
86 | 92 | ||
87 | 93 | ||
88 | 94 | func tryGetStringExternal (address,key) = match getString(address, key) { | |
89 | 95 | case a: String => | |
90 | 96 | a | |
91 | 97 | case _ => | |
92 | 98 | "" | |
93 | 99 | } | |
94 | 100 | ||
95 | 101 | ||
96 | 102 | func tryGetString (key) = tryGetStringExternal(this, key) | |
97 | 103 | ||
98 | 104 | ||
99 | 105 | func getOracle () = Address(fromBase58String(tryGetString(staticKey_oracleAddress()))) | |
100 | 106 | ||
101 | 107 | ||
102 | 108 | func getEggAssetId () = fromBase58String(tryGetStringExternal(getOracle(), staticKey_eggAssetId())) | |
103 | 109 | ||
104 | 110 | ||
105 | 111 | func getBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_breederAddress()))) | |
106 | 112 | ||
107 | 113 | ||
108 | 114 | func getIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_incubatorAddress()))) | |
109 | 115 | ||
110 | 116 | ||
111 | 117 | func getBabyDuckAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_babyDuckAddress()))) | |
112 | 118 | ||
113 | 119 | ||
114 | 120 | func getFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_farmingAddress()))) | |
115 | 121 | ||
116 | 122 | ||
117 | 123 | func getCfMasterAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_cfMasterAddress()))) | |
118 | 124 | ||
119 | 125 | ||
120 | 126 | func getHuntAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_huntAddress()))) | |
121 | 127 | ||
122 | 128 | ||
123 | 129 | func getRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_rebirthAddress()))) | |
124 | 130 | ||
125 | 131 | ||
126 | 132 | func getTurtleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleBreederAddress()))) | |
127 | 133 | ||
128 | 134 | ||
129 | 135 | func getTurtleIncubatorAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleIncubatorAddress()))) | |
130 | 136 | ||
131 | 137 | ||
132 | 138 | func getTurtleStakingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleStakingAddress()))) | |
133 | 139 | ||
134 | 140 | ||
135 | 141 | func getTurtleRebirthAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_turtleRebirthAddress()))) | |
136 | 142 | ||
137 | 143 | ||
138 | 144 | func getCapacityAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_capacityAddress()))) | |
139 | 145 | ||
140 | 146 | ||
141 | 147 | func getVeggFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_veggFarmingAddress()))) | |
142 | 148 | ||
143 | 149 | ||
144 | 150 | func getMutantFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_mutantFarmingAddress()))) | |
145 | 151 | ||
146 | 152 | ||
147 | 153 | func getFelineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineFarmingAddress()))) | |
148 | 154 | ||
149 | 155 | ||
150 | 156 | func getCanineFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineFarmingAddress()))) | |
151 | 157 | ||
152 | 158 | ||
153 | 159 | func getCanineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_canineBreederAddress()))) | |
154 | 160 | ||
155 | 161 | ||
156 | 162 | func getFelineBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_felineBreederAddress()))) | |
157 | 163 | ||
158 | 164 | ||
159 | - | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getMutantFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress()] | |
165 | + | func getEagleFarmingAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_eagleFarmingAddress()))) | |
166 | + | ||
167 | + | ||
168 | + | func getEagleBreederAddress () = Address(fromBase58String(tryGetStringExternal(getOracle(), staticKey_eagleBreederAddress()))) | |
169 | + | ||
170 | + | ||
171 | + | func getTrustedAddress () = [getBreederAddress(), getBabyDuckAddress(), getFarmingAddress(), getHuntAddress(), getRebirthAddress(), getTurtleBreederAddress(), getTurtleIncubatorAddress(), getTurtleStakingAddress(), getTurtleRebirthAddress(), getCapacityAddress(), getVeggFarmingAddress(), getMutantFarmingAddress(), getFelineFarmingAddress(), getCanineFarmingAddress(), getCanineBreederAddress(), getFelineBreederAddress(), getEagleFarmingAddress(), getEagleBreederAddress()] | |
160 | 172 | ||
161 | 173 | ||
162 | 174 | func masterTryGetBoolean (key) = match getBoolean(getCfMasterAddress(), key) { | |
163 | 175 | case b: Boolean => | |
164 | 176 | b | |
165 | 177 | case _ => | |
166 | 178 | false | |
167 | 179 | } | |
168 | 180 | ||
169 | 181 | ||
170 | 182 | func isTestEnv () = tryGetBoolean("TESTENV") | |
171 | 183 | ||
172 | 184 | ||
173 | 185 | @Callable(i) | |
174 | 186 | func addRefKey (refererAddress,refererKey) = if ((i.caller != this)) | |
175 | 187 | then throw("admin only") | |
176 | 188 | else { | |
177 | 189 | let refStateKey = (("key_" + refererKey) + "_refererAddress") | |
178 | 190 | if ((tryGetString(refStateKey) == "")) | |
179 | 191 | then [StringEntry(refStateKey, refererAddress), StringEntry(((("address_" + refererAddress) + "_refererKey_") + refererKey), refererKey)] | |
180 | 192 | else throw((("The ref key \"" + refererKey) + "\" is already registered")) | |
181 | 193 | } | |
182 | 194 | ||
183 | 195 | ||
184 | 196 | ||
185 | 197 | @Callable(i) | |
186 | 198 | func whitelistAddress (refererAddress) = if ((i.caller != this)) | |
187 | 199 | then throw("RF: Only for admin!") | |
188 | 200 | else [BooleanEntry((refererAddress + "_whitelisted"), true)] | |
189 | 201 | ||
190 | 202 | ||
191 | 203 | ||
192 | 204 | @Callable(i) | |
193 | 205 | func refPayment (refererKey) = { | |
194 | 206 | let dao = if (isTestEnv()) | |
195 | 207 | then "3Mx9X6Dpj3thXL2So77C4DG9AmBM4WX8Mvw" | |
196 | 208 | else "3PEwRcYNAUtoFvKpBhKoiwajnZfdoDR6h4h" | |
197 | 209 | let alreadySend = tryGetInteger("dao_refund") | |
198 | 210 | let sendFundsToDao = $Tuple2([ScriptTransfer(addressFromStringValue(dao), i.payments[0].amount, i.payments[0].assetId), IntegerEntry("dao_refund", (alreadySend + i.payments[0].amount))], true) | |
199 | 211 | let referalAddress = toString(i.originCaller) | |
200 | 212 | if ((indexOf(getTrustedAddress(), i.caller) == unit)) | |
201 | 213 | then throw("RC: This method can be called only by farming and incubator dApps") | |
202 | 214 | else if (if ((refererKey == "")) | |
203 | 215 | then (tryGetString((("address_" + referalAddress) + "_referedBy")) == "") | |
204 | 216 | else false) | |
205 | 217 | then sendFundsToDao | |
206 | 218 | else if (masterTryGetBoolean(("farm_" + referalAddress))) | |
207 | 219 | then sendFundsToDao | |
208 | 220 | else { | |
209 | 221 | let givenReferer = match getString(this, (("key_" + refererKey) + "_refererAddress")) { | |
210 | 222 | case x: String => | |
211 | 223 | x | |
212 | 224 | case _ => | |
213 | 225 | refererKey | |
214 | 226 | } | |
215 | 227 | let refererAddress = match getString(this, (("address_" + referalAddress) + "_referedBy")) { | |
216 | 228 | case x: String => | |
217 | 229 | x | |
218 | 230 | case _ => | |
219 | 231 | givenReferer | |
220 | 232 | } | |
221 | 233 | let refAmount = i.payments[0].amount | |
222 | 234 | if ((i.payments[0].assetId != getEggAssetId())) | |
223 | 235 | then throw("Don't try to cheat the system!") | |
224 | 236 | else if ((tryGetBoolean((refererAddress + "_whitelisted")) == false)) | |
225 | 237 | then sendFundsToDao | |
226 | 238 | else if ((addressFromString(refererAddress) == unit)) | |
227 | 239 | then sendFundsToDao | |
228 | 240 | else { | |
229 | 241 | let refererAddressValue = addressFromStringValue(refererAddress) | |
230 | 242 | let referalAddressValue = addressFromStringValue(referalAddress) | |
231 | 243 | let paymentForReferer = refAmount | |
232 | 244 | let refererEarnedReward = (("address_" + refererAddress) + "_earnedReward") | |
233 | 245 | let referalDeliveredReward = (((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_deliveredReward") | |
234 | 246 | if ((refererAddress == referalAddress)) | |
235 | 247 | then sendFundsToDao | |
236 | 248 | 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) | |
237 | 249 | } | |
238 | 250 | } | |
239 | 251 | } | |
240 | 252 | ||
241 | 253 | ||
242 | 254 | ||
243 | 255 | @Callable(i) | |
244 | 256 | func configureOracle (oracle) = if ((i.caller != this)) | |
245 | 257 | then throw("RCCO: admin only") | |
246 | 258 | else [StringEntry(staticKey_oracleAddress(), oracle)] | |
247 | 259 | ||
248 | 260 | ||
249 | 261 | @Verifier(tx) | |
250 | 262 | func verify () = if (isTestEnv()) | |
251 | 263 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
252 | 264 | else { | |
253 | 265 | let firstUser = base58'6TdaXEfhnjYquvPf3yV7MFxt2CbgFmaqsvGwkKfXtKi4' | |
254 | 266 | let secondUser = base58'7DsP2WaMLocbHuUxux7pbXRjTrrZ1TFQPsi5QumS3gr8' | |
255 | 267 | let thirdUser = base58'BpFWP3p3JgYrrP45xfrKzeMcWMEXoinj4FVPPkUiA8D3' | |
256 | 268 | let firstUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], firstUser)) | |
257 | 269 | then 1 | |
258 | 270 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], firstUser)) | |
259 | 271 | then 1 | |
260 | 272 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], firstUser)) | |
261 | 273 | then 1 | |
262 | 274 | else 0 | |
263 | 275 | let secondUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], secondUser)) | |
264 | 276 | then 1 | |
265 | 277 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], secondUser)) | |
266 | 278 | then 1 | |
267 | 279 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], secondUser)) | |
268 | 280 | then 1 | |
269 | 281 | else 0 | |
270 | 282 | let thirdUserSigned = if (sigVerify(tx.bodyBytes, tx.proofs[0], thirdUser)) | |
271 | 283 | then 1 | |
272 | 284 | else if (sigVerify(tx.bodyBytes, tx.proofs[1], thirdUser)) | |
273 | 285 | then 1 | |
274 | 286 | else if (sigVerify(tx.bodyBytes, tx.proofs[2], thirdUser)) | |
275 | 287 | then 1 | |
276 | 288 | else 0 | |
277 | 289 | let signaturesCount = ((firstUserSigned + secondUserSigned) + thirdUserSigned) | |
278 | 290 | match tx { | |
279 | 291 | case _ => | |
280 | 292 | (signaturesCount >= 1) | |
281 | 293 | } | |
282 | 294 | } | |
283 | 295 |
github/deemru/w8io/169f3d6 41.15 ms ◑