tx · 4dK6LQXF53babiLS5PGLb2if2X2bSHTN7kkst4rRvJF7 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH: -0.01500000 Waves 2022.07.27 12:57 [2158075] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves
{ "type": 13, "id": "4dK6LQXF53babiLS5PGLb2if2X2bSHTN7kkst4rRvJF7", "fee": 1500000, "feeAssetId": null, "timestamp": 1658915869119, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "5CnWmhGEnCyFoyBH6eyaQoWT2hKyKu1egSrQ3pGPYqQmwF9xJ5gcYTRq8A6GWqsYacXQfZK2e9cWWdNH2Wq2BH2o" ], "script": "base64:BgIgCAISABIAEgASABIAEgASABIAEgASABIAEgASABIAEgAdAAp1c2R0VXNkbkxQASDbTYM1ZEcblu+fDC+gz33VeZ2S6OGbNQ/BP8x7AnApCwANdXNkdFVzZG5MUFRDSQEgCoHNqe1AYR2YSrg62HoEaFMIJsDJmPFhwSl++h3eKvIACHd4VXNkbkxQASAbuaGPe85Mpc36zkfJCxaOTfZb3sLrk8HWxajRsaoLHAALd3hVc2RuTFBUQ0kBILfs3eYbAnvathOH/VXQ1jy2x6I3PUuIvcF7b0hEAJgvAAp1c2RjVXNkbkxQASADaQH8GwqYCojNj/4RWYWFJpEys1qS/CbpSF3Tn95cdgANdXNkY1VzZG5MUFRDSQEg9gI33dOf74ZFL1wjRw+VX9E6baErwqe0m1RBB1L1bsYACnVzZGNVc2R0TFABIMb4pHQbVkhWEJ+QfsIz9DFriwRKLCv9mUuH9YWbfOSMAA11c2RjVXNkdExQVENJASACxoV8BEszx+Lvh2eHUvtVgv2z34QjtqBaxTXdz1dK/gAMcHV6emxlVXNkbkxQASDDM8Z0ziOqpCLfSSTlxJlreASwd1aCd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ECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQZpbml0V1gABAJwbQkBBXZhbHVlAQkAkQMCCAUBaQhwYXltZW50cwAABAJhbQgFAnBtBmFtb3VudAMJAQIhPQIIBQJwbQdhc3NldElkBQh3eFVzZG5MUAkAAgECEFVuZXhwZWN0ZWQgdG9rZW4EAXMJAPwHBAkBB0FkZHJlc3MBARoBVFlAJ5NrSynuvrGhDubcQLjPpI16DOu1DwIFc3Rha2UFA25pbAkAzAgCBQJwbQUDbmlsAwkAAAIFAXMFAXMEA3VwZAkBDEludGVnZXJFbnRyeQIFCWtleVdYVVNETgUCYW0EBHVwZEsJAQxJbnRlZ2VyRW50cnkCBRFrZXl3eFVzZG5Db21wb3VuZAAACQDMCAIFA3VwZAkAzAgCBQR1cGRLBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5E9yFLA==", "height": 2158075, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8jKD68yjCcXXkBQjusT8gMB6KnkQ6rJKhpUGzSTeziA6 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
83 | 83 | ||
84 | 84 | ||
85 | 85 | @Callable(i) | |
86 | + | func initWxtUsdn () = { | |
87 | + | let pm = value(i.payments[0]) | |
88 | + | let am = pm.amount | |
89 | + | if ((pm.assetId != wxUsdnLP)) | |
90 | + | then throw("Unexpected token") | |
91 | + | else { | |
92 | + | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
93 | + | if ((s == s)) | |
94 | + | then { | |
95 | + | let upd = IntegerEntry(keyWXUSDN, am) | |
96 | + | let updK = IntegerEntry(keywxUsdnCompound, 0) | |
97 | + | [upd, updK] | |
98 | + | } | |
99 | + | else throw("Strict value is not equal to itself.") | |
100 | + | } | |
101 | + | } | |
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | @Callable(i) | |
86 | 106 | func withdraw () = { | |
87 | 107 | let payment = value(i.payments[0]) | |
88 | 108 | let am = payment.amount | |
130 | 150 | if ((unstake == unstake)) | |
131 | 151 | then { | |
132 | 152 | let wxLpFeeTransfer = ScriptTransfer(Address(tw), fee, wxUsdnLP) | |
133 | - | let wxLpTransfer = ScriptTransfer(i.caller, ( | |
153 | + | let wxLpTransfer = ScriptTransfer(i.caller, (wxLpToWithdraw - fee), wxUsdnLP) | |
134 | 154 | let updateWxLpStaked = IntegerEntry(keyWXUSDN, (wxUsdnStaked - wxLpToWithdraw)) | |
135 | 155 | let burnWxLpTci = Burn(wxUsdnLP, am) | |
136 | 156 | if ((burnWxLpTci == burnWxLpTci)) | |
151 | 171 | let singleUsdcLP = fraction(usdcUsdnTCI, def, usdcUsdnStaked) | |
152 | 172 | let usdcLpToWithdraw = fraction(singleUsdcLP, am, def) | |
153 | 173 | let fee = fraction(usdcLpToWithdraw, def, feePerc) | |
154 | - | let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP) | |
155 | - | let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP) | |
156 | - | let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw)) | |
157 | - | let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am) | |
158 | - | if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci)) | |
159 | - | then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked] | |
174 | + | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcLpToWithdraw], nil) | |
175 | + | if ((unstake == unstake)) | |
176 | + | then { | |
177 | + | let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP) | |
178 | + | let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP) | |
179 | + | let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw)) | |
180 | + | let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am) | |
181 | + | if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci)) | |
182 | + | then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked] | |
183 | + | else throw("Strict value is not equal to itself.") | |
184 | + | } | |
160 | 185 | else throw("Strict value is not equal to itself.") | |
161 | 186 | } | |
162 | 187 | else if ((id == usdcUsdtLPTCI)) | |
171 | 196 | let singleUsdcUsdt = fraction(usdcUsdtTci, def, usdcUsdtStaked) | |
172 | 197 | let usdcUsdtLpToWithdraw = fraction(singleUsdcUsdt, am, def) | |
173 | 198 | let fee = fraction(usdcUsdtLpToWithdraw, def, feePerc) | |
174 | - | let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP) | |
175 | - | let usdcUsdtTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdtLP) | |
176 | - | let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw)) | |
177 | - | let burnWxLpTci = Burn(usdcUsdnLPTCI, am) | |
178 | - | if ((burnWxLpTci == burnWxLpTci)) | |
179 | - | then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked] | |
199 | + | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcUsdtLpToWithdraw], nil) | |
200 | + | if ((unstake == unstake)) | |
201 | + | then { | |
202 | + | let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP) | |
203 | + | let usdcUsdtTransfer = ScriptTransfer(i.caller, (usdcUsdtLpToWithdraw - fee), usdcUsdtLP) | |
204 | + | let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw)) | |
205 | + | let burnWxLpTci = Burn(usdcUsdnLPTCI, am) | |
206 | + | if ((burnWxLpTci == burnWxLpTci)) | |
207 | + | then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked] | |
208 | + | else throw("Strict value is not equal to itself.") | |
209 | + | } | |
180 | 210 | else throw("Strict value is not equal to itself.") | |
181 | 211 | } | |
182 | 212 | else if ((id == puzzleUsdnLPTCI)) | |
191 | 221 | let singlePuzzleUsdn = fraction(puzzleUsdnTci, def, puzzleLPStaked) | |
192 | 222 | let puzzleUsdnWithdraw = fraction(singlePuzzleUsdn, am, def) | |
193 | 223 | let fee = fraction(puzzleUsdnWithdraw, def, feePerc) | |
194 | - | let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP) | |
195 | - | let puzzleUsdnTransfer = ScriptTransfer(i.caller, (am - fee), puzzleUsdnLP) | |
196 | - | let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw)) | |
197 | - | let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am) | |
198 | - | if ((burnPuzzleTCI == burnPuzzleTCI)) | |
199 | - | then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked] | |
224 | + | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", puzzleUsdnWithdraw], nil) | |
225 | + | if ((unstake == unstake)) | |
226 | + | then { | |
227 | + | let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP) | |
228 | + | let puzzleUsdnTransfer = ScriptTransfer(i.caller, (puzzleUsdnWithdraw - fee), puzzleUsdnLP) | |
229 | + | let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw)) | |
230 | + | let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am) | |
231 | + | if ((burnPuzzleTCI == burnPuzzleTCI)) | |
232 | + | then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked] | |
233 | + | else throw("Strict value is not equal to itself.") | |
234 | + | } | |
200 | 235 | else throw("Strict value is not equal to itself.") | |
201 | 236 | } | |
202 | 237 | else throw("Invalid asset") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let usdtUsdnLP = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS' | |
5 | 5 | ||
6 | 6 | let usdtUsdnLPTCI = base58'i1snzKxSEZVokh9TWj8hTJQEDBsocnL2hRWsSbsMPK7' | |
7 | 7 | ||
8 | 8 | let wxUsdnLP = base58'2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib' | |
9 | 9 | ||
10 | 10 | let wxUsdnLPTCI = base58'DNy6WBfhPE4y82RonGdHhZEunNotEDzmNfrBomWnsyGi' | |
11 | 11 | ||
12 | 12 | let usdcUsdnLP = base58'EK6N7S38xbtBT3SxAqoGdDLCiX6rojX6G169CnSyuE5' | |
13 | 13 | ||
14 | 14 | let usdcUsdnLPTCI = base58'HZKFpNfyPG5gt4D6Nfy1zQSg2Ptmqv932GjNTCyBEeKP' | |
15 | 15 | ||
16 | 16 | let usdcUsdtLP = base58'EPhdEfmQaNcHyvDmRGhnLhgcJtKZ2a4k3ZBmKWtAEWyH' | |
17 | 17 | ||
18 | 18 | let usdcUsdtLPTCI = base58'BqPYkaiz7Le6fFu1rjZ54anrpT57EpvyugZCUqrsjXj' | |
19 | 19 | ||
20 | 20 | let puzzleUsdnLP = base58'E8zHu33GfcNyGLypX77gZiUXfvuZQeaYmiEfsy7VYNwP' | |
21 | 21 | ||
22 | 22 | let puzzleUsdnLPTCI = base58'Dh9QXSSABE5V6aRfu3mCbDAUokbpE7ER7pbZV6cvyg1A' | |
23 | 23 | ||
24 | 24 | let wxId = base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on' | |
25 | 25 | ||
26 | 26 | let keySponsorship = "Sponsorship_in_lock" | |
27 | 27 | ||
28 | 28 | let isStopped = false | |
29 | 29 | ||
30 | 30 | let keyStaked = "STAKED_LP" | |
31 | 31 | ||
32 | 32 | let keyCompound = "From_Compound" | |
33 | 33 | ||
34 | 34 | let keywxUsdnCompound = "WX_USDN_compound" | |
35 | 35 | ||
36 | 36 | let keyWXUSDN = "WX_USDN" | |
37 | 37 | ||
38 | 38 | let keyUsdcUsdnCompound = "USDC_USDN_compound" | |
39 | 39 | ||
40 | 40 | let keyUSDCUSDN = "USDC_USDN" | |
41 | 41 | ||
42 | 42 | let keyUsdcUsdtCompound = "USDC_USDT_compound" | |
43 | 43 | ||
44 | 44 | let keyUSDCUSDT = "USDC_USDT" | |
45 | 45 | ||
46 | 46 | let keyPuzzleUsdnCompound = "PUZZLE_USDN_compound" | |
47 | 47 | ||
48 | 48 | let keyPUZZLEUSDN = "PUZZLE_USDN" | |
49 | 49 | ||
50 | 50 | let def = 100000000 | |
51 | 51 | ||
52 | 52 | let feePerc = 10000000000 | |
53 | 53 | ||
54 | 54 | let tw = base58'3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH' | |
55 | 55 | ||
56 | 56 | let oracle = base58'3NAVBWBnqieKa3CdN39MAhToyTHShYxX1gB' | |
57 | 57 | ||
58 | 58 | let stakePool = "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz" | |
59 | 59 | ||
60 | 60 | func checkAddress (caller) = if ((caller != oracle)) | |
61 | 61 | then false | |
62 | 62 | else true | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | @Callable(i) | |
66 | 66 | func initUsdtUsdn () = { | |
67 | 67 | let pm = value(i.payments[0]) | |
68 | 68 | let am = pm.amount | |
69 | 69 | if ((pm.assetId != usdtUsdnLP)) | |
70 | 70 | then throw("Unexpected token") | |
71 | 71 | else { | |
72 | 72 | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
73 | 73 | if ((s == s)) | |
74 | 74 | then { | |
75 | 75 | let upd = IntegerEntry(keyStaked, am) | |
76 | 76 | let updK = IntegerEntry(keyCompound, 0) | |
77 | 77 | [upd, updK] | |
78 | 78 | } | |
79 | 79 | else throw("Strict value is not equal to itself.") | |
80 | 80 | } | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | ||
85 | 85 | @Callable(i) | |
86 | + | func initWxtUsdn () = { | |
87 | + | let pm = value(i.payments[0]) | |
88 | + | let am = pm.amount | |
89 | + | if ((pm.assetId != wxUsdnLP)) | |
90 | + | then throw("Unexpected token") | |
91 | + | else { | |
92 | + | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
93 | + | if ((s == s)) | |
94 | + | then { | |
95 | + | let upd = IntegerEntry(keyWXUSDN, am) | |
96 | + | let updK = IntegerEntry(keywxUsdnCompound, 0) | |
97 | + | [upd, updK] | |
98 | + | } | |
99 | + | else throw("Strict value is not equal to itself.") | |
100 | + | } | |
101 | + | } | |
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | @Callable(i) | |
86 | 106 | func withdraw () = { | |
87 | 107 | let payment = value(i.payments[0]) | |
88 | 108 | let am = payment.amount | |
89 | 109 | let id = payment.assetId | |
90 | 110 | if ((id == usdtUsdnLPTCI)) | |
91 | 111 | then { | |
92 | 112 | let TCIAmount = match assetInfo(usdtUsdnLPTCI) { | |
93 | 113 | case q: Asset => | |
94 | 114 | q.quantity | |
95 | 115 | case _ => | |
96 | 116 | 0 | |
97 | 117 | } | |
98 | 118 | let usdnUsdtStaked = valueOrElse(getInteger(this, keyStaked), 0) | |
99 | 119 | let forSingleTCI = fraction(usdnUsdtStaked, def, TCIAmount) | |
100 | 120 | let usdnLpToWithdraw = fraction(forSingleTCI, am, def) | |
101 | 121 | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS", usdnLpToWithdraw], nil) | |
102 | 122 | if ((unstake == unstake)) | |
103 | 123 | then { | |
104 | 124 | let fee = fraction(usdnLpToWithdraw, def, feePerc) | |
105 | 125 | let brn = Burn(usdtUsdnLPTCI, am) | |
106 | 126 | if ((brn == brn)) | |
107 | 127 | then { | |
108 | 128 | let updateUsdnLpStaked = IntegerEntry(keyStaked, (usdnUsdtStaked - usdnLpToWithdraw)) | |
109 | 129 | let usdnLpfeeTransfer = ScriptTransfer(Address(tw), fee, usdtUsdnLP) | |
110 | 130 | let transfer = ScriptTransfer(i.caller, (usdnLpToWithdraw - fee), usdtUsdnLP) | |
111 | 131 | [usdnLpfeeTransfer, transfer, updateUsdnLpStaked] | |
112 | 132 | } | |
113 | 133 | else throw("Strict value is not equal to itself.") | |
114 | 134 | } | |
115 | 135 | else throw("Strict value is not equal to itself.") | |
116 | 136 | } | |
117 | 137 | else if ((id == wxUsdnLPTCI)) | |
118 | 138 | then { | |
119 | 139 | let wxTciAm = match assetInfo(wxUsdnLPTCI) { | |
120 | 140 | case q: Asset => | |
121 | 141 | q.quantity | |
122 | 142 | case _ => | |
123 | 143 | 0 | |
124 | 144 | } | |
125 | 145 | let wxUsdnStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
126 | 146 | let singleWXLP = fraction(wxUsdnStaked, def, wxTciAm) | |
127 | 147 | let wxLpToWithdraw = fraction(singleWXLP, am, def) | |
128 | 148 | let fee = fraction(wxLpToWithdraw, def, feePerc) | |
129 | 149 | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", wxLpToWithdraw], nil) | |
130 | 150 | if ((unstake == unstake)) | |
131 | 151 | then { | |
132 | 152 | let wxLpFeeTransfer = ScriptTransfer(Address(tw), fee, wxUsdnLP) | |
133 | - | let wxLpTransfer = ScriptTransfer(i.caller, ( | |
153 | + | let wxLpTransfer = ScriptTransfer(i.caller, (wxLpToWithdraw - fee), wxUsdnLP) | |
134 | 154 | let updateWxLpStaked = IntegerEntry(keyWXUSDN, (wxUsdnStaked - wxLpToWithdraw)) | |
135 | 155 | let burnWxLpTci = Burn(wxUsdnLP, am) | |
136 | 156 | if ((burnWxLpTci == burnWxLpTci)) | |
137 | 157 | then [wxLpFeeTransfer, wxLpTransfer, updateWxLpStaked] | |
138 | 158 | else throw("Strict value is not equal to itself.") | |
139 | 159 | } | |
140 | 160 | else throw("Strict value is not equal to itself.") | |
141 | 161 | } | |
142 | 162 | else if ((id == usdcUsdnLPTCI)) | |
143 | 163 | then { | |
144 | 164 | let usdcUsdnTCI = match assetInfo(usdcUsdnLPTCI) { | |
145 | 165 | case q: Asset => | |
146 | 166 | q.quantity | |
147 | 167 | case _ => | |
148 | 168 | 0 | |
149 | 169 | } | |
150 | 170 | let usdcUsdnStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0) | |
151 | 171 | let singleUsdcLP = fraction(usdcUsdnTCI, def, usdcUsdnStaked) | |
152 | 172 | let usdcLpToWithdraw = fraction(singleUsdcLP, am, def) | |
153 | 173 | let fee = fraction(usdcLpToWithdraw, def, feePerc) | |
154 | - | let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP) | |
155 | - | let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP) | |
156 | - | let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw)) | |
157 | - | let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am) | |
158 | - | if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci)) | |
159 | - | then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked] | |
174 | + | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcLpToWithdraw], nil) | |
175 | + | if ((unstake == unstake)) | |
176 | + | then { | |
177 | + | let usdcUsdnLPFee = ScriptTransfer(Address(tw), fee, usdcUsdnLP) | |
178 | + | let usdcUsdnTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdnLP) | |
179 | + | let updateUsdcUsdnLpStaked = IntegerEntry(keyUSDCUSDN, (usdcUsdnStaked - usdcLpToWithdraw)) | |
180 | + | let burnUsdcUsdnLpTci = Burn(usdcUsdnLPTCI, am) | |
181 | + | if ((burnUsdcUsdnLpTci == burnUsdcUsdnLpTci)) | |
182 | + | then [usdcUsdnLPFee, usdcUsdnTransfer, updateUsdcUsdnLpStaked] | |
183 | + | else throw("Strict value is not equal to itself.") | |
184 | + | } | |
160 | 185 | else throw("Strict value is not equal to itself.") | |
161 | 186 | } | |
162 | 187 | else if ((id == usdcUsdtLPTCI)) | |
163 | 188 | then { | |
164 | 189 | let usdcUsdtTci = match assetInfo(usdcUsdnLPTCI) { | |
165 | 190 | case q: Asset => | |
166 | 191 | q.quantity | |
167 | 192 | case _ => | |
168 | 193 | 0 | |
169 | 194 | } | |
170 | 195 | let usdcUsdtStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0) | |
171 | 196 | let singleUsdcUsdt = fraction(usdcUsdtTci, def, usdcUsdtStaked) | |
172 | 197 | let usdcUsdtLpToWithdraw = fraction(singleUsdcUsdt, am, def) | |
173 | 198 | let fee = fraction(usdcUsdtLpToWithdraw, def, feePerc) | |
174 | - | let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP) | |
175 | - | let usdcUsdtTransfer = ScriptTransfer(i.caller, (am - fee), usdcUsdtLP) | |
176 | - | let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw)) | |
177 | - | let burnWxLpTci = Burn(usdcUsdnLPTCI, am) | |
178 | - | if ((burnWxLpTci == burnWxLpTci)) | |
179 | - | then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked] | |
199 | + | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", usdcUsdtLpToWithdraw], nil) | |
200 | + | if ((unstake == unstake)) | |
201 | + | then { | |
202 | + | let usdcUsdtLPFee = ScriptTransfer(Address(tw), fee, usdcUsdtLP) | |
203 | + | let usdcUsdtTransfer = ScriptTransfer(i.caller, (usdcUsdtLpToWithdraw - fee), usdcUsdtLP) | |
204 | + | let updateUsdcUsdtLpStaked = IntegerEntry(keyUSDCUSDT, (usdcUsdtStaked - usdcUsdtLpToWithdraw)) | |
205 | + | let burnWxLpTci = Burn(usdcUsdnLPTCI, am) | |
206 | + | if ((burnWxLpTci == burnWxLpTci)) | |
207 | + | then [usdcUsdtLPFee, usdcUsdtTransfer, updateUsdcUsdtLpStaked] | |
208 | + | else throw("Strict value is not equal to itself.") | |
209 | + | } | |
180 | 210 | else throw("Strict value is not equal to itself.") | |
181 | 211 | } | |
182 | 212 | else if ((id == puzzleUsdnLPTCI)) | |
183 | 213 | then { | |
184 | 214 | let puzzleUsdnTci = match assetInfo(puzzleUsdnLPTCI) { | |
185 | 215 | case q: Asset => | |
186 | 216 | q.quantity | |
187 | 217 | case _ => | |
188 | 218 | 0 | |
189 | 219 | } | |
190 | 220 | let puzzleLPStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0) | |
191 | 221 | let singlePuzzleUsdn = fraction(puzzleUsdnTci, def, puzzleLPStaked) | |
192 | 222 | let puzzleUsdnWithdraw = fraction(singlePuzzleUsdn, am, def) | |
193 | 223 | let fee = fraction(puzzleUsdnWithdraw, def, feePerc) | |
194 | - | let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP) | |
195 | - | let puzzleUsdnTransfer = ScriptTransfer(i.caller, (am - fee), puzzleUsdnLP) | |
196 | - | let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw)) | |
197 | - | let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am) | |
198 | - | if ((burnPuzzleTCI == burnPuzzleTCI)) | |
199 | - | then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked] | |
224 | + | let unstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "unstake", ["2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib", puzzleUsdnWithdraw], nil) | |
225 | + | if ((unstake == unstake)) | |
226 | + | then { | |
227 | + | let puzzleUsdnLPFee = ScriptTransfer(Address(tw), fee, puzzleUsdnLP) | |
228 | + | let puzzleUsdnTransfer = ScriptTransfer(i.caller, (puzzleUsdnWithdraw - fee), puzzleUsdnLP) | |
229 | + | let updatePuzzleUsdnLpStaked = IntegerEntry(keyPUZZLEUSDN, (puzzleLPStaked - puzzleUsdnWithdraw)) | |
230 | + | let burnPuzzleTCI = Burn(puzzleUsdnLPTCI, am) | |
231 | + | if ((burnPuzzleTCI == burnPuzzleTCI)) | |
232 | + | then [puzzleUsdnLPFee, puzzleUsdnTransfer, updatePuzzleUsdnLpStaked] | |
233 | + | else throw("Strict value is not equal to itself.") | |
234 | + | } | |
200 | 235 | else throw("Strict value is not equal to itself.") | |
201 | 236 | } | |
202 | 237 | else throw("Invalid asset") | |
203 | 238 | } | |
204 | 239 | ||
205 | 240 | ||
206 | 241 | ||
207 | 242 | @Callable(i) | |
208 | 243 | func depositWxUsdnLP () = { | |
209 | 244 | let pmt = value(i.payments[0]) | |
210 | 245 | let pmtAmount = pmt.amount | |
211 | 246 | if ((pmt.assetId != wxUsdnLP)) | |
212 | 247 | then throw("attach WXUSDNLP tokens only") | |
213 | 248 | else if (isStopped) | |
214 | 249 | then throw("smart contract is on lock") | |
215 | 250 | else { | |
216 | 251 | let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
217 | 252 | let totalIssued = match assetInfo(wxUsdnLPTCI) { | |
218 | 253 | case asset: Asset => | |
219 | 254 | asset.quantity | |
220 | 255 | case _ => | |
221 | 256 | throw("Can't find asset") | |
222 | 257 | } | |
223 | 258 | let one = fraction(totalIssued, 100000000, tkStaked) | |
224 | 259 | let toIssue = fraction(pmtAmount, one, 100000000) | |
225 | 260 | let updateState = IntegerEntry(keyWXUSDN, (tkStaked + pmtAmount)) | |
226 | 261 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
227 | 262 | if ((LPstake == LPstake)) | |
228 | 263 | then { | |
229 | 264 | let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true) | |
230 | 265 | let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI) | |
231 | 266 | [LPIssue, transfer, updateState] | |
232 | 267 | } | |
233 | 268 | else throw("Strict value is not equal to itself.") | |
234 | 269 | } | |
235 | 270 | } | |
236 | 271 | ||
237 | 272 | ||
238 | 273 | ||
239 | 274 | @Callable(i) | |
240 | 275 | func depositUsdtUsdnLP () = { | |
241 | 276 | let pmt = value(i.payments[0]) | |
242 | 277 | let pmtAmount = pmt.amount | |
243 | 278 | if ((pmt.assetId != usdtUsdnLP)) | |
244 | 279 | then throw("attach USDTUSDNLP tokens only") | |
245 | 280 | else if (isStopped) | |
246 | 281 | then throw("smart contract is on lock") | |
247 | 282 | else { | |
248 | 283 | let tkStaked = valueOrElse(getInteger(this, keyStaked), 0) | |
249 | 284 | let totalIssued = match assetInfo(usdtUsdnLPTCI) { | |
250 | 285 | case asset: Asset => | |
251 | 286 | asset.quantity | |
252 | 287 | case _ => | |
253 | 288 | throw("Can't find asset") | |
254 | 289 | } | |
255 | 290 | let fromCompound = valueOrElse(getInteger(this, keyCompound), 0) | |
256 | 291 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
257 | 292 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
258 | 293 | let updateState = IntegerEntry(keyStaked, (tkStaked + pmtAmount)) | |
259 | 294 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
260 | 295 | if ((LPstake == LPstake)) | |
261 | 296 | then { | |
262 | 297 | let LPIssue = Reissue(usdtUsdnLPTCI, toIssue, true) | |
263 | 298 | let transfer = ScriptTransfer(i.caller, toIssue, usdtUsdnLPTCI) | |
264 | 299 | [LPIssue, transfer, updateState] | |
265 | 300 | } | |
266 | 301 | else throw("Strict value is not equal to itself.") | |
267 | 302 | } | |
268 | 303 | } | |
269 | 304 | ||
270 | 305 | ||
271 | 306 | ||
272 | 307 | @Callable(i) | |
273 | 308 | func depositUsdcUsdnLP () = { | |
274 | 309 | let pmt = value(i.payments[0]) | |
275 | 310 | let pmtAmount = pmt.amount | |
276 | 311 | if ((pmt.assetId != usdcUsdnLP)) | |
277 | 312 | then throw("attach USDCUSDNLP tokens only") | |
278 | 313 | else if (isStopped) | |
279 | 314 | then throw("smart contract is on lock") | |
280 | 315 | else { | |
281 | 316 | let tkStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0) | |
282 | 317 | let totalIssued = match assetInfo(usdcUsdnLPTCI) { | |
283 | 318 | case asset: Asset => | |
284 | 319 | asset.quantity | |
285 | 320 | case _ => | |
286 | 321 | throw("Can't find asset") | |
287 | 322 | } | |
288 | 323 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdnCompound), 0) | |
289 | 324 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
290 | 325 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
291 | 326 | let updateState = IntegerEntry(keyUSDCUSDN, (tkStaked + pmtAmount)) | |
292 | 327 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
293 | 328 | if ((LPstake == LPstake)) | |
294 | 329 | then { | |
295 | 330 | let LPIssue = Reissue(usdcUsdnLPTCI, toIssue, true) | |
296 | 331 | let transfer = ScriptTransfer(i.caller, toIssue, usdcUsdnLPTCI) | |
297 | 332 | [LPIssue, transfer, updateState] | |
298 | 333 | } | |
299 | 334 | else throw("Strict value is not equal to itself.") | |
300 | 335 | } | |
301 | 336 | } | |
302 | 337 | ||
303 | 338 | ||
304 | 339 | ||
305 | 340 | @Callable(i) | |
306 | 341 | func depositUsdcUsdtLP () = { | |
307 | 342 | let pmt = value(i.payments[0]) | |
308 | 343 | let pmtAmount = pmt.amount | |
309 | 344 | if ((pmt.assetId != usdcUsdtLP)) | |
310 | 345 | then throw("attach USDCUSDTLP tokens only") | |
311 | 346 | else if (isStopped) | |
312 | 347 | then throw("smart contract is on lock") | |
313 | 348 | else { | |
314 | 349 | let tkStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0) | |
315 | 350 | let totalIssued = match assetInfo(usdcUsdtLPTCI) { | |
316 | 351 | case asset: Asset => | |
317 | 352 | asset.quantity | |
318 | 353 | case _ => | |
319 | 354 | throw("Can't find asset") | |
320 | 355 | } | |
321 | 356 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdtCompound), 0) | |
322 | 357 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
323 | 358 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
324 | 359 | let updateState = IntegerEntry(keyUSDCUSDT, (tkStaked + pmtAmount)) | |
325 | 360 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
326 | 361 | if ((LPstake == LPstake)) | |
327 | 362 | then { | |
328 | 363 | let LPIssue = Reissue(usdcUsdtLPTCI, toIssue, true) | |
329 | 364 | let transfer = ScriptTransfer(i.caller, toIssue, usdcUsdtLPTCI) | |
330 | 365 | [LPIssue, transfer, updateState] | |
331 | 366 | } | |
332 | 367 | else throw("Strict value is not equal to itself.") | |
333 | 368 | } | |
334 | 369 | } | |
335 | 370 | ||
336 | 371 | ||
337 | 372 | ||
338 | 373 | @Callable(i) | |
339 | 374 | func depositPuzzleUsdnLP () = { | |
340 | 375 | let pmt = value(i.payments[0]) | |
341 | 376 | let pmtAmount = pmt.amount | |
342 | 377 | if ((pmt.assetId != puzzleUsdnLP)) | |
343 | 378 | then throw("attach PUZZLEUDSNLP tokens only") | |
344 | 379 | else if (isStopped) | |
345 | 380 | then throw("smart contract is on lock") | |
346 | 381 | else { | |
347 | 382 | let tkStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0) | |
348 | 383 | let totalIssued = match assetInfo(puzzleUsdnLPTCI) { | |
349 | 384 | case asset: Asset => | |
350 | 385 | asset.quantity | |
351 | 386 | case _ => | |
352 | 387 | throw("Can't find asset") | |
353 | 388 | } | |
354 | 389 | let fromCompound = valueOrElse(getInteger(this, keyPuzzleUsdnCompound), 0) | |
355 | 390 | let forOne = fraction(totalIssued, 100000000, tkStaked) | |
356 | 391 | let toIssue = fraction(pmtAmount, forOne, 100000000) | |
357 | 392 | let updateState = IntegerEntry(keyPUZZLEUSDN, (tkStaked + pmtAmount)) | |
358 | 393 | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
359 | 394 | if ((LPstake == LPstake)) | |
360 | 395 | then { | |
361 | 396 | let LPIssue = Reissue(puzzleUsdnLPTCI, toIssue, true) | |
362 | 397 | let transfer = ScriptTransfer(i.caller, toIssue, puzzleUsdnLPTCI) | |
363 | 398 | [LPIssue, transfer, updateState] | |
364 | 399 | } | |
365 | 400 | else throw("Strict value is not equal to itself.") | |
366 | 401 | } | |
367 | 402 | } | |
368 | 403 | ||
369 | 404 | ||
370 | 405 | ||
371 | 406 | @Callable(i) | |
372 | 407 | func compoundWxUsdnLP () = { | |
373 | 408 | let compound = value(i.payments[0]) | |
374 | 409 | let ca = compound.amount | |
375 | 410 | let isOracle = checkAddress(i.caller.bytes) | |
376 | 411 | if ((compound.assetId != wxUsdnLP)) | |
377 | 412 | then throw("attach WXUSDNLP tokens only") | |
378 | 413 | else if (!(isOracle)) | |
379 | 414 | then throw("You are not authotized to call this function") | |
380 | 415 | else { | |
381 | 416 | let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0) | |
382 | 417 | let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
383 | 418 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
384 | 419 | if ((stakeC == stakeC)) | |
385 | 420 | then { | |
386 | 421 | let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca)) | |
387 | 422 | let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca)) | |
388 | 423 | [updateState, tc] | |
389 | 424 | } | |
390 | 425 | else throw("Strict value is not equal to itself.") | |
391 | 426 | } | |
392 | 427 | } | |
393 | 428 | ||
394 | 429 | ||
395 | 430 | ||
396 | 431 | @Callable(i) | |
397 | 432 | func compoundUsdtUsdnLP () = { | |
398 | 433 | let compound = value(i.payments[0]) | |
399 | 434 | let ca = compound.amount | |
400 | 435 | let isOracle = checkAddress(i.caller.bytes) | |
401 | 436 | if ((compound.assetId != usdtUsdnLP)) | |
402 | 437 | then throw("attach USDTUSDNLP tokens only") | |
403 | 438 | else if (!(isOracle)) | |
404 | 439 | then throw("You are not authotized to call this function") | |
405 | 440 | else { | |
406 | 441 | let fromCompound = valueOrElse(getInteger(this, keyCompound), 0) | |
407 | 442 | let totalStaked = valueOrElse(getInteger(this, keyStaked), 0) | |
408 | 443 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
409 | 444 | if ((stakeC == stakeC)) | |
410 | 445 | then { | |
411 | 446 | let updateState = IntegerEntry(keyStaked, (totalStaked + ca)) | |
412 | 447 | let tc = IntegerEntry(keyCompound, (fromCompound + ca)) | |
413 | 448 | [updateState, tc] | |
414 | 449 | } | |
415 | 450 | else throw("Strict value is not equal to itself.") | |
416 | 451 | } | |
417 | 452 | } | |
418 | 453 | ||
419 | 454 | ||
420 | 455 | ||
421 | 456 | @Callable(i) | |
422 | 457 | func compoundUsdcUsdnLP () = { | |
423 | 458 | let compound = value(i.payments[0]) | |
424 | 459 | let ca = compound.amount | |
425 | 460 | let isOracle = checkAddress(i.caller.bytes) | |
426 | 461 | if ((compound.assetId != usdcUsdnLP)) | |
427 | 462 | then throw("attach USDCUSDNLP tokens only") | |
428 | 463 | else if (!(isOracle)) | |
429 | 464 | then throw("You are not authotized to call this function") | |
430 | 465 | else { | |
431 | 466 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdnCompound), 0) | |
432 | 467 | let totalStaked = valueOrElse(getInteger(this, keyUSDCUSDN), 0) | |
433 | 468 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
434 | 469 | if ((stakeC == stakeC)) | |
435 | 470 | then { | |
436 | 471 | let updateState = IntegerEntry(keyUSDCUSDN, (totalStaked + ca)) | |
437 | 472 | let tc = IntegerEntry(keyUsdcUsdnCompound, (fromCompound + ca)) | |
438 | 473 | [updateState, tc] | |
439 | 474 | } | |
440 | 475 | else throw("Strict value is not equal to itself.") | |
441 | 476 | } | |
442 | 477 | } | |
443 | 478 | ||
444 | 479 | ||
445 | 480 | ||
446 | 481 | @Callable(i) | |
447 | 482 | func compoundUsdcUsdtLP () = { | |
448 | 483 | let compound = value(i.payments[0]) | |
449 | 484 | let ca = compound.amount | |
450 | 485 | let isOracle = checkAddress(i.caller.bytes) | |
451 | 486 | if ((compound.assetId != usdcUsdtLP)) | |
452 | 487 | then throw("attach USDCUSDTLP tokens only") | |
453 | 488 | else if (!(isOracle)) | |
454 | 489 | then throw("You are not authotized to call this function") | |
455 | 490 | else { | |
456 | 491 | let fromCompound = valueOrElse(getInteger(this, keyUsdcUsdtCompound), 0) | |
457 | 492 | let totalStaked = valueOrElse(getInteger(this, keyUSDCUSDT), 0) | |
458 | 493 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
459 | 494 | if ((stakeC == stakeC)) | |
460 | 495 | then { | |
461 | 496 | let updateState = IntegerEntry(keyUSDCUSDT, (totalStaked + ca)) | |
462 | 497 | let tc = IntegerEntry(keyUsdcUsdtCompound, (fromCompound + ca)) | |
463 | 498 | [updateState, tc] | |
464 | 499 | } | |
465 | 500 | else throw("Strict value is not equal to itself.") | |
466 | 501 | } | |
467 | 502 | } | |
468 | 503 | ||
469 | 504 | ||
470 | 505 | ||
471 | 506 | @Callable(i) | |
472 | 507 | func compoundPuzzleUsdnLP () = { | |
473 | 508 | let compound = value(i.payments[0]) | |
474 | 509 | let ca = compound.amount | |
475 | 510 | let isOracle = checkAddress(i.caller.bytes) | |
476 | 511 | if ((compound.assetId != puzzleUsdnLP)) | |
477 | 512 | then throw("attach PUZZLEUSDNLP tokens only") | |
478 | 513 | else if (!(isOracle)) | |
479 | 514 | then throw("You are not authotized to call this function") | |
480 | 515 | else { | |
481 | 516 | let fromCompound = valueOrElse(getInteger(this, keyPuzzleUsdnCompound), 0) | |
482 | 517 | let totalStaked = valueOrElse(getInteger(this, keyPUZZLEUSDN), 0) | |
483 | 518 | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
484 | 519 | if ((stakeC == stakeC)) | |
485 | 520 | then { | |
486 | 521 | let updateState = IntegerEntry(keyPUZZLEUSDN, (totalStaked + ca)) | |
487 | 522 | let tc = IntegerEntry(keyPuzzleUsdnCompound, (fromCompound + ca)) | |
488 | 523 | [updateState, tc] | |
489 | 524 | } | |
490 | 525 | else throw("Strict value is not equal to itself.") | |
491 | 526 | } | |
492 | 527 | } | |
493 | 528 | ||
494 | 529 | ||
495 | 530 | ||
496 | 531 | @Callable(i) | |
497 | 532 | func sponsorBoost () = { | |
498 | 533 | let pm = value(i.payments[0]) | |
499 | 534 | let lockPeriod = 100 | |
500 | 535 | if ((pm.assetId != wxId)) | |
501 | 536 | then throw("Error") | |
502 | 537 | else { | |
503 | 538 | let sponsored = valueOrElse(getInteger(this, keySponsorship), 0) | |
504 | 539 | let lock = invoke(Address(base58'3PJL8Hn8LACaSBWLQ3UVhctA5cTQLBFwBAP'), "increaseLock", [lockPeriod], [pm]) | |
505 | 540 | if ((lock == lock)) | |
506 | 541 | then { | |
507 | 542 | let s = IntegerEntry(keySponsorship, (pm.amount + sponsored)) | |
508 | 543 | [s] | |
509 | 544 | } | |
510 | 545 | else throw("Strict value is not equal to itself.") | |
511 | 546 | } | |
512 | 547 | } | |
513 | 548 | ||
514 | 549 | ||
515 | 550 | ||
516 | 551 | @Callable(i) | |
517 | 552 | func initWX () = { | |
518 | 553 | let pm = value(i.payments[0]) | |
519 | 554 | let am = pm.amount | |
520 | 555 | if ((pm.assetId != wxUsdnLP)) | |
521 | 556 | then throw("Unexpected token") | |
522 | 557 | else { | |
523 | 558 | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
524 | 559 | if ((s == s)) | |
525 | 560 | then { | |
526 | 561 | let upd = IntegerEntry(keyWXUSDN, am) | |
527 | 562 | let updK = IntegerEntry(keywxUsdnCompound, 0) | |
528 | 563 | [upd, updK] | |
529 | 564 | } | |
530 | 565 | else throw("Strict value is not equal to itself.") | |
531 | 566 | } | |
532 | 567 | } | |
533 | 568 | ||
534 | 569 | ||
535 | 570 | @Verifier(tx) | |
536 | 571 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
537 | 572 |
github/deemru/w8io/026f985 51.03 ms ◑