Forwarding: update forwarding interface names, add tests#590
Merged
sohkai merged 1 commit intoextend_forwarder_interfacefrom Jul 2, 2020
Merged
Conversation
facuspagnuolo
added a commit
that referenced
this pull request
Jul 2, 2020
* forwarder: move to separate dir and make fns external * forwarder: provide payable interface * forwarder: provide forwarder interface with extra data * forwarder: remove unused import * forwarder: improve forwarders hierarchy * Forwarding: update forwarding interface names, add tests (#590) * tests: remove wrong (and unused) test import Co-authored-by: Brett Sun <qisheng.brett.sun@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This admittedly does a couple of refactors / changes to the Forwarding interfaces from #583:
IForwarderinterface to beIAbstractInterface, so we can reserveIForwarderas the "normal" (most basic and most commonly used) forwarding typeIForwarderFeeinterface to the payable interfacesforwardFee()method returningEtherTokenConstantisForwarder()interface for backwards compatibility with aragonOS 4May be easiest to review by just looking at the branch's code.
This is somewhat debatable, but I wanted to keep this because:
isForwarder(), and in the majority of the case (e.g.IForwarder), this will continue to just work without any additional checksisForwarder()andforwarderType()checks, and ifisForwarder()is true butforwarderType()returns 0, know they're dealing with an older aragonOS 4 contract (which only has one forwarding interface).