Crate espresso_contract_deployer

Crate espresso_contract_deployer 

Source

Modules§

builder
builder pattern for
impersonate_filler
network_config
Fetching hotshot network config
output
proposals
provider

Structs§

Contracts
Cache of contracts predeployed or deployed during this current run.
DeployedContracts
Set of predeployed contracts.

Enums§

Contract
An identifier for a particular contract.
OwnableContract

Constants§

DEFAULT_EXIT_ESCROW_PERIOD_SECONDS
Default exit escrow period for stake table (2 days in seconds)
LIBRARY_PLACEHOLDER_ADDRESS 🔒
MAX_HISTORY_RETENTION_SECONDS
stateHistoryRetentionPeriod in LightClient.sol as the maximum retention period in seconds
MAX_RETRY_ATTEMPTS
Maximum number of retries for state checks after transactions
RETRY_INITIAL_DELAY_MS
Initial delay in milliseconds for retry exponential backoff

Functions§

already_initialized 🔒
build_provider
a handy thin wrapper around wallet builder and provider builder that directly returns an instantiated Provider with default fillers with wallet, ready to send tx
build_provider_ledger
build_random_provider
similar to build_provider() but using a random wallet
build_signer
deploy_fee_contract_proxy
The primary logic for deploying and initializing an upgradable fee contract.
deploy_light_client_contract 🔒
Default deployment function LightClient.sol or LightClientMock.sol with mock: true.
deploy_light_client_proxy
The primary logic for deploying and initializing an upgradable light client contract.
deploy_ops_timelock
Deploy and initialize the Ops Timelock contract
deploy_reward_claim_proxy
Deploy and initialize the RewardClaim contract behind a proxy
deploy_safe_exit_timelock
Deploy and initialize the Safe Exit Timelock contract
deploy_stake_table_proxy
The primary logic for deploying and initializing an upgradable permissionless StakeTable contract.
deploy_token_proxy
The primary logic for deploying and initializing an upgradable Espresso Token contract.
encode_function_call
Encode a function call with the given signature and arguments
fetch_stake_table_for_stake_table_storage_migration
Read stake table data from L1 StakeTable V1 events for V2 migration
get_proxy_initialized_version
grant_admin_role
Grant DEFAULT_ADMIN_ROLE to a new admin for AccessControl-based contracts This handles contracts like RewardClaim that use AccessControl instead of Ownable
is_contract
is_proxy_contract
helper function to decide if the contract at given address addr is a proxy contract
prepare_stake_table_v2_upgrade
Prepare the upgrade data for StakeTable V2, checking version and fetching commissions if needed.
read_proxy_impl
retry_until_true
retry helper for checking state after transactions Retries up to 5 times with exponential backoff (500ms, 1s, 2s, 4s, 8s) Parameters:
transfer_ownership
Common logic for any Ownable contract to transfer ownership
upgrade_esp_token_v2
Upgrade the esp token proxy to use EspTokenV2.
upgrade_fee_v1
Upgrade the fee contract from V1.x.x to V1.0.1 This is for fee contracts owned by an EOA
upgrade_light_client_v2
Upgrade the light client proxy to use LightClientV2. Internally, first detect existence of proxy, then deploy LCV2, then upgrade and initializeV2. Internal to “deploy LCV2”, we deploy PlonkVerifierV2 whose address will be used at LCV2 init time. Assumes:
upgrade_light_client_v3
Upgrade the light client proxy to use LightClientV3. Internally, first detect existence of proxy, then deploy LCV3, then upgrade and initializeV3. Internal to “deploy LCV3”, we deploy PlonkVerifierV3 whose address will be used at LCV3 init time. Assumes:
upgrade_stake_table_v2
Upgrade the stake table proxy from V1 to V2, or patch V2

Type Aliases§

HttpProviderWithWallet
Type alias that connects to providers with recommended fillers and wallet use <HttpProviderWithWallet as WalletProvider>::wallet() to access internal wallet use <HttpProviderWithWallet as WalletProvider>::default_signer_address(&provider) to get wallet address