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
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use cosmwasm_std::{IbcEndpoint, Uint128};
use cw_storage_plus::{Item, Map};
pub const CONFIG: Item<Config> = Item::new("ics20_config");
pub const CHANNEL_INFO: Map<&str, ChannelInfo> = Map::new("channel_info");
pub const CHANNEL_STATE: Map<(&str, &str), ChannelState> = Map::new("channel_state");
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug, Default)]
pub struct ChannelState {
pub outstanding: Uint128,
pub total_sent: Uint128,
}
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug, Default)]
pub struct Config {
pub default_timeout: u64,
}
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
pub struct ChannelInfo {
pub id: String,
pub counterparty_endpoint: IbcEndpoint,
pub connection_id: String,
}