Skip to main content

detect_configurable_account

Function detect_configurable_account 

Source
pub async fn detect_configurable_account<P: Provider<TempoNetwork>>(
    provider: &P,
    account: Address,
    keys: &[Address],
    config: Option<ConfigurableAccountConfig>,
    required: bool,
    block: BlockId,
) -> Result<Option<ConfigurableAccountConfig>>
Expand description

Tells whether account is a configurable account at block, and returns its configuration there.

The account is one when it has a registered configuration commitment (a derived account after its first transaction, or an upgraded EOA), or when one of the local owner keys derives it as a 1-of-1, salt-0 account. config overrides the lookup: it is checked against the commitment, or against the account address for an account that has not sent its first transaction.

Returns None before T14 and for an account that is not a configurable account, unless required is set or config is given, which fail instead. A sender that is itself one of keys is also taken as a plain key when the RPC cannot be reached, so that fully specified transactions still sign offline.