dapphub / ds-proxy

a proxy object that can compose transactions on owner's behalf
https://dapp.tools/dappsys/ds-proxy.html
GNU General Public License v3.0
311 stars 76 forks source link

failing calls should return revert data #19

Closed rainbreak closed 5 years ago

rainbreak commented 5 years ago

i.e. use revert(0, response) rather than revert(0, 0). Needs a test adding as well.

gbalabasquer commented 5 years ago

I think it should be revert(response, size). Regarding the test, is there a way to check the return value of a failing call with dapp test?

gbalabasquer commented 5 years ago

I guess I can catch it using assembly as well

rainbreak commented 5 years ago

Yeah I think you'll have to construct something with assembly. Also possible this isn't in hevm yet :/

gbalabasquer commented 5 years ago

Change done, test as well. However it is not returning any value with returndatacopy when the tx fails. It is possible is a hevm limitation as you mentioned.

rainbreak commented 5 years ago

Let's resolve this hevm issue before merging #18, just to be safe. I can take a look this week.