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

3.0 testnet migrations #2224

Merged
merged 14 commits into from
Oct 18, 2019
Merged

3.0 testnet migrations #2224

merged 14 commits into from
Oct 18, 2019

Conversation

abandeali1
Copy link
Member

@abandeali1 abandeali1 commented Sep 30, 2019

Description

This PR:

  • Adds a getSelector method to each function in the auto-generated wrappers and regenerates all of the existing wrappers.
  • Adds a new migration script to migrate the testnets from 2.0 to 3.0. This is pretty different than running a migration from scratch (that script did not change).
  • Updates contract-addresses with all of the new testnet addresses.

TODOs (likely in another PR):

  • Update test_contract_configs.ts to verify the new configurations.
  • Update migration.ts to do a fresh 3.0 deployment with proper configurations (this might break other packages).

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 force-pushed the feat/3.0/do-not-authorize-owner branch from c6ee90b to 1212555 Compare September 30, 2019 16:39
@abandeali1 abandeali1 force-pushed the feat/3.0/testnet-migrations branch from bc5aed2 to a37fa1a Compare September 30, 2019 17:03
@abandeali1 abandeali1 marked this pull request as ready for review September 30, 2019 17:06
@abandeali1 abandeali1 requested review from xianny and dekz September 30, 2019 17:08
@coveralls
Copy link

coveralls commented Sep 30, 2019

Coverage Status

Coverage remained the same at 75.286% when pulling caf6329 on feat/3.0/testnet-migrations into 3fd2965 on 3.0.

@@ -6,6 +6,7 @@ export interface ContractAddresses {
zrxToken: string;
etherToken: string;
exchange: string;
exchange_v3: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Convention in TypeScript is to use camelCase instead of under_scores. Maybe we could call this exchangeV3?

Copy link
Member

Choose a reason for hiding this comment

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

Think we should remove this completely. Our packages won't support multiple versions, we don't intend to operate both simultaneously.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, I'd be in favor of removing it.

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 we should leave the old exchange address as exchangeV2. We'll still need it for mainnet deployments, and v2 will probably continue to be live for ~3 months after v3 is deployed.

Copy link
Contributor

@feuGeneA feuGeneA left a comment

Choose a reason for hiding this comment

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

Code under my ownership looks good to me.

@@ -6,6 +6,7 @@ export interface ContractAddresses {
zrxToken: string;
etherToken: string;
exchange: string;
exchange_v3: string;
Copy link
Member

Choose a reason for hiding this comment

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

Think we should remove this completely. Our packages won't support multiple versions, we don't intend to operate both simultaneously.

@@ -31,6 +36,7 @@ const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
const networkToAddresses: { [networkId: number]: ContractAddresses } = {
1: {
exchange: '0x080bf510fcbf18b91105470639e9561022937712',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
exchange: '0x080bf510fcbf18b91105470639e9561022937712',
exchange: NULL_ADDRESS,

Let's break this so no one can actually get hurt if used on mainnet.

@abandeali1 abandeali1 force-pushed the feat/3.0/do-not-authorize-owner branch from 1212555 to aa198ad Compare October 1, 2019 00:42
@abandeali1 abandeali1 force-pushed the feat/3.0/testnet-migrations branch from a37fa1a to ffcd297 Compare October 1, 2019 04:03
@abandeali1 abandeali1 force-pushed the feat/3.0/testnet-migrations branch from 7122906 to ac1063d Compare October 4, 2019 06:04
@abandeali1 abandeali1 changed the base branch from feat/3.0/do-not-authorize-owner to 3.0 October 4, 2019 06:05
@buildsize
Copy link

buildsize bot commented Oct 18, 2019

File name Previous Size New Size Change
init.py 7.04 KB 7.04 KB 0 bytes (0%)
abi_gen_dummy.ts 175.07 KB 184.68 KB 9.61 KB (5%)
lib_dummy.ts 5.23 KB 5.23 KB 0 bytes (0%)
test_lib_dummy.ts 14.17 KB 14.8 KB 647 bytes (4%)

@abandeali1 abandeali1 merged commit d6c064b into 3.0 Oct 18, 2019
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.

5 participants