Proxy Resolvers#
ProxyCheck#
ProxyConfig#
- class starknet_py.proxy.contract_abi_resolver.ProxyConfig#
Proxy resolving configuration.
- proxy_checks: List[ProxyCheck]#
List of classes implementing
ProxyCheck
ABC, that will be used for checking if contract at the address is a proxy contract.
ContractAbiResolver#
- class starknet_py.proxy.contract_abi_resolver.ContractAbiResolver#
Class for resolving abi of a contract
- __init__(address: int, client: Client, proxy_config: ProxyConfig)#
- Parameters:
address – Contract’s address
client – Client used for resolving abi
proxy_config – Proxy config for resolving proxy
- async get_abi_for_address() Tuple[List[StructDict | FunctionDict | ConstructorDict | L1HandlerDict | EventDict], int] #
Returns abi and cairo version of a contract directly from address.
- Raises:
ContractNotFoundError – when contract could not be found at address
AbiNotFoundError – when abi is not present in contract class at address
- async resolve() Tuple[List[StructDict | FunctionDict | ConstructorDict | L1HandlerDict | EventDict], int] #
Returns abi and cairo version of either direct contract or contract proxied by direct contract depending on proxy_config.
- Raises:
ContractNotFoundError – when contract could not be found at address
ProxyResolutionError – when given ProxyChecks were not sufficient to resolve proxy
AbiNotFoundError – when abi is not present in contract class at address
- async resolve_abi() Tuple[List[StructDict | FunctionDict | ConstructorDict | L1HandlerDict | EventDict], int] #
Returns abi and cairo version of a contract that is being proxied by contract at address.
- Raises:
ContractNotFoundError – when contract could not be found at address
ProxyResolutionError – when given ProxyChecks were not sufficient to resolve proxy
AbiNotFoundError – when abi is not present in proxied contract class at address
Errors#
- class starknet_py.proxy.contract_abi_resolver.AbiNotFoundError#
Error while resolving contract abi.
- class starknet_py.proxy.contract_abi_resolver.ProxyResolutionError#
Error while resolving proxy using ProxyChecks.