Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gitpusha opened this issue Aug 4, 2020 · 0 comments · Fixed by #286
Closed

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

gitpusha opened this issue Aug 4, 2020 · 0 comments · Fixed by #286

Comments

@gitpusha
Copy link

gitpusha commented Aug 4, 2020

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).

@rmeissner rmeissner transferred this issue from 5afe/contract-proxy-kit Aug 4, 2020
@rmeissner rmeissner changed the title MultiSend needs payable modifier to work with value MultiSend cannot be used if msg.value != 0 Aug 4, 2020
@rmeissner rmeissner added this to the contracts-safe-1.3.0 milestone Mar 19, 2021
Saw-mon-and-Natalie pushed a commit to Saw-mon-and-Natalie/safe-contracts that referenced this issue Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants