1pub use erc4626::*;
2#[allow(
5 clippy::enum_variant_names,
6 clippy::too_many_arguments,
7 clippy::upper_case_acronyms,
8 clippy::type_complexity,
9 dead_code,
10 non_camel_case_types,
11)]
12pub mod erc4626 {
13 #[rustfmt::skip]
14 const __ABI: &str = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Approval\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Deposit\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Transfer\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[],\"indexed\":true},{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\",\"components\":[],\"indexed\":false},{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\",\"components\":[],\"indexed\":false}],\"type\":\"event\",\"name\":\"Withdraw\",\"outputs\":[],\"anonymous\":false},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"asset\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[],\"stateMutability\":\"view\",\"type\":\"function\",\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\",\"components\":[]}]},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\",\"components\":[]},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\",\"components\":[]}],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\",\"components\":[]}]}]";
15 pub static ERC4626_ABI: ::ethers_contract::Lazy<::ethers_core::abi::Abi> = ::ethers_contract::Lazy::new(||
17 ::ethers_core::utils::__serde_json::from_str(__ABI).expect("ABI is always valid"));
18 pub struct ERC4626<M>(::ethers_contract::Contract<M>);
19 impl<M> ::core::clone::Clone for ERC4626<M> {
20 fn clone(&self) -> Self {
21 Self(::core::clone::Clone::clone(&self.0))
22 }
23 }
24 impl<M> ::core::ops::Deref for ERC4626<M> {
25 type Target = ::ethers_contract::Contract<M>;
26 fn deref(&self) -> &Self::Target {
27 &self.0
28 }
29 }
30 impl<M> ::core::ops::DerefMut for ERC4626<M> {
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34 }
35 impl<M> ::core::fmt::Debug for ERC4626<M> {
36 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
37 f.debug_tuple(stringify!(ERC4626)).field(&self.address()).finish()
38 }
39 }
40 impl<M: ::ethers_providers::Middleware> ERC4626<M> {
41 pub fn new<T: Into<::ethers_core::types::Address>>(
44 address: T,
45 client: ::std::sync::Arc<M>,
46 ) -> Self {
47 Self(
48 ::ethers_contract::Contract::new(
49 address.into(),
50 ERC4626_ABI.clone(),
51 client,
52 ),
53 )
54 }
55 pub fn allowance(
57 &self,
58 owner: ::ethers_core::types::Address,
59 spender: ::ethers_core::types::Address,
60 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
61 self.0
62 .method_hash([221, 98, 237, 62], (owner, spender))
63 .expect("method not found (this should never happen)")
64 }
65 pub fn approve(
67 &self,
68 spender: ::ethers_core::types::Address,
69 amount: ::ethers_core::types::U256,
70 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
71 self.0
72 .method_hash([9, 94, 167, 179], (spender, amount))
73 .expect("method not found (this should never happen)")
74 }
75 pub fn asset(
77 &self,
78 ) -> ::ethers_contract::builders::ContractCall<
79 M,
80 ::ethers_core::types::Address,
81 > {
82 self.0
83 .method_hash([56, 213, 46, 15], ())
84 .expect("method not found (this should never happen)")
85 }
86 pub fn balance_of(
88 &self,
89 account: ::ethers_core::types::Address,
90 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
91 self.0
92 .method_hash([112, 160, 130, 49], account)
93 .expect("method not found (this should never happen)")
94 }
95 pub fn convert_to_assets(
97 &self,
98 shares: ::ethers_core::types::U256,
99 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
100 self.0
101 .method_hash([7, 162, 209, 58], shares)
102 .expect("method not found (this should never happen)")
103 }
104 pub fn convert_to_shares(
106 &self,
107 assets: ::ethers_core::types::U256,
108 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
109 self.0
110 .method_hash([198, 230, 245, 146], assets)
111 .expect("method not found (this should never happen)")
112 }
113 pub fn decimals(&self) -> ::ethers_contract::builders::ContractCall<M, u8> {
115 self.0
116 .method_hash([49, 60, 229, 103], ())
117 .expect("method not found (this should never happen)")
118 }
119 pub fn decrease_allowance(
121 &self,
122 spender: ::ethers_core::types::Address,
123 subtracted_value: ::ethers_core::types::U256,
124 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
125 self.0
126 .method_hash([164, 87, 194, 215], (spender, subtracted_value))
127 .expect("method not found (this should never happen)")
128 }
129 pub fn deposit(
131 &self,
132 assets: ::ethers_core::types::U256,
133 receiver: ::ethers_core::types::Address,
134 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
135 self.0
136 .method_hash([110, 85, 63, 101], (assets, receiver))
137 .expect("method not found (this should never happen)")
138 }
139 pub fn increase_allowance(
141 &self,
142 spender: ::ethers_core::types::Address,
143 added_value: ::ethers_core::types::U256,
144 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
145 self.0
146 .method_hash([57, 80, 147, 81], (spender, added_value))
147 .expect("method not found (this should never happen)")
148 }
149 pub fn max_deposit(
151 &self,
152 p0: ::ethers_core::types::Address,
153 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
154 self.0
155 .method_hash([64, 45, 38, 125], p0)
156 .expect("method not found (this should never happen)")
157 }
158 pub fn max_mint(
160 &self,
161 p0: ::ethers_core::types::Address,
162 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
163 self.0
164 .method_hash([198, 61, 117, 182], p0)
165 .expect("method not found (this should never happen)")
166 }
167 pub fn max_redeem(
169 &self,
170 owner: ::ethers_core::types::Address,
171 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
172 self.0
173 .method_hash([217, 5, 119, 126], owner)
174 .expect("method not found (this should never happen)")
175 }
176 pub fn max_withdraw(
178 &self,
179 owner: ::ethers_core::types::Address,
180 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
181 self.0
182 .method_hash([206, 150, 203, 119], owner)
183 .expect("method not found (this should never happen)")
184 }
185 pub fn mint(
187 &self,
188 shares: ::ethers_core::types::U256,
189 receiver: ::ethers_core::types::Address,
190 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
191 self.0
192 .method_hash([148, 191, 128, 77], (shares, receiver))
193 .expect("method not found (this should never happen)")
194 }
195 pub fn name(
197 &self,
198 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
199 self.0
200 .method_hash([6, 253, 222, 3], ())
201 .expect("method not found (this should never happen)")
202 }
203 pub fn preview_deposit(
205 &self,
206 assets: ::ethers_core::types::U256,
207 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
208 self.0
209 .method_hash([239, 139, 48, 247], assets)
210 .expect("method not found (this should never happen)")
211 }
212 pub fn preview_mint(
214 &self,
215 shares: ::ethers_core::types::U256,
216 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
217 self.0
218 .method_hash([179, 215, 246, 185], shares)
219 .expect("method not found (this should never happen)")
220 }
221 pub fn preview_redeem(
223 &self,
224 shares: ::ethers_core::types::U256,
225 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
226 self.0
227 .method_hash([76, 218, 213, 6], shares)
228 .expect("method not found (this should never happen)")
229 }
230 pub fn preview_withdraw(
232 &self,
233 assets: ::ethers_core::types::U256,
234 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
235 self.0
236 .method_hash([10, 40, 164, 119], assets)
237 .expect("method not found (this should never happen)")
238 }
239 pub fn redeem(
241 &self,
242 shares: ::ethers_core::types::U256,
243 receiver: ::ethers_core::types::Address,
244 owner: ::ethers_core::types::Address,
245 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
246 self.0
247 .method_hash([186, 8, 118, 82], (shares, receiver, owner))
248 .expect("method not found (this should never happen)")
249 }
250 pub fn symbol(
252 &self,
253 ) -> ::ethers_contract::builders::ContractCall<M, ::std::string::String> {
254 self.0
255 .method_hash([149, 216, 155, 65], ())
256 .expect("method not found (this should never happen)")
257 }
258 pub fn total_assets(
260 &self,
261 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
262 self.0
263 .method_hash([1, 225, 209, 20], ())
264 .expect("method not found (this should never happen)")
265 }
266 pub fn total_supply(
268 &self,
269 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
270 self.0
271 .method_hash([24, 22, 13, 221], ())
272 .expect("method not found (this should never happen)")
273 }
274 pub fn transfer(
276 &self,
277 to: ::ethers_core::types::Address,
278 amount: ::ethers_core::types::U256,
279 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
280 self.0
281 .method_hash([169, 5, 156, 187], (to, amount))
282 .expect("method not found (this should never happen)")
283 }
284 pub fn transfer_from(
286 &self,
287 from: ::ethers_core::types::Address,
288 to: ::ethers_core::types::Address,
289 amount: ::ethers_core::types::U256,
290 ) -> ::ethers_contract::builders::ContractCall<M, bool> {
291 self.0
292 .method_hash([35, 184, 114, 221], (from, to, amount))
293 .expect("method not found (this should never happen)")
294 }
295 pub fn withdraw(
297 &self,
298 assets: ::ethers_core::types::U256,
299 receiver: ::ethers_core::types::Address,
300 owner: ::ethers_core::types::Address,
301 ) -> ::ethers_contract::builders::ContractCall<M, ::ethers_core::types::U256> {
302 self.0
303 .method_hash([180, 96, 175, 148], (assets, receiver, owner))
304 .expect("method not found (this should never happen)")
305 }
306 pub fn approval_filter(
308 &self,
309 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, ApprovalFilter> {
310 self.0.event()
311 }
312 pub fn deposit_filter(
314 &self,
315 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, DepositFilter> {
316 self.0.event()
317 }
318 pub fn transfer_filter(
320 &self,
321 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, TransferFilter> {
322 self.0.event()
323 }
324 pub fn withdraw_filter(
326 &self,
327 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, WithdrawFilter> {
328 self.0.event()
329 }
330 pub fn events(
332 &self,
333 ) -> ::ethers_contract::builders::Event<::std::sync::Arc<M>, M, ERC4626Events> {
334 self.0.event_with_filter(::core::default::Default::default())
335 }
336 }
337 impl<M: ::ethers_providers::Middleware> From<::ethers_contract::Contract<M>>
338 for ERC4626<M> {
339 fn from(contract: ::ethers_contract::Contract<M>) -> Self {
340 Self::new(contract.address(), contract.client())
341 }
342 }
343 #[derive(
344 Clone,
345 ::ethers_contract::EthEvent,
346 ::ethers_contract::EthDisplay,
347 Default,
348 Debug,
349 PartialEq,
350 Eq,
351 Hash
352 )]
353 #[ethevent(name = "Approval", abi = "Approval(address,address,uint256)")]
354 pub struct ApprovalFilter {
355 #[ethevent(indexed)]
356 pub owner: ::ethers_core::types::Address,
357 #[ethevent(indexed)]
358 pub spender: ::ethers_core::types::Address,
359 pub value: ::ethers_core::types::U256,
360 }
361 #[derive(
362 Clone,
363 ::ethers_contract::EthEvent,
364 ::ethers_contract::EthDisplay,
365 Default,
366 Debug,
367 PartialEq,
368 Eq,
369 Hash
370 )]
371 #[ethevent(name = "Deposit", abi = "Deposit(address,address,uint256,uint256)")]
372 pub struct DepositFilter {
373 #[ethevent(indexed)]
374 pub sender: ::ethers_core::types::Address,
375 #[ethevent(indexed)]
376 pub owner: ::ethers_core::types::Address,
377 pub assets: ::ethers_core::types::U256,
378 pub shares: ::ethers_core::types::U256,
379 }
380 #[derive(
381 Clone,
382 ::ethers_contract::EthEvent,
383 ::ethers_contract::EthDisplay,
384 Default,
385 Debug,
386 PartialEq,
387 Eq,
388 Hash
389 )]
390 #[ethevent(name = "Transfer", abi = "Transfer(address,address,uint256)")]
391 pub struct TransferFilter {
392 #[ethevent(indexed)]
393 pub from: ::ethers_core::types::Address,
394 #[ethevent(indexed)]
395 pub to: ::ethers_core::types::Address,
396 pub value: ::ethers_core::types::U256,
397 }
398 #[derive(
399 Clone,
400 ::ethers_contract::EthEvent,
401 ::ethers_contract::EthDisplay,
402 Default,
403 Debug,
404 PartialEq,
405 Eq,
406 Hash
407 )]
408 #[ethevent(
409 name = "Withdraw",
410 abi = "Withdraw(address,address,address,uint256,uint256)"
411 )]
412 pub struct WithdrawFilter {
413 #[ethevent(indexed)]
414 pub sender: ::ethers_core::types::Address,
415 #[ethevent(indexed)]
416 pub receiver: ::ethers_core::types::Address,
417 #[ethevent(indexed)]
418 pub owner: ::ethers_core::types::Address,
419 pub assets: ::ethers_core::types::U256,
420 pub shares: ::ethers_core::types::U256,
421 }
422 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
424 pub enum ERC4626Events {
425 ApprovalFilter(ApprovalFilter),
426 DepositFilter(DepositFilter),
427 TransferFilter(TransferFilter),
428 WithdrawFilter(WithdrawFilter),
429 }
430 impl ::ethers_contract::EthLogDecode for ERC4626Events {
431 fn decode_log(
432 log: &::ethers_core::abi::RawLog,
433 ) -> ::core::result::Result<Self, ::ethers_core::abi::Error> {
434 if let Ok(decoded) = ApprovalFilter::decode_log(log) {
435 return Ok(ERC4626Events::ApprovalFilter(decoded));
436 }
437 if let Ok(decoded) = DepositFilter::decode_log(log) {
438 return Ok(ERC4626Events::DepositFilter(decoded));
439 }
440 if let Ok(decoded) = TransferFilter::decode_log(log) {
441 return Ok(ERC4626Events::TransferFilter(decoded));
442 }
443 if let Ok(decoded) = WithdrawFilter::decode_log(log) {
444 return Ok(ERC4626Events::WithdrawFilter(decoded));
445 }
446 Err(::ethers_core::abi::Error::InvalidData)
447 }
448 }
449 impl ::core::fmt::Display for ERC4626Events {
450 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
451 match self {
452 Self::ApprovalFilter(element) => ::core::fmt::Display::fmt(element, f),
453 Self::DepositFilter(element) => ::core::fmt::Display::fmt(element, f),
454 Self::TransferFilter(element) => ::core::fmt::Display::fmt(element, f),
455 Self::WithdrawFilter(element) => ::core::fmt::Display::fmt(element, f),
456 }
457 }
458 }
459 impl ::core::convert::From<ApprovalFilter> for ERC4626Events {
460 fn from(value: ApprovalFilter) -> Self {
461 Self::ApprovalFilter(value)
462 }
463 }
464 impl ::core::convert::From<DepositFilter> for ERC4626Events {
465 fn from(value: DepositFilter) -> Self {
466 Self::DepositFilter(value)
467 }
468 }
469 impl ::core::convert::From<TransferFilter> for ERC4626Events {
470 fn from(value: TransferFilter) -> Self {
471 Self::TransferFilter(value)
472 }
473 }
474 impl ::core::convert::From<WithdrawFilter> for ERC4626Events {
475 fn from(value: WithdrawFilter) -> Self {
476 Self::WithdrawFilter(value)
477 }
478 }
479 #[derive(
481 Clone,
482 ::ethers_contract::EthCall,
483 ::ethers_contract::EthDisplay,
484 Default,
485 Debug,
486 PartialEq,
487 Eq,
488 Hash
489 )]
490 #[ethcall(name = "allowance", abi = "allowance(address,address)")]
491 pub struct AllowanceCall {
492 pub owner: ::ethers_core::types::Address,
493 pub spender: ::ethers_core::types::Address,
494 }
495 #[derive(
497 Clone,
498 ::ethers_contract::EthCall,
499 ::ethers_contract::EthDisplay,
500 Default,
501 Debug,
502 PartialEq,
503 Eq,
504 Hash
505 )]
506 #[ethcall(name = "approve", abi = "approve(address,uint256)")]
507 pub struct ApproveCall {
508 pub spender: ::ethers_core::types::Address,
509 pub amount: ::ethers_core::types::U256,
510 }
511 #[derive(
513 Clone,
514 ::ethers_contract::EthCall,
515 ::ethers_contract::EthDisplay,
516 Default,
517 Debug,
518 PartialEq,
519 Eq,
520 Hash
521 )]
522 #[ethcall(name = "asset", abi = "asset()")]
523 pub struct AssetCall;
524 #[derive(
526 Clone,
527 ::ethers_contract::EthCall,
528 ::ethers_contract::EthDisplay,
529 Default,
530 Debug,
531 PartialEq,
532 Eq,
533 Hash
534 )]
535 #[ethcall(name = "balanceOf", abi = "balanceOf(address)")]
536 pub struct BalanceOfCall {
537 pub account: ::ethers_core::types::Address,
538 }
539 #[derive(
541 Clone,
542 ::ethers_contract::EthCall,
543 ::ethers_contract::EthDisplay,
544 Default,
545 Debug,
546 PartialEq,
547 Eq,
548 Hash
549 )]
550 #[ethcall(name = "convertToAssets", abi = "convertToAssets(uint256)")]
551 pub struct ConvertToAssetsCall {
552 pub shares: ::ethers_core::types::U256,
553 }
554 #[derive(
556 Clone,
557 ::ethers_contract::EthCall,
558 ::ethers_contract::EthDisplay,
559 Default,
560 Debug,
561 PartialEq,
562 Eq,
563 Hash
564 )]
565 #[ethcall(name = "convertToShares", abi = "convertToShares(uint256)")]
566 pub struct ConvertToSharesCall {
567 pub assets: ::ethers_core::types::U256,
568 }
569 #[derive(
571 Clone,
572 ::ethers_contract::EthCall,
573 ::ethers_contract::EthDisplay,
574 Default,
575 Debug,
576 PartialEq,
577 Eq,
578 Hash
579 )]
580 #[ethcall(name = "decimals", abi = "decimals()")]
581 pub struct DecimalsCall;
582 #[derive(
584 Clone,
585 ::ethers_contract::EthCall,
586 ::ethers_contract::EthDisplay,
587 Default,
588 Debug,
589 PartialEq,
590 Eq,
591 Hash
592 )]
593 #[ethcall(name = "decreaseAllowance", abi = "decreaseAllowance(address,uint256)")]
594 pub struct DecreaseAllowanceCall {
595 pub spender: ::ethers_core::types::Address,
596 pub subtracted_value: ::ethers_core::types::U256,
597 }
598 #[derive(
600 Clone,
601 ::ethers_contract::EthCall,
602 ::ethers_contract::EthDisplay,
603 Default,
604 Debug,
605 PartialEq,
606 Eq,
607 Hash
608 )]
609 #[ethcall(name = "deposit", abi = "deposit(uint256,address)")]
610 pub struct DepositCall {
611 pub assets: ::ethers_core::types::U256,
612 pub receiver: ::ethers_core::types::Address,
613 }
614 #[derive(
616 Clone,
617 ::ethers_contract::EthCall,
618 ::ethers_contract::EthDisplay,
619 Default,
620 Debug,
621 PartialEq,
622 Eq,
623 Hash
624 )]
625 #[ethcall(name = "increaseAllowance", abi = "increaseAllowance(address,uint256)")]
626 pub struct IncreaseAllowanceCall {
627 pub spender: ::ethers_core::types::Address,
628 pub added_value: ::ethers_core::types::U256,
629 }
630 #[derive(
632 Clone,
633 ::ethers_contract::EthCall,
634 ::ethers_contract::EthDisplay,
635 Default,
636 Debug,
637 PartialEq,
638 Eq,
639 Hash
640 )]
641 #[ethcall(name = "maxDeposit", abi = "maxDeposit(address)")]
642 pub struct MaxDepositCall(pub ::ethers_core::types::Address);
643 #[derive(
645 Clone,
646 ::ethers_contract::EthCall,
647 ::ethers_contract::EthDisplay,
648 Default,
649 Debug,
650 PartialEq,
651 Eq,
652 Hash
653 )]
654 #[ethcall(name = "maxMint", abi = "maxMint(address)")]
655 pub struct MaxMintCall(pub ::ethers_core::types::Address);
656 #[derive(
658 Clone,
659 ::ethers_contract::EthCall,
660 ::ethers_contract::EthDisplay,
661 Default,
662 Debug,
663 PartialEq,
664 Eq,
665 Hash
666 )]
667 #[ethcall(name = "maxRedeem", abi = "maxRedeem(address)")]
668 pub struct MaxRedeemCall {
669 pub owner: ::ethers_core::types::Address,
670 }
671 #[derive(
673 Clone,
674 ::ethers_contract::EthCall,
675 ::ethers_contract::EthDisplay,
676 Default,
677 Debug,
678 PartialEq,
679 Eq,
680 Hash
681 )]
682 #[ethcall(name = "maxWithdraw", abi = "maxWithdraw(address)")]
683 pub struct MaxWithdrawCall {
684 pub owner: ::ethers_core::types::Address,
685 }
686 #[derive(
688 Clone,
689 ::ethers_contract::EthCall,
690 ::ethers_contract::EthDisplay,
691 Default,
692 Debug,
693 PartialEq,
694 Eq,
695 Hash
696 )]
697 #[ethcall(name = "mint", abi = "mint(uint256,address)")]
698 pub struct MintCall {
699 pub shares: ::ethers_core::types::U256,
700 pub receiver: ::ethers_core::types::Address,
701 }
702 #[derive(
704 Clone,
705 ::ethers_contract::EthCall,
706 ::ethers_contract::EthDisplay,
707 Default,
708 Debug,
709 PartialEq,
710 Eq,
711 Hash
712 )]
713 #[ethcall(name = "name", abi = "name()")]
714 pub struct NameCall;
715 #[derive(
717 Clone,
718 ::ethers_contract::EthCall,
719 ::ethers_contract::EthDisplay,
720 Default,
721 Debug,
722 PartialEq,
723 Eq,
724 Hash
725 )]
726 #[ethcall(name = "previewDeposit", abi = "previewDeposit(uint256)")]
727 pub struct PreviewDepositCall {
728 pub assets: ::ethers_core::types::U256,
729 }
730 #[derive(
732 Clone,
733 ::ethers_contract::EthCall,
734 ::ethers_contract::EthDisplay,
735 Default,
736 Debug,
737 PartialEq,
738 Eq,
739 Hash
740 )]
741 #[ethcall(name = "previewMint", abi = "previewMint(uint256)")]
742 pub struct PreviewMintCall {
743 pub shares: ::ethers_core::types::U256,
744 }
745 #[derive(
747 Clone,
748 ::ethers_contract::EthCall,
749 ::ethers_contract::EthDisplay,
750 Default,
751 Debug,
752 PartialEq,
753 Eq,
754 Hash
755 )]
756 #[ethcall(name = "previewRedeem", abi = "previewRedeem(uint256)")]
757 pub struct PreviewRedeemCall {
758 pub shares: ::ethers_core::types::U256,
759 }
760 #[derive(
762 Clone,
763 ::ethers_contract::EthCall,
764 ::ethers_contract::EthDisplay,
765 Default,
766 Debug,
767 PartialEq,
768 Eq,
769 Hash
770 )]
771 #[ethcall(name = "previewWithdraw", abi = "previewWithdraw(uint256)")]
772 pub struct PreviewWithdrawCall {
773 pub assets: ::ethers_core::types::U256,
774 }
775 #[derive(
777 Clone,
778 ::ethers_contract::EthCall,
779 ::ethers_contract::EthDisplay,
780 Default,
781 Debug,
782 PartialEq,
783 Eq,
784 Hash
785 )]
786 #[ethcall(name = "redeem", abi = "redeem(uint256,address,address)")]
787 pub struct RedeemCall {
788 pub shares: ::ethers_core::types::U256,
789 pub receiver: ::ethers_core::types::Address,
790 pub owner: ::ethers_core::types::Address,
791 }
792 #[derive(
794 Clone,
795 ::ethers_contract::EthCall,
796 ::ethers_contract::EthDisplay,
797 Default,
798 Debug,
799 PartialEq,
800 Eq,
801 Hash
802 )]
803 #[ethcall(name = "symbol", abi = "symbol()")]
804 pub struct SymbolCall;
805 #[derive(
807 Clone,
808 ::ethers_contract::EthCall,
809 ::ethers_contract::EthDisplay,
810 Default,
811 Debug,
812 PartialEq,
813 Eq,
814 Hash
815 )]
816 #[ethcall(name = "totalAssets", abi = "totalAssets()")]
817 pub struct TotalAssetsCall;
818 #[derive(
820 Clone,
821 ::ethers_contract::EthCall,
822 ::ethers_contract::EthDisplay,
823 Default,
824 Debug,
825 PartialEq,
826 Eq,
827 Hash
828 )]
829 #[ethcall(name = "totalSupply", abi = "totalSupply()")]
830 pub struct TotalSupplyCall;
831 #[derive(
833 Clone,
834 ::ethers_contract::EthCall,
835 ::ethers_contract::EthDisplay,
836 Default,
837 Debug,
838 PartialEq,
839 Eq,
840 Hash
841 )]
842 #[ethcall(name = "transfer", abi = "transfer(address,uint256)")]
843 pub struct TransferCall {
844 pub to: ::ethers_core::types::Address,
845 pub amount: ::ethers_core::types::U256,
846 }
847 #[derive(
849 Clone,
850 ::ethers_contract::EthCall,
851 ::ethers_contract::EthDisplay,
852 Default,
853 Debug,
854 PartialEq,
855 Eq,
856 Hash
857 )]
858 #[ethcall(name = "transferFrom", abi = "transferFrom(address,address,uint256)")]
859 pub struct TransferFromCall {
860 pub from: ::ethers_core::types::Address,
861 pub to: ::ethers_core::types::Address,
862 pub amount: ::ethers_core::types::U256,
863 }
864 #[derive(
866 Clone,
867 ::ethers_contract::EthCall,
868 ::ethers_contract::EthDisplay,
869 Default,
870 Debug,
871 PartialEq,
872 Eq,
873 Hash
874 )]
875 #[ethcall(name = "withdraw", abi = "withdraw(uint256,address,address)")]
876 pub struct WithdrawCall {
877 pub assets: ::ethers_core::types::U256,
878 pub receiver: ::ethers_core::types::Address,
879 pub owner: ::ethers_core::types::Address,
880 }
881 #[derive(Clone, ::ethers_contract::EthAbiType, Debug, PartialEq, Eq, Hash)]
883 pub enum ERC4626Calls {
884 Allowance(AllowanceCall),
885 Approve(ApproveCall),
886 Asset(AssetCall),
887 BalanceOf(BalanceOfCall),
888 ConvertToAssets(ConvertToAssetsCall),
889 ConvertToShares(ConvertToSharesCall),
890 Decimals(DecimalsCall),
891 DecreaseAllowance(DecreaseAllowanceCall),
892 Deposit(DepositCall),
893 IncreaseAllowance(IncreaseAllowanceCall),
894 MaxDeposit(MaxDepositCall),
895 MaxMint(MaxMintCall),
896 MaxRedeem(MaxRedeemCall),
897 MaxWithdraw(MaxWithdrawCall),
898 Mint(MintCall),
899 Name(NameCall),
900 PreviewDeposit(PreviewDepositCall),
901 PreviewMint(PreviewMintCall),
902 PreviewRedeem(PreviewRedeemCall),
903 PreviewWithdraw(PreviewWithdrawCall),
904 Redeem(RedeemCall),
905 Symbol(SymbolCall),
906 TotalAssets(TotalAssetsCall),
907 TotalSupply(TotalSupplyCall),
908 Transfer(TransferCall),
909 TransferFrom(TransferFromCall),
910 Withdraw(WithdrawCall),
911 }
912 impl ::ethers_core::abi::AbiDecode for ERC4626Calls {
913 fn decode(
914 data: impl AsRef<[u8]>,
915 ) -> ::core::result::Result<Self, ::ethers_core::abi::AbiError> {
916 let data = data.as_ref();
917 if let Ok(decoded)
918 = <AllowanceCall as ::ethers_core::abi::AbiDecode>::decode(data) {
919 return Ok(Self::Allowance(decoded));
920 }
921 if let Ok(decoded)
922 = <ApproveCall as ::ethers_core::abi::AbiDecode>::decode(data) {
923 return Ok(Self::Approve(decoded));
924 }
925 if let Ok(decoded)
926 = <AssetCall as ::ethers_core::abi::AbiDecode>::decode(data) {
927 return Ok(Self::Asset(decoded));
928 }
929 if let Ok(decoded)
930 = <BalanceOfCall as ::ethers_core::abi::AbiDecode>::decode(data) {
931 return Ok(Self::BalanceOf(decoded));
932 }
933 if let Ok(decoded)
934 = <ConvertToAssetsCall as ::ethers_core::abi::AbiDecode>::decode(data) {
935 return Ok(Self::ConvertToAssets(decoded));
936 }
937 if let Ok(decoded)
938 = <ConvertToSharesCall as ::ethers_core::abi::AbiDecode>::decode(data) {
939 return Ok(Self::ConvertToShares(decoded));
940 }
941 if let Ok(decoded)
942 = <DecimalsCall as ::ethers_core::abi::AbiDecode>::decode(data) {
943 return Ok(Self::Decimals(decoded));
944 }
945 if let Ok(decoded)
946 = <DecreaseAllowanceCall as ::ethers_core::abi::AbiDecode>::decode(
947 data,
948 ) {
949 return Ok(Self::DecreaseAllowance(decoded));
950 }
951 if let Ok(decoded)
952 = <DepositCall as ::ethers_core::abi::AbiDecode>::decode(data) {
953 return Ok(Self::Deposit(decoded));
954 }
955 if let Ok(decoded)
956 = <IncreaseAllowanceCall as ::ethers_core::abi::AbiDecode>::decode(
957 data,
958 ) {
959 return Ok(Self::IncreaseAllowance(decoded));
960 }
961 if let Ok(decoded)
962 = <MaxDepositCall as ::ethers_core::abi::AbiDecode>::decode(data) {
963 return Ok(Self::MaxDeposit(decoded));
964 }
965 if let Ok(decoded)
966 = <MaxMintCall as ::ethers_core::abi::AbiDecode>::decode(data) {
967 return Ok(Self::MaxMint(decoded));
968 }
969 if let Ok(decoded)
970 = <MaxRedeemCall as ::ethers_core::abi::AbiDecode>::decode(data) {
971 return Ok(Self::MaxRedeem(decoded));
972 }
973 if let Ok(decoded)
974 = <MaxWithdrawCall as ::ethers_core::abi::AbiDecode>::decode(data) {
975 return Ok(Self::MaxWithdraw(decoded));
976 }
977 if let Ok(decoded)
978 = <MintCall as ::ethers_core::abi::AbiDecode>::decode(data) {
979 return Ok(Self::Mint(decoded));
980 }
981 if let Ok(decoded)
982 = <NameCall as ::ethers_core::abi::AbiDecode>::decode(data) {
983 return Ok(Self::Name(decoded));
984 }
985 if let Ok(decoded)
986 = <PreviewDepositCall as ::ethers_core::abi::AbiDecode>::decode(data) {
987 return Ok(Self::PreviewDeposit(decoded));
988 }
989 if let Ok(decoded)
990 = <PreviewMintCall as ::ethers_core::abi::AbiDecode>::decode(data) {
991 return Ok(Self::PreviewMint(decoded));
992 }
993 if let Ok(decoded)
994 = <PreviewRedeemCall as ::ethers_core::abi::AbiDecode>::decode(data) {
995 return Ok(Self::PreviewRedeem(decoded));
996 }
997 if let Ok(decoded)
998 = <PreviewWithdrawCall as ::ethers_core::abi::AbiDecode>::decode(data) {
999 return Ok(Self::PreviewWithdraw(decoded));
1000 }
1001 if let Ok(decoded)
1002 = <RedeemCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1003 return Ok(Self::Redeem(decoded));
1004 }
1005 if let Ok(decoded)
1006 = <SymbolCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1007 return Ok(Self::Symbol(decoded));
1008 }
1009 if let Ok(decoded)
1010 = <TotalAssetsCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1011 return Ok(Self::TotalAssets(decoded));
1012 }
1013 if let Ok(decoded)
1014 = <TotalSupplyCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1015 return Ok(Self::TotalSupply(decoded));
1016 }
1017 if let Ok(decoded)
1018 = <TransferCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1019 return Ok(Self::Transfer(decoded));
1020 }
1021 if let Ok(decoded)
1022 = <TransferFromCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1023 return Ok(Self::TransferFrom(decoded));
1024 }
1025 if let Ok(decoded)
1026 = <WithdrawCall as ::ethers_core::abi::AbiDecode>::decode(data) {
1027 return Ok(Self::Withdraw(decoded));
1028 }
1029 Err(::ethers_core::abi::Error::InvalidData.into())
1030 }
1031 }
1032 impl ::ethers_core::abi::AbiEncode for ERC4626Calls {
1033 fn encode(self) -> Vec<u8> {
1034 match self {
1035 Self::Allowance(element) => {
1036 ::ethers_core::abi::AbiEncode::encode(element)
1037 }
1038 Self::Approve(element) => ::ethers_core::abi::AbiEncode::encode(element),
1039 Self::Asset(element) => ::ethers_core::abi::AbiEncode::encode(element),
1040 Self::BalanceOf(element) => {
1041 ::ethers_core::abi::AbiEncode::encode(element)
1042 }
1043 Self::ConvertToAssets(element) => {
1044 ::ethers_core::abi::AbiEncode::encode(element)
1045 }
1046 Self::ConvertToShares(element) => {
1047 ::ethers_core::abi::AbiEncode::encode(element)
1048 }
1049 Self::Decimals(element) => ::ethers_core::abi::AbiEncode::encode(element),
1050 Self::DecreaseAllowance(element) => {
1051 ::ethers_core::abi::AbiEncode::encode(element)
1052 }
1053 Self::Deposit(element) => ::ethers_core::abi::AbiEncode::encode(element),
1054 Self::IncreaseAllowance(element) => {
1055 ::ethers_core::abi::AbiEncode::encode(element)
1056 }
1057 Self::MaxDeposit(element) => {
1058 ::ethers_core::abi::AbiEncode::encode(element)
1059 }
1060 Self::MaxMint(element) => ::ethers_core::abi::AbiEncode::encode(element),
1061 Self::MaxRedeem(element) => {
1062 ::ethers_core::abi::AbiEncode::encode(element)
1063 }
1064 Self::MaxWithdraw(element) => {
1065 ::ethers_core::abi::AbiEncode::encode(element)
1066 }
1067 Self::Mint(element) => ::ethers_core::abi::AbiEncode::encode(element),
1068 Self::Name(element) => ::ethers_core::abi::AbiEncode::encode(element),
1069 Self::PreviewDeposit(element) => {
1070 ::ethers_core::abi::AbiEncode::encode(element)
1071 }
1072 Self::PreviewMint(element) => {
1073 ::ethers_core::abi::AbiEncode::encode(element)
1074 }
1075 Self::PreviewRedeem(element) => {
1076 ::ethers_core::abi::AbiEncode::encode(element)
1077 }
1078 Self::PreviewWithdraw(element) => {
1079 ::ethers_core::abi::AbiEncode::encode(element)
1080 }
1081 Self::Redeem(element) => ::ethers_core::abi::AbiEncode::encode(element),
1082 Self::Symbol(element) => ::ethers_core::abi::AbiEncode::encode(element),
1083 Self::TotalAssets(element) => {
1084 ::ethers_core::abi::AbiEncode::encode(element)
1085 }
1086 Self::TotalSupply(element) => {
1087 ::ethers_core::abi::AbiEncode::encode(element)
1088 }
1089 Self::Transfer(element) => ::ethers_core::abi::AbiEncode::encode(element),
1090 Self::TransferFrom(element) => {
1091 ::ethers_core::abi::AbiEncode::encode(element)
1092 }
1093 Self::Withdraw(element) => ::ethers_core::abi::AbiEncode::encode(element),
1094 }
1095 }
1096 }
1097 impl ::core::fmt::Display for ERC4626Calls {
1098 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1099 match self {
1100 Self::Allowance(element) => ::core::fmt::Display::fmt(element, f),
1101 Self::Approve(element) => ::core::fmt::Display::fmt(element, f),
1102 Self::Asset(element) => ::core::fmt::Display::fmt(element, f),
1103 Self::BalanceOf(element) => ::core::fmt::Display::fmt(element, f),
1104 Self::ConvertToAssets(element) => ::core::fmt::Display::fmt(element, f),
1105 Self::ConvertToShares(element) => ::core::fmt::Display::fmt(element, f),
1106 Self::Decimals(element) => ::core::fmt::Display::fmt(element, f),
1107 Self::DecreaseAllowance(element) => ::core::fmt::Display::fmt(element, f),
1108 Self::Deposit(element) => ::core::fmt::Display::fmt(element, f),
1109 Self::IncreaseAllowance(element) => ::core::fmt::Display::fmt(element, f),
1110 Self::MaxDeposit(element) => ::core::fmt::Display::fmt(element, f),
1111 Self::MaxMint(element) => ::core::fmt::Display::fmt(element, f),
1112 Self::MaxRedeem(element) => ::core::fmt::Display::fmt(element, f),
1113 Self::MaxWithdraw(element) => ::core::fmt::Display::fmt(element, f),
1114 Self::Mint(element) => ::core::fmt::Display::fmt(element, f),
1115 Self::Name(element) => ::core::fmt::Display::fmt(element, f),
1116 Self::PreviewDeposit(element) => ::core::fmt::Display::fmt(element, f),
1117 Self::PreviewMint(element) => ::core::fmt::Display::fmt(element, f),
1118 Self::PreviewRedeem(element) => ::core::fmt::Display::fmt(element, f),
1119 Self::PreviewWithdraw(element) => ::core::fmt::Display::fmt(element, f),
1120 Self::Redeem(element) => ::core::fmt::Display::fmt(element, f),
1121 Self::Symbol(element) => ::core::fmt::Display::fmt(element, f),
1122 Self::TotalAssets(element) => ::core::fmt::Display::fmt(element, f),
1123 Self::TotalSupply(element) => ::core::fmt::Display::fmt(element, f),
1124 Self::Transfer(element) => ::core::fmt::Display::fmt(element, f),
1125 Self::TransferFrom(element) => ::core::fmt::Display::fmt(element, f),
1126 Self::Withdraw(element) => ::core::fmt::Display::fmt(element, f),
1127 }
1128 }
1129 }
1130 impl ::core::convert::From<AllowanceCall> for ERC4626Calls {
1131 fn from(value: AllowanceCall) -> Self {
1132 Self::Allowance(value)
1133 }
1134 }
1135 impl ::core::convert::From<ApproveCall> for ERC4626Calls {
1136 fn from(value: ApproveCall) -> Self {
1137 Self::Approve(value)
1138 }
1139 }
1140 impl ::core::convert::From<AssetCall> for ERC4626Calls {
1141 fn from(value: AssetCall) -> Self {
1142 Self::Asset(value)
1143 }
1144 }
1145 impl ::core::convert::From<BalanceOfCall> for ERC4626Calls {
1146 fn from(value: BalanceOfCall) -> Self {
1147 Self::BalanceOf(value)
1148 }
1149 }
1150 impl ::core::convert::From<ConvertToAssetsCall> for ERC4626Calls {
1151 fn from(value: ConvertToAssetsCall) -> Self {
1152 Self::ConvertToAssets(value)
1153 }
1154 }
1155 impl ::core::convert::From<ConvertToSharesCall> for ERC4626Calls {
1156 fn from(value: ConvertToSharesCall) -> Self {
1157 Self::ConvertToShares(value)
1158 }
1159 }
1160 impl ::core::convert::From<DecimalsCall> for ERC4626Calls {
1161 fn from(value: DecimalsCall) -> Self {
1162 Self::Decimals(value)
1163 }
1164 }
1165 impl ::core::convert::From<DecreaseAllowanceCall> for ERC4626Calls {
1166 fn from(value: DecreaseAllowanceCall) -> Self {
1167 Self::DecreaseAllowance(value)
1168 }
1169 }
1170 impl ::core::convert::From<DepositCall> for ERC4626Calls {
1171 fn from(value: DepositCall) -> Self {
1172 Self::Deposit(value)
1173 }
1174 }
1175 impl ::core::convert::From<IncreaseAllowanceCall> for ERC4626Calls {
1176 fn from(value: IncreaseAllowanceCall) -> Self {
1177 Self::IncreaseAllowance(value)
1178 }
1179 }
1180 impl ::core::convert::From<MaxDepositCall> for ERC4626Calls {
1181 fn from(value: MaxDepositCall) -> Self {
1182 Self::MaxDeposit(value)
1183 }
1184 }
1185 impl ::core::convert::From<MaxMintCall> for ERC4626Calls {
1186 fn from(value: MaxMintCall) -> Self {
1187 Self::MaxMint(value)
1188 }
1189 }
1190 impl ::core::convert::From<MaxRedeemCall> for ERC4626Calls {
1191 fn from(value: MaxRedeemCall) -> Self {
1192 Self::MaxRedeem(value)
1193 }
1194 }
1195 impl ::core::convert::From<MaxWithdrawCall> for ERC4626Calls {
1196 fn from(value: MaxWithdrawCall) -> Self {
1197 Self::MaxWithdraw(value)
1198 }
1199 }
1200 impl ::core::convert::From<MintCall> for ERC4626Calls {
1201 fn from(value: MintCall) -> Self {
1202 Self::Mint(value)
1203 }
1204 }
1205 impl ::core::convert::From<NameCall> for ERC4626Calls {
1206 fn from(value: NameCall) -> Self {
1207 Self::Name(value)
1208 }
1209 }
1210 impl ::core::convert::From<PreviewDepositCall> for ERC4626Calls {
1211 fn from(value: PreviewDepositCall) -> Self {
1212 Self::PreviewDeposit(value)
1213 }
1214 }
1215 impl ::core::convert::From<PreviewMintCall> for ERC4626Calls {
1216 fn from(value: PreviewMintCall) -> Self {
1217 Self::PreviewMint(value)
1218 }
1219 }
1220 impl ::core::convert::From<PreviewRedeemCall> for ERC4626Calls {
1221 fn from(value: PreviewRedeemCall) -> Self {
1222 Self::PreviewRedeem(value)
1223 }
1224 }
1225 impl ::core::convert::From<PreviewWithdrawCall> for ERC4626Calls {
1226 fn from(value: PreviewWithdrawCall) -> Self {
1227 Self::PreviewWithdraw(value)
1228 }
1229 }
1230 impl ::core::convert::From<RedeemCall> for ERC4626Calls {
1231 fn from(value: RedeemCall) -> Self {
1232 Self::Redeem(value)
1233 }
1234 }
1235 impl ::core::convert::From<SymbolCall> for ERC4626Calls {
1236 fn from(value: SymbolCall) -> Self {
1237 Self::Symbol(value)
1238 }
1239 }
1240 impl ::core::convert::From<TotalAssetsCall> for ERC4626Calls {
1241 fn from(value: TotalAssetsCall) -> Self {
1242 Self::TotalAssets(value)
1243 }
1244 }
1245 impl ::core::convert::From<TotalSupplyCall> for ERC4626Calls {
1246 fn from(value: TotalSupplyCall) -> Self {
1247 Self::TotalSupply(value)
1248 }
1249 }
1250 impl ::core::convert::From<TransferCall> for ERC4626Calls {
1251 fn from(value: TransferCall) -> Self {
1252 Self::Transfer(value)
1253 }
1254 }
1255 impl ::core::convert::From<TransferFromCall> for ERC4626Calls {
1256 fn from(value: TransferFromCall) -> Self {
1257 Self::TransferFrom(value)
1258 }
1259 }
1260 impl ::core::convert::From<WithdrawCall> for ERC4626Calls {
1261 fn from(value: WithdrawCall) -> Self {
1262 Self::Withdraw(value)
1263 }
1264 }
1265 #[derive(
1267 Clone,
1268 ::ethers_contract::EthAbiType,
1269 ::ethers_contract::EthAbiCodec,
1270 Default,
1271 Debug,
1272 PartialEq,
1273 Eq,
1274 Hash
1275 )]
1276 pub struct AllowanceReturn(pub ::ethers_core::types::U256);
1277 #[derive(
1279 Clone,
1280 ::ethers_contract::EthAbiType,
1281 ::ethers_contract::EthAbiCodec,
1282 Default,
1283 Debug,
1284 PartialEq,
1285 Eq,
1286 Hash
1287 )]
1288 pub struct ApproveReturn(pub bool);
1289 #[derive(
1291 Clone,
1292 ::ethers_contract::EthAbiType,
1293 ::ethers_contract::EthAbiCodec,
1294 Default,
1295 Debug,
1296 PartialEq,
1297 Eq,
1298 Hash
1299 )]
1300 pub struct AssetReturn(pub ::ethers_core::types::Address);
1301 #[derive(
1303 Clone,
1304 ::ethers_contract::EthAbiType,
1305 ::ethers_contract::EthAbiCodec,
1306 Default,
1307 Debug,
1308 PartialEq,
1309 Eq,
1310 Hash
1311 )]
1312 pub struct BalanceOfReturn(pub ::ethers_core::types::U256);
1313 #[derive(
1315 Clone,
1316 ::ethers_contract::EthAbiType,
1317 ::ethers_contract::EthAbiCodec,
1318 Default,
1319 Debug,
1320 PartialEq,
1321 Eq,
1322 Hash
1323 )]
1324 pub struct ConvertToAssetsReturn(pub ::ethers_core::types::U256);
1325 #[derive(
1327 Clone,
1328 ::ethers_contract::EthAbiType,
1329 ::ethers_contract::EthAbiCodec,
1330 Default,
1331 Debug,
1332 PartialEq,
1333 Eq,
1334 Hash
1335 )]
1336 pub struct ConvertToSharesReturn(pub ::ethers_core::types::U256);
1337 #[derive(
1339 Clone,
1340 ::ethers_contract::EthAbiType,
1341 ::ethers_contract::EthAbiCodec,
1342 Default,
1343 Debug,
1344 PartialEq,
1345 Eq,
1346 Hash
1347 )]
1348 pub struct DecimalsReturn(pub u8);
1349 #[derive(
1351 Clone,
1352 ::ethers_contract::EthAbiType,
1353 ::ethers_contract::EthAbiCodec,
1354 Default,
1355 Debug,
1356 PartialEq,
1357 Eq,
1358 Hash
1359 )]
1360 pub struct DecreaseAllowanceReturn(pub bool);
1361 #[derive(
1363 Clone,
1364 ::ethers_contract::EthAbiType,
1365 ::ethers_contract::EthAbiCodec,
1366 Default,
1367 Debug,
1368 PartialEq,
1369 Eq,
1370 Hash
1371 )]
1372 pub struct DepositReturn(pub ::ethers_core::types::U256);
1373 #[derive(
1375 Clone,
1376 ::ethers_contract::EthAbiType,
1377 ::ethers_contract::EthAbiCodec,
1378 Default,
1379 Debug,
1380 PartialEq,
1381 Eq,
1382 Hash
1383 )]
1384 pub struct IncreaseAllowanceReturn(pub bool);
1385 #[derive(
1387 Clone,
1388 ::ethers_contract::EthAbiType,
1389 ::ethers_contract::EthAbiCodec,
1390 Default,
1391 Debug,
1392 PartialEq,
1393 Eq,
1394 Hash
1395 )]
1396 pub struct MaxDepositReturn(pub ::ethers_core::types::U256);
1397 #[derive(
1399 Clone,
1400 ::ethers_contract::EthAbiType,
1401 ::ethers_contract::EthAbiCodec,
1402 Default,
1403 Debug,
1404 PartialEq,
1405 Eq,
1406 Hash
1407 )]
1408 pub struct MaxMintReturn(pub ::ethers_core::types::U256);
1409 #[derive(
1411 Clone,
1412 ::ethers_contract::EthAbiType,
1413 ::ethers_contract::EthAbiCodec,
1414 Default,
1415 Debug,
1416 PartialEq,
1417 Eq,
1418 Hash
1419 )]
1420 pub struct MaxRedeemReturn(pub ::ethers_core::types::U256);
1421 #[derive(
1423 Clone,
1424 ::ethers_contract::EthAbiType,
1425 ::ethers_contract::EthAbiCodec,
1426 Default,
1427 Debug,
1428 PartialEq,
1429 Eq,
1430 Hash
1431 )]
1432 pub struct MaxWithdrawReturn(pub ::ethers_core::types::U256);
1433 #[derive(
1435 Clone,
1436 ::ethers_contract::EthAbiType,
1437 ::ethers_contract::EthAbiCodec,
1438 Default,
1439 Debug,
1440 PartialEq,
1441 Eq,
1442 Hash
1443 )]
1444 pub struct MintReturn(pub ::ethers_core::types::U256);
1445 #[derive(
1447 Clone,
1448 ::ethers_contract::EthAbiType,
1449 ::ethers_contract::EthAbiCodec,
1450 Default,
1451 Debug,
1452 PartialEq,
1453 Eq,
1454 Hash
1455 )]
1456 pub struct NameReturn(pub ::std::string::String);
1457 #[derive(
1459 Clone,
1460 ::ethers_contract::EthAbiType,
1461 ::ethers_contract::EthAbiCodec,
1462 Default,
1463 Debug,
1464 PartialEq,
1465 Eq,
1466 Hash
1467 )]
1468 pub struct PreviewDepositReturn(pub ::ethers_core::types::U256);
1469 #[derive(
1471 Clone,
1472 ::ethers_contract::EthAbiType,
1473 ::ethers_contract::EthAbiCodec,
1474 Default,
1475 Debug,
1476 PartialEq,
1477 Eq,
1478 Hash
1479 )]
1480 pub struct PreviewMintReturn(pub ::ethers_core::types::U256);
1481 #[derive(
1483 Clone,
1484 ::ethers_contract::EthAbiType,
1485 ::ethers_contract::EthAbiCodec,
1486 Default,
1487 Debug,
1488 PartialEq,
1489 Eq,
1490 Hash
1491 )]
1492 pub struct PreviewRedeemReturn(pub ::ethers_core::types::U256);
1493 #[derive(
1495 Clone,
1496 ::ethers_contract::EthAbiType,
1497 ::ethers_contract::EthAbiCodec,
1498 Default,
1499 Debug,
1500 PartialEq,
1501 Eq,
1502 Hash
1503 )]
1504 pub struct PreviewWithdrawReturn(pub ::ethers_core::types::U256);
1505 #[derive(
1507 Clone,
1508 ::ethers_contract::EthAbiType,
1509 ::ethers_contract::EthAbiCodec,
1510 Default,
1511 Debug,
1512 PartialEq,
1513 Eq,
1514 Hash
1515 )]
1516 pub struct RedeemReturn(pub ::ethers_core::types::U256);
1517 #[derive(
1519 Clone,
1520 ::ethers_contract::EthAbiType,
1521 ::ethers_contract::EthAbiCodec,
1522 Default,
1523 Debug,
1524 PartialEq,
1525 Eq,
1526 Hash
1527 )]
1528 pub struct SymbolReturn(pub ::std::string::String);
1529 #[derive(
1531 Clone,
1532 ::ethers_contract::EthAbiType,
1533 ::ethers_contract::EthAbiCodec,
1534 Default,
1535 Debug,
1536 PartialEq,
1537 Eq,
1538 Hash
1539 )]
1540 pub struct TotalAssetsReturn(pub ::ethers_core::types::U256);
1541 #[derive(
1543 Clone,
1544 ::ethers_contract::EthAbiType,
1545 ::ethers_contract::EthAbiCodec,
1546 Default,
1547 Debug,
1548 PartialEq,
1549 Eq,
1550 Hash
1551 )]
1552 pub struct TotalSupplyReturn(pub ::ethers_core::types::U256);
1553 #[derive(
1555 Clone,
1556 ::ethers_contract::EthAbiType,
1557 ::ethers_contract::EthAbiCodec,
1558 Default,
1559 Debug,
1560 PartialEq,
1561 Eq,
1562 Hash
1563 )]
1564 pub struct TransferReturn(pub bool);
1565 #[derive(
1567 Clone,
1568 ::ethers_contract::EthAbiType,
1569 ::ethers_contract::EthAbiCodec,
1570 Default,
1571 Debug,
1572 PartialEq,
1573 Eq,
1574 Hash
1575 )]
1576 pub struct TransferFromReturn(pub bool);
1577 #[derive(
1579 Clone,
1580 ::ethers_contract::EthAbiType,
1581 ::ethers_contract::EthAbiCodec,
1582 Default,
1583 Debug,
1584 PartialEq,
1585 Eq,
1586 Hash
1587 )]
1588 pub struct WithdrawReturn(pub ::ethers_core::types::U256);
1589}