Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Revert with reason #3364
Part of issue #1686
Depends on #3373
I went with encoding the reason string as a function call to
Still to do:
The reason we might not want to forward the reason string is that it allows a called attacker to consume more gas in the caller (because the caller needs to copy the return data), but I think this is an acceptable "risk" given the benefit that the error string shows up in the transaction receipt.
Is the string returned regularly, right? In terms of forwarding the return data, would this work https://github.com/aragon/aragon-core/blob/dev/contracts/common/DelegateProxy.sol#L9
I think prefixing a specific 4-byte sequence allows us to extend the encoding later, while at the same time it does not reduce usability since it is fixed for now. Also, it is better than just prefixing a certain number of zeros, since it already suggests away how to extend it to encode different types.
I would opt to merge it :)
axic left a comment
Needs test cases for built in revert bubbling: