Skip to content

Commit

Permalink
Enable parsing multiple relayer listening contract addresses from env…
Browse files Browse the repository at this point in the history
…ironment variables

Previously, multiple relayer listening contracts could only be specified by repeating the flags for each contract. This approach limited the ability to set these addresses at runtime via environment variables.

This change introduces support for parsing contract addresses delimited by commas (",") from environment variables. This enhancement simplifies configuration and improves flexibility by allowing the contracts to be set through a single environment variable.
  • Loading branch information
Jurshsmith committed Jun 26, 2024
1 parent 9c8cc7d commit c3cfa18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/fuel-core/src/cli/run/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct RelayerArgs {
pub relayer: Option<url::Url>,

/// Ethereum contract address. Create EthAddress into fuel_types
#[arg(long = "relayer-v2-listening-contracts", value_parser = parse_h160, env)]
#[arg(long = "relayer-v2-listening-contracts", value_parser = parse_h160, value_delimiter = ",", env)]
pub eth_v2_listening_contracts: Vec<H160>,

/// Number of da block that the contract is deployed at.
Expand Down

0 comments on commit c3cfa18

Please sign in to comment.