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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
use crate::client::client_types::{terra_decimal_format, terra_f64_format, terra_u64_format};
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize, Debug)]
pub struct OracleParameterWhiteList {
pub name: String,
#[serde(with = "terra_f64_format")]
pub tobin_tax: f64,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OracleParameters {
#[serde(with = "terra_u64_format")]
pub vote_period: u64,
#[serde(with = "terra_f64_format")]
pub vote_threshold: f64,
#[serde(with = "terra_f64_format")]
pub reward_band: f64,
#[serde(with = "terra_u64_format")]
pub reward_distribution_window: u64,
pub whitelist: Vec<OracleParameterWhiteList>,
#[serde(with = "terra_f64_format")]
pub slash_fraction: f64,
#[serde(with = "terra_u64_format")]
pub slash_window: u64,
#[serde(with = "terra_f64_format")]
pub min_valid_per_window: f64,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OracleParametersResult {
#[serde(with = "terra_u64_format")]
pub height: u64,
pub result: OracleParameters,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OracleVotes {
#[serde(with = "terra_decimal_format")]
pub exchange_rate: Decimal,
pub denom: String,
pub voter: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OracleVotesResult {
#[serde(with = "terra_u64_format")]
pub height: u64,
pub result: Vec<OracleVotes>,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OraclePreVotes {
pub hash: String,
pub denom: String,
pub voter: String,
#[serde(with = "terra_u64_format")]
pub submit_block: u64,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OraclePreVotesResult {
#[serde(with = "terra_u64_format")]
pub height: u64,
pub result: Vec<OraclePreVotes>,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OracleVoteFeederResult {
#[serde(with = "terra_u64_format")]
pub height: u64,
pub result: String,
}
#[derive(Deserialize, Serialize, Debug)]
pub struct OracleVoteMissResult {
#[serde(with = "terra_u64_format")]
pub height: u64,
#[serde(with = "terra_u64_format")]
pub result: u64,
}