zksync_web3_rs/zks_wallet/requests/
withdraw_request.rs1use std::fmt::Debug;
2
3use ethers::types::{Address, U256};
4
5#[derive(Clone, Debug)]
6pub struct WithdrawRequest {
7 pub amount: U256,
8 pub to: Address,
9 pub from: Address,
10}
11
12impl WithdrawRequest {
13 pub fn new(amount: U256) -> Self {
14 Self {
15 amount,
16 to: Default::default(),
17 from: Default::default(),
18 }
19 }
20
21 pub fn to(mut self, to: Address) -> Self {
22 self.to = to;
23 self
24 }
25
26 pub fn from(mut self, from: Address) -> Self {
27 self.from = from;
28 self
29 }
30}