Skip to content

Commit d2bbbf6

Browse files
authored
Merge pull request #700 from movementlabsxyz/0xmovses/contract-config-update
Implement relayer contract switch on ETH side calls
2 parents 7aa85be + 249228a commit d2bbbf6

File tree

6 files changed

+343
-132
lines changed

6 files changed

+343
-132
lines changed

protocol-units/bridge/config/src/common/eth.rs

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const DEFAULT_ETH_WS_CONNECTION_PORT: u16 = 8545; // same as RPC
1111
const DEFAULT_ETH_INITIATOR_CONTRACT: &str = "Oxeee";
1212
const DEFAULT_ETH_COUNTERPARTY_CONTRACT: &str = "0xccc";
1313
const DEFAULT_ETH_WETH_CONTRACT: &str = "0xe3e3";
14+
const DEFAULT_ASSET: &str = "MOVE";
1415

1516
#[derive(Clone, Debug, Serialize, Deserialize)]
1617
pub struct EthConfig {
@@ -48,6 +49,9 @@ pub struct EthConfig {
4849
pub gas_limit: u64,
4950
#[serde(default = "default_transaction_send_retries")]
5051
pub transaction_send_retries: u32,
52+
53+
#[serde(default = "default_asset")]
54+
pub asset: String,
5155
}
5256

5357
env_default!(
@@ -71,6 +75,8 @@ env_default!(
7175
DEFAULT_ETH_WETH_CONTRACT.to_string()
7276
);
7377

78+
env_default!(default_asset, "ASSET", String, DEFAULT_ASSET.to_string());
79+
7480
env_short_default!(default_time_lock_secs, u64, 48 * 60 * 60 as u64); //48h by default
7581

7682
env_short_default!(default_gas_limit, u64, 10_000_000_000_000_000 as u64);
@@ -182,6 +188,8 @@ impl Default for EthConfig {
182188
signer_private_key: default_signer_private_key(),
183189
gas_limit: default_gas_limit(),
184190
transaction_send_retries: default_transaction_send_retries(),
191+
192+
asset: default_asset(),
185193
}
186194
}
187195
}

protocol-units/bridge/service/abis/AtomicBridgeCounterpartyMOVE.json

+1
Large diffs are not rendered by default.

protocol-units/bridge/service/abis/AtomicBridgeInitiatorMOVE.json

+1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)