diff --git a/common/network-defaults/src/lib.rs b/common/network-defaults/src/lib.rs index a7f7f2003b..f350490376 100644 --- a/common/network-defaults/src/lib.rs +++ b/common/network-defaults/src/lib.rs @@ -8,11 +8,15 @@ use url::Url; pub mod eth_contract; #[cfg(network = "milhon")] pub mod milhon; +#[cfg(network = "qa")] +pub mod qa; #[cfg(network = "sandbox")] pub mod sandbox; #[cfg(network = "milhon")] pub use milhon::*; +#[cfg(network = "qa")] +pub use qa::*; #[cfg(network = "sandbox")] pub use sandbox::*; @@ -58,6 +62,14 @@ pub fn default_validators() -> Vec { ] } +#[cfg(network = "qa")] +pub fn default_validators() -> Vec { + vec![ValidatorDetails::new( + "https://qa-validator.nymtech.net", + Some("https://qa-validator.nymtech.net/api"), + )] +} + #[cfg(network = "sandbox")] pub fn default_validators() -> Vec { vec![ValidatorDetails::new( diff --git a/common/network-defaults/src/qa.rs b/common/network-defaults/src/qa.rs new file mode 100644 index 0000000000..c31b8bc379 --- /dev/null +++ b/common/network-defaults/src/qa.rs @@ -0,0 +1,17 @@ +// Copyright 2021 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +pub const BECH32_PREFIX: &str = "nymt"; +pub const DENOM: &str = "unymt"; + +pub const DEFAULT_MIXNET_CONTRACT_ADDRESS: &str = "nymt14hj2tavq8fpesdwxxcu44rty3hh90vhuysqrsr"; +pub const DEFAULT_VESTING_CONTRACT_ADDRESS: &str = "nymt17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9f8xzkv"; +pub const BANDWIDTH_CLAIM_CONTRACT_ADDRESS: &str = "nymt17p9rzwnnfxcjp32un9ug7yhhzgtkhvl9f8xzkv"; +pub const REWARDING_VALIDATOR_ADDRESS: &str = "nymt1dn52nx8wv9wkqmrvj6tcmdzh4es6jt8tr7f6j9"; +pub const ETH_CONTRACT_ADDRESS: [u8; 20] = + hex_literal::hex!("9fEE3e28c17dbB87310A51F13C4fbf4331A6f102"); + +// Name of the event triggered by the eth contract. If the event name is changed, +// this would also need to be changed; It is currently tested against the json abi +pub const ETH_EVENT_NAME: &str = "Burned"; +pub const ETH_BURN_FUNCTION_NAME: &str = "burnTokenForAccessCode";