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
31
32
33
34
35
36
37
38
39
use crate::{
api::{
config::GearConfig,
generated::api::{
runtime_types::{gear_common::ActiveProgram, sp_runtime::DispatchError},
Event,
},
},
result::Result,
};
use parity_scale_codec::{Decode, Encode};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use subxt::TransactionInBlock;
#[derive(Clone, Debug, Decode, Encode, PartialEq, Eq, Serialize, Deserialize)]
pub struct GasInfo {
pub min_limit: u64,
pub reserved: u64,
pub burned: u64,
}
pub type GearPages = HashMap<u32, Vec<u8>>;
pub type InBlock<'i> = Result<TransactionInBlock<'i, GearConfig, DispatchError, Event>>;
#[derive(Debug, Decode)]
pub enum Program {
Active(ActiveProgram),
Terminated,
}