safe-global / safe-core-sdk

The Safe{Core} SDK allows builders to add account abstraction functionality into their apps.

Home Page:https://docs.safe.global/sdk/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multisend for calls only should not allow ˋDELEGATECALLˋ operation

clemsos opened this issue · comments

Description

When creating a multicall transaction with only calls, the operation should not return a ˋDELEGATECALL` operation, as the multisend function of the MultiSendCallOnly contract does not allow it.

https://github.com/safe-global/safe-smart-account/blob/main/contracts/libraries/MultiSendCallOnly.sol#L55

When onlyCalls flag is set in createTransaction, the operation for the calls should always be 0.

Environment

  • Safe Core SDK version:
  • Safe contract version:
  • Environment:
    • non-browser: hardhat

Steps to reproduce

  • Parse a set of calls to a proxy using ˋsafe.createTransactionˋ with ˋonlyCallsˋ flag set to true
  • Execute the tx in a safe

The tx will revert as the 1 operation is not allowed

Expected result

Multisend should execute all txs properly.

Additional context

Tested a with passing operation CALL to all packed txs and it worked, while using ˋoperation: 1ˋ fails.