tx · 4qev3vWMjsBWQ1ZrXyfyF9qa6nKfhxCGQaTwxb4tiY3X

3MsNfeY3eRCNZXXyoFwekaSqsaTdrXKLqfF:  -0.01660000 Waves

2020.10.20 21:31 [1229249] smart account 3MsNfeY3eRCNZXXyoFwekaSqsaTdrXKLqfF > SELF 0.00000000 Waves

{ "type": 13, "id": "4qev3vWMjsBWQ1ZrXyfyF9qa6nKfhxCGQaTwxb4tiY3X", "fee": 1660000, "feeAssetId": null, "timestamp": 1603218684983, "version": 2, "chainId": 84, "sender": "3MsNfeY3eRCNZXXyoFwekaSqsaTdrXKLqfF", "senderPublicKey": "9HTwTKruTGvJ6qj6TnQU71EtPTv5eQNsXyuFgW1x3JvZ", "proofs": [ "32GGhtb9hp9bsW6DawXDwPnewRiHdWkFe8FCK62aH8ZtaP11s7cpnaZmfBAKPfMmPH66Dv4D3syVFezNZ98zK2p1" ], "script": "base64:AAIDAAAAAAAAABEIARIAEgASABIAEgMKAQESAAAAAAAAAAAGAAAAAWkBAAAAFFJlYWRNYXhHb3Zlcm5EZXBvc2l0AAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAtTdGFrZWRUb2tlbgEAAAAgRcBshwjyRR7E4jbQIGP2jvCbtpj52Gvg2osXltv2/UMEAAAAC0dvdmVyblRva2VuAQAAACC8BnLNTH75zY/85pKTg3cOi9DRRgrZqRPS5vvLPGg8zQQAAAASVXNlclN0YWtlZFRva2VuS2V5CQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAFfCQACWAAAAAEFAAAAC1N0YWtlZFRva2VuBAAAABJVc2VyR292ZXJuVG9rZW5LZXkJAAEsAAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQA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gUAAAAVVXNlckdvdmVyblRva2VuQW1vdW50AAAAAAAAAABkCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAALUHJpemVXaW5uZXIFAAAAC1ByaXplQW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJGdW5kQm94U3Rha2VkVG9rZW4AAAAAAAAAAAAJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAElVzZXJHb3Zlcm5Ub2tlbktleQAAAAAAAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAALUHJpemVBbW91bnQFAAAAC1N0YWtlZFRva2VuCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAZAUAAAALR292ZXJuVG9rZW4FAAAAA25pbAkAAAIAAAABCQABLAAAAAICAAAAR1lvdSBoYXZlIHRvIGRlcG9zaXQgMTAwIEdvdmVyblRva2VuIHRvIGNsYWltIFJld2FyZCAKIFlvdXIgQmFsYW5jZSBpczogCQABpAAAAAEFAAAAFVVzZXJHb3Zlcm5Ub2tlbkFtb3VudAAAAAAkGMlS", "height": 1229249, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 61QND4MqLAiAHrXbbDCPFFLCS4iWSPDpgLNbtqKgTaVU Next: 9mXwazf9yVNDNg9zefCde6pDhYr8gu2QDqxoZCQgfogz Diff:
OldNewDifferences
186186 then throw(("You have to Stake StakedToken to claim reward
187187 Your Balance of Staked Tokens is: " + toString(UserStakedTokenAmount)))
188188 else if ((UserGovernTokenAmount > 100))
189- then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry(FundBoxStakedToken, 0), DataEntry(MaxGovernTokenDepositerKey, 0), DataEntry(UserGovernTokenKey, 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)]))
189+ then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry(FundBoxStakedToken, 0), DataEntry(UserGovernTokenKey, 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)]))
190190 else throw(("You have to deposit 100 GovernToken to claim Reward
191191 Your Balance is: " + toString(UserGovernTokenAmount)))
192192 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func ReadMaxGovernDeposit () = {
88 let GovernTokenKey = "GovernTokenMaxDeposit"
99 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
1010 let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
1111 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
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, ReadUserGovernTokenKey) {
2323 case a: Int =>
2424 a
2525 case _ =>
2626 0
2727 }
2828 let ReadUserStakedTokenKey = getStringValue(this, UserStakedTokenKey)
2929 let UserStakedTokenBalance = match getInteger(this, ReadUserStakedTokenKey) {
3030 case a: Int =>
3131 a
3232 case _ =>
3333 0
3434 }
3535 throw(((("Winner is.....: " + Winner) + "
3636 Total GovernToken: ") + toString(MaxGovernTokenDeposit)))
3737 }
3838
3939
4040
4141 @Callable(i)
4242 func payYield () = {
4343 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
4444 let currentKey = toBase58String(i.caller.bytes)
4545 let currentAmount = match getInteger(this, currentKey) {
4646 case a: Int =>
4747 a
4848 case _ =>
4949 0
5050 }
5151 if ((currentAmount > 0))
5252 then {
5353 let GovernTokenAmount = assetBalance(this, GovernToken)
5454 if ((1 > GovernTokenAmount))
5555 then throw("No enough GovernToken In Contract")
5656 else ScriptResult(WriteSet([DataEntry(currentKey, 10)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken)]))
5757 }
5858 else throw("You need to deposit Collateral Token to receive Govern Token")
5959 }
6060
6161
6262
6363 @Callable(i)
6464 func Stake () = {
6565 let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
6666 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
6767 let pmt = extract(i.payment)
6868 if (if (isDefined(pmt.assetId))
6969 then (extract(pmt.assetId) == StakedToken)
7070 else false)
7171 then {
7272 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
7373 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
7474 let currentAmount = match getInteger(this, UserStakedTokenKey) {
7575 case a: Int =>
7676 a
7777 case _ =>
7878 0
7979 }
8080 let newAmount = (currentAmount + pmt.amount)
8181 let GovernTokenSmartContractBalance = assetBalance(this, GovernToken)
8282 if ((1 > GovernTokenSmartContractBalance))
8383 then throw("No enough GovernToken In Contract")
8484 else ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, 10), DataEntry(UserStakedTokenKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, 10, GovernToken)]))
8585 }
8686 else throw("Can deposit only StakeToken")
8787 }
8888
8989
9090
9191 @Callable(i)
9292 func DepositGovernToken () = {
9393 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
9494 let GovernTokenMaxDeposit = toBase58String(GovernToken)
9595 let pmt = extract(i.payment)
9696 if (if (isDefined(pmt.assetId))
9797 then (extract(pmt.assetId) == GovernToken)
9898 else false)
9999 then {
100100 let currentKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
101101 let currentAmount = match getInteger(this, currentKey) {
102102 case a: Int =>
103103 a
104104 case _ =>
105105 0
106106 }
107107 let CurrrentGovernTokenDeposit = (currentAmount + pmt.amount)
108108 let GovernTokenKey = "GovernTokenMaxDeposit"
109109 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
110110 let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) {
111111 case a: Int =>
112112 a
113113 case _ =>
114114 0
115115 }
116116 if (if ((CurrrentGovernTokenDeposit > MaxGovernTokenDeposit))
117117 then true
118118 else (MaxGovernTokenDeposit == 0))
119119 then WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit), DataEntry(GovernTokenKey, CurrrentGovernTokenDeposit), DataEntry(MaxGovernTokenDepositerKey, currentKey)])
120120 else WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit)])
121121 }
122122 else throw("Can deposit only Govern Token")
123123 }
124124
125125
126126
127127 @Callable(i)
128128 func WithdrawStakedFunds (amount) = {
129129 let CollateralToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
130130 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
131131 let currentKey = toBase58String(i.caller.bytes)
132132 let currentAmount = match getInteger(this, currentKey) {
133133 case a: Int =>
134134 a
135135 case _ =>
136136 0
137137 }
138138 let newAmount = (currentAmount - amount)
139139 if ((0 > amount))
140140 then throw("Can't withdraw negative amount")
141141 else if ((0 > newAmount))
142142 then throw("User cannot withdraw more than deposited funds")
143143 else {
144144 let GovernTokenAmount = assetBalance(this, GovernToken)
145145 if ((1 > GovernTokenAmount))
146146 then throw("No enough GovernToken In Contract")
147147 else ScriptResult(WriteSet([DataEntry(currentKey, 1), DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken), ScriptTransfer(i.caller, amount, CollateralToken)]))
148148 }
149149 }
150150
151151
152152
153153 @Callable(i)
154154 func ClaimPrize () = {
155155 let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
156156 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
157157 let FundBoxAddress58 = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
158158 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
159159 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
160160 let FundBoxStakedToken = ((toBase58String(FundBoxAddress58) + "_") + toBase58String(StakedToken))
161161 let UserGovernTokenAmount = match getInteger(this, UserGovernTokenKey) {
162162 case a: Int =>
163163 a
164164 case _ =>
165165 0
166166 }
167167 let UserStakedTokenAmount = match getInteger(this, UserStakedTokenKey) {
168168 case a: Int =>
169169 a
170170 case _ =>
171171 0
172172 }
173173 let PrizeAmount = match getInteger(this, FundBoxStakedToken) {
174174 case a: Int =>
175175 a
176176 case _ =>
177177 0
178178 }
179179 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
180180 let PrizeWinner = getStringValue(this, MaxGovernTokenDepositerKey)
181181 if ((PrizeAmount == 0))
182182 then throw("No prize to Claim")
183183 else if ((UserGovernTokenKey != PrizeWinner))
184184 then throw("You are not the winner hence cannot claim the reward ")
185185 else if ((1 > UserStakedTokenAmount))
186186 then throw(("You have to Stake StakedToken to claim reward
187187 Your Balance of Staked Tokens is: " + toString(UserStakedTokenAmount)))
188188 else if ((UserGovernTokenAmount > 100))
189- then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry(FundBoxStakedToken, 0), DataEntry(MaxGovernTokenDepositerKey, 0), DataEntry(UserGovernTokenKey, 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)]))
189+ then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry(FundBoxStakedToken, 0), DataEntry(UserGovernTokenKey, 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)]))
190190 else throw(("You have to deposit 100 GovernToken to claim Reward
191191 Your Balance is: " + toString(UserGovernTokenAmount)))
192192 }
193193
194194

github/deemru/w8io/026f985 
70.44 ms