1mod msg;
2mod query;
3mod route;
4
5
6pub const NATIVE_DENOM: &str = "uterp";
7
8pub const NATIVE_BOND_DENOM: &str = "uterp";
9pub const NATIVE_FEE_DENOM: &str = "uthiol";
10
11pub const TEST_BOND_DENOM: &str = "uterpx";
12pub const TEST_FEE_DENOM: &str = "uthiolx";
13
14pub const GENESIS_MINT_START_TIME: u64 = 1647032400000000000;
15
16
17use cosmwasm_std::{coin, coins, Addr, BankMsg, Coin};
18pub use msg::{
19 create_fund_community_pool_msg,
20 TerpMsg, TerpMsgWrapper,
21};
22
23pub type Response = cosmwasm_std::Response<TerpMsgWrapper>;
24pub type SubMsg = cosmwasm_std::SubMsg<TerpMsgWrapper>;
25pub type CosmosMsg = cosmwasm_std::CosmosMsg<TerpMsgWrapper>;
26
27pub use query::TerpQuery;
28pub use route::TerpRoute;
29
30pub fn terps(amount: impl Into<u128>) -> Vec<Coin> {
37 coins(amount.into(), NATIVE_BOND_DENOM)
38}
39pub fn thiols(amount: impl Into<u128>) -> Vec<Coin> {
40 coins(amount.into(), NATIVE_FEE_DENOM)
41}
42
43pub fn test_terps(amount: impl Into<u128>) -> Vec<Coin> {
44 coins(amount.into(), TEST_BOND_DENOM)
45}
46pub fn test_thiols(amount: impl Into<u128>) -> Vec<Coin> {
47 coins(amount.into(), TEST_FEE_DENOM)
48}
49
50pub fn terp(amount: impl Into<u128>) -> Coin {
51 coin(amount.into(), NATIVE_BOND_DENOM)
52}
53
54pub fn thiol(amount: impl Into<u128>) -> Coin {
55 coin(amount.into(), NATIVE_FEE_DENOM)
56}
57
58pub fn test_terp(amount: impl Into<u128>) -> Coin {
59 coin(amount.into(), NATIVE_BOND_DENOM)
60}
61
62pub fn test_thiol(amount: impl Into<u128>) -> Coin {
63 coin(amount.into(), NATIVE_FEE_DENOM)
64}
65
66pub fn send_terps_msg(to_address: &Addr, amount: impl Into<u128>) -> BankMsg {
67 BankMsg::Send {
68 to_address: to_address.to_string(),
69 amount: terps(amount),
70 }
71}
72
73pub fn send_thiols_msg(to_address: &Addr, amount: impl Into<u128>) -> BankMsg {
74 BankMsg::Send {
75 to_address: to_address.to_string(),
76 amount: thiols(amount),
77 }
78}