Solidity 0.4.22 introduced support for error reasons on revert EVM operations, check that proxies correctlly forward the error reason to their clients.
As an example, let's assume we have a logic contract named Reverter:
contract Reverter {
function willRevert() public {
require(false, "This is an error message from the contract");
}
}
If you deploy this contract and attempt to call willRevert, you get the following message. Note that the message includes the revert reason This is an error message from the contract.
transact to Reverter.willRevert errored: VM error: revert.
revert The transaction has been reverted to the initial state.
Reason provided by the contract: "This is an error message from the contract".
Debug the transaction to get more information.
Now, if you create a Proxy for Reverter via ZeppelinOS, and attempt to call willRevert on the proxy, the returned error message must include the This is an error message from the contract legend. Add a test in zos-lib to ensure it works like this, and make any necessary changes in Proxy if needed.
Depends on zeppelinos/zos-lib#162
Solidity 0.4.22 introduced support for error reasons on revert EVM operations, check that proxies correctlly forward the error reason to their clients.
As an example, let's assume we have a logic contract named
Reverter:If you deploy this contract and attempt to call
willRevert, you get the following message. Note that the message includes the revert reasonThis is an error message from the contract.Now, if you create a Proxy for
Revertervia ZeppelinOS, and attempt to callwillReverton the proxy, the returned error message must include theThis is an error message from the contractlegend. Add a test in zos-lib to ensure it works like this, and make any necessary changes in Proxy if needed.Depends on zeppelinos/zos-lib#162