add serai rpc methods

This commit is contained in:
akildemir
2024-10-26 14:25:54 +03:00
parent f3d20e60b3
commit 21589936a9
12 changed files with 398 additions and 40 deletions

View File

@@ -0,0 +1,19 @@
#[cfg(feature = "borsh")]
use borsh::{BorshSerialize, BorshDeserialize};
#[cfg(feature = "serde")]
use serde::{Serialize, Deserialize};
use scale::{Encode, Decode, MaxEncodedLen};
use crate::{Coin, SubstrateAmount};
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Encode, Decode, MaxEncodedLen)]
#[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct QuotePriceParams {
pub coin1: Coin,
pub coin2: Coin,
pub amount: SubstrateAmount,
pub include_fee: bool,
pub exact_in: bool,
}

View File

@@ -40,6 +40,10 @@ pub use account::*;
mod constants;
pub use constants::*;
mod dex;
#[allow(unused_imports)]
pub use dex::*;
pub type BlockNumber = u64;
pub type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;