tx · Ca1iEJr8YzvRHkuLtYZgUMzDtp2RJH64mx86HfdtEzH7

3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ:  -0.01990000 Waves

2020.10.20 19:50 [1229145] smart account 3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ > SELF 0.00000000 Waves

{ "type": 13, "id": "Ca1iEJr8YzvRHkuLtYZgUMzDtp2RJH64mx86HfdtEzH7", "fee": 1990000, "feeAssetId": null, "timestamp": 1603212514403, "version": 2, "chainId": 84, "sender": "3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ", "senderPublicKey": "EPmZCX2H4AC1hUmAFRUfWrhzXrNjf3wPaybY6jHZQphj", "proofs": [ "3PYDPteDQAsVXvmuijs1iAkNiBoicbj96WUcUjUyDApQph3Jc4PMzx1XhmDfJLgi4pbrHJuWGRT7xGoJxtm4kUPX" ], "script": "base64:AAIDAAAAAAAAABEIARIAEgASABIAEgMKAQESAAAAAAAAAAAGAAAAAWkBAAAAFFJlYWRNYXhHb3Zlcm5EZXBvc2l0AAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAZXaW5uZXIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMFAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAABVNYXhHb3Zlcm5Ub2tlbkRlcG9zaXQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAOR292ZXJuVG9rZW5LZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAABJXaW5uZXIgaXMuLi4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VVzZXJHb3Zlcm5Ub2tlbkFtb3VudAAAAAAAAAAAZAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAC1ByaXplV2lubmVyBQAAAAtQcml6ZUFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAASRnVuZEJveFN0YWtlZFRva2VuAAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJVc2VyR292ZXJuVG9rZW5LZXkAAAAAAAAAAGQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAC1ByaXplQW1vdW50BQAAAAtTdGFrZWRUb2tlbgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAGQFAAAAC0dvdmVyblRva2VuBQAAAANuaWwJAAACAAAAAQkAASwAAAACAgAAAEdZb3UgaGF2ZSB0byBkZXBvc2l0IDEwMCBHb3Zlcm5Ub2tlbiB0byBjbGFpbSBSZXdhcmQgCiBZb3VyIEJhbGFuY2UgaXM6IAkAAaQAAAABBQAAABVVc2VyR292ZXJuVG9rZW5BbW91bnQAAAAA02yMyQ==", "height": 1229145, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7UQxc8Qq9mdSyiTfmVcRpsfRUB1TkKDT3etK5Gr8MFip Next: AnsQJFbGC5wDvtzp3MBwnh2GMezS2nGKteGEVbKXWnbY Diff:
OldNewDifferences
1717 }
1818 else 0
1919 }
20- throw(((("Winner is.....: " + d) + " ") + toString(e)))
20+ throw(((("Winner is.....: " + d) + "
21+ Total GovernToken: ") + toString(e)))
2122 }
2223
2324
5657 then (extract(m.assetId) == l)
5758 else false)
5859 then {
59- let i = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
60+ let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
61+ let o = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
6062 let j = {
61- let f = getInteger(this, i)
63+ let f = getInteger(this, n)
6264 if ($isInstanceOf(f, "Int"))
6365 then {
6466 let g = f
6668 }
6769 else 0
6870 }
69- let n = (j + m.amount)
70- let k = assetBalance(this, h)
71- if ((1 > k))
71+ let p = (j + m.amount)
72+ let q = assetBalance(this, h)
73+ if ((1 > q))
7274 then throw("No enough GovernToken In Contract")
73- else ScriptResult(WriteSet([DataEntry(i, 10), DataEntry(i, n)]), TransferSet([ScriptTransfer(a.caller, 10, h)]))
75+ else ScriptResult(WriteSet([DataEntry(o, 10), DataEntry(n, p)]), TransferSet([ScriptTransfer(a.caller, 10, h)]))
7476 }
7577 else throw("Can deposit only StakeToken")
7678 }
8082 @Callable(a)
8183 func DepositGovernToken () = {
8284 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
83- let o = toBase58String(h)
85+ let r = toBase58String(h)
8486 let m = extract(a.payment)
8587 if (if (isDefined(m.assetId))
8688 then (extract(m.assetId) == h)
9698 }
9799 else 0
98100 }
99- let p = (j + m.amount)
101+ let s = (j + m.amount)
100102 let b = "GovernTokenMaxDeposit"
101103 let c = "MaxGovernTokenDepositerKey"
102104 let e = {
108110 }
109111 else 0
110112 }
111- if (if ((p > e))
113+ if (if ((s > e))
112114 then true
113115 else (e == 0))
114- then WriteSet([DataEntry(i, p), DataEntry(b, p), DataEntry(c, i)])
115- else WriteSet([DataEntry(i, p)])
116+ then WriteSet([DataEntry(i, s), DataEntry(b, s), DataEntry(c, i)])
117+ else WriteSet([DataEntry(i, s)])
116118 }
117119 else throw("Can deposit only Govern Token")
118120 }
120122
121123
122124 @Callable(a)
123-func WithdrawStakedFunds (q) = {
124- let l = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
125+func WithdrawStakedFunds (t) = {
126+ let u = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
125127 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
126128 let i = toBase58String(a.caller.bytes)
127129 let j = {
133135 }
134136 else 0
135137 }
136- let n = (j - q)
137- if ((0 > q))
138+ let p = (j - t)
139+ if ((0 > t))
138140 then throw("Can't withdraw negative amount")
139- else if ((0 > n))
141+ else if ((0 > p))
140142 then throw("User cannot withdraw more than deposited funds")
141143 else {
142144 let k = assetBalance(this, h)
143145 if ((1 > k))
144146 then throw("No enough GovernToken In Contract")
145- else ScriptResult(WriteSet([DataEntry(i, 1), DataEntry(i, n)]), TransferSet([ScriptTransfer(a.caller, 1, h), ScriptTransfer(a.caller, q, l)]))
147+ else ScriptResult(WriteSet([DataEntry(i, 1), DataEntry(i, p)]), TransferSet([ScriptTransfer(a.caller, 1, h), ScriptTransfer(a.caller, t, u)]))
146148 }
147149 }
148150
150152
151153 @Callable(a)
152154 func ClaimPrize () = {
153- let r = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
155+ let l = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
154156 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
155- let s = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
156- let t = (("3N1QzUHdfyXmKVFAn9TPHG7iuW4uK53pfXA" + "_") + toBase58String(r))
157- let u = Address(base58'3N1QzUHdfyXmKVFAn9TPHG7iuW4uK53pfXA')
158- let v = Address(base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD')
159- let w = "3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD"
160- let x = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
161- let y = ((toBase58String(a.caller.bytes) + "_") + toBase58String(r))
162- let z = ((toBase58String(s) + "_") + toBase58String(r))
163- let A = {
164- let f = getInteger(this, x)
157+ let v = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
158+ let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
159+ let o = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
160+ let w = ((toBase58String(v) + "_") + toBase58String(l))
161+ let x = {
162+ let f = getInteger(this, o)
165163 if ($isInstanceOf(f, "Int"))
166164 then {
167165 let g = f
169167 }
170168 else 0
171169 }
172- let B = {
173- let f = getInteger(this, y)
170+ let y = {
171+ let f = getInteger(this, n)
174172 if ($isInstanceOf(f, "Int"))
175173 then {
176174 let g = f
178176 }
179177 else 0
180178 }
181- let C = {
182- let f = getInteger(this, z)
179+ let z = {
180+ let f = getInteger(this, w)
183181 if ($isInstanceOf(f, "Int"))
184182 then {
185183 let g = f
187185 }
188186 else 0
189187 }
190- if ((C == 0))
188+ let c = "MaxGovernTokenDepositerKey"
189+ let A = getStringValue(this, c)
190+ if ((z == 0))
191191 then throw("No prize to Claim")
192- else if ((y != t))
192+ else if ((toBase58String(a.caller.bytes) != A))
193193 then throw("You are not the winner hence cannot claim the reward ")
194- else if ((1 > B))
194+ else if ((1 > y))
195195 then throw(("You have to Stake StakedToken to claim reward
196- Your Balance of Staked Tokens is: " + toString(B)))
197- else if ((A > 100))
198- then ScriptResult(WriteSet([DataEntry(t, C), DataEntry(z, 0), DataEntry(x, 100)]), TransferSet([ScriptTransfer(u, C, r), ScriptTransfer(a.caller, 100, h)]))
196+ Your Balance of Staked Tokens is: " + toString(y)))
197+ 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)]))
199199 else throw(("You have to deposit 100 GovernToken to claim Reward
200- Your Balance is: " + toString(A)))
200+ Your Balance is: " + toString(x)))
201201 }
202202
203203
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 }
20- throw(((("Winner is.....: " + d) + " ") + toString(e)))
20+ throw(((("Winner is.....: " + d) + "
21+ Total GovernToken: ") + toString(e)))
2122 }
2223
2324
2425
2526 @Callable(a)
2627 func payYield () = {
2728 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
2829 let i = toBase58String(a.caller.bytes)
2930 let j = {
3031 let f = getInteger(this, i)
3132 if ($isInstanceOf(f, "Int"))
3233 then {
3334 let g = f
3435 g
3536 }
3637 else 0
3738 }
3839 if ((j > 0))
3940 then {
4041 let k = assetBalance(this, h)
4142 if ((1 > k))
4243 then throw("No enough GovernToken In Contract")
4344 else ScriptResult(WriteSet([DataEntry(i, 10)]), TransferSet([ScriptTransfer(a.caller, 1, h)]))
4445 }
4546 else throw("You need to deposit Collateral Token to receive Govern Token")
4647 }
4748
4849
4950
5051 @Callable(a)
5152 func Stake () = {
5253 let l = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
5354 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
5455 let m = extract(a.payment)
5556 if (if (isDefined(m.assetId))
5657 then (extract(m.assetId) == l)
5758 else false)
5859 then {
59- let i = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
60+ let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
61+ let o = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
6062 let j = {
61- let f = getInteger(this, i)
63+ let f = getInteger(this, n)
6264 if ($isInstanceOf(f, "Int"))
6365 then {
6466 let g = f
6567 g
6668 }
6769 else 0
6870 }
69- let n = (j + m.amount)
70- let k = assetBalance(this, h)
71- if ((1 > k))
71+ let p = (j + m.amount)
72+ let q = assetBalance(this, h)
73+ if ((1 > q))
7274 then throw("No enough GovernToken In Contract")
73- else ScriptResult(WriteSet([DataEntry(i, 10), DataEntry(i, n)]), TransferSet([ScriptTransfer(a.caller, 10, h)]))
75+ else ScriptResult(WriteSet([DataEntry(o, 10), DataEntry(n, p)]), TransferSet([ScriptTransfer(a.caller, 10, h)]))
7476 }
7577 else throw("Can deposit only StakeToken")
7678 }
7779
7880
7981
8082 @Callable(a)
8183 func DepositGovernToken () = {
8284 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
83- let o = toBase58String(h)
85+ let r = toBase58String(h)
8486 let m = extract(a.payment)
8587 if (if (isDefined(m.assetId))
8688 then (extract(m.assetId) == h)
8789 else false)
8890 then {
8991 let i = toBase58String(a.caller.bytes)
9092 let j = {
9193 let f = getInteger(this, i)
9294 if ($isInstanceOf(f, "Int"))
9395 then {
9496 let g = f
9597 g
9698 }
9799 else 0
98100 }
99- let p = (j + m.amount)
101+ let s = (j + m.amount)
100102 let b = "GovernTokenMaxDeposit"
101103 let c = "MaxGovernTokenDepositerKey"
102104 let e = {
103105 let f = getInteger(this, b)
104106 if ($isInstanceOf(f, "Int"))
105107 then {
106108 let g = f
107109 g
108110 }
109111 else 0
110112 }
111- if (if ((p > e))
113+ if (if ((s > e))
112114 then true
113115 else (e == 0))
114- then WriteSet([DataEntry(i, p), DataEntry(b, p), DataEntry(c, i)])
115- else WriteSet([DataEntry(i, p)])
116+ then WriteSet([DataEntry(i, s), DataEntry(b, s), DataEntry(c, i)])
117+ else WriteSet([DataEntry(i, s)])
116118 }
117119 else throw("Can deposit only Govern Token")
118120 }
119121
120122
121123
122124 @Callable(a)
123-func WithdrawStakedFunds (q) = {
124- let l = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
125+func WithdrawStakedFunds (t) = {
126+ let u = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
125127 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
126128 let i = toBase58String(a.caller.bytes)
127129 let j = {
128130 let f = getInteger(this, i)
129131 if ($isInstanceOf(f, "Int"))
130132 then {
131133 let g = f
132134 g
133135 }
134136 else 0
135137 }
136- let n = (j - q)
137- if ((0 > q))
138+ let p = (j - t)
139+ if ((0 > t))
138140 then throw("Can't withdraw negative amount")
139- else if ((0 > n))
141+ else if ((0 > p))
140142 then throw("User cannot withdraw more than deposited funds")
141143 else {
142144 let k = assetBalance(this, h)
143145 if ((1 > k))
144146 then throw("No enough GovernToken In Contract")
145- else ScriptResult(WriteSet([DataEntry(i, 1), DataEntry(i, n)]), TransferSet([ScriptTransfer(a.caller, 1, h), ScriptTransfer(a.caller, q, l)]))
147+ else ScriptResult(WriteSet([DataEntry(i, 1), DataEntry(i, p)]), TransferSet([ScriptTransfer(a.caller, 1, h), ScriptTransfer(a.caller, t, u)]))
146148 }
147149 }
148150
149151
150152
151153 @Callable(a)
152154 func ClaimPrize () = {
153- let r = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
155+ let l = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
154156 let h = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
155- let s = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
156- let t = (("3N1QzUHdfyXmKVFAn9TPHG7iuW4uK53pfXA" + "_") + toBase58String(r))
157- let u = Address(base58'3N1QzUHdfyXmKVFAn9TPHG7iuW4uK53pfXA')
158- let v = Address(base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD')
159- let w = "3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD"
160- let x = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
161- let y = ((toBase58String(a.caller.bytes) + "_") + toBase58String(r))
162- let z = ((toBase58String(s) + "_") + toBase58String(r))
163- let A = {
164- let f = getInteger(this, x)
157+ let v = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
158+ let n = ((toBase58String(a.caller.bytes) + "_") + toBase58String(l))
159+ let o = ((toBase58String(a.caller.bytes) + "_") + toBase58String(h))
160+ let w = ((toBase58String(v) + "_") + toBase58String(l))
161+ let x = {
162+ let f = getInteger(this, o)
165163 if ($isInstanceOf(f, "Int"))
166164 then {
167165 let g = f
168166 g
169167 }
170168 else 0
171169 }
172- let B = {
173- let f = getInteger(this, y)
170+ let y = {
171+ let f = getInteger(this, n)
174172 if ($isInstanceOf(f, "Int"))
175173 then {
176174 let g = f
177175 g
178176 }
179177 else 0
180178 }
181- let C = {
182- let f = getInteger(this, z)
179+ let z = {
180+ let f = getInteger(this, w)
183181 if ($isInstanceOf(f, "Int"))
184182 then {
185183 let g = f
186184 g
187185 }
188186 else 0
189187 }
190- if ((C == 0))
188+ let c = "MaxGovernTokenDepositerKey"
189+ let A = getStringValue(this, c)
190+ if ((z == 0))
191191 then throw("No prize to Claim")
192- else if ((y != t))
192+ else if ((toBase58String(a.caller.bytes) != A))
193193 then throw("You are not the winner hence cannot claim the reward ")
194- else if ((1 > B))
194+ else if ((1 > y))
195195 then throw(("You have to Stake StakedToken to claim reward
196- Your Balance of Staked Tokens is: " + toString(B)))
197- else if ((A > 100))
198- then ScriptResult(WriteSet([DataEntry(t, C), DataEntry(z, 0), DataEntry(x, 100)]), TransferSet([ScriptTransfer(u, C, r), ScriptTransfer(a.caller, 100, h)]))
196+ Your Balance of Staked Tokens is: " + toString(y)))
197+ 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)]))
199199 else throw(("You have to deposit 100 GovernToken to claim Reward
200- Your Balance is: " + toString(A)))
200+ Your Balance is: " + toString(x)))
201201 }
202202
203203

github/deemru/w8io/169f3d6 
81.38 ms