Skip to content

MultiSend cannot be used if msg.value != 0 #227

@gitpusha

Description

@gitpusha

How to reproduce

I tried to use CPK 1.1.1 with the following custom config on Rinkeby:

  4: {
    masterCopyAddress: '0x6851D6fDFAfD08c0295C392436245E5bc78B0185',
    proxyFactoryAddress: '0x1f4Ab3778e3FeB06A3D4702B31CE56a561080986',
    multiSendAddress: '0xB522a9f781924eD250A11C54105E51840B138AdD',
    fallbackHandlerAddress: '0x40A930851BD2e590Bd5A5C981b436de25742E980',
  },

I wanted to make use of the new payable execTransaction method.

However my TX failed in MultiSend:
https://dashboard.tenderly.co/tx/rinkeby/0xdd3f43df77e3c190faf1ab333d27fe4ac778e705ae09eaa4385ae22353cef322/debugger

Then I deployed a payable MultiSend. multiSend contract to Rinkeby:
https://rinkeby.etherscan.io/address/0x636D3336B120498CC3B596FF30B20e87d813953f#code

Then my TX that uses ETHER msg.value worked:
https://rinkeby.etherscan.io/tx/0x08f1271ffb68efbdfdb0a0856910ca662a6c9e6070638dfdda9dbf767a2dafa3

Why it happens

This happens because Solidity creates a check that msg.value == 0 if the payable modifiere is not present (https://github.com/gnosis/safe-contracts/blob/development/contracts/libraries/MultiSend.sol#L27).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions