partner_chains_mock_data_sources/
native_token.rs

1use crate::Result;
2use async_trait::async_trait;
3use sidechain_domain::*;
4use sp_native_token_management::{MainChainScripts, NativeTokenManagementDataSource};
5
6pub struct NativeTokenDataSourceMock;
7
8impl NativeTokenDataSourceMock {
9	pub fn new() -> Self {
10		Self
11	}
12}
13
14impl Default for NativeTokenDataSourceMock {
15	fn default() -> Self {
16		Self::new()
17	}
18}
19
20#[async_trait]
21impl NativeTokenManagementDataSource for NativeTokenDataSourceMock {
22	async fn get_total_native_token_transfer(
23		&self,
24		_after_block: Option<McBlockHash>,
25		_to_block: McBlockHash,
26		_scripts: MainChainScripts,
27	) -> Result<NativeTokenAmount> {
28		Ok(NativeTokenAmount(1000))
29	}
30}