Skip to content

Ensure that proxies bubble up error messages #102

Description

@spalladino

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:researchResearch on a topic before implementing ittopic:upgradeabilityUpgreadeability for both kernel and user contracts

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions