1use std::ops::Deref;
2
3use hermes_cli_framework::config::Config;
4use ibc_relayer::config::{load as load_config, Config as RelayerConfig};
5
6pub struct HermesConfig {
7 pub config: RelayerConfig,
8}
9
10impl Deref for HermesConfig {
11 type Target = RelayerConfig;
12
13 fn deref(&self) -> &Self::Target {
14 &self.config
15 }
16}
17
18impl Config for HermesConfig {
19 fn load_from_path(
20 path: impl AsRef<std::path::Path>,
21 ) -> Result<Self, Box<dyn std::error::Error>> {
22 let config = load_config(path)?;
23 Ok(Self { config })
24 }
25}