TopUpConfig

Documentation for eth_defi.lifi.top_up.TopUpConfig Python class.

class TopUpConfig

Bases: object

Configuration for cross-chain gas top-up.

Read from environment variables via read_top_up_config().

Attributes summary

private_key

Hot wallet private key

source_chain_id

Source chain numeric ID

source_chain_name

Source chain human name

target_chain_ids

Target chain numeric IDs

min_gas_usd

Minimum gas balance in USD before triggering a top-up

top_up_usd

Amount to bridge in USD when topping up

dry_run

Whether to only display quotes without executing

source_token_choice

Source token: "native" or "usdc"

source_token_address

Resolved source token address

Methods summary

__init__(private_key, source_chain_id, ...)

private_key: str

Hot wallet private key

source_chain_id: int

Source chain numeric ID

source_chain_name: str

Source chain human name

target_chain_ids: list[int]

Target chain numeric IDs

min_gas_usd: decimal.Decimal

Minimum gas balance in USD before triggering a top-up

top_up_usd: decimal.Decimal

Amount to bridge in USD when topping up

dry_run: bool

Whether to only display quotes without executing

source_token_choice: str

Source token: “native” or “usdc”

source_token_address: str

Resolved source token address

__init__(private_key, source_chain_id, source_chain_name, target_chain_ids, min_gas_usd, top_up_usd, dry_run, source_token_choice, source_token_address)
Parameters
Return type

None