-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Ethereum bridge chain parameters + refactor runtime config
- Loading branch information
Showing
6 changed files
with
44 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod ledger; | ||
pub mod params; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//! Blockchain-level parameters for the configuration of the Ethereum bridge. | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct Config { | ||
/// Minimum number of confirmations needed to trust an Ethereum branch. | ||
/// This must be at least one. | ||
pub min_confirmations: u64, | ||
/// The addresses of the Ethereum contracts that need to be directly known | ||
/// by validators | ||
pub contract_addresses: Addresses, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct Addresses { | ||
/// The Ethereum address of the proxy contract e.g. | ||
/// 0x6B175474E89094C44Da98b954EedeAC495271d0F | ||
pub proxy: String, | ||
/// The Ethereum address of the ERC20 contract that represents this chain's | ||
/// native token e.g. 0x6B175474E89094C44Da98b954EedeAC495271d0F | ||
pub native_erc20: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters