Skip to content

SafeTx MultiSend decoding #204

Description

@Drewsapple

While adding the function multiSend(bytes memory transactions) function selector to the database may be helpful, decoding the contents of a multicall for a safe (and ensuring it's happening on the right contract) would greatly improve transparency for batched transactions in Safe.

The calldata format for the transactions bytes is listed here. The encoding is the same for both the MultiSend contract and MultiSendCallOnly. The addresses that most safe interfaces use are taken from the safe-global/safe-deployments repo. While v1.5.0 has been deployed, the webuis still only suggest upgrades up to v1.4.1, so both should be included.

MultiSend v1.4.1
MultiSendCallOnly v1.4.1
MultiSend v1.5.0
MultiSendCallOnly v1.5.0

(v1.3.0 may be still be commonly used as well)

dialog_confirm_safe_tx should get additional logic that checks if a SafeTx is a delegatecall to one of those addresses, starting with calldata 0x8d80ff0a, then parse the batched calls as described in the comment in MultiSend. These individual calls should then be passed into eth_data_recognize and eth_data_format, so that a signer can see what each of the calls in a batch does (and where that call is destined).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions