safe.tx

Documentation for eth_defi.safe.tx Python module.

Gnosis Safe multisignature transaction handling.

Note

This code may be unfinished and untested.

Functions

propose_safe_transaction(safe, address, ...)

Propose a Safe transaction for Safe UI others to sign.

Exceptions

SafeTxProposalError

Error proposing Safe transaction

exception SafeTxProposalError

Bases: Exception

Error proposing Safe transaction

__init__(*args, **kwargs)
__new__(**kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

propose_safe_transaction(safe, address, private_key, data, operation=0, value=0)

Propose a Safe transaction for Safe UI others to sign.

Parameters
  • safe (safe_eth.safe.safe.Safe) – The Safe instance

  • address (Union[eth_typing.evm.HexAddress, str]) – Target contract address

  • private_key (str) – Proposer’s private key

  • data (bytes | hexbytes.main.HexBytes) –

  • value (int) –

Parma data

Contract call payload

Raises

SafeTxProposalError – If we have a problem with the transaction service

Returns

Proposed Safe transaction

Return type

safe_eth.safe.safe_tx.SafeTx