Support `gs_multi_send` in the `safe-apps-provider`
We are migrating the wallet-connect safe app to the safe-apps-provider: https://github.com/safe-global/safe-react-apps/pull/537
The only thing the safe-apps-provider lacks is the support for the OG gs_multi_send method for batching transactions. Supporting this method has some complexity because under the hood, the safe-apps-provider stores a fake transaction that includes the recipient address, data, etc. Since the transactions passed to the gs_multi_send method will be encoded and sent to the multisend contract, we need somehow to get the encoded data and the address of the multisend contract.
I see two options to achieve this:
- Replicate the encoding/address retrieval logic from our interfaces in the
safe-apps-provider - Change the
txs.sendreturn type to return the whole safe transaction object
I lean towards 2)
Is this the MultiSend contract that you referred to here, @mmv08?
Is this the MultiSend contract that you referred to here, @mmv08?
Yes and no. When I created the issue, we likely would've used that contract. Today, the contract of choice would be the MultiSendCallOnly contract because it doesn't allow nested delegate calls and is easier to reason about regarding the security of the transaction. The addresses it is deployed to can be found here and the source code is available here
I don't think this issue is relevant given that we support ERC-5792 nowadays
Thanks for the quick answer @mmv08!
Related issue: https://github.com/safe-global/safe-core-sdk/issues/1182
Thanks for the quick answer @mmv08!
Related issue: https://github.com/safe-global/safe-deployments/blob/d72ccc6c4cf11b2085153ca1a4a24dff738ba3ad/src/assets/v1.4.1/multi_send_call_only.json
is the link correct?
Haha no, it wasn't.