tx · 5HhAwVotTmKjHeffwqu8ffJKxcq4ZggZgAKmZUgoVmzq 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH: -0.01700000 Waves 2022.07.12 10:59 [2136248] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves
{ "type": 13, "id": "5HhAwVotTmKjHeffwqu8ffJKxcq4ZggZgAKmZUgoVmzq", "fee": 1700000, "feeAssetId": null, "timestamp": 1657612816016, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "2tbo4vMXu7QtRcMNAwZURveCTS1BM7KdBZSmhiKizDpqXtmJQgAMks4rGuww47aTicCRpu2iBMBvCqav13sECjXC" ], "script": "base64:AAIFAAAAAAAAAB4IAhIAEgASABIAEgASABIAEgASABIAEgASABIAEgAAAAAVAAAAAAh1c2RuVXNkdAEAAAAg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsAAAAADXVzZG5Vc2R0TFBUQ0kBAAAAIAqBzantQGEdmEq4Oth6BGhTCCbAyZjxYcEpfvod3iryAAAAAAh3eFVzZG5MUAEAAAAgG7mhj3vOTKXN+s5HyQsWjk32W97C65PB1sWo0bGqCxwAAAAAC3d4VXNkbkxQVENJAQAAACC37N3mGwJ72rYTh/1V0NY8tseiNz1LiL3Be29IRACYLwAAAAALd2F2ZXNVc2RuTHABAAAAINUKknePcghEmMkNN/IegHNiilmrJ+abeEGdbsH03iJ2AAAAAA53YXZlc1VzZG5MUFRDSQEAAAAgxRp2zzmtZIv1fW7qZyCOpdLB08oGyQGtTSaCWHrWElkAAAAACWV0aFVzZG5MUAEAAAAgf0Ew/c/5+Zy9fq7UHSNMMuNJS4SB4kp3y/IQBPX7+eEAAAAADGV0aFVzZG5MUFRDSQEAAAAg4e0WyvKtIAu2EMEK2Ns8J2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WdlckVudHJ5AAAAAgUAAAASa2V5QnRjVXNkbkNvbXBvdW5kAAAAAAAAAAAABAAAAAdMUElzc3VlCQEAAAAHUmVpc3N1ZQAAAAMFAAAADGJ0Y1VzZG5MUFRDSQUAAAACYW0GBAAAAAJ0cgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAJhbQUAAAAMYnRjVXNkbkxQVENJCQAETAAAAAIFAAAAA3VwZAkABEwAAAACBQAAAAR1cGRLCQAETAAAAAIFAAAAB0xQSXNzdWUJAARMAAAAAgUAAAACdHIFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleXuKHqA=", "height": 2136248, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 75G5dLJ2XDaeJs1wA7jUbntu4rqKrpf1yiQRFoq2KCJc Next: 6jmXJHpXx2K6YY2uUoaf5a5wYZ2mVbK4UdrB3MNnkZ5A Diff:
Old | New | Differences | |
---|---|---|---|
59 | 59 | case _ => | |
60 | 60 | throw("Can't find asset") | |
61 | 61 | } | |
62 | - | let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, btcUsdnLPTCI)) / tkStaked)) | |
62 | + | let one = fraction((totalIssued - assetBalance(this, btcUsdnLPTCI)), 100000000, tkStaked) | |
63 | + | let toIssue = fraction(pmtAmount, one, 100000000) | |
63 | 64 | let updateState = IntegerEntry(keyBtcUsdn, (tkStaked + pmtAmount)) | |
64 | 65 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
65 | 66 | if ((LPstake == LPstake)) | |
90 | 91 | case _ => | |
91 | 92 | throw("Can't find asset") | |
92 | 93 | } | |
93 | - | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
94 | + | let one = fraction(totalIssued, 100000000, tkStaked) | |
95 | + | let toIssue = fraction(pmtAmount, one, 100000000) | |
94 | 96 | let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount)) | |
95 | 97 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
96 | 98 | if ((LPstake == LPstake)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let usdnUsdt = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS' | |
5 | 5 | ||
6 | 6 | let usdnUsdtLPTCI = base58'i1snzKxSEZVokh9TWj8hTJQEDBsocnL2hRWsSbsMPK7' | |
7 | 7 | ||
8 | 8 | let wxUsdnLP = base58'2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib' | |
9 | 9 | ||
10 | 10 | let wxUsdnLPTCI = base58'DNy6WBfhPE4y82RonGdHhZEunNotEDzmNfrBomWnsyGi' | |
11 | 11 | ||
12 | 12 | let wavesUsdnLp = base58'FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V' | |
13 | 13 | ||
14 | 14 | let wavesUsdnLPTCI = base58'EGQiqw8jLjg6SVLUeeqMLjk3EjhEVHtjkJ6w46HyFfep' | |
15 | 15 | ||
16 | 16 | let ethUsdnLP = base58'9ZkS8GoUWn69QhgF1RsRtS9CFtc7ZbDNX5N238Jmqjdr' | |
17 | 17 | ||
18 | 18 | let ethUsdnLPTCI = base58'GCvR4BmCSjncVEEwr9psvhN5mctdNTGPs8Xp4b2oQNFZ' | |
19 | 19 | ||
20 | 20 | let btcUsdnLP = base58'2RmyyZ39ZoPoTWksM6urmjgx9mB8ksP8Ru6ba8u89mZm' | |
21 | 21 | ||
22 | 22 | let btcUsdnLPTCI = base58'4jarprgmcev38EU5p2duJAznZSLUxZ831jCT2vf95Hey' | |
23 | 23 | ||
24 | 24 | let isStopped = false | |
25 | 25 | ||
26 | 26 | let keyUsdtUsdn = "STAKED_LP" | |
27 | 27 | ||
28 | 28 | let keyUsdtUsdnCompound = "From_Compound" | |
29 | 29 | ||
30 | 30 | let keywxUsdnCompound = "WX_USDN_compound" | |
31 | 31 | ||
32 | 32 | let keyWXUSDN = "WX_USDN" | |
33 | 33 | ||
34 | 34 | let keyWAVESUSDN = "WAVES_USDN" | |
35 | 35 | ||
36 | 36 | let keyWavesCompound = "WAVES_USDN_COMPOUND" | |
37 | 37 | ||
38 | 38 | let keyBtcUsdn = "BTC_USDN" | |
39 | 39 | ||
40 | 40 | let keyBtcUsdnCompound = "BTC_USDN_COMPOUND" | |
41 | 41 | ||
42 | 42 | let keyEthUsdn = "ETH_USDN" | |
43 | 43 | ||
44 | 44 | let keyEthUsdnCompound = "ETH_USDN_COMPOUND" | |
45 | 45 | ||
46 | 46 | @Callable(i) | |
47 | 47 | func depositBtcUsdnLP () = { | |
48 | 48 | let pmt = value(i.payments[0]) | |
49 | 49 | let pmtAmount = pmt.amount | |
50 | 50 | if ((pmt.assetId != btcUsdnLP)) | |
51 | 51 | then throw("attach BTCUSDNLP tokens only") | |
52 | 52 | else if (isStopped) | |
53 | 53 | then throw("smart contract is on lock") | |
54 | 54 | else { | |
55 | 55 | let tkStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0) | |
56 | 56 | let totalIssued = match assetInfo(btcUsdnLPTCI) { | |
57 | 57 | case asset: Asset => | |
58 | 58 | asset.quantity | |
59 | 59 | case _ => | |
60 | 60 | throw("Can't find asset") | |
61 | 61 | } | |
62 | - | let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, btcUsdnLPTCI)) / tkStaked)) | |
62 | + | let one = fraction((totalIssued - assetBalance(this, btcUsdnLPTCI)), 100000000, tkStaked) | |
63 | + | let toIssue = fraction(pmtAmount, one, 100000000) | |
63 | 64 | let updateState = IntegerEntry(keyBtcUsdn, (tkStaked + pmtAmount)) | |
64 | 65 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
65 | 66 | if ((LPstake == LPstake)) | |
66 | 67 | then { | |
67 | 68 | let LPIssue = Reissue(btcUsdnLPTCI, toIssue, true) | |
68 | 69 | let transfer = ScriptTransfer(i.caller, toIssue, btcUsdnLPTCI) | |
69 | 70 | [LPIssue, transfer, updateState] | |
70 | 71 | } | |
71 | 72 | else throw("Strict value is not equal to itself.") | |
72 | 73 | } | |
73 | 74 | } | |
74 | 75 | ||
75 | 76 | ||
76 | 77 | ||
77 | 78 | @Callable(i) | |
78 | 79 | func depositWavesUsdnLP () = { | |
79 | 80 | let pmt = value(i.payments[0]) | |
80 | 81 | let pmtAmount = pmt.amount | |
81 | 82 | if ((pmt.assetId != wavesUsdnLp)) | |
82 | 83 | then throw("attach WAVESUSDNLP tokens only") | |
83 | 84 | else if (isStopped) | |
84 | 85 | then throw("smart contract is on lock") | |
85 | 86 | else { | |
86 | 87 | let tkStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0) | |
87 | 88 | let totalIssued = match assetInfo(wavesUsdnLPTCI) { | |
88 | 89 | case asset: Asset => | |
89 | 90 | asset.quantity | |
90 | 91 | case _ => | |
91 | 92 | throw("Can't find asset") | |
92 | 93 | } | |
93 | - | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
94 | + | let one = fraction(totalIssued, 100000000, tkStaked) | |
95 | + | let toIssue = fraction(pmtAmount, one, 100000000) | |
94 | 96 | let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount)) | |
95 | 97 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
96 | 98 | if ((LPstake == LPstake)) | |
97 | 99 | then { | |
98 | 100 | let LPIssue = Reissue(wavesUsdnLPTCI, toIssue, true) | |
99 | 101 | let transfer = ScriptTransfer(i.caller, toIssue, wavesUsdnLPTCI) | |
100 | 102 | [LPIssue, transfer, updateState] | |
101 | 103 | } | |
102 | 104 | else throw("Strict value is not equal to itself.") | |
103 | 105 | } | |
104 | 106 | } | |
105 | 107 | ||
106 | 108 | ||
107 | 109 | ||
108 | 110 | @Callable(i) | |
109 | 111 | func depositWxUsdnLP () = { | |
110 | 112 | let pmt = value(i.payments[0]) | |
111 | 113 | let pmtAmount = pmt.amount | |
112 | 114 | if ((pmt.assetId != wxUsdnLP)) | |
113 | 115 | then throw("attach WXUSDNLP tokens only") | |
114 | 116 | else if (isStopped) | |
115 | 117 | then throw("smart contract is on lock") | |
116 | 118 | else { | |
117 | 119 | let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
118 | 120 | let totalIssued = match assetInfo(wxUsdnLPTCI) { | |
119 | 121 | case asset: Asset => | |
120 | 122 | asset.quantity | |
121 | 123 | case _ => | |
122 | 124 | throw("Can't find asset") | |
123 | 125 | } | |
124 | 126 | let one = fraction(totalIssued, 100000000, tkStaked) | |
125 | 127 | let toIssue = fraction(pmtAmount, one, 100000000) | |
126 | 128 | let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount)) | |
127 | 129 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
128 | 130 | if ((LPstake == LPstake)) | |
129 | 131 | then { | |
130 | 132 | let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true) | |
131 | 133 | let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI) | |
132 | 134 | [LPIssue, transfer, updateState] | |
133 | 135 | } | |
134 | 136 | else throw("Strict value is not equal to itself.") | |
135 | 137 | } | |
136 | 138 | } | |
137 | 139 | ||
138 | 140 | ||
139 | 141 | ||
140 | 142 | @Callable(i) | |
141 | 143 | func depositUsdtUsdnLP () = { | |
142 | 144 | let pmt = value(i.payments[0]) | |
143 | 145 | let pmtAmount = pmt.amount | |
144 | 146 | if ((pmt.assetId != usdnUsdt)) | |
145 | 147 | then throw("attach USDTUSDNLP tokens only") | |
146 | 148 | else if (isStopped) | |
147 | 149 | then throw("smart contract is on lock") | |
148 | 150 | else { | |
149 | 151 | let tkStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0) | |
150 | 152 | let totalIssued = match assetInfo(usdnUsdtLPTCI) { | |
151 | 153 | case asset: Asset => | |
152 | 154 | asset.quantity | |
153 | 155 | case _ => | |
154 | 156 | throw("Can't find asset") | |
155 | 157 | } | |
156 | 158 | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
157 | 159 | let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount)) | |
158 | 160 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
159 | 161 | if ((LPstake == LPstake)) | |
160 | 162 | then { | |
161 | 163 | let LPIssue = Reissue(usdnUsdtLPTCI, toIssue, true) | |
162 | 164 | let transfer = ScriptTransfer(i.caller, toIssue, usdnUsdtLPTCI) | |
163 | 165 | [LPIssue, transfer, updateState] | |
164 | 166 | } | |
165 | 167 | else throw("Strict value is not equal to itself.") | |
166 | 168 | } | |
167 | 169 | } | |
168 | 170 | ||
169 | 171 | ||
170 | 172 | ||
171 | 173 | @Callable(i) | |
172 | 174 | func depositEthUsdnLP () = { | |
173 | 175 | let pmt = value(i.payments[0]) | |
174 | 176 | let pmtAmount = pmt.amount | |
175 | 177 | if ((pmt.assetId != ethUsdnLP)) | |
176 | 178 | then throw("attach ETHUSDNLP tokens only") | |
177 | 179 | else if (isStopped) | |
178 | 180 | then throw("smart contract is on lock") | |
179 | 181 | else { | |
180 | 182 | let tkStaked = valueOrElse(getInteger(this, keyEthUsdn), 0) | |
181 | 183 | let totalIssued = match assetInfo(ethUsdnLPTCI) { | |
182 | 184 | case asset: Asset => | |
183 | 185 | asset.quantity | |
184 | 186 | case _ => | |
185 | 187 | throw("Can't find asset") | |
186 | 188 | } | |
187 | 189 | let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, ethUsdnLPTCI)) / tkStaked)) | |
188 | 190 | let updateState = IntegerEntry(keyEthUsdn, (tkStaked + pmtAmount)) | |
189 | 191 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
190 | 192 | if ((LPstake == LPstake)) | |
191 | 193 | then { | |
192 | 194 | let LPIssue = Reissue(ethUsdnLPTCI, toIssue, true) | |
193 | 195 | let transfer = ScriptTransfer(i.caller, toIssue, ethUsdnLPTCI) | |
194 | 196 | [LPIssue, transfer, updateState] | |
195 | 197 | } | |
196 | 198 | else throw("Strict value is not equal to itself.") | |
197 | 199 | } | |
198 | 200 | } | |
199 | 201 | ||
200 | 202 | ||
201 | 203 | ||
202 | 204 | @Callable(i) | |
203 | 205 | func compoundBTCUSDNLP () = { | |
204 | 206 | let compound = value(i.payments[0]) | |
205 | 207 | let ca = compound.amount | |
206 | 208 | if ((compound.assetId != btcUsdnLP)) | |
207 | 209 | then throw("attach BTCUSDNLP tokens only") | |
208 | 210 | else { | |
209 | 211 | let fromCompound = valueOrElse(getInteger(this, keyBtcUsdnCompound), 0) | |
210 | 212 | let totalStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0) | |
211 | 213 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
212 | 214 | if ((stakeC == stakeC)) | |
213 | 215 | then { | |
214 | 216 | let updateState = IntegerEntry(keyBtcUsdn, (totalStaked + ca)) | |
215 | 217 | let tc = IntegerEntry(keyBtcUsdnCompound, (fromCompound + ca)) | |
216 | 218 | [updateState, tc] | |
217 | 219 | } | |
218 | 220 | else throw("Strict value is not equal to itself.") | |
219 | 221 | } | |
220 | 222 | } | |
221 | 223 | ||
222 | 224 | ||
223 | 225 | ||
224 | 226 | @Callable(i) | |
225 | 227 | func compoundETHUSDNLP () = { | |
226 | 228 | let compound = value(i.payments[0]) | |
227 | 229 | let ca = compound.amount | |
228 | 230 | if ((compound.assetId != ethUsdnLP)) | |
229 | 231 | then throw("attach ETHUSDNLP tokens only") | |
230 | 232 | else { | |
231 | 233 | let fromCompound = valueOrElse(getInteger(this, keyEthUsdnCompound), 0) | |
232 | 234 | let totalStaked = valueOrElse(getInteger(this, keyEthUsdn), 0) | |
233 | 235 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
234 | 236 | if ((stakeC == stakeC)) | |
235 | 237 | then { | |
236 | 238 | let updateState = IntegerEntry(keyEthUsdn, (totalStaked + ca)) | |
237 | 239 | let tc = IntegerEntry(keyEthUsdnCompound, (fromCompound + ca)) | |
238 | 240 | [updateState, tc] | |
239 | 241 | } | |
240 | 242 | else throw("Strict value is not equal to itself.") | |
241 | 243 | } | |
242 | 244 | } | |
243 | 245 | ||
244 | 246 | ||
245 | 247 | ||
246 | 248 | @Callable(i) | |
247 | 249 | func compoundWXUSDNLP () = { | |
248 | 250 | let compound = value(i.payments[0]) | |
249 | 251 | let ca = compound.amount | |
250 | 252 | if ((compound.assetId != wxUsdnLP)) | |
251 | 253 | then throw("attach WXUSDNLP tokens only") | |
252 | 254 | else { | |
253 | 255 | let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0) | |
254 | 256 | let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
255 | 257 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
256 | 258 | if ((stakeC == stakeC)) | |
257 | 259 | then { | |
258 | 260 | let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca)) | |
259 | 261 | let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca)) | |
260 | 262 | [updateState, tc] | |
261 | 263 | } | |
262 | 264 | else throw("Strict value is not equal to itself.") | |
263 | 265 | } | |
264 | 266 | } | |
265 | 267 | ||
266 | 268 | ||
267 | 269 | ||
268 | 270 | @Callable(i) | |
269 | 271 | func compoundUSDTUSDNLP () = { | |
270 | 272 | let compound = value(i.payments[0]) | |
271 | 273 | let ca = compound.amount | |
272 | 274 | if ((compound.assetId != usdnUsdt)) | |
273 | 275 | then throw("attach USDTUSDNLP tokens only") | |
274 | 276 | else { | |
275 | 277 | let fromCompound = valueOrElse(getInteger(this, keyUsdtUsdnCompound), 0) | |
276 | 278 | let totalStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0) | |
277 | 279 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
278 | 280 | if ((stakeC == stakeC)) | |
279 | 281 | then { | |
280 | 282 | let updateState = IntegerEntry(keyUsdtUsdn, (totalStaked + ca)) | |
281 | 283 | let tc = IntegerEntry(keyUsdtUsdnCompound, (fromCompound + ca)) | |
282 | 284 | [updateState, tc] | |
283 | 285 | } | |
284 | 286 | else throw("Strict value is not equal to itself.") | |
285 | 287 | } | |
286 | 288 | } | |
287 | 289 | ||
288 | 290 | ||
289 | 291 | ||
290 | 292 | @Callable(i) | |
291 | 293 | func compoundWAVESUSDNLP () = { | |
292 | 294 | let compound = value(i.payments[0]) | |
293 | 295 | let ca = compound.amount | |
294 | 296 | if ((compound.assetId != wavesUsdnLp)) | |
295 | 297 | then throw("attach WAVESUSDNLP tokens only") | |
296 | 298 | else { | |
297 | 299 | let fromCompound = valueOrElse(getInteger(this, keyWavesCompound), 0) | |
298 | 300 | let totalStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0) | |
299 | 301 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
300 | 302 | if ((stakeC == stakeC)) | |
301 | 303 | then { | |
302 | 304 | let updateState = IntegerEntry(keyWAVESUSDN, (totalStaked + ca)) | |
303 | 305 | let tc = IntegerEntry(keyWavesCompound, (fromCompound + ca)) | |
304 | 306 | [updateState, tc] | |
305 | 307 | } | |
306 | 308 | else throw("Strict value is not equal to itself.") | |
307 | 309 | } | |
308 | 310 | } | |
309 | 311 | ||
310 | 312 | ||
311 | 313 | ||
312 | 314 | @Callable(i) | |
313 | 315 | func initWX () = { | |
314 | 316 | let pm = value(i.payments[0]) | |
315 | 317 | let am = pm.amount | |
316 | 318 | if ((pm.assetId != wxUsdnLP)) | |
317 | 319 | then throw("Unexpected token") | |
318 | 320 | else { | |
319 | 321 | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
320 | 322 | if ((s == s)) | |
321 | 323 | then { | |
322 | 324 | let upd = IntegerEntry(keyWXUSDN, am) | |
323 | 325 | let updK = IntegerEntry(keywxUsdnCompound, 0) | |
324 | 326 | [upd, updK] | |
325 | 327 | } | |
326 | 328 | else throw("Strict value is not equal to itself.") | |
327 | 329 | } | |
328 | 330 | } | |
329 | 331 | ||
330 | 332 | ||
331 | 333 | ||
332 | 334 | @Callable(i) | |
333 | 335 | func initWAVES () = { | |
334 | 336 | let pm = value(i.payments[0]) | |
335 | 337 | let am = pm.amount | |
336 | 338 | if ((pm.assetId != wavesUsdnLp)) | |
337 | 339 | then throw("Unexpected token") | |
338 | 340 | else { | |
339 | 341 | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
340 | 342 | if ((s == s)) | |
341 | 343 | then { | |
342 | 344 | let upd = IntegerEntry(keyWAVESUSDN, am) | |
343 | 345 | let updK = IntegerEntry(keyWavesCompound, 0) | |
344 | 346 | [upd, updK] | |
345 | 347 | } | |
346 | 348 | else throw("Strict value is not equal to itself.") | |
347 | 349 | } | |
348 | 350 | } | |
349 | 351 | ||
350 | 352 | ||
351 | 353 | ||
352 | 354 | @Callable(i) | |
353 | 355 | func initETH () = { | |
354 | 356 | let pm = value(i.payments[0]) | |
355 | 357 | let am = pm.amount | |
356 | 358 | if ((pm.assetId != ethUsdnLP)) | |
357 | 359 | then throw("Unexpected token") | |
358 | 360 | else { | |
359 | 361 | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
360 | 362 | if ((s == s)) | |
361 | 363 | then { | |
362 | 364 | let upd = IntegerEntry(keyEthUsdn, am) | |
363 | 365 | let updK = IntegerEntry(keyEthUsdnCompound, 0) | |
364 | 366 | let issue = Reissue(ethUsdnLPTCI, am, true) | |
365 | 367 | let send = ScriptTransfer(i.caller, am, ethUsdnLPTCI) | |
366 | 368 | [upd, updK, issue, send] | |
367 | 369 | } | |
368 | 370 | else throw("Strict value is not equal to itself.") | |
369 | 371 | } | |
370 | 372 | } | |
371 | 373 | ||
372 | 374 | ||
373 | 375 | ||
374 | 376 | @Callable(i) | |
375 | 377 | func initBTC () = { | |
376 | 378 | let pm = value(i.payments[0]) | |
377 | 379 | let am = pm.amount | |
378 | 380 | if ((pm.assetId != btcUsdnLP)) | |
379 | 381 | then throw("Unexpected token") | |
380 | 382 | else { | |
381 | 383 | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
382 | 384 | if ((s == s)) | |
383 | 385 | then { | |
384 | 386 | let upd = IntegerEntry(keyBtcUsdn, am) | |
385 | 387 | let updK = IntegerEntry(keyBtcUsdnCompound, 0) | |
386 | 388 | let LPIssue = Reissue(btcUsdnLPTCI, am, true) | |
387 | 389 | let tr = ScriptTransfer(i.caller, am, btcUsdnLPTCI) | |
388 | 390 | [upd, updK, LPIssue, tr] | |
389 | 391 | } | |
390 | 392 | else throw("Strict value is not equal to itself.") | |
391 | 393 | } | |
392 | 394 | } | |
393 | 395 | ||
394 | 396 | ||
395 | 397 | @Verifier(tx) | |
396 | 398 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
397 | 399 |
github/deemru/w8io/026f985 59.97 ms ◑