diff --git a/chainIdFaucetToken.json b/chainIdFaucetToken.json index e98cd02..baabfcc 100644 --- a/chainIdFaucetToken.json +++ b/chainIdFaucetToken.json @@ -1,18 +1,19 @@ { - "1": "", - "3": "", - "5": "", - "10": "", - "42": "", - "137": "", - "420": "", - "42161": "", - "43113": "", - "43114": "", - "80001": "", - "421613": "", - "11155111": "", - "3884533461": "0x631f0dAfEC5ECd9391FAA65830Cb19fD7e156EE8", - "3884533462": "0x631f0dAfEC5ECd9391FAA65830Cb19fD7e156EE8", - "3884533463": "0x631f0dAfEC5ECd9391FAA65830Cb19fD7e156EE8" + "1": "", + "3": "", + "5": "", + "10": "", + "42": "", + "137": "", + "420": "", + "42161": "", + "43113": "", + "43114": "", + "80001": "", + "421613": "", + "11155111": "", + "3884533461": "0x7F07E8FF927DA7a900f1876Be7FE87Eb61cCeF6F", + "3884533462": "0x7F07E8FF927DA7a900f1876Be7FE87Eb61cCeF6F", + "3884533463": "0x7F07E8FF927DA7a900f1876Be7FE87Eb61cCeF6F", + "4006": "0x7F07E8FF927DA7a900f1876Be7FE87Eb61cCeF6F" } diff --git a/chainIdRpcs.json b/chainIdRpcs.json index 050b4a0..93491c9 100644 --- a/chainIdRpcs.json +++ b/chainIdRpcs.json @@ -55,5 +55,8 @@ ], "3884533463": [ "https://demeter-testnet.webb.tools" + ], + "4006": [ + "https://tangle-standalone-archive.webb.tools" ] } diff --git a/src/main.rs b/src/main.rs index 34af715..1ad63fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -77,12 +77,18 @@ const fn default_verify_following_webb() -> bool { #[derive(Deserialize)] pub struct AppConfig { + /// The database to use for the auth and claims db: PathBuf, + /// The mnemonic to use for the faucet mnemonic: String, + /// The amount of time to wait between claims + /// This is to prevent users from spamming the faucet #[serde(default = "default_time_to_wait_between_claims")] pub time_to_wait_between_claims: std::time::Duration, + /// The amount of ERC20 tokens to send to the user #[serde(default = "default_token_amount")] pub token_amount: u64, + /// The amount of native tokens to send to the user #[serde(default = "default_native_token_amount")] pub native_token_amount: f64, /// Whether to verify that the user is following the webb twitter account @@ -147,8 +153,13 @@ fn ethers_providers_firing() -> impl Fairing { .state::() { Some(config) => { - let networks = - vec![Network::Athena, Network::Hermes, Network::Demeter]; + // Supported networks + let networks = vec![ + Network::Athena, + Network::Hermes, + Network::Demeter, + Network::TangleEVMTestnet, + ]; let mnemonic: String = config.mnemonic.parse().unwrap(); let wallet = match MnemonicBuilder::::default() diff --git a/src/txes/networks.rs b/src/txes/networks.rs index dafc528..fd08ba7 100644 --- a/src/txes/networks.rs +++ b/src/txes/networks.rs @@ -12,6 +12,7 @@ pub enum Network { Hermes, Athena, Demeter, + TangleEVMTestnet, // Substrate Tangle, @@ -31,6 +32,7 @@ impl Network { "hermes" => Some(Self::Hermes), "athena" => Some(Self::Athena), "demeter" => Some(Self::Demeter), + "tangle-evm-testnet" => Some(Self::TangleEVMTestnet), _ => None, } } @@ -48,6 +50,7 @@ impl Network { 3884533461 => Some(Self::Athena), 3884533462 => Some(Self::Hermes), 3884533463 => Some(Self::Demeter), + 4006 => Some(Self::TangleEVMTestnet), _ => None, } } @@ -65,6 +68,7 @@ impl Network { Self::Athena => Some(3884533461), Self::Hermes => Some(3884533462), Self::Demeter => Some(3884533463), + Self::TangleEVMTestnet => Some(4006), _ => None, } } @@ -101,6 +105,7 @@ impl Network { Self::ArbitrumGoerli => Some(TypedChainId::Evm(421613)), Self::Athena => Some(TypedChainId::Evm(3884533461)), Self::Demeter => Some(TypedChainId::Evm(3884533463)), + Self::TangleEVMTestnet => Some(TypedChainId::Evm(4006)), Self::Goerli => Some(TypedChainId::Evm(5)), Self::Hermes => Some(TypedChainId::Evm(3884533462)), Self::MoonbaseAlpha => Some(TypedChainId::Evm(1287)),