safe-core-sdk icon indicating copy to clipboard operation
safe-core-sdk copied to clipboard

Multisend for calls only should not allow ˋDELEGATECALLˋ operation

Open clemsos opened this issue 2 months ago • 0 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.

clemsos avatar May 03 '24 09:05 clemsos