Documentation for eth_defi.middleware.construct_sign_and_send_raw_middleware_anvil function.


Capture transactions sign and send as raw transactions


This is middleware that has been fixed for Anvil/other JSON-RPC compatibility.

Keyword arguments: private_key_or_account – A single private key or a tuple, list or set of private keys. Keys can be any of the following formats:

  • An eth_account.LocalAccount object

  • An eth_keys.PrivateKey object

  • A raw private key as a hex string or byte string

Return type

Callable[[Callable[[web3.types.RPCEndpoint, Any], web3.types.RPCResponse], web3.main.Web3], Any]