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