Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

ZeroEx: Merge Migrate and Ownable Features #2564

Conversation

dorothy-zbornak
Copy link
Contributor

Description

This merges the Migrate and Ownable features in ZeroEx into just Ownable.

The rationale is that Migrate was reaching into Ownable's storage, which meant they were tightly coupled, so they might as well be one feature.

  • I also removed Migrate's getMigrationOwner() function because the original owner can just be encoded in the calldata during a migration.
  • migrate() now accepts a third parameter: the new owner. Previously a migrate() call could not also set a new owner because it would restore the original before returning. Now it sets it to newOwner before returning.

Maintenance

I also snuck in a fix to some asset-swapper tests I wrote a while back that are infrequently failing on CI.

Testing instructions

Types of changes

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

@dorothy-zbornak dorothy-zbornak force-pushed the feat/contracts-zero-ex/consolidate-bootstrap-features branch from 10164d1 to 6a91244 Compare April 23, 2020 16:39
@dorothy-zbornak dorothy-zbornak marked this pull request as ready for review April 23, 2020 16:40
Comment on lines +51 to +53
constructor() public {
_implementation = address(this);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also switched to this pattern instead of explicitly passing in impl in bootstrap(). This is the pattern we will also follow for migrate().

@coveralls
Copy link

coveralls commented Apr 23, 2020

Coverage Status

Coverage decreased (-0.2%) to 79.487% when pulling 712958d on feat/contracts-zero-ex/consolidate-bootstrap-features into 6063854 on development.

Copy link
Contributor

@hysz hysz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Contributor

@moodlezoup moodlezoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¸¸.•¨•♫♪¸¸.•¨ simple is best •♫♪¸¸.•¨•♫♪¸¸

@dorothy-zbornak dorothy-zbornak force-pushed the feat/contracts-zero-ex/consolidate-bootstrap-features branch from 6a91244 to 712958d Compare April 24, 2020 05:07
@dorothy-zbornak dorothy-zbornak merged commit 501070b into development Apr 24, 2020
@dorothy-zbornak dorothy-zbornak deleted the feat/contracts-zero-ex/consolidate-bootstrap-features branch April 24, 2020 05:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants