1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use std::fmt::Debug;

use ethers::types::{Address, U256};

#[derive(Clone, Debug)]
pub struct WithdrawRequest {
    pub amount: U256,
    pub to: Address,
    pub from: Address,
}

impl WithdrawRequest {
    pub fn new(amount: U256) -> Self {
        Self {
            amount,
            to: Default::default(),
            from: Default::default(),
        }
    }

    pub fn to(mut self, to: Address) -> Self {
        self.to = to;
        self
    }

    pub fn from(mut self, from: Address) -> Self {
        self.from = from;
        self
    }
}