tx · 3hMEWSW212rKCDSJyXx2F4zxnjzhXQDf7yozAe43cjV3 3N5ecXT7MHB6z33Ms2Pvy6thNVBMeacaACo: -0.01100000 Waves 2023.08.17 10:53 [2714317] smart account 3N5ecXT7MHB6z33Ms2Pvy6thNVBMeacaACo > SELF 0.00000000 Waves
{ "type": 13, "id": "3hMEWSW212rKCDSJyXx2F4zxnjzhXQDf7yozAe43cjV3", "fee": 1100000, "feeAssetId": null, "timestamp": 1692258811529, "version": 2, "chainId": 84, "sender": "3N5ecXT7MHB6z33Ms2Pvy6thNVBMeacaACo", "senderPublicKey": "3WPc9rDre1YBs13teGnzt1PnEEQZXaaSTRU1tVuqLa4Z", "proofs": [ "4jJtgtsA7hKexQcwbRH6yPh1RqTTRUPKmcfVwX7q67RUQPTLYVnaULpwxG3Uz1ag6UtruSVjdcgjnNrRDDYHcrB7" ], "script": "base64:BgI/CAISDQoLGBgBAQEBAQEBCAgSABIAEgQKAgEIEgQKAgEIEgQKAgEIEgQKAgEIEgQKAgEIEgQKAgEIEgQKAgEIMQAUSU5JVElBTF9UT0tFTl9BTU9VTlQAgICapuqv4wEADVBFUkNFTlRfU0NBTEUA6AcADGtXRGFvQWRkcmVzcwILd0Rhb0FkZHJlc3MAC2tXRGFvQW1vdW50Agp3RGFvQW1vdW50AAlrV0Rhb0xvY2sCDndEYW9Mb2NrUGVyaW9kAAxrV0Rhb1Zlc3RpbmcCEXdEYW9WZXN0aW5nUGVyaW9kAA9rV0Rhb1dpdGhkcmF3ZWQCDndEYW9XaXRoZHJhd2VkAAxrVGVhbUFkZHJlc3MCC3RlYW1BZGRyZXNzAAtrVGVhbUFtb3VudAIKdGVhbUFtb3VudAAJa1RlYW1Mb2NrAg50ZWFtTG9ja1BlcmlvZAAMa1RlYW1WZXN0aW5nAhF0ZWFtVmVzdGluZ1BlcmlvZAAPa1RlYW1XaXRoZHJhd2VkAg50ZWFtV2l0aGRyYXdlZAAQa01hcmtldGluZ0Ftb3VudAIMbWFya2V0QW1v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atus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: G1pV52N1z7QqxYVYtun2utbbnWZcCguKSv8ZGyt1wgMa Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let INITIAL_TOKEN_AMOUNT = 1000000000000000 | |
5 | + | ||
6 | + | let PERCENT_SCALE = 1000 | |
7 | + | ||
8 | + | let kWDaoAddress = "wDaoAddress" | |
9 | + | ||
10 | + | let kWDaoAmount = "wDaoAmount" | |
11 | + | ||
12 | + | let kWDaoLock = "wDaoLockPeriod" | |
13 | + | ||
14 | + | let kWDaoVesting = "wDaoVestingPeriod" | |
15 | + | ||
16 | + | let kWDaoWithdrawed = "wDaoWithdrawed" | |
17 | + | ||
18 | + | let kTeamAddress = "teamAddress" | |
19 | + | ||
20 | + | let kTeamAmount = "teamAmount" | |
21 | + | ||
22 | + | let kTeamLock = "teamLockPeriod" | |
23 | + | ||
24 | + | let kTeamVesting = "teamVestingPeriod" | |
25 | + | ||
26 | + | let kTeamWithdrawed = "teamWithdrawed" | |
27 | + | ||
28 | + | let kMarketingAmount = "marketAmount" | |
29 | + | ||
30 | + | let kMarketingWithdrawed = "marketingWithdrawed" | |
31 | + | ||
32 | + | let kPartnerAmount = "partnerAmount" | |
33 | + | ||
34 | + | let kPartnersWithdrawed = "partnersWithdrawed" | |
35 | + | ||
36 | + | let kRetroDropAmount = "retroDropAmount" | |
37 | + | ||
38 | + | let kRetroDropWithdrawed = "retroDropWithdrawed" | |
39 | + | ||
40 | + | let kLendRewardAmount = "lendRewardsAmount" | |
41 | + | ||
42 | + | let kLendRewardWithdrawed = "lendRewardWithdrawed" | |
43 | + | ||
44 | + | let kLPRewardAmount = "lpRewardAmount" | |
45 | + | ||
46 | + | let kLPRewardWithdrawed = "lpRewardWithdrawed" | |
47 | + | ||
48 | + | let kPoolInitAmount = "poolInitAmount" | |
49 | + | ||
50 | + | let kPoolInitWithdrawed = "poolInitWithdrawed" | |
51 | + | ||
52 | + | let kLaunchpadAmount = "launchpadAmount" | |
53 | + | ||
54 | + | let kLaunchpadWithdrawed = "launchpadWithdrawed" | |
55 | + | ||
56 | + | let kAXLYTokenId = "axlyTokenId" | |
57 | + | ||
58 | + | let kStartHeight = "startHeight" | |
59 | + | ||
60 | + | let kAdmin1PK = "group1_admin1_pub_key" | |
61 | + | ||
62 | + | let kAdmin2PK = "group1_admin2_pub_key" | |
63 | + | ||
64 | + | let kAdmin3PK = "group1_admin3_pub_key" | |
65 | + | ||
66 | + | let kAxlyMainContract = "mainContract" | |
67 | + | ||
68 | + | let kAxlyFarming = "farmingAddress" | |
69 | + | ||
70 | + | let mainContract = addressFromStringValue(valueOrErrorMessage(getString(this, kAxlyMainContract), "Can't get mainContact key")) | |
71 | + | ||
72 | + | let farmingAddress = addressFromStringValue(valueOrErrorMessage(getString(this, kAxlyFarming), "Can't get farmingAddress key")) | |
73 | + | ||
74 | + | let admin1PK = fromBase58String(valueOrErrorMessage(getString(mainContract, kAdmin1PK), "Can't get admin1PK")) | |
75 | + | ||
76 | + | let admin2PK = fromBase58String(valueOrErrorMessage(getString(mainContract, kAdmin2PK), "Can't get admin2PK")) | |
77 | + | ||
78 | + | let admin3PK = fromBase58String(valueOrErrorMessage(getString(mainContract, kAdmin3PK), "Can't get admin3PK")) | |
79 | + | ||
80 | + | let AXLYId = fromBase58String(getStringValue(this, kAXLYTokenId)) | |
81 | + | ||
82 | + | func isAdminCall (i) = if (containsElement([admin1PK, admin2PK, admin3PK], i.callerPublicKey)) | |
83 | + | then unit | |
84 | + | else throw("Only admin group1 can call this function") | |
85 | + | ||
86 | + | ||
87 | + | func isSelfCall (i) = if ((i.caller == this)) | |
88 | + | then unit | |
89 | + | else throw("Only contract itself can call this function") | |
90 | + | ||
91 | + | ||
92 | + | func isFarmingCall (i) = if ((i.caller == farmingAddress)) | |
93 | + | then unit | |
94 | + | else throw("Only farming contract can call this function") | |
95 | + | ||
96 | + | ||
97 | + | func parsePercentParamToAmount (param) = { | |
98 | + | let percent = match param { | |
99 | + | case p: Int => | |
100 | + | p | |
101 | + | case p: String => | |
102 | + | valueOrErrorMessage(parseInt(p), "Can't parse percent in params") | |
103 | + | case _ => | |
104 | + | throw("Match error") | |
105 | + | } | |
106 | + | if (if ((0 >= percent)) | |
107 | + | then true | |
108 | + | else (percent >= PERCENT_SCALE)) | |
109 | + | then throw("percent must be number between 1(0.1) and 999(99.9)") | |
110 | + | else { | |
111 | + | let amount = fraction(INITIAL_TOKEN_AMOUNT, percent, PERCENT_SCALE) | |
112 | + | amount | |
113 | + | } | |
114 | + | } | |
115 | + | ||
116 | + | ||
117 | + | func parseLockVestingPeriod (lockStr,vestStr) = { | |
118 | + | let lockPeriod = valueOrErrorMessage(parseInt(lockStr), "Can't parse lock period") | |
119 | + | let vestingPeriod = valueOrErrorMessage(parseInt(vestStr), "Can't parse vesting period") | |
120 | + | if (if ((0 >= lockPeriod)) | |
121 | + | then true | |
122 | + | else (0 >= vestingPeriod)) | |
123 | + | then throw("lockPeriod and vestingPeriod must be greater than 0") | |
124 | + | else if ((lockPeriod > vestingPeriod)) | |
125 | + | then throw("vestingPeriod must be greater than lockPeriod") | |
126 | + | else $Tuple2(lockPeriod, vestingPeriod) | |
127 | + | } | |
128 | + | ||
129 | + | ||
130 | + | func validateAddress (aStr) = toString(valueOrErrorMessage(addressFromString(aStr), "Wrong address in params")) | |
131 | + | ||
132 | + | ||
133 | + | func parseWDAOTeamParams (params) = { | |
134 | + | let address = validateAddress(params[0]) | |
135 | + | let amount = parsePercentParamToAmount(params[1]) | |
136 | + | let $t045414619 = parseLockVestingPeriod(params[2], params[3]) | |
137 | + | let lockPeriod = $t045414619._1 | |
138 | + | let vestingPeriod = $t045414619._2 | |
139 | + | $Tuple4(address, amount, lockPeriod, vestingPeriod) | |
140 | + | } | |
141 | + | ||
142 | + | ||
143 | + | func parseParams (params) = { | |
144 | + | let address = validateAddress(params[0]) | |
145 | + | let amount = parsePercentParamToAmount(params[1]) | |
146 | + | $Tuple2(address, amount) | |
147 | + | } | |
148 | + | ||
149 | + | ||
150 | + | func withdrawTeamDao (totalAmount,lockPeriod,vestingPeriod,withdrawed,address,wKey) = { | |
151 | + | let startHeight = getIntegerValue(this, kStartHeight) | |
152 | + | let lockTill = (startHeight + lockPeriod) | |
153 | + | let vestingTill = ((startHeight + lockPeriod) + vestingPeriod) | |
154 | + | let canWithdraw = (fraction(totalAmount, min([(height - (startHeight + lockPeriod)), vestingTill]), vestingPeriod) - withdrawed) | |
155 | + | if ((lockTill >= height)) | |
156 | + | then throw("Lock period is not end") | |
157 | + | else if ((0 >= canWithdraw)) | |
158 | + | then throw("Nothing to withdraw") | |
159 | + | else [IntegerEntry(wKey, (withdrawed + canWithdraw)), ScriptTransfer(address, canWithdraw, AXLYId)] | |
160 | + | } | |
161 | + | ||
162 | + | ||
163 | + | func withdrawToOther (amount,totalAmount,withdrawed,address,wKey) = if (((withdrawed + amount) > totalAmount)) | |
164 | + | then throw(((("You can't withdraw more than " + toString(totalAmount)) + " already withdrawed: ") + toString(withdrawed))) | |
165 | + | else [IntegerEntry(wKey, (withdrawed + amount)), ScriptTransfer(address, amount, AXLYId)] | |
166 | + | ||
167 | + | ||
168 | + | @Callable(i) | |
169 | + | func init (wDaoParams,teamParams,marketingPercent,partnerPercent,retroDropPercent,lendRewardPercent,lpRewardPercent,poolInitPercent,launchpadPercent,mainContractAddr,farmingAddr) = valueOrElse(isSelfCall(i), if ((size(wDaoParams) != 4)) | |
170 | + | then throw("wDaoParams must have 4 args") | |
171 | + | else if ((size(teamParams) != 4)) | |
172 | + | then throw("teamParams must have 4 args") | |
173 | + | else if ((0 >= marketingPercent)) | |
174 | + | then throw("marketingPercent must be > 0") | |
175 | + | else if ((0 >= partnerPercent)) | |
176 | + | then throw("partnerPercent must be > 0") | |
177 | + | else if ((0 >= retroDropPercent)) | |
178 | + | then throw("retroDropPercent must be > 0") | |
179 | + | else if ((0 >= lendRewardPercent)) | |
180 | + | then throw("lendRewardParams must be > 0") | |
181 | + | else if ((0 >= lpRewardPercent)) | |
182 | + | then throw("lpRewardParams must be > 0") | |
183 | + | else if ((0 >= poolInitPercent)) | |
184 | + | then throw("poolInitParams must be > 0") | |
185 | + | else if (!(isDefined(addressFromString(farmingAddr)))) | |
186 | + | then throw("Wrong farming address") | |
187 | + | else if (!(isDefined(addressFromString(mainContractAddr)))) | |
188 | + | then throw("Wrong main contract address") | |
189 | + | else { | |
190 | + | let $t072527350 = parseWDAOTeamParams(wDaoParams) | |
191 | + | let wDaoAddress = $t072527350._1 | |
192 | + | let wDaoAmount = $t072527350._2 | |
193 | + | let wDaoLockPeriod = $t072527350._3 | |
194 | + | let wDaoVestingPeriod = $t072527350._4 | |
195 | + | let $t073537451 = parseWDAOTeamParams(teamParams) | |
196 | + | let teamAddress = $t073537451._1 | |
197 | + | let teamAmount = $t073537451._2 | |
198 | + | let teamLockPeriod = $t073537451._3 | |
199 | + | let teamVestingPeriod = $t073537451._4 | |
200 | + | let mAmount = parsePercentParamToAmount(marketingPercent) | |
201 | + | let pAmount = parsePercentParamToAmount(partnerPercent) | |
202 | + | let rAmount = parsePercentParamToAmount(retroDropPercent) | |
203 | + | let lAmount = parsePercentParamToAmount(lendRewardPercent) | |
204 | + | let lpAmount = parsePercentParamToAmount(lpRewardPercent) | |
205 | + | let piAmount = parsePercentParamToAmount(poolInitPercent) | |
206 | + | let laAmount = parsePercentParamToAmount(launchpadPercent) | |
207 | + | let sum = (((((((wDaoAmount + teamAmount) + mAmount) + pAmount) + rAmount) + lAmount) + lpAmount) + piAmount) | |
208 | + | if ((sum > INITIAL_TOKEN_AMOUNT)) | |
209 | + | then throw("Wrong percents( > 100%)") | |
210 | + | else { | |
211 | + | let issue = Issue("AXLY", "AXLY protocol token", INITIAL_TOKEN_AMOUNT, 8, false) | |
212 | + | let idStr = toBase58String(calculateAssetId(issue)) | |
213 | + | [StringEntry(kWDaoAddress, wDaoAddress), IntegerEntry(kWDaoAmount, wDaoAmount), IntegerEntry(kWDaoLock, wDaoLockPeriod), IntegerEntry(kWDaoVesting, wDaoVestingPeriod), StringEntry(kTeamAddress, teamAddress), IntegerEntry(kTeamAmount, teamAmount), IntegerEntry(kTeamLock, teamLockPeriod), IntegerEntry(kTeamVesting, teamVestingPeriod), IntegerEntry(kMarketingAmount, mAmount), IntegerEntry(kPartnerAmount, pAmount), IntegerEntry(kRetroDropAmount, rAmount), IntegerEntry(kLendRewardAmount, lAmount), IntegerEntry(kLPRewardAmount, lpAmount), IntegerEntry(kPoolInitAmount, piAmount), IntegerEntry(kLaunchpadAmount, laAmount), IntegerEntry(kStartHeight, height), StringEntry(kAxlyMainContract, mainContractAddr), StringEntry(kAxlyFarming, farmingAddr), issue, StringEntry(kAXLYTokenId, idStr)] | |
214 | + | } | |
215 | + | }) | |
216 | + | ||
217 | + | ||
218 | + | ||
219 | + | @Callable(i) | |
220 | + | func withdrawWDao () = { | |
221 | + | let amount = getIntegerValue(this, kWDaoAmount) | |
222 | + | let lockPeriod = getIntegerValue(this, kWDaoLock) | |
223 | + | let vestingPeriod = getIntegerValue(this, kWDaoVesting) | |
224 | + | let address = addressFromStringValue(getStringValue(this, kWDaoAddress)) | |
225 | + | let withdrawed = valueOrElse(getInteger(this, kWDaoWithdrawed), 0) | |
226 | + | withdrawTeamDao(amount, lockPeriod, vestingPeriod, withdrawed, address, kWDaoWithdrawed) | |
227 | + | } | |
228 | + | ||
229 | + | ||
230 | + | ||
231 | + | @Callable(i) | |
232 | + | func withdrawTeam () = { | |
233 | + | let amount = getIntegerValue(this, kTeamAmount) | |
234 | + | let lockPeriod = getIntegerValue(this, kTeamLock) | |
235 | + | let vestingPeriod = getIntegerValue(this, kTeamVesting) | |
236 | + | let address = addressFromStringValue(getStringValue(this, kTeamAddress)) | |
237 | + | let withdrawed = valueOrElse(getInteger(this, kTeamWithdrawed), 0) | |
238 | + | withdrawTeamDao(amount, lockPeriod, vestingPeriod, withdrawed, address, kTeamWithdrawed) | |
239 | + | } | |
240 | + | ||
241 | + | ||
242 | + | ||
243 | + | @Callable(i) | |
244 | + | func withdrawMarketing (amount,addressStr) = valueOrElse(isSelfCall(i), { | |
245 | + | let totalAmount = getIntegerValue(this, kMarketingAmount) | |
246 | + | let withdrawed = getIntegerValue(this, kMarketingWithdrawed) | |
247 | + | let address = addressFromStringValue(addressStr) | |
248 | + | withdrawToOther(amount, totalAmount, withdrawed, address, kMarketingWithdrawed) | |
249 | + | }) | |
250 | + | ||
251 | + | ||
252 | + | ||
253 | + | @Callable(i) | |
254 | + | func withdrawPartners (amount,addressStr) = valueOrElse(isSelfCall(i), { | |
255 | + | let totalAmount = getIntegerValue(this, kPartnerAmount) | |
256 | + | let withdrawed = getIntegerValue(this, kPartnersWithdrawed) | |
257 | + | let address = addressFromStringValue(addressStr) | |
258 | + | withdrawToOther(amount, totalAmount, withdrawed, address, kPartnersWithdrawed) | |
259 | + | }) | |
260 | + | ||
261 | + | ||
262 | + | ||
263 | + | @Callable(i) | |
264 | + | func withdrawRetroDraop (amount,addressStr) = valueOrElse(isSelfCall(i), { | |
265 | + | let totalAmount = getIntegerValue(this, kRetroDropAmount) | |
266 | + | let withdrawed = getIntegerValue(this, kRetroDropWithdrawed) | |
267 | + | let address = addressFromStringValue(addressStr) | |
268 | + | withdrawToOther(amount, totalAmount, withdrawed, address, kRetroDropWithdrawed) | |
269 | + | }) | |
270 | + | ||
271 | + | ||
272 | + | ||
273 | + | @Callable(i) | |
274 | + | func withdrawPollInit (amount,addressStr) = valueOrElse(isSelfCall(i), { | |
275 | + | let totalAmount = getIntegerValue(this, kPoolInitAmount) | |
276 | + | let withdrawed = getIntegerValue(this, kPoolInitWithdrawed) | |
277 | + | let address = addressFromStringValue(addressStr) | |
278 | + | withdrawToOther(amount, totalAmount, withdrawed, address, kPoolInitWithdrawed) | |
279 | + | }) | |
280 | + | ||
281 | + | ||
282 | + | ||
283 | + | @Callable(i) | |
284 | + | func withdrawLendReward (amount,addressToStr) = valueOrElse(isFarmingCall(i), { | |
285 | + | let totalAmount = getIntegerValue(this, kLendRewardAmount) | |
286 | + | let withdrawed = getIntegerValue(this, kLendRewardWithdrawed) | |
287 | + | let address = addressFromStringValue(addressToStr) | |
288 | + | withdrawToOther(amount, totalAmount, withdrawed, address, kLendRewardWithdrawed) | |
289 | + | }) | |
290 | + | ||
291 | + | ||
292 | + | ||
293 | + | @Callable(i) | |
294 | + | func withdrawLpReward (amount,addressToStr) = valueOrElse(isFarmingCall(i), { | |
295 | + | let totalAmount = getIntegerValue(this, kLPRewardAmount) | |
296 | + | let withdrawed = getIntegerValue(this, kLPRewardWithdrawed) | |
297 | + | let address = addressFromStringValue(addressToStr) | |
298 | + | withdrawToOther(amount, totalAmount, withdrawed, address, kLPRewardWithdrawed) | |
299 | + | }) | |
300 | + | ||
301 | + | ||
302 | + | ||
303 | + | @Callable(i) | |
304 | + | func withdrawLaunchpad (amount,addressToStr) = valueOrElse(isSelfCall(i), { | |
305 | + | let totalAmount = getIntegerValue(this, kLaunchpadAmount) | |
306 | + | let withdrawed = getIntegerValue(this, kLaunchpadWithdrawed) | |
307 | + | let address = addressFromStringValue(addressToStr) | |
308 | + | withdrawToOther(amount, totalAmount, withdrawed, address, kLaunchpadWithdrawed) | |
309 | + | }) | |
310 | + | ||
311 | + | ||
312 | + | @Verifier(tx) | |
313 | + | func verify () = { | |
314 | + | let multiSignedByAdmins = { | |
315 | + | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK)) | |
316 | + | then 1 | |
317 | + | else 0 | |
318 | + | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK)) | |
319 | + | then 1 | |
320 | + | else 0 | |
321 | + | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK)) | |
322 | + | then 1 | |
323 | + | else 0 | |
324 | + | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
325 | + | } | |
326 | + | match tx { | |
327 | + | case inv: InvokeScriptTransaction => | |
328 | + | let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
329 | + | let isRightFee = if ((inv.fee == 100900000)) | |
330 | + | then (inv.feeAssetId == unit) | |
331 | + | else false | |
332 | + | let isInitCall = (inv.function == "init") | |
333 | + | let isnoPayments = (size(inv.payments) == 0) | |
334 | + | if (if (if (if (isRightFee) | |
335 | + | then isInitCall | |
336 | + | else false) | |
337 | + | then isSelf | |
338 | + | else false) | |
339 | + | then isnoPayments | |
340 | + | else false) | |
341 | + | then true | |
342 | + | else multiSignedByAdmins | |
343 | + | case _ => | |
344 | + | multiSignedByAdmins | |
345 | + | } | |
346 | + | } | |
347 | + |
github/deemru/w8io/026f985 39.73 ms ◑