tx · Hdsb21yL2a9KVv3iJU5nDwbjhjmwbLFn1DriWJ5z3Cw6

3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ:  -0.01990000 Waves

2020.10.20 20:05 [1229160] smart account 3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ > SELF 0.00000000 Waves

{ "type": 13, "id": "Hdsb21yL2a9KVv3iJU5nDwbjhjmwbLFn1DriWJ5z3Cw6", "fee": 1990000, "feeAssetId": null, "timestamp": 1603213515215, "version": 2, "chainId": 84, "sender": "3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ", "senderPublicKey": "EPmZCX2H4AC1hUmAFRUfWrhzXrNjf3wPaybY6jHZQphj", "proofs": [ "7h4Xu3vnokvK7Jvhn2rTR1X9VJKtPXb8JjMFaTHBRxSqkpwAGeu8gxHgVnPvbhcDERmCQgTSncpF9Qsnz6pk8Jr" ], "script": "base64:AAIDAAAAAAAAABEIARIAEgASABIAEgMKAQESAAAAAAAAAAAGAAAAAWkBAAAAFFJlYWRNYXhHb3Zlcm5EZXBvc2l0AAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAZXaW5uZXIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMFAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAABVNYXhHb3Zlcm5Ub2tlbkRlcG9zaXQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAOR292ZXJuVG9rZW5LZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAABJXaW5uZX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VVXNlclN0YWtlZFRva2VuQW1vdW50AwkAAGYAAAACBQAAABVVc2VyR292ZXJuVG9rZW5BbW91bnQAAAAAAAAAAGQJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAtQcml6ZVdpbm5lcgUAAAALUHJpemVBbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEkZ1bmRCb3hTdGFrZWRUb2tlbgAAAAAAAAAAAAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAASVXNlckdvdmVyblRva2VuS2V5AAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAtQcml6ZUFtb3VudAUAAAALU3Rha2VkVG9rZW4JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAABkBQAAAAtHb3Zlcm5Ub2tlbgUAAAADbmlsCQAAAgAAAAEJAAEsAAAAAgIAAABHWW91IGhhdmUgdG8gZGVwb3NpdCAxMDAgR292ZXJuVG9rZW4gdG8gY2xhaW0gUmV3YXJkIAogWW91ciBCYWxhbmNlIGlzOiAJAAGkAAAAAQUAAAAVVXNlckdvdmVyblRva2VuQW1vdW50AAAAAEDWZnA=", "height": 1229160, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AnsQJFbGC5wDvtzp3MBwnh2GMezS2nGKteGEVbKXWnbY Next: DbKwXfPW86TEi4NZcCcQWZBrNyx9TvVZdzXWodhntc5q Diff:
OldNewDifferences
195195 then throw(("You have to Stake StakedToken to claim reward
196196 Your Balance of Staked Tokens is: " + toString(y)))
197197 else if ((x > 100))
198- then ScriptResult(WriteSet([DataEntry(A, z), DataEntry(w, 0), DataEntry(o, 100)]), TransferSet([ScriptTransfer(a.caller, z, l), ScriptTransfer(a.caller, 100, h)]))
198+ then ScriptResult(WriteSet([DataEntry(A, z), DataEntry(w, 0), DataEntry(o, 0)]), TransferSet([ScriptTransfer(a.caller, z, l), ScriptTransfer(a.caller, 100, h)]))
199199 else throw(("You have to deposit 100 GovernToken to claim Reward
200200 Your Balance is: " + toString(x)))
201201 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func ReadMaxGovernDeposit () = {
88 let b = "GovernTokenMaxDeposit"
99 let c = "MaxGovernTokenDepositerKey"
1010 let d = getStringValue(this, c)
1111 let e = {
1212 let f = getInteger(this, b)
1313 if ($isInstanceOf(f, "Int"))
1414 then {
1515 let g = f
1616 g
1717 }
1818 else 0
1919 }
2020 throw(((("Winner is.....: " + d) + "
2121 Total GovernToken: ") + toString(e)))
2222 }
2323
2424
2525
2626 @Callable(a)
2727 func payYield () = {
2828 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
2929 let i = toBase58String(a.caller.bytes)
3030 let j = {
3131 let f = getInteger(this, i)
3232 if ($isInstanceOf(f, "Int"))
3333 then {
3434 let g = f
3535 g
3636 }
3737 else 0
3838 }
3939 if ((j > 0))
4040 then {
4141 let k = assetBalance(this, h)
4242 if ((1 > k))
4343 then throw("No enough GovernToken In Contract")
4444 else ScriptResult(WriteSet([DataEntry(i, 10)]), TransferSet([ScriptTransfer(a.caller, 1, h)]))
4545 }
4646 else throw("You need to deposit Collateral Token to receive Govern Token")
4747 }
4848
4949
5050
5151 @Callable(a)
5252 func Stake () = {
5353 let l = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
5454 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
5555 let m = extract(a.payment)
5656 if (if (isDefined(m.assetId))
5757 then (extract(m.assetId) == l)
5858 else false)
5959 then {
6060 let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
6161 let o = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
6262 let j = {
6363 let f = getInteger(this, n)
6464 if ($isInstanceOf(f, "Int"))
6565 then {
6666 let g = f
6767 g
6868 }
6969 else 0
7070 }
7171 let p = (j + m.amount)
7272 let q = assetBalance(this, h)
7373 if ((1 > q))
7474 then throw("No enough GovernToken In Contract")
7575 else ScriptResult(WriteSet([DataEntry(o, 10), DataEntry(n, p)]), TransferSet([ScriptTransfer(a.caller, 10, h)]))
7676 }
7777 else throw("Can deposit only StakeToken")
7878 }
7979
8080
8181
8282 @Callable(a)
8383 func DepositGovernToken () = {
8484 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
8585 let r = toBase58String(h)
8686 let m = extract(a.payment)
8787 if (if (isDefined(m.assetId))
8888 then (extract(m.assetId) == h)
8989 else false)
9090 then {
9191 let i = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
9292 let j = {
9393 let f = getInteger(this, i)
9494 if ($isInstanceOf(f, "Int"))
9595 then {
9696 let g = f
9797 g
9898 }
9999 else 0
100100 }
101101 let s = (j + m.amount)
102102 let b = "GovernTokenMaxDeposit"
103103 let c = "MaxGovernTokenDepositerKey"
104104 let e = {
105105 let f = getInteger(this, b)
106106 if ($isInstanceOf(f, "Int"))
107107 then {
108108 let g = f
109109 g
110110 }
111111 else 0
112112 }
113113 if (if ((s > e))
114114 then true
115115 else (e == 0))
116116 then WriteSet([DataEntry(i, s), DataEntry(b, s), DataEntry(c, i)])
117117 else WriteSet([DataEntry(i, s)])
118118 }
119119 else throw("Can deposit only Govern Token")
120120 }
121121
122122
123123
124124 @Callable(a)
125125 func WithdrawStakedFunds (t) = {
126126 let u = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
127127 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
128128 let i = toBase58String(a.caller.bytes)
129129 let j = {
130130 let f = getInteger(this, i)
131131 if ($isInstanceOf(f, "Int"))
132132 then {
133133 let g = f
134134 g
135135 }
136136 else 0
137137 }
138138 let p = (j - t)
139139 if ((0 > t))
140140 then throw("Can't withdraw negative amount")
141141 else if ((0 > p))
142142 then throw("User cannot withdraw more than deposited funds")
143143 else {
144144 let k = assetBalance(this, h)
145145 if ((1 > k))
146146 then throw("No enough GovernToken In Contract")
147147 else ScriptResult(WriteSet([DataEntry(i, 1), DataEntry(i, p)]), TransferSet([ScriptTransfer(a.caller, 1, h), ScriptTransfer(a.caller, t, u)]))
148148 }
149149 }
150150
151151
152152
153153 @Callable(a)
154154 func ClaimPrize () = {
155155 let l = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
156156 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
157157 let v = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
158158 let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
159159 let o = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
160160 let w = ((toBase58String(v) + "_") + toBase58String(l))
161161 let x = {
162162 let f = getInteger(this, o)
163163 if ($isInstanceOf(f, "Int"))
164164 then {
165165 let g = f
166166 g
167167 }
168168 else 0
169169 }
170170 let y = {
171171 let f = getInteger(this, n)
172172 if ($isInstanceOf(f, "Int"))
173173 then {
174174 let g = f
175175 g
176176 }
177177 else 0
178178 }
179179 let z = {
180180 let f = getInteger(this, w)
181181 if ($isInstanceOf(f, "Int"))
182182 then {
183183 let g = f
184184 g
185185 }
186186 else 0
187187 }
188188 let c = "MaxGovernTokenDepositerKey"
189189 let A = getStringValue(this, c)
190190 if ((z == 0))
191191 then throw("No prize to Claim")
192192 else if ((toBase58String(a.caller.bytes) != A))
193193 then throw("You are not the winner hence cannot claim the reward ")
194194 else if ((1 > y))
195195 then throw(("You have to Stake StakedToken to claim reward
196196 Your Balance of Staked Tokens is: " + toString(y)))
197197 else if ((x > 100))
198- then ScriptResult(WriteSet([DataEntry(A, z), DataEntry(w, 0), DataEntry(o, 100)]), TransferSet([ScriptTransfer(a.caller, z, l), ScriptTransfer(a.caller, 100, h)]))
198+ then ScriptResult(WriteSet([DataEntry(A, z), DataEntry(w, 0), DataEntry(o, 0)]), TransferSet([ScriptTransfer(a.caller, z, l), ScriptTransfer(a.caller, 100, h)]))
199199 else throw(("You have to deposit 100 GovernToken to claim Reward
200200 Your Balance is: " + toString(x)))
201201 }
202202
203203

github/deemru/w8io/169f3d6 
39.68 ms