tx · 8kn48XBvU8mbZR2vJgYdEya5fzLWBUR13VtNKHP6YKou

3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u:  -0.01440000 Waves

2021.01.26 21:04 [1370815] smart account 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u > SELF 0.00000000 Waves

{ "type": 13, "id": "8kn48XBvU8mbZR2vJgYdEya5fzLWBUR13VtNKHP6YKou", "fee": 1440000, "feeAssetId": null, "timestamp": 1611684286099, "version": 2, "chainId": 84, "sender": "3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u", "senderPublicKey": "FFDorDp8bC9dyUK2w8hYPWPVEcbbk9zYkpHn3gcq9svn", "proofs": [ "cEAGv8hWQ6RvHm2AxmG258ajC73CzmLsq52g6YJnkDertRyr8mb33bDJi3AFnLX2iBMVYbQDk68mDxxM7uT5wF1" ], "script": "base64:AAIDAAAAAAAAABIIARIAEgASAwoBARIDCgEBEgAAAAAAAAAABQAAAAFpAQAAAApQdXNoUmV3YXJkAAAAAAQAAAALU3Rha2VkVG9rZW4BAAAAILXRKGG85gSnPN40vyincnte9/w4CJZnKBhuOOwELCGyBAAAAAtHb3Zlcm5Ub2tlbgEAAAAgEID4OLobvW7l4Eafs479e9fJOrvsYRoAST8NKMW+XbkEAAAADG1pblB1c2hCbG9jawAAAAAAAAAACgQAAAANbWluU3Rha2VCbG9jawAAAAAAAAAABwQAAAAORGVsYXlBZnRlclB1c2gAAAAAAAAAABQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAAAJAAAAAAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAtHb3Zlcm5Ub2tlbgcEAAAACFVzZXJQdXNoCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAFX1B1c2gEAAAAEVVzZXJMYXN0UHVzaE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AAxOZXdEZWxheUNvc3QDCQAAAAAAAAIFAAAAD0FjdHVhbERlbGF5Q29zdAAAAAAAAAAAAAAAAAAAO5rKAAkAAGgAAAACAAAAAAAAAAACBQAAAA9BY3R1YWxEZWxheUNvc3QDCQAAZwAAAAIFAAAAFVVzZXJHb3Zlcm5Ub2tlbkFtb3VudAUAAAAMTmV3RGVsYXlDb3N0BAAAAAhOZXdEZWxheQkAAGQAAAACBQAAAAtBY3R1YWxEZWxheQkAAGgAAAACAAAAAAAAAAWgBQAAAAlEZWxheURheXMJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABURlbGF5BQAAAAhOZXdEZWxheQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAJRGVsYXlDb3N0BQAAAAxOZXdEZWxheUNvc3QJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAB0Z1bmRCb3gFAAAAC1ByaXplQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAtQcml6ZUhlaWdodAUAAAAGaGVpZ2h0BQAAAANuaWwJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAASVRvIGRlbGF5IHRoZSByZWxlYXNlIG9mIHRoZSByZXdhcmQgT05FIERBWSBsYXRlciB0aGFuIGV4cGVjdGVkLCB5b3UgbmVlZCAJAAGkAAAAAQUAAAAMTmV3RGVsYXlDb3N0AgAAAAdUUk9JS0FzCQAAAgAAAAECAAAAKUNhbiBVc2Ugb25seSBUcm9pa2EgVG9rZW4gdG8gRGVsYXkgUmV3YXJkAAAAAAsSVGA=", "height": 1370815, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 666guFnQ8HHT7U9w2uyp5VRe9GFDcJsf36q69AdoLwmf Next: 7UPLR17uqpw31V29B4q3fxGCpVwXhwH5VNVrof6TTJ6n Diff:
OldNewDifferences
292292 }
293293
294294
295+
296+@Callable(i)
297+func delayprize () = {
298+ let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21'
299+ let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA'
300+ let DelayDays = 1
301+ let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
302+ let UserWalletSGovernBalance = assetBalance(Address(i.caller.bytes), GovernToken)
303+ let ContractWalletStakeBalance = assetBalance(this, StakedToken)
304+ let StakeBalance = match getInteger(this, "StakeBalance") {
305+ case a: Int =>
306+ a
307+ case _ =>
308+ 0
309+ }
310+ let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
311+ let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
312+ case a: Int =>
313+ a
314+ case _ =>
315+ 0
316+ }
317+ let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
318+ then (PrizeAmount == 0)
319+ else false)
320+ then 0
321+ else if (if ((HeightTransactFundBox == 0))
322+ then (PrizeAmount != 0)
323+ else false)
324+ then height
325+ else if (if ((HeightTransactFundBox != 0))
326+ then (PrizeAmount != 0)
327+ else false)
328+ then HeightTransactFundBox
329+ else 0
330+ let ActualDelay = match getInteger(this, "Delay") {
331+ case a: Int =>
332+ a
333+ case _ =>
334+ 0
335+ }
336+ let ActualDelayCost = match getInteger(this, "DelayCost") {
337+ case a: Int =>
338+ a
339+ case _ =>
340+ 10
341+ }
342+ let pmt = extract(i.payment)
343+ if (if (isDefined(pmt.assetId))
344+ then (extract(pmt.assetId) == GovernToken)
345+ else false)
346+ then {
347+ let UserGovernTokenAmount = pmt.amount
348+ let NewDelayCost = if ((ActualDelayCost == 0))
349+ then 1000000000
350+ else (2 * ActualDelayCost)
351+ if ((UserGovernTokenAmount >= NewDelayCost))
352+ then {
353+ let NewDelay = (ActualDelay + (1440 * DelayDays))
354+ WriteSet([DataEntry("Delay", NewDelay), DataEntry("DelayCost", NewDelayCost), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", height)])
355+ }
356+ else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString(NewDelayCost)) + "TROIKAs"))
357+ }
358+ else throw("Can Use only Troika Token to Delay Reward")
359+ }
360+
361+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func PushReward () = {
88 let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21'
99 let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA'
1010 let minPushBlock = 10
1111 let minStakeBlock = 7
1212 let DelayAfterPush = 20
1313 let pmt = extract(i.payment)
1414 if (if ((pmt.amount > 0))
1515 then (pmt.assetId == GovernToken)
1616 else false)
1717 then {
1818 let UserPush = (toBase58String(i.caller.bytes) + "_Push")
1919 let UserLastPushBlock = (toBase58String(i.caller.bytes) + "_UserLastPushBlock")
2020 let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock")
2121 let UserStake = (toBase58String(i.caller.bytes) + "_Staking")
2222 let ContractWalletStakeBalance = assetBalance(this, StakedToken)
2323 let StakeBalance = match getInteger(this, "StakeBalance") {
2424 case a: Int =>
2525 a
2626 case _ =>
2727 0
2828 }
2929 let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
3030 let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
3131 case a: Int =>
3232 a
3333 case _ =>
3434 0
3535 }
3636 let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
3737 then (PrizeAmount == 0)
3838 else false)
3939 then 0
4040 else if (if ((HeightTransactFundBox == 0))
4141 then (PrizeAmount != 0)
4242 else false)
4343 then height
4444 else if (if ((HeightTransactFundBox != 0))
4545 then (PrizeAmount != 0)
4646 else false)
4747 then HeightTransactFundBox
4848 else 0
4949 let HighestPushValue = match getInteger(this, "HighestPush") {
5050 case a: Int =>
5151 a
5252 case _ =>
5353 0
5454 }
5555 let UserLastPushvalue = match getInteger(this, UserPush) {
5656 case a: Int =>
5757 a
5858 case _ =>
5959 0
6060 }
6161 let ActualDelay = match getInteger(this, "Delay") {
6262 case a: Int =>
6363 a
6464 case _ =>
6565 0
6666 }
6767 let NewDelay = (ActualDelay + DelayAfterPush)
6868 let HighestPushAddress = match getInteger(this, "HighestPushAddress") {
6969 case a: Int =>
7070 a
7171 case _ =>
7272 0
7373 }
7474 let UserLastPushBlockValue = match getInteger(this, UserLastPushBlock) {
7575 case a: Int =>
7676 a
7777 case _ =>
7878 0
7979 }
8080 let UserLastStakeBlockValue = match getInteger(this, UserLastStakeBlock) {
8181 case a: Int =>
8282 a
8383 case _ =>
8484 0
8585 }
8686 let UserStakeValue = match getInteger(this, UserStake) {
8787 case a: Int =>
8888 a
8989 case _ =>
9090 0
9191 }
9292 let UserPushvalue = (pmt.amount + UserLastPushvalue)
9393 if (if (if (if (if ((UserPushvalue > 0))
9494 then ((height - UserLastStakeBlockValue) > (1440 * minStakeBlock))
9595 else false)
9696 then ((height - UserLastPushBlockValue) > minPushBlock)
9797 else false)
9898 then (UserPushvalue > HighestPushValue)
9999 else false)
100100 then (UserStakeValue > 0)
101101 else false)
102102 then WriteSet([DataEntry(UserPush, UserPushvalue), DataEntry("HighestPushAddress", toBase58String(i.caller.bytes)), DataEntry("HighestPush", UserPushvalue), DataEntry(UserLastStakeBlock, height), DataEntry("PrizeHeight", height), DataEntry("Delay", NewDelay)])
103103 else throw((("Your Push dot not comply one of the following conditions: " + "<br> 1. Positive Value <br> 2. Must Staked ASIMI Token for a minimum of week <br> ") + "3. Should be Higher than last Highest Push <br> 4. Should wait required time between Pushes"))
104104 }
105105 else throw("Can deposit only positive amounts of ASIMI Token")
106106 }
107107
108108
109109
110110 @Callable(i)
111111 func Stake () = {
112112 let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21'
113113 let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA'
114114 let pmt = extract(i.payment)
115115 if (if ((pmt.amount > 0))
116116 then (pmt.assetId == StakedToken)
117117 else false)
118118 then {
119119 let GovernTokenSmartContractBalance = assetBalance(this, GovernToken)
120120 let UserAPY = (toBase58String(i.caller.bytes) + "_APY")
121121 let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking")
122122 let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings")
123123 let UserLastStakeBlock = (toBase58String(i.caller.bytes) + "_UserLastStakeBlock")
124124 let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions")
125125 let AddressHeight = (toBase58String(i.caller.bytes) + "_PrizeHeight")
126126 let UserStakeTransactions = match getInteger(this, UserStakeTransactionsKey) {
127127 case a: Int =>
128128 a
129129 case _ =>
130130 0
131131 }
132132 let NewUserStakeTransactions = (UserStakeTransactions + 1)
133133 let currentAmountStakedToken = match getInteger(this, UserStakedTokenKey) {
134134 case a: Int =>
135135 a
136136 case _ =>
137137 0
138138 }
139139 let newAmountStakedToken = (currentAmountStakedToken + pmt.amount)
140140 let ContractWalletStakeBalance = assetBalance(this, StakedToken)
141141 let StakeBalance = match getInteger(this, "StakeBalance") {
142142 case a: Int =>
143143 a
144144 case _ =>
145145 0
146146 }
147147 let StakeBalanceAmount = (StakeBalance + pmt.amount)
148148 let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
149149 let currentAmountGovernToken = match getInteger(this, UserGovernTokenKey) {
150150 case a: Int =>
151151 a
152152 case _ =>
153153 0
154154 }
155155 let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
156156 case a: Int =>
157157 a
158158 case _ =>
159159 0
160160 }
161161 let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
162162 then (PrizeAmount == 0)
163163 else false)
164164 then 0
165165 else if (if ((HeightTransactFundBox == 0))
166166 then (PrizeAmount != 0)
167167 else false)
168168 then height
169169 else if (if ((HeightTransactFundBox != 0))
170170 then (PrizeAmount != 0)
171171 else false)
172172 then HeightTransactFundBox
173173 else 0
174174 if ((100000000 > GovernTokenSmartContractBalance))
175175 then throw("No enough GovernToken In Contract, Please deposit GovernTokens")
176176 else {
177177 let Reward = if ((StakeBalance == 0))
178178 then 10000
179179 else if ((NewUserStakeTransactions > 10))
180180 then ((10000 * NewUserStakeTransactions) * (1 + (newAmountStakedToken / StakeBalance)))
181181 else (10000 * (1 + (newAmountStakedToken / StakeBalance)))
182182 let UserAPYValue = if ((currentAmountGovernToken > 0))
183183 then ((100 * Reward) / currentAmountGovernToken)
184184 else 0
185185 let newAmountGovernToken = (currentAmountGovernToken + Reward)
186186 ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, newAmountGovernToken), DataEntry(UserStakedTokenKey, newAmountStakedToken), DataEntry(UserStakeTransactionsKey, NewUserStakeTransactions), DataEntry("StakeBalance", StakeBalanceAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue), DataEntry(UserAPY, UserAPYValue), DataEntry(UserLastStakeBlock, height)]), TransferSet([ScriptTransfer(i.caller, Reward, GovernToken)]))
187187 }
188188 }
189189 else throw("Can deposit only StakeToken")
190190 }
191191
192192
193193
194194 @Callable(i)
195195 func WithdrawStakedFunds (amount) = {
196196 let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21'
197197 let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA'
198198 let UserStakedTokenKey = (toBase58String(i.caller.bytes) + "_Staking")
199199 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
200200 let ContractWalletStakeBalance = assetBalance(this, StakedToken)
201201 let StakeBalance = match getInteger(this, "StakeBalance") {
202202 case a: Int =>
203203 a
204204 case _ =>
205205 0
206206 }
207207 let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
208208 let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
209209 case a: Int =>
210210 a
211211 case _ =>
212212 0
213213 }
214214 let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
215215 then (PrizeAmount == 0)
216216 else false)
217217 then 0
218218 else if (if ((HeightTransactFundBox == 0))
219219 then (PrizeAmount != 0)
220220 else false)
221221 then height
222222 else if (if ((HeightTransactFundBox != 0))
223223 then (PrizeAmount != 0)
224224 else false)
225225 then HeightTransactFundBox
226226 else 0
227227 let currentKey = toBase58String(i.caller.bytes)
228228 let currentAmount = match getInteger(this, UserStakedTokenKey) {
229229 case a: Int =>
230230 a
231231 case _ =>
232232 0
233233 }
234234 let newAmount = (currentAmount - amount)
235235 let StakeBalanceAmount = (StakeBalance - amount)
236236 if ((0 > amount))
237237 then throw("Can't withdraw negative amount")
238238 else if ((0 > newAmount))
239239 then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((currentAmount / 100000000))))
240240 else if ((100000000 > assetBalance(this, GovernToken)))
241241 then throw(("Not enough Troika In Contract: " + toString((assetBalance(this, GovernToken) / 100000000))))
242242 else ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, 100000000), DataEntry(UserStakedTokenKey, newAmount), DataEntry("StakeBalance", StakeBalanceAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue)]), TransferSet([ScriptTransfer(i.caller, 100000000, GovernToken), ScriptTransfer(i.caller, amount, StakedToken)]))
243243 }
244244
245245
246246
247247 @Callable(i)
248248 func HarvestGovernToiken (amount) = {
249249 let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21'
250250 let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA'
251251 let ContractWalletStakeBalance = assetBalance(this, StakedToken)
252252 let UserGovernTokenKey = (toBase58String(i.caller.bytes) + "_Earnings")
253253 let StakeBalance = match getInteger(this, "StakeBalance") {
254254 case a: Int =>
255255 a
256256 case _ =>
257257 0
258258 }
259259 let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
260260 let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
261261 case a: Int =>
262262 a
263263 case _ =>
264264 0
265265 }
266266 let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
267267 then (PrizeAmount == 0)
268268 else false)
269269 then 0
270270 else if (if ((HeightTransactFundBox == 0))
271271 then (PrizeAmount != 0)
272272 else false)
273273 then height
274274 else if (if ((HeightTransactFundBox != 0))
275275 then (PrizeAmount != 0)
276276 else false)
277277 then HeightTransactFundBox
278278 else 0
279279 let currentKey = toBase58String(i.caller.bytes)
280280 let currentAmount = match getInteger(this, UserGovernTokenKey) {
281281 case a: Int =>
282282 a
283283 case _ =>
284284 0
285285 }
286286 let newAmount = (currentAmount - amount)
287287 if ((0 > amount))
288288 then throw("Can't withdraw negative amount")
289289 else if ((0 > newAmount))
290290 then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString((currentAmount / 100000000))))
291291 else ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, newAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue)]), TransferSet([ScriptTransfer(i.caller, amount, GovernToken)]))
292292 }
293293
294294
295+
296+@Callable(i)
297+func delayprize () = {
298+ let StakedToken = base58'DEjmrvdViZH7trtuAqaKQFjNjfbK6D7yMHm18UQ8Hj21'
299+ let GovernToken = base58'27RauQwTvdbcPqeFkzoTf5WPt3HtEAmRDVxprWUNp6bA'
300+ let DelayDays = 1
301+ let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
302+ let UserWalletSGovernBalance = assetBalance(Address(i.caller.bytes), GovernToken)
303+ let ContractWalletStakeBalance = assetBalance(this, StakedToken)
304+ let StakeBalance = match getInteger(this, "StakeBalance") {
305+ case a: Int =>
306+ a
307+ case _ =>
308+ 0
309+ }
310+ let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
311+ let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
312+ case a: Int =>
313+ a
314+ case _ =>
315+ 0
316+ }
317+ let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
318+ then (PrizeAmount == 0)
319+ else false)
320+ then 0
321+ else if (if ((HeightTransactFundBox == 0))
322+ then (PrizeAmount != 0)
323+ else false)
324+ then height
325+ else if (if ((HeightTransactFundBox != 0))
326+ then (PrizeAmount != 0)
327+ else false)
328+ then HeightTransactFundBox
329+ else 0
330+ let ActualDelay = match getInteger(this, "Delay") {
331+ case a: Int =>
332+ a
333+ case _ =>
334+ 0
335+ }
336+ let ActualDelayCost = match getInteger(this, "DelayCost") {
337+ case a: Int =>
338+ a
339+ case _ =>
340+ 10
341+ }
342+ let pmt = extract(i.payment)
343+ if (if (isDefined(pmt.assetId))
344+ then (extract(pmt.assetId) == GovernToken)
345+ else false)
346+ then {
347+ let UserGovernTokenAmount = pmt.amount
348+ let NewDelayCost = if ((ActualDelayCost == 0))
349+ then 1000000000
350+ else (2 * ActualDelayCost)
351+ if ((UserGovernTokenAmount >= NewDelayCost))
352+ then {
353+ let NewDelay = (ActualDelay + (1440 * DelayDays))
354+ WriteSet([DataEntry("Delay", NewDelay), DataEntry("DelayCost", NewDelayCost), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", height)])
355+ }
356+ else throw((("To delay the release of the reward ONE DAY later than expected, you need " + toString(NewDelayCost)) + "TROIKAs"))
357+ }
358+ else throw("Can Use only Troika Token to Delay Reward")
359+ }
360+
361+

github/deemru/w8io/873ac7e 
53.34 ms