propose_safe_transaction
Documentation for eth_defi.safe.tx.propose_safe_transaction function.
- propose_safe_transaction(safe, address, private_key, data, operation=SafeOperationEnum.CALL, value=0)
Create a signed Safe Transaction Service proposal without broadcasting it.
On 2026-09-19, the deployed Lighter tutorial Safe accepted and indexed a zero-value, state-free
totalAssets()proposal whileSAFE_TRANSACTION_SERVICE_API_KEYwas unset. The key is optional, but Safe recommends it in production for higher rate limits and reliability.- 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 (Union[bytes, hexbytes.main.HexBytes]) – Contract call payload
operation (Union[safe_eth.safe.enums.SafeOperationEnum, int]) – Safe Call or DelegateCall operation
value (int) – Native-token value to transfer with the contract call
- Raises
SafeTxProposalError – If the configured Safe Transaction Service does not support the chain or rejects the proposal
- Returns
Proposed Safe transaction
- Return type
safe_eth.safe.safe_tx.SafeTx