mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add non-transaction-chaining scheduler
This commit is contained in:
@@ -3,12 +3,22 @@ use std::io;
|
||||
|
||||
use group::GroupEncoding;
|
||||
|
||||
use borsh::{BorshSerialize, BorshDeserialize};
|
||||
|
||||
use serai_primitives::{ExternalAddress, Balance};
|
||||
|
||||
use crate::Id;
|
||||
|
||||
/// An address on the external network.
|
||||
pub trait Address: Send + Sync + Clone + Into<ExternalAddress> + TryFrom<ExternalAddress> {
|
||||
pub trait Address:
|
||||
Send
|
||||
+ Sync
|
||||
+ Clone
|
||||
+ Into<ExternalAddress>
|
||||
+ TryFrom<ExternalAddress>
|
||||
+ BorshSerialize
|
||||
+ BorshDeserialize
|
||||
{
|
||||
/// Write this address.
|
||||
fn write(&self, writer: &mut impl io::Write) -> io::Result<()>;
|
||||
/// Read an address.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::io;
|
||||
|
||||
use scale::{Encode, Decode, IoReader};
|
||||
use borsh::{BorshSerialize, BorshDeserialize};
|
||||
|
||||
use serai_primitives::{Balance, Data};
|
||||
use serai_coins_primitives::OutInstructionWithBalance;
|
||||
@@ -8,7 +9,7 @@ use serai_coins_primitives::OutInstructionWithBalance;
|
||||
use crate::Address;
|
||||
|
||||
/// A payment to fulfill.
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, BorshSerialize, BorshDeserialize)]
|
||||
pub struct Payment<A: Address> {
|
||||
address: A,
|
||||
balance: Balance,
|
||||
|
||||
Reference in New Issue
Block a user