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

Update 3.0 testnet migrations and addresses #2296

Merged
merged 5 commits into from
Oct 29, 2019

Conversation

abandeali1
Copy link
Member

@abandeali1 abandeali1 commented Oct 28, 2019

Description

  • Productionizes the migration script a bit more in preparation for mainnet deployment
  • Updates contract-addresses with new testnet addresses and a new schema

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.

@abandeali1 abandeali1 marked this pull request as ready for review October 28, 2019 01:47
@abandeali1 abandeali1 requested a review from albrow as a code owner October 28, 2019 01:47
@abandeali1 abandeali1 requested a review from dekz October 28, 2019 01:48
@abandeali1 abandeali1 requested a review from jalextowle October 28, 2019 01:48
@coveralls
Copy link

coveralls commented Oct 28, 2019

Coverage Status

Coverage remained the same at 75.286% when pulling 77fa97f on feat/3.0/testnet-migrations-2 into 011ecb8 on development.

Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

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

This looks good overall, but I have some nits and questions. I'm going to go ahead and approve though so that you aren't blocked

@@ -42,7 +44,8 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = {
orderValidator: NULL_ADDRESS,
zrxToken: '0xe41d2489571d322189246dafa5ebde1f4699f498',
etherToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
assetProxyOwner: NULL_ADDRESS,
assetProxyOwner: '0xdffe798c7172dd6deb32baee68af322e8f495ce0',
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Will this be removed after the full migration?

Copy link
Member Author

@abandeali1 abandeali1 Oct 28, 2019

Choose a reason for hiding this comment

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

Yep, this is still needed for the mainnet migrations. We can remove it completely afterwords.

exchange: '0x725bc2f8c85ed0289d3da79cde3125d33fc1d7e6',
assetProxyOwner: '0xdcf20f7b447d51f2b3e5499b7f6cbbf7295a5d26',
exchange: '0xc56388332ddfc98701fefed94535100c6166956c',
assetProxyOwner: NULL_ADDRESS,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

},
3: {
erc20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa',
erc721Proxy: '0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4',
zrxToken: '0xff67881f8d12f372d91baae9752eb3631ff0ed00',
etherToken: '0xc778417e063141139fce010982780140aa0cd5ab',
exchangeV2: '0xbff9493f92a3df4b0429b6d00743b3cfb4c85831',
exchange: '0x725bc2f8c85ed0289d3da79cde3125d33fc1d7e6',
assetProxyOwner: '0xdcf20f7b447d51f2b3e5499b7f6cbbf7295a5d26',
exchange: '0xc56388332ddfc98701fefed94535100c6166956c',
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think that noting that this exchange is version 3 of the protocol is worth a comment. It might be a bit confusing to the uninitiated that this exchange is really exchangeV3 rather than exchangeV1.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the plan was to remove exchangeV2 after mainnet migrations, but we still need it until then.

@@ -284,6 +284,8 @@ export async function runMigrationsAsync(
exchange: exchange.address,
// TODO (xianny): figure out how to deploy AssetProxyOwnerContract
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can this be removed, or are we still waiting for the migration to be updated for the ZeroExGovernor?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably. This file actually doesn't look very up to date. I haven't been modifying it except to get it to build.

logUtils.log('Configuring ZrxVault...');
await zrxVault.addAuthorizedAddress.awaitTransactionSuccessAsync(governor.address);
await zrxVault.transferOwnership.awaitTransactionSuccessAsync(governor.address);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think we'll still want to add the governor as an authorized address. A bunch of functions including setStakingProxy and enterCatastrophicFailureMode are onlyAuthorized.

Is there a reason why it shouldn't be authorized?

Copy link
Member Author

Choose a reason for hiding this comment

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

These were moved inside the ZeroExGovernor functionCalls array to keep all of the configurations in one place. Doesn't really matter which we end up doing

logUtils.log('ZrxVault configured!');

logUtils.log('Configuring StakingProxy...');
await stakingProxy.addAuthorizedAddress.awaitTransactionSuccessAsync(governor.address);
await stakingProxy.transferOwnership.awaitTransactionSuccessAsync(governor.address);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

feuGeneA added a commit that referenced this pull request Oct 28, 2019
@abandeali1 abandeali1 changed the base branch from feat/staking/remove-read-only-mode to 3.0 October 28, 2019 23:06
@moodlezoup moodlezoup changed the base branch from 3.0 to development October 28, 2019 23:58
feuGeneA added a commit that referenced this pull request Oct 29, 2019
@abandeali1 abandeali1 force-pushed the feat/3.0/testnet-migrations-2 branch from af26093 to ae54b98 Compare October 29, 2019 00:40
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.

3 participants