I have to create a multisignature transaction which the transaction should get signed with at least 2 private keys. Could anyone explain how to do it? I am using web3.py

import rlp

    from ethereum.transactions import Transaction
    tx = Transaction(
    raw_tx = rlp.encode(tx)
    raw_tx_hex = web3.toHex(raw_tx)

In the above code, I am only signing with one private key. Could anyone explain how to sign with multiple private keys?

1 Answer 1


An Ethereum transaction should have only one signature, representing the account that will pay the gas for it. If you want to control a resource with multiple signatures, you have two options:

  • Make a contract that requires multiple transactions to make whatever it is happen. See this contract for an example.
  • Instead of checking the transaction signature (in practice, msg.sender) like you would with a simple transaction, sign the data to the transaction and have your contract check it using ecrecover. This allows you to collect the signatures out-of-band and submit all the signature data in a single transaction. See this contract for an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.