tx · 7PcAZw5dzhdQLmWGJ26fCS6ZPHQaaCv4xPs7VWRJQMhH

3Mzqq2HLLw6JETYRkDNo7eTdVdFw29GhQsW:  -0.01990000 Waves

2020.10.20 21:57 [1229272] smart account 3Mzqq2HLLw6JETYRkDNo7eTdVdFw29GhQsW > SELF 0.00000000 Waves

{ "type": 13, "id": "7PcAZw5dzhdQLmWGJ26fCS6ZPHQaaCv4xPs7VWRJQMhH", "fee": 1990000, "feeAssetId": null, "timestamp": 1603220268021, "version": 2, "chainId": 84, "sender": "3Mzqq2HLLw6JETYRkDNo7eTdVdFw29GhQsW", "senderPublicKey": "5z4sZd5N9cB7oxvLA6qHYQkfheJ5fFEVhuAaBWSaQKY3", "proofs": [ "3f4vm3TimqryD6phDh2rSfL8s6Lu5DqoDDxbEYiwQt6YTHWtoF5wv1nVyBBGtqqHk7r1MBMvjcjuvVfLvgyiZaW3" ], "script": "base64:AAIDAAAAAAAAABEIARIAEgASABIAEgMKAQESAAAAAAAAAAAGAAAAAWkBAAAAFFJlYWRNYXhHb3Zlcm5EZXBvc2l0AAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAtTdGFrZWRUb2tlbgEAAAAgRcBshwjyRR7E4jbQIGP2jvCbtpj52Gvg2osXltv2/UMEAAAAC0dvdmVyblRva2VuAQAAACC8BnLNTH75zY/85pKTg3cOi9DRRgrZqRPS5vvLPGg8zQQAAAASVXNlclN0YWtlZFRva2VuS2V5CQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAFfCQACWAAAAAEFAAAAC1N0YWtlZFRva2VuBAAAABJVc2VyR292ZXJuVG9rZW5LZXkJAAEsAAAAAgkAASwAAAACCQACWAAAAAEICAUAAA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0byBjbGFpbSBSZXdhcmQgCiBZb3VyIEJhbGFuY2UgaXM6IAkAAaQAAAABBQAAABVVc2VyR292ZXJuVG9rZW5BbW91bnQAAAAAeVFFJA==", "height": 1229272, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: APLPgsSsmBCcvt8G39CZzXAPotej9zUQ61HdU278iRV4 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+
5+
6+@Callable(a)
7+func ReadMaxGovernDeposit () = {
8+ let b = "GovernTokenMaxDeposit"
9+ let c = "MaxGovernTokenDepositerKey"
10+ let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
11+ let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
12+ let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d))
13+ let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e))
14+ let h = getStringValue(this, c)
15+ let i = {
16+ let j = getInteger(this, b)
17+ if ($isInstanceOf(j, "Int"))
18+ then {
19+ let k = j
20+ k
21+ }
22+ else 0
23+ }
24+ throw(((("Winner is.....: " + h) + " Balance is: ") + toString(i)))
25+ }
26+
27+
28+
29+@Callable(a)
30+func payYield () = {
31+ let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
32+ let l = toBase58String(a.caller.bytes)
33+ let m = {
34+ let j = getInteger(this, l)
35+ if ($isInstanceOf(j, "Int"))
36+ then {
37+ let k = j
38+ k
39+ }
40+ else 0
41+ }
42+ if ((m > 0))
43+ then {
44+ let n = assetBalance(this, e)
45+ if ((1 > n))
46+ then throw("No enough GovernToken In Contract")
47+ else ScriptResult(WriteSet([DataEntry(l, 10)]), TransferSet([ScriptTransfer(a.caller, 1, e)]))
48+ }
49+ else throw("You need to deposit Collateral Token to receive Govern Token")
50+ }
51+
52+
53+
54+@Callable(a)
55+func Stake () = {
56+ let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
57+ let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
58+ let o = extract(a.payment)
59+ if (if (isDefined(o.assetId))
60+ then (extract(o.assetId) == d)
61+ else false)
62+ then {
63+ let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d))
64+ let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e))
65+ let m = {
66+ let j = getInteger(this, f)
67+ if ($isInstanceOf(j, "Int"))
68+ then {
69+ let k = j
70+ k
71+ }
72+ else 0
73+ }
74+ let p = (m + o.amount)
75+ let q = assetBalance(this, e)
76+ if ((1 > q))
77+ then throw("No enough GovernToken In Contract")
78+ else ScriptResult(WriteSet([DataEntry(g, 10), DataEntry(f, p)]), TransferSet([ScriptTransfer(a.caller, 10, e)]))
79+ }
80+ else throw("Can deposit only StakeToken")
81+ }
82+
83+
84+
85+@Callable(a)
86+func DepositGovernToken () = {
87+ let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
88+ let r = toBase58String(e)
89+ let o = extract(a.payment)
90+ if (if (isDefined(o.assetId))
91+ then (extract(o.assetId) == e)
92+ else false)
93+ then {
94+ let l = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e))
95+ let m = {
96+ let j = getInteger(this, l)
97+ if ($isInstanceOf(j, "Int"))
98+ then {
99+ let k = j
100+ k
101+ }
102+ else 0
103+ }
104+ let s = (m + o.amount)
105+ let b = "GovernTokenMaxDeposit"
106+ let c = "MaxGovernTokenDepositerKey"
107+ let i = {
108+ let j = getInteger(this, b)
109+ if ($isInstanceOf(j, "Int"))
110+ then {
111+ let k = j
112+ k
113+ }
114+ else 0
115+ }
116+ if ((s > i))
117+ then WriteSet([DataEntry(l, s), DataEntry(b, s), DataEntry(c, l)])
118+ else WriteSet([DataEntry(l, s)])
119+ }
120+ else throw("Can deposit only Govern Token")
121+ }
122+
123+
124+
125+@Callable(a)
126+func WithdrawStakedFunds (t) = {
127+ let u = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
128+ let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
129+ let l = toBase58String(a.caller.bytes)
130+ let m = {
131+ let j = getInteger(this, l)
132+ if ($isInstanceOf(j, "Int"))
133+ then {
134+ let k = j
135+ k
136+ }
137+ else 0
138+ }
139+ let p = (m - t)
140+ if ((0 > t))
141+ then throw("Can't withdraw negative amount")
142+ else if ((0 > p))
143+ then throw("User cannot withdraw more than deposited funds")
144+ else {
145+ let n = assetBalance(this, e)
146+ if ((1 > n))
147+ then throw("No enough GovernToken In Contract")
148+ else ScriptResult(WriteSet([DataEntry(l, 1), DataEntry(l, p)]), TransferSet([ScriptTransfer(a.caller, 1, e), ScriptTransfer(a.caller, t, u)]))
149+ }
150+ }
151+
152+
153+
154+@Callable(a)
155+func ClaimPrize () = {
156+ let d = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN'
157+ let e = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ'
158+ let v = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD'
159+ let f = ((toBase58String(a.caller.bytes) + "_") + toBase58String(d))
160+ let g = ((toBase58String(a.caller.bytes) + "_") + toBase58String(e))
161+ let w = ((toBase58String(v) + "_") + toBase58String(d))
162+ let x = {
163+ let j = getInteger(this, g)
164+ if ($isInstanceOf(j, "Int"))
165+ then {
166+ let k = j
167+ k
168+ }
169+ else 0
170+ }
171+ let y = {
172+ let j = getInteger(this, f)
173+ if ($isInstanceOf(j, "Int"))
174+ then {
175+ let k = j
176+ k
177+ }
178+ else 0
179+ }
180+ let z = {
181+ let j = getInteger(this, w)
182+ if ($isInstanceOf(j, "Int"))
183+ then {
184+ let k = j
185+ k
186+ }
187+ else 0
188+ }
189+ let c = "MaxGovernTokenDepositerKey"
190+ let A = getStringValue(this, c)
191+ if ((z == 0))
192+ then throw("No prize to Claim")
193+ else if ((g != A))
194+ then throw("You are not the winner hence cannot claim the reward ")
195+ else if ((1 > y))
196+ then throw(("You have to Stake StakedToken to claim reward
197+ Your Balance of Staked Tokens is: " + toString(y)))
198+ else if ((x > 100))
199+ then ScriptResult(WriteSet([DataEntry(A, z), DataEntry(w, 0), DataEntry(g, 0)]), TransferSet([ScriptTransfer(a.caller, z, d), ScriptTransfer(a.caller, 100, e)]))
200+ else throw(("You have to deposit 100 GovernToken to claim Reward
201+ Your Balance is: " + toString(x)))
202+ }
203+
204+

github/deemru/w8io/026f985 
21.18 ms