tx · DwGmwi2g5Xk3LCzP7qdttFw13iqfCeybT1dcU1YUMJtY

3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u:  -0.01440000 Waves

2020.12.28 20:37 [1328838] smart account 3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u > SELF 0.00000000 Waves

{ "type": 13, "id": "DwGmwi2g5Xk3LCzP7qdttFw13iqfCeybT1dcU1YUMJtY", "fee": 1440000, "feeAssetId": null, "timestamp": 1609177057414, "version": 2, "chainId": 84, "sender": "3N9eE86dXUm7rfc2WWCMLHkaEM4Y8yoNj7u", "senderPublicKey": "FFDorDp8bC9dyUK2w8hYPWPVEcbbk9zYkpHn3gcq9svn", "proofs": [ "AjRE38jUj8juVWfk47TcN7qGinjT44EfX3hNdQ94yjXM8xjpPNzpJZRmVBrquqkvLgQMVKe6WgGhHWdabfSS943" ], "script": "base64:AAIDAAAAAAAAABYIARIAEgASABIAEgMKAQESAwoBARIAAAAAAAAAAAcAAAABaQEAAAAMUmVhZFBvb2xEYXRhAAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAtTdGFrZWRUb2tlbgEAAAAg4kCrtAPNiHBMRPYvMCXeThBq6KlRf6cxe4yUvVS2aoUEAAAAC0dvdmVyblRva2VuAQAAACASiWf4V0Rs4Spwpaqhn2bfVjnt1mPO6pt7R8ZSZ6gxXgQAAAASVXNlclN0YWtlZFRva2VuS2V5CQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAFfCQACWAAAAAEFAAAAC1N0YWtlZFRva2VuBAAAABJVc2VyR292ZXJuVG9rZW5LZXkJAAEsAAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZX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AADkFuZCBIZWlnaHQgaXM6CQABpAAAAAEFAAAABmhlaWdodAAAAABKfM73", "height": 1328838, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9wDDtbcZ7fPoUZT1wdiuUomktNohjHCVarJoQbjYCsNR Next: 8E1q165G6qDHWwqekbn7ubVv1kHByzvEnschU773AJoD Diff:
OldNewDifferences
232232 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
233233 let FundBoxStakedToken = ((toBase58String(FundBoxAddress58) + "_") + toBase58String(StakedToken))
234234 let GovernTokenAmount = assetBalance(this, GovernToken)
235- let FundBoxHeight = (toBase58String(FundBoxAddress58) + "_PrizeHeight")
236235 let ContractWalletStakeBalance = assetBalance(this, StakedToken)
237236 let StakeBalance = match getInteger(this, "StakeBalance") {
238237 case a: Int =>
256255 let GovernTokenKey = "GovernTokenMaxDeposit"
257256 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
258257 let PrizeWinner = getStringValue(this, MaxGovernTokenDepositerKey)
259- let PrizeHeight = match getInteger(this, FundBoxHeight) {
258+ let PrizeHeight = match getInteger(this, "PrizeHeight") {
260259 case a: Int =>
261260 a
262261 case _ =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func ReadPoolData () = {
88 let GovernTokenKey = "GovernTokenMaxDeposit"
99 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
1010 let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr'
1111 let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P'
1212 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
1313 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
1414 let Winner = getStringValue(this, MaxGovernTokenDepositerKey)
1515 let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) {
1616 case a: Int =>
1717 a
1818 case _ =>
1919 0
2020 }
2121 let ReadUserGovernTokenKey = getStringValue(this, UserGovernTokenKey)
2222 let UserGovernTokenBalance = match getInteger(this, UserGovernTokenKey) {
2323 case a: Int =>
2424 a
2525 case _ =>
2626 0
2727 }
2828 let ReadUserStakedTokenKey = getStringValue(this, UserStakedTokenKey)
2929 let UserStakedTokenBalance = match getInteger(this, UserStakedTokenKey) {
3030 case a: Int =>
3131 a
3232 case _ =>
3333 0
3434 }
3535 throw(((((((("Winner is.....: " + Winner) + " Balance is: ") + toString(MaxGovernTokenDeposit)) + "
3636 Staked Token in your Balance is.....: ") + toString(UserStakedTokenBalance)) + "
3737 Govern Token in your Balance is.....: ") + toString(UserGovernTokenBalance)))
3838 }
3939
4040
4141
4242 @Callable(i)
4343 func ResetAccount () = {
4444 let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr'
4545 let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P'
4646 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
4747 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
4848 let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions")
4949 WriteSet([DataEntry(UserGovernTokenKey, 0), DataEntry(UserStakedTokenKey, 0), DataEntry(UserStakeTransactionsKey, 0)])
5050 }
5151
5252
5353
5454 @Callable(i)
5555 func Stake () = {
5656 let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr'
5757 let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P'
5858 let GovernTokenSmartContractBalance = assetBalance(this, GovernToken)
5959 let StakedTokenSmartContractBalance = assetBalance(this, StakedToken)
6060 let pmt = extract(i.payment)
6161 if (if ((pmt.amount > 0))
6262 then (pmt.assetId == StakedToken)
6363 else false)
6464 then {
6565 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
6666 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
6767 let UserStakeTransactionsKey = (toBase58String(i.caller.bytes) + "_StakedTransactions")
6868 let AddressHeight = (toBase58String(i.caller.bytes) + "_PrizeHeight")
6969 let UserStakeTransactions = match getInteger(this, UserStakeTransactionsKey) {
7070 case a: Int =>
7171 a
7272 case _ =>
7373 0
7474 }
7575 let NewUserStakeTransactions = (UserStakeTransactions + 1)
7676 let currentAmountStakedToken = match getInteger(this, UserStakedTokenKey) {
7777 case a: Int =>
7878 a
7979 case _ =>
8080 0
8181 }
8282 let newAmountStakedToken = (currentAmountStakedToken + pmt.amount)
8383 let ContractWalletStakeBalance = assetBalance(this, StakedToken)
8484 let StakeBalance = match getInteger(this, "StakeBalance") {
8585 case a: Int =>
8686 a
8787 case _ =>
8888 0
8989 }
9090 let StakeBalanceAmount = (StakeBalance + pmt.amount)
9191 let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
9292 let currentAmountGovernToken = match getInteger(this, UserGovernTokenKey) {
9393 case a: Int =>
9494 a
9595 case _ =>
9696 0
9797 }
9898 let HeightTransactFundBox = match getInteger(this, "PrizeHeight") {
9999 case a: Int =>
100100 a
101101 case _ =>
102102 0
103103 }
104104 let PrizeHeightValue = if (if ((HeightTransactFundBox == 0))
105105 then (PrizeAmount != 0)
106106 else false)
107107 then height
108108 else 0
109109 if ((1 > GovernTokenSmartContractBalance))
110110 then throw("No enough GovernToken In Contract, Please deposit GovernTokens")
111111 else if ((StakedTokenSmartContractBalance == 0))
112112 then {
113113 let newAmountGovernToken = (currentAmountGovernToken + 10)
114114 ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, newAmountGovernToken), DataEntry(UserStakedTokenKey, newAmountStakedToken), DataEntry(UserStakeTransactionsKey, NewUserStakeTransactions), DataEntry("StakeBalance", StakeBalanceAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue)]), TransferSet([ScriptTransfer(i.caller, 10, GovernToken)]))
115115 }
116116 else if ((NewUserStakeTransactions > 50))
117117 then {
118118 let Reward = ((10 * NewUserStakeTransactions) * (newAmountStakedToken / StakedTokenSmartContractBalance))
119119 let newAmountGovernToken = (currentAmountGovernToken + Reward)
120120 ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, Reward), DataEntry(UserStakedTokenKey, newAmountStakedToken), DataEntry(UserStakeTransactionsKey, NewUserStakeTransactions), DataEntry("StakeBalance", StakeBalanceAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue)]), TransferSet([ScriptTransfer(i.caller, Reward, GovernToken)]))
121121 }
122122 else {
123123 let Reward = (10 * (newAmountStakedToken / StakedTokenSmartContractBalance))
124124 let newAmountGovernToken = (currentAmountGovernToken + Reward)
125125 ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, Reward), DataEntry(UserStakedTokenKey, newAmountStakedToken), DataEntry(UserStakeTransactionsKey, NewUserStakeTransactions), DataEntry("StakeBalance", StakeBalanceAmount), DataEntry("FundBox", PrizeAmount), DataEntry("PrizeHeight", PrizeHeightValue)]), TransferSet([ScriptTransfer(i.caller, Reward, GovernToken)]))
126126 }
127127 }
128128 else throw("Can deposit only StakeToken")
129129 }
130130
131131
132132
133133 @Callable(i)
134134 func DepositGovernToken () = {
135135 let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P'
136136 let GovernTokenMaxDeposit = toBase58String(GovernToken)
137137 let pmt = extract(i.payment)
138138 if (if (isDefined(pmt.assetId))
139139 then (extract(pmt.assetId) == GovernToken)
140140 else false)
141141 then {
142142 let currentKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
143143 let currentAmount = match getInteger(this, currentKey) {
144144 case a: Int =>
145145 a
146146 case _ =>
147147 0
148148 }
149149 let CurrrentGovernTokenDeposit = (currentAmount + pmt.amount)
150150 let GovernTokenKey = "GovernTokenMaxDeposit"
151151 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
152152 let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) {
153153 case a: Int =>
154154 a
155155 case _ =>
156156 0
157157 }
158158 if ((CurrrentGovernTokenDeposit > MaxGovernTokenDeposit))
159159 then WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit), DataEntry(GovernTokenKey, CurrrentGovernTokenDeposit), DataEntry(MaxGovernTokenDepositerKey, currentKey)])
160160 else WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit)])
161161 }
162162 else throw("Can deposit only Govern Token")
163163 }
164164
165165
166166
167167 @Callable(i)
168168 func WithdrawStakedFunds (amount) = {
169169 let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr'
170170 let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P'
171171 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
172172 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
173173 let currentKey = toBase58String(i.caller.bytes)
174174 let currentAmount = match getInteger(this, UserStakedTokenKey) {
175175 case a: Int =>
176176 a
177177 case _ =>
178178 0
179179 }
180180 let newAmount = (currentAmount - amount)
181181 let StakeBalance = match getInteger(this, "StakeBalance") {
182182 case a: Int =>
183183 a
184184 case _ =>
185185 0
186186 }
187187 let StakeBalanceAmount = (StakeBalance - amount)
188188 if ((0 > amount))
189189 then throw("Can't withdraw negative amount")
190190 else if ((0 > newAmount))
191191 then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(currentAmount)))
192192 else {
193193 let GovernTokenAmount = assetBalance(this, GovernToken)
194194 if ((1 > GovernTokenAmount))
195195 then throw("No enough GovernToken In Contract")
196196 else ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, 1), DataEntry(UserStakedTokenKey, newAmount), DataEntry("StakeBalance", StakeBalanceAmount)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken), ScriptTransfer(i.caller, amount, StakedToken)]))
197197 }
198198 }
199199
200200
201201
202202 @Callable(i)
203203 func HarvestGovernToiken (amount) = {
204204 let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P'
205205 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
206206 let currentKey = toBase58String(i.caller.bytes)
207207 let currentAmount = match getInteger(this, UserGovernTokenKey) {
208208 case a: Int =>
209209 a
210210 case _ =>
211211 0
212212 }
213213 let newAmount = (currentAmount - amount)
214214 if ((0 > amount))
215215 then throw("Can't withdraw negative amount")
216216 else if ((0 > newAmount))
217217 then throw(("User cannot withdraw more than deposited funds, Your deposit is: " + toString(currentAmount)))
218218 else {
219219 let GovernTokenAmount = assetBalance(this, GovernToken)
220220 ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, GovernToken)]))
221221 }
222222 }
223223
224224
225225
226226 @Callable(i)
227227 func ClaimPrize () = {
228228 let StakedToken = base58'GECLRH2fx2Xxix5gmrGV92AMt1A9LPohRpqwqRE16mwr'
229229 let GovernToken = base58'2FMrxDLdQhauSY7d1uDUyKP1MpxkM7BeWA2UMnk3cG3P'
230230 let FundBoxAddress58 = base58'3MsH5Hr1qQYUnwq4HTpiaGpXQi6cGPUsa5n'
231231 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
232232 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
233233 let FundBoxStakedToken = ((toBase58String(FundBoxAddress58) + "_") + toBase58String(StakedToken))
234234 let GovernTokenAmount = assetBalance(this, GovernToken)
235- let FundBoxHeight = (toBase58String(FundBoxAddress58) + "_PrizeHeight")
236235 let ContractWalletStakeBalance = assetBalance(this, StakedToken)
237236 let StakeBalance = match getInteger(this, "StakeBalance") {
238237 case a: Int =>
239238 a
240239 case _ =>
241240 0
242241 }
243242 let PrizeAmount = (ContractWalletStakeBalance - StakeBalance)
244243 let UserGovernTokenAmount = match getInteger(this, UserGovernTokenKey) {
245244 case a: Int =>
246245 a
247246 case _ =>
248247 0
249248 }
250249 let UserStakedTokenAmount = match getInteger(this, UserStakedTokenKey) {
251250 case a: Int =>
252251 a
253252 case _ =>
254253 0
255254 }
256255 let GovernTokenKey = "GovernTokenMaxDeposit"
257256 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
258257 let PrizeWinner = getStringValue(this, MaxGovernTokenDepositerKey)
259- let PrizeHeight = match getInteger(this, FundBoxHeight) {
258+ let PrizeHeight = match getInteger(this, "PrizeHeight") {
260259 case a: Int =>
261260 a
262261 case _ =>
263262 0
264263 }
265264 let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) {
266265 case a: Int =>
267266 a
268267 case _ =>
269268 0
270269 }
271270 if (if ((PrizeAmount == 0))
272271 then true
273272 else (100 > GovernTokenAmount))
274273 then throw("No prize to Claim or No enough Govern Token en Contract")
275274 else if ((UserGovernTokenKey != PrizeWinner))
276275 then throw("You are not the winner hence cannot claim the reward ")
277276 else if ((1 > UserStakedTokenAmount))
278277 then throw(("You have to Stake StakedToken to claim reward
279278 Your Balance of Staked Tokens is: " + toString(UserStakedTokenAmount)))
280279 else if (if (if ((UserGovernTokenAmount >= 100))
281280 then (height >= (PrizeHeight + 10))
282281 else false)
283282 then (height > 0)
284283 else false)
285284 then if ((UserGovernTokenAmount >= MaxGovernTokenDeposit))
286285 then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry("FundBox", 0), DataEntry(GovernTokenKey, 0), DataEntry(UserGovernTokenKey, 0), DataEntry(MaxGovernTokenDepositerKey, ""), DataEntry("PrizeHeight", 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)]))
287286 else throw((("You should deposit at least " + toString(MaxGovernTokenDeposit)) + " to be able to claim reward"))
288287 else throw(((((((("You have to deposit 100 GovernToken to claim Reward
289288 Your Balance is: " + toString(UserGovernTokenAmount)) + "
290289 Deposit done at: ") + toString(PrizeHeight)) + " And wait:") + toString((PrizeHeight + 10))) + "And Height is:") + toString(height)))
291290 }
292291
293292

github/deemru/w8io/026f985 
73.63 ms