2022-04-13 04:30:22 -07:00
|
|
|
use schemars::JsonSchema;
|
2022-09-30 00:03:54 -07:00
|
|
|
use serde::{Deserialize, Serialize};
|
2022-04-13 04:30:22 -07:00
|
|
|
|
|
|
|
use cosmwasm_std::Storage;
|
2022-09-30 00:03:54 -07:00
|
|
|
use cosmwasm_storage::{singleton, singleton_read, ReadonlySingleton, Singleton};
|
2022-04-13 04:30:22 -07:00
|
|
|
|
|
|
|
type HumanAddr = String;
|
|
|
|
|
|
|
|
pub static CONFIG_KEY: &[u8] = b"config";
|
|
|
|
|
|
|
|
// Guardian set information
|
2022-09-30 03:07:27 -07:00
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
2022-04-13 04:30:22 -07:00
|
|
|
pub struct Config {
|
|
|
|
pub token_bridge_contract: HumanAddr,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn config(storage: &mut dyn Storage) -> Singleton<Config> {
|
|
|
|
singleton(storage, CONFIG_KEY)
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton<Config> {
|
|
|
|
singleton_read(storage, CONFIG_KEY)
|
2022-09-30 00:03:54 -07:00
|
|
|
}
|