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