tx · 9mXwazf9yVNDNg9zefCde6pDhYr8gu2QDqxoZCQgfogz

3MsNfeY3eRCNZXXyoFwekaSqsaTdrXKLqfF:  -0.01990000 Waves

2020.10.20 21:37 [1229254] smart account 3MsNfeY3eRCNZXXyoFwekaSqsaTdrXKLqfF > SELF 0.00000000 Waves

{ "type": 13, "id": "9mXwazf9yVNDNg9zefCde6pDhYr8gu2QDqxoZCQgfogz", "fee": 1990000, "feeAssetId": null, "timestamp": 1603219112117, "version": 2, "chainId": 84, "sender": "3MsNfeY3eRCNZXXyoFwekaSqsaTdrXKLqfF", "senderPublicKey": "9HTwTKruTGvJ6qj6TnQU71EtPTv5eQNsXyuFgW1x3JvZ", "proofs": [ "5khQZzFATqX6p7QNrS6twqvUtjEYtqyHVsb3pYXYxJ4m69AqSooHgcTfryeigxKZRk12HpEDW9NtfNzfzEUjPcXZ" ], "script": "base64:AAIDAAAAAAAAABEIARIAEgASABIAEgMKAQESAAAAAAAAAAAGAAAAAWkBAAAAFFJlYWRNYXhHb3Zlcm5EZXBvc2l0AAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAtTdGFrZWRUb2tlbgEAAAAgRcBshwjyRR7E4jbQIGP2jvCbtpj52Gvg2osXltv2/UMEAAAAC0dvdmVyblRva2VuAQAAACC8BnLNTH75zY/85pKTg3cOi9DRRgrZqRPS5vvLPGg8zQQAAAASVXNlclN0YWtlZFRva2VuS2V5CQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAFfCQACWAAAAAEFAAAAC1N0YWtlZFRva2VuBAAAABJVc2VyR292ZXJuVG9rZW5LZXkJAAEsAAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZ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AAAAAAAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAALUHJpemVBbW91bnQFAAAAC1N0YWtlZFRva2VuCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAZAUAAAALR292ZXJuVG9rZW4FAAAAA25pbAkAAAIAAAABCQABLAAAAAICAAAAR1lvdSBoYXZlIHRvIGRlcG9zaXQgMTAwIEdvdmVyblRva2VuIHRvIGNsYWltIFJld2FyZCAKIFlvdXIgQmFsYW5jZSBpczogCQABpAAAAAEFAAAAFVVzZXJHb3Zlcm5Ub2tlbkFtb3VudAAAAAAjlcIY", "height": 1229254, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4qev3vWMjsBWQ1ZrXyfyF9qa6nKfhxCGQaTwxb4tiY3X Next: 9QB7w3GT1pv6BkczSXE4kYkP89G5nQtYn9KrxAqL6fa9 Diff:
OldNewDifferences
2020 }
2121 let ReadUserGovernTokenKey = getStringValue(this, UserGovernTokenKey)
2222 let UserGovernTokenBalance = match getInteger(this, ReadUserGovernTokenKey) {
23- case a: Int =>
24- a
25- case _ =>
26- 0
27- }
28- let ReadUserStakedTokenKey = getStringValue(this, UserStakedTokenKey)
29- let UserStakedTokenBalance = match getInteger(this, ReadUserStakedTokenKey) {
3023 case a: Int =>
3124 a
3225 case _ =>
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) {
23- case a: Int =>
24- a
25- case _ =>
26- 0
27- }
28- let ReadUserStakedTokenKey = getStringValue(this, UserStakedTokenKey)
29- let UserStakedTokenBalance = match getInteger(this, ReadUserStakedTokenKey) {
3023 case a: Int =>
3124 a
3225 case _ =>
3326 0
3427 }
3528 throw(((("Winner is.....: " + Winner) + "
3629 Total GovernToken: ") + toString(MaxGovernTokenDeposit)))
3730 }
3831
3932
4033
4134 @Callable(i)
4235 func payYield () = {
4336 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
4437 let currentKey = toBase58String(i.caller.bytes)
4538 let currentAmount = match getInteger(this, currentKey) {
4639 case a: Int =>
4740 a
4841 case _ =>
4942 0
5043 }
5144 if ((currentAmount > 0))
5245 then {
5346 let GovernTokenAmount = assetBalance(this, GovernToken)
5447 if ((1 > GovernTokenAmount))
5548 then throw("No enough GovernToken In Contract")
5649 else ScriptResult(WriteSet([DataEntry(currentKey, 10)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken)]))
5750 }
5851 else throw("You need to deposit Collateral Token to receive Govern Token")
5952 }
6053
6154
6255
6356 @Callable(i)
6457 func Stake () = {
6558 let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
6659 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
6760 let pmt = extract(i.payment)
6861 if (if (isDefined(pmt.assetId))
6962 then (extract(pmt.assetId) == StakedToken)
7063 else false)
7164 then {
7265 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
7366 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
7467 let currentAmount = match getInteger(this, UserStakedTokenKey) {
7568 case a: Int =>
7669 a
7770 case _ =>
7871 0
7972 }
8073 let newAmount = (currentAmount + pmt.amount)
8174 let GovernTokenSmartContractBalance = assetBalance(this, GovernToken)
8275 if ((1 > GovernTokenSmartContractBalance))
8376 then throw("No enough GovernToken In Contract")
8477 else ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, 10), DataEntry(UserStakedTokenKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, 10, GovernToken)]))
8578 }
8679 else throw("Can deposit only StakeToken")
8780 }
8881
8982
9083
9184 @Callable(i)
9285 func DepositGovernToken () = {
9386 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
9487 let GovernTokenMaxDeposit = toBase58String(GovernToken)
9588 let pmt = extract(i.payment)
9689 if (if (isDefined(pmt.assetId))
9790 then (extract(pmt.assetId) == GovernToken)
9891 else false)
9992 then {
10093 let currentKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
10194 let currentAmount = match getInteger(this, currentKey) {
10295 case a: Int =>
10396 a
10497 case _ =>
10598 0
10699 }
107100 let CurrrentGovernTokenDeposit = (currentAmount + pmt.amount)
108101 let GovernTokenKey = "GovernTokenMaxDeposit"
109102 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
110103 let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) {
111104 case a: Int =>
112105 a
113106 case _ =>
114107 0
115108 }
116109 if (if ((CurrrentGovernTokenDeposit > MaxGovernTokenDeposit))
117110 then true
118111 else (MaxGovernTokenDeposit == 0))
119112 then WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit), DataEntry(GovernTokenKey, CurrrentGovernTokenDeposit), DataEntry(MaxGovernTokenDepositerKey, currentKey)])
120113 else WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit)])
121114 }
122115 else throw("Can deposit only Govern Token")
123116 }
124117
125118
126119
127120 @Callable(i)
128121 func WithdrawStakedFunds (amount) = {
129122 let CollateralToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
130123 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
131124 let currentKey = toBase58String(i.caller.bytes)
132125 let currentAmount = match getInteger(this, currentKey) {
133126 case a: Int =>
134127 a
135128 case _ =>
136129 0
137130 }
138131 let newAmount = (currentAmount - amount)
139132 if ((0 > amount))
140133 then throw("Can't withdraw negative amount")
141134 else if ((0 > newAmount))
142135 then throw("User cannot withdraw more than deposited funds")
143136 else {
144137 let GovernTokenAmount = assetBalance(this, GovernToken)
145138 if ((1 > GovernTokenAmount))
146139 then throw("No enough GovernToken In Contract")
147140 else ScriptResult(WriteSet([DataEntry(currentKey, 1), DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken), ScriptTransfer(i.caller, amount, CollateralToken)]))
148141 }
149142 }
150143
151144
152145
153146 @Callable(i)
154147 func ClaimPrize () = {
155148 let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
156149 let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
157150 let FundBoxAddress58 = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
158151 let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken))
159152 let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken))
160153 let FundBoxStakedToken = ((toBase58String(FundBoxAddress58) + "_") + toBase58String(StakedToken))
161154 let UserGovernTokenAmount = match getInteger(this, UserGovernTokenKey) {
162155 case a: Int =>
163156 a
164157 case _ =>
165158 0
166159 }
167160 let UserStakedTokenAmount = match getInteger(this, UserStakedTokenKey) {
168161 case a: Int =>
169162 a
170163 case _ =>
171164 0
172165 }
173166 let PrizeAmount = match getInteger(this, FundBoxStakedToken) {
174167 case a: Int =>
175168 a
176169 case _ =>
177170 0
178171 }
179172 let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey"
180173 let PrizeWinner = getStringValue(this, MaxGovernTokenDepositerKey)
181174 if ((PrizeAmount == 0))
182175 then throw("No prize to Claim")
183176 else if ((UserGovernTokenKey != PrizeWinner))
184177 then throw("You are not the winner hence cannot claim the reward ")
185178 else if ((1 > UserStakedTokenAmount))
186179 then throw(("You have to Stake StakedToken to claim reward
187180 Your Balance of Staked Tokens is: " + toString(UserStakedTokenAmount)))
188181 else if ((UserGovernTokenAmount > 100))
189182 then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry(FundBoxStakedToken, 0), DataEntry(UserGovernTokenKey, 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)]))
190183 else throw(("You have to deposit 100 GovernToken to claim Reward
191184 Your Balance is: " + toString(UserGovernTokenAmount)))
192185 }
193186
194187

github/deemru/w8io/026f985 
88.97 ms