tx · 4kxm32M7kBYp2WTNjY2v9EhdGs3Y3wEusCvsWSHXRnnS 3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ: -0.01550000 Waves 2020.10.20 20:40 [1229196] smart account 3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ > SELF 0.00000000 Waves
{ "type": 13, "id": "4kxm32M7kBYp2WTNjY2v9EhdGs3Y3wEusCvsWSHXRnnS", "fee": 1550000, "feeAssetId": null, "timestamp": 1603215613058, "version": 2, "chainId": 84, "sender": "3N3y7DVmszkgFYMGoDtNnPjrNmLTf1rRUKJ", "senderPublicKey": "EPmZCX2H4AC1hUmAFRUfWrhzXrNjf3wPaybY6jHZQphj", "proofs": [ "2qYjZ5DgT1oSpdyJpPRDRkcqbM7v4fdpEMJc2okpE6BUBZnTTW9BmFdENwPdNBq2m6y8fA7LTiGSMYFLRTpZ8C1B" ], "script": "base64:AAIDAAAAAAAAABEIARIAEgASABIAEgMKAQESAAAAAAAAAAAGAAAAAWkBAAAAFFJlYWRNYXhHb3Zlcm5EZXBvc2l0AAAAAAQAAAAOR292ZXJuVG9rZW5LZXkCAAAAFUdvdmVyblRva2VuTWF4RGVwb3NpdAQAAAAaTWF4R292ZXJuVG9rZW5EZXBvc2l0ZXJLZXkCAAAAGk1heEdvdmVyblRva2VuRGVwb3NpdGVyS2V5BAAAAAtTdGFrZWRUb2tlbgEAAAAgRcBshwjyRR7E4jbQIGP2jvCbtpj52Gvg2osXltv2/UMEAAAAC0dvdmVyblRva2VuAQAAACC8BnLNTH75zY/85pKTg3cOi9DRRgrZqRPS5vvLPGg8zQQAAAASVXNlclN0YWtlZFRva2VuS2V5CQABLAAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAFfCQACWAAAAAEFAAAAC1N0YWtlZFRva2VuBAAAABJVc2VyR292ZXJuVG9rZW5LZXkJAAEsAAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABa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wdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAC1ByaXplV2lubmVyBQAAAAtQcml6ZUFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAASRnVuZEJveFN0YWtlZFRva2VuAAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJVc2VyR292ZXJuVG9rZW5LZXkAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAC1ByaXplQW1vdW50BQAAAAtTdGFrZWRUb2tlbgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAGQFAAAAC0dvdmVyblRva2VuBQAAAANuaWwJAAACAAAAAQkAASwAAAACAgAAAEdZb3UgaGF2ZSB0byBkZXBvc2l0IDEwMCBHb3Zlcm5Ub2tlbiB0byBjbGFpbSBSZXdhcmQgCiBZb3VyIEJhbGFuY2UgaXM6IAkAAaQAAAABBQAAABVVc2VyR292ZXJuVG9rZW5BbW91bnQAAAAAjdoSVw==", "height": 1229196, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fc47opQhGKMNtdkPgaiSfUwcDwr49wEhaBVPL2wCcU5g Next: AxtQQzKkb21WdsLJC7ft42KS8iEENaekHTrKcsHvUbBe Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func ReadMaxGovernDeposit () = { | |
8 | 8 | let GovernTokenKey = "GovernTokenMaxDeposit" | |
9 | 9 | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
10 | 10 | let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
11 | 11 | let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
12 | 12 | let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken)) | |
13 | 13 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
14 | 14 | let Winner = getStringValue(this, MaxGovernTokenDepositerKey) | |
15 | 15 | let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) { | |
16 | 16 | case a: Int => | |
17 | 17 | a | |
18 | 18 | case _ => | |
19 | 19 | 0 | |
20 | 20 | } | |
21 | 21 | let ReadUserGovernTokenKey = getStringValue(this, UserGovernTokenKey) | |
22 | 22 | let UserGovernTokenBalance = match getInteger(this, ReadUserGovernTokenKey) { | |
23 | 23 | case a: Int => | |
24 | 24 | a | |
25 | 25 | case _ => | |
26 | 26 | 0 | |
27 | 27 | } | |
28 | 28 | let ReadUserStakedTokenKey = getStringValue(this, UserStakedTokenKey) | |
29 | 29 | throw(((((("Winner is.....: " + Winner) + " | |
30 | 30 | Total GovernToken: ") + toString(MaxGovernTokenDeposit)) + " | |
31 | 31 | Your Balance of GovernToken is: ") + toString(UserGovernTokenBalance))) | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Callable(i) | |
37 | 37 | func payYield () = { | |
38 | 38 | let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
39 | 39 | let currentKey = toBase58String(i.caller.bytes) | |
40 | 40 | let currentAmount = match getInteger(this, currentKey) { | |
41 | 41 | case a: Int => | |
42 | 42 | a | |
43 | 43 | case _ => | |
44 | 44 | 0 | |
45 | 45 | } | |
46 | 46 | if ((currentAmount > 0)) | |
47 | 47 | then { | |
48 | 48 | let GovernTokenAmount = assetBalance(this, GovernToken) | |
49 | 49 | if ((1 > GovernTokenAmount)) | |
50 | 50 | then throw("No enough GovernToken In Contract") | |
51 | 51 | else ScriptResult(WriteSet([DataEntry(currentKey, 10)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken)])) | |
52 | 52 | } | |
53 | 53 | else throw("You need to deposit Collateral Token to receive Govern Token") | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | 58 | @Callable(i) | |
59 | 59 | func Stake () = { | |
60 | 60 | let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
61 | 61 | let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
62 | 62 | let pmt = extract(i.payment) | |
63 | 63 | if (if (isDefined(pmt.assetId)) | |
64 | 64 | then (extract(pmt.assetId) == StakedToken) | |
65 | 65 | else false) | |
66 | 66 | then { | |
67 | 67 | let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken)) | |
68 | 68 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
69 | 69 | let currentAmount = match getInteger(this, UserStakedTokenKey) { | |
70 | 70 | case a: Int => | |
71 | 71 | a | |
72 | 72 | case _ => | |
73 | 73 | 0 | |
74 | 74 | } | |
75 | 75 | let newAmount = (currentAmount + pmt.amount) | |
76 | 76 | let GovernTokenSmartContractBalance = assetBalance(this, GovernToken) | |
77 | 77 | if ((1 > GovernTokenSmartContractBalance)) | |
78 | 78 | then throw("No enough GovernToken In Contract") | |
79 | 79 | else ScriptResult(WriteSet([DataEntry(UserGovernTokenKey, 10), DataEntry(UserStakedTokenKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, 10, GovernToken)])) | |
80 | 80 | } | |
81 | 81 | else throw("Can deposit only StakeToken") | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | ||
86 | 86 | @Callable(i) | |
87 | 87 | func DepositGovernToken () = { | |
88 | 88 | let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
89 | 89 | let GovernTokenMaxDeposit = toBase58String(GovernToken) | |
90 | 90 | let pmt = extract(i.payment) | |
91 | 91 | if (if (isDefined(pmt.assetId)) | |
92 | 92 | then (extract(pmt.assetId) == GovernToken) | |
93 | 93 | else false) | |
94 | 94 | then { | |
95 | 95 | let currentKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
96 | 96 | let currentAmount = match getInteger(this, currentKey) { | |
97 | 97 | case a: Int => | |
98 | 98 | a | |
99 | 99 | case _ => | |
100 | 100 | 0 | |
101 | 101 | } | |
102 | 102 | let CurrrentGovernTokenDeposit = (currentAmount + pmt.amount) | |
103 | 103 | let GovernTokenKey = "GovernTokenMaxDeposit" | |
104 | 104 | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
105 | 105 | let MaxGovernTokenDeposit = match getInteger(this, GovernTokenKey) { | |
106 | 106 | case a: Int => | |
107 | 107 | a | |
108 | 108 | case _ => | |
109 | 109 | 0 | |
110 | 110 | } | |
111 | 111 | if (if ((CurrrentGovernTokenDeposit > MaxGovernTokenDeposit)) | |
112 | 112 | then true | |
113 | 113 | else (MaxGovernTokenDeposit == 0)) | |
114 | 114 | then WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit), DataEntry(GovernTokenKey, CurrrentGovernTokenDeposit), DataEntry(MaxGovernTokenDepositerKey, currentKey)]) | |
115 | 115 | else WriteSet([DataEntry(currentKey, CurrrentGovernTokenDeposit)]) | |
116 | 116 | } | |
117 | 117 | else throw("Can deposit only Govern Token") | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | ||
122 | 122 | @Callable(i) | |
123 | 123 | func WithdrawStakedFunds (amount) = { | |
124 | 124 | let CollateralToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
125 | 125 | let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
126 | 126 | let currentKey = toBase58String(i.caller.bytes) | |
127 | 127 | let currentAmount = match getInteger(this, currentKey) { | |
128 | 128 | case a: Int => | |
129 | 129 | a | |
130 | 130 | case _ => | |
131 | 131 | 0 | |
132 | 132 | } | |
133 | 133 | let newAmount = (currentAmount - amount) | |
134 | 134 | if ((0 > amount)) | |
135 | 135 | then throw("Can't withdraw negative amount") | |
136 | 136 | else if ((0 > newAmount)) | |
137 | 137 | then throw("User cannot withdraw more than deposited funds") | |
138 | 138 | else { | |
139 | 139 | let GovernTokenAmount = assetBalance(this, GovernToken) | |
140 | 140 | if ((1 > GovernTokenAmount)) | |
141 | 141 | then throw("No enough GovernToken In Contract") | |
142 | 142 | else ScriptResult(WriteSet([DataEntry(currentKey, 1), DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, 1, GovernToken), ScriptTransfer(i.caller, amount, CollateralToken)])) | |
143 | 143 | } | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(i) | |
149 | 149 | func ClaimPrize () = { | |
150 | 150 | let StakedToken = base58'5hHK64aujiyn7cNrTBwhe5yJQuxs119KTPbE9nFjLoUN' | |
151 | 151 | let GovernToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' | |
152 | 152 | let FundBoxAddress58 = base58'3NCMrhPAVqXgtLdpi2BhFWpJkMBUAFrozbD' | |
153 | 153 | let UserStakedTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(StakedToken)) | |
154 | 154 | let UserGovernTokenKey = ((toBase58String(i.caller.bytes) + "_") + toBase58String(GovernToken)) | |
155 | 155 | let FundBoxStakedToken = ((toBase58String(FundBoxAddress58) + "_") + toBase58String(StakedToken)) | |
156 | 156 | let UserGovernTokenAmount = match getInteger(this, UserGovernTokenKey) { | |
157 | 157 | case a: Int => | |
158 | 158 | a | |
159 | 159 | case _ => | |
160 | 160 | 0 | |
161 | 161 | } | |
162 | 162 | let UserStakedTokenAmount = match getInteger(this, UserStakedTokenKey) { | |
163 | 163 | case a: Int => | |
164 | 164 | a | |
165 | 165 | case _ => | |
166 | 166 | 0 | |
167 | 167 | } | |
168 | 168 | let PrizeAmount = match getInteger(this, FundBoxStakedToken) { | |
169 | 169 | case a: Int => | |
170 | 170 | a | |
171 | 171 | case _ => | |
172 | 172 | 0 | |
173 | 173 | } | |
174 | 174 | let MaxGovernTokenDepositerKey = "MaxGovernTokenDepositerKey" | |
175 | 175 | let PrizeWinner = getStringValue(this, MaxGovernTokenDepositerKey) | |
176 | 176 | if ((PrizeAmount == 0)) | |
177 | 177 | then throw("No prize to Claim") | |
178 | 178 | else if ((UserGovernTokenKey != PrizeWinner)) | |
179 | 179 | then throw("You are not the winner hence cannot claim the reward ") | |
180 | 180 | else if ((1 > UserStakedTokenAmount)) | |
181 | 181 | then throw(("You have to Stake StakedToken to claim reward | |
182 | 182 | Your Balance of Staked Tokens is: " + toString(UserStakedTokenAmount))) | |
183 | 183 | else if ((UserGovernTokenAmount > 100)) | |
184 | 184 | then ScriptResult(WriteSet([DataEntry(PrizeWinner, PrizeAmount), DataEntry(FundBoxStakedToken, 0), DataEntry(UserGovernTokenKey, 0)]), TransferSet([ScriptTransfer(i.caller, PrizeAmount, StakedToken), ScriptTransfer(i.caller, 100, GovernToken)])) | |
185 | 185 | else throw(("You have to deposit 100 GovernToken to claim Reward | |
186 | 186 | Your Balance is: " + toString(UserGovernTokenAmount))) | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 |
github/deemru/w8io/026f985 33.50 ms ◑