From b942745c91d01eb057e8f05c9903d6b4698ec0a6 Mon Sep 17 00:00:00 2001 From: Iris Date: Wed, 27 Mar 2024 17:46:01 +0100 Subject: [PATCH] fix: naming in config --- bot/src/bot.rs | 2 +- bot/src/config.rs | 10 +++++----- config.template.toml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bot/src/bot.rs b/bot/src/bot.rs index 632a2d5..c083844 100644 --- a/bot/src/bot.rs +++ b/bot/src/bot.rs @@ -73,7 +73,7 @@ pub async fn get_domains_ready_for_renewal( // get the erc20 address for the given auto_renew_contract to_hex( *config - .altcoins_mapping + .renewers_mapping .get(&result.auto_renew_contract) .unwrap(), ), diff --git a/bot/src/config.rs b/bot/src/config.rs index 3f8b1e1..82fc397 100644 --- a/bot/src/config.rs +++ b/bot/src/config.rs @@ -84,7 +84,7 @@ pub_struct!(Clone; Config { rpc: Rpc, watchtower: Watchtower, server: Server, - altcoins_mapping: HashMap, + renewers_mapping: HashMap, }); impl<'de> Deserialize<'de> for Config { @@ -102,7 +102,7 @@ impl<'de> Deserialize<'de> for Config { rpc: Rpc, watchtower: Watchtower, server: Server, - altcoins: HashMap, + renewers: HashMap, } let OuterConfig { @@ -114,11 +114,11 @@ impl<'de> Deserialize<'de> for Config { rpc, watchtower, server, - altcoins, + renewers, } = OuterConfig::deserialize(deserializer)?; // Build atcoins mapping - let altcoins_mapping = altcoins + let renewers_mapping = renewers .into_values() .map(|val| (val.renewal_contract, val.address)) .collect(); @@ -132,7 +132,7 @@ impl<'de> Deserialize<'de> for Config { rpc, watchtower, server, - altcoins_mapping, + renewers_mapping, }) } } diff --git a/config.template.toml b/config.template.toml index 41e7eb1..e6ed5f7 100644 --- a/config.template.toml +++ b/config.template.toml @@ -39,11 +39,11 @@ rpc_url = "https://starknet-goerli.g.alchemy.com/v2/xxxxxxx" [server] starknetid_api = "https://api.starknet.id" -[altcoins] -[altcoins.ETH] +[renewers] +[renewers.ETH_LEGACY] address = "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7" renewal_contract = "0x020379Ba14750ECEE8dde204D0649808BCf6D32E9fDe81Ca952Ab0360cdC0937" -[altcoins.STRK] +[renewers.STRK] address = "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d" renewal_contract = "0x078F63fcD145Ddc6ca932E562b466AFbfD7c9E882C9aa70f3e5b2ce05cD892eA" \ No newline at end of file