packages.valory.contracts.gnosis_safe_proxy_factory.contract
This module contains the class to connect to an Gnosis Safe Proxy Factory contract.
GnosisSafeProxyFactoryContract Objects
class GnosisSafeProxyFactoryContract(Contract)
The Gnosis Safe Proxy Factory contract.
get_raw_transaction
@classmethod
def get_raw_transaction(cls, ledger_api: LedgerApi, contract_address: str,
**kwargs: Any) -> Optional[JSONLike]
Get the raw transaction.
get_raw_message
@classmethod
def get_raw_message(cls, ledger_api: LedgerApi, contract_address: str,
**kwargs: Any) -> Optional[bytes]
Get raw message.
get_state
@classmethod
def get_state(cls, ledger_api: LedgerApi, contract_address: str,
**kwargs: Any) -> Optional[JSONLike]
Get state.
get_deploy_transaction
@classmethod
def get_deploy_transaction(cls, ledger_api: LedgerApi, deployer_address: str,
**kwargs: Any) -> Optional[JSONLike]
Get deploy transaction.
Arguments:
ledger_api: ledger API object.deployer_address: the deployer address.kwargs: the keyword arguments.
Returns:
an optional JSON-like object.
build_tx_deploy_proxy_contract_with_nonce
@classmethod
def build_tx_deploy_proxy_contract_with_nonce(
cls,
ledger_api: EthereumApi,
proxy_factory_address: str,
master_copy: str,
address: str,
initializer: bytes,
salt_nonce: int,
gas: int = MIN_GAS,
gas_price: Optional[int] = None,
max_fee_per_gas: Optional[int] = None,
max_priority_fee_per_gas: Optional[int] = None,
nonce: Optional[int] = None) -> Tuple[TxParams, str]
Deploy proxy contract via Proxy Factory using createProxyWithNonce (create2)
Arguments:
ledger_api: ledger API objectproxy_factory_address: the address of the proxy factoryaddress: Ethereum addressmaster_copy: Address the proxy will point atinitializer: Data for safe creationsalt_nonce: Uint256 forcreate2saltgas: Gasgas_price: Gas Pricemax_fee_per_gas: maxmax_priority_fee_per_gas: maxnonce: Nonce
Returns:
Tuple(tx-hash, tx, deployed contract address)
verify_contract
@classmethod
def verify_contract(cls, ledger_api: EthereumApi,
contract_address: str) -> JSONLike
Verify the contract's bytecode
Arguments:
ledger_api: the ledger API objectcontract_address: the contract address
Returns:
the verified status