summaryrefslogtreecommitdiff
path: root/src/transaction.rs
blob: dcaff498c43f82a2d9e683d24a266f5dc90da0cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use serde::{Deserialize, Serialize};

use crate::client::Client;

#[derive(Hash, Deserialize, Serialize, Clone, Copy, PartialEq)]
pub struct Transaction {
    from: Client,
    to: Client,
    amount: u32,
}

impl Transaction {
    pub fn new(from: Client, to: Client, amount: u32) -> Self {
        Self {
            from,
            to,
            amount,
        }
    }
}