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

Change all instances of networkId to chainId #2313

Merged
merged 39 commits into from
Nov 6, 2019

Conversation

feuGeneA
Copy link
Contributor

@feuGeneA feuGeneA commented Nov 4, 2019

Description

Merge base chosen just for ease of review, because this PR builds on top of @0x/contract-addresses changes in that #2284, which is based on that branch.

The test-publish CI check is currently failing because @0x/mesh-rpc-client is out of sync with this PR; specifically, @0x/mesh-rpc-client is importing ContractNetworks from @0x/types, but that interface has been renamed to ContractChains. When @0x/mesh-rpc-client is updated, we can simply re-run that CI job and then see all the pretty ✔️'s in here.

Testing instructions

CI!

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Add new entries to the relevant CHANGELOG.jsons.

These should have been added back when we started generating these
wrappers.
All of the contract artifacts were removed from the Python package
recently, because now they're copied from the monorepo/packages area as
an automated build step.  Somehow this one artifact slipped through the
cracks.
This was preventing the Exchange wrapper from ever importing its
validator!
- Capture stderr (and have it included in stdout) so that it doesn't
leak onto the console for commands that didn't actually fail.

- Include all error output in the Exception object (eliminate print
statement).
Newer versions care about this stuff.  Old versions didn't, and we don't
either.
`bytes.fromhex(bytes.decode('utf-8')` is just plain wrong.  It would
work for some cases, but is not working when trying to fill orders with
the latest Exchange contract.
I swear the previous way was working before, but it wasn't working now,
so this fixes it.
In various places.  This allows the caller to install middleware (which
in web3.py is installed on a Web3 object, not on a provider) before
executing any RPC calls, which is important for the case where one wants
to produce signatures locally before submitting to a remote node.
This allows easier consumption by other languages.  (Specifically, it
eliminates the overhead of keeping the Python addresses package in sync
with the TypeScript one.)
Removed script that existed only to exclude runs of sra_client builds
(parallel_without_sra_client).  Now `parallel` is used by CI,
re-including sra_client in CI checks.
It seems this hadn't been done since the merge with the 3.0 branch.
@feuGeneA feuGeneA requested a review from xianny November 4, 2019 22:44
@feuGeneA feuGeneA self-assigned this Nov 4, 2019
@buildsize
Copy link

buildsize bot commented Nov 4, 2019

File name Previous Size New Size Change
init.py 26.91 KB 26.91 KB 0 bytes (0%)
abi_gen_dummy.ts 184.68 KB [deleted]
lib_dummy.ts 5.23 KB [deleted]
test_lib_dummy.ts 14.8 KB [deleted]
environment.pickle 1.61 MB 1.61 MB -112 bytes (0%)
index.doctree 193.72 KB 193.52 KB -204 bytes (0%)
.buildinfo 230 bytes 230 bytes 0 bytes (0%)
genindex.html 5.6 KB 5.6 KB 0 bytes (0%)
index.html 2.52 KB 2.52 KB 0 bytes (0%)
objects.inv 375 bytes 375 bytes 0 bytes (0%)
py-modindex.html 3.07 KB 3.07 KB 0 bytes (0%)
search.html 2.84 KB 2.84 KB 0 bytes (0%)
searchindex.js 6.02 KB 6.02 KB -6 bytes (0%)
index.rst.txt 415 bytes 415 bytes 0 bytes (0%)
alabaster.css 10.92 KB 10.92 KB 0 bytes (0%)
basic.css 11.89 KB 11.89 KB 0 bytes (0%)
custom.css 42 bytes 42 bytes 0 bytes (0%)
doctools.js 9.05 KB 9.05 KB 0 bytes (0%)
documentation_options.js 303 bytes 303 bytes 0 bytes (0%)
file.png 286 bytes 286 bytes 0 bytes (0%)
jquery-[version].js 273.79 KB 273.79 KB 0 bytes (0%)
jquery.js 86.08 KB 86.08 KB 0 bytes (0%)
language_data.js 10.59 KB 10.59 KB 0 bytes (0%)
minus.png 90 bytes 90 bytes 0 bytes (0%)
plus.png 90 bytes 90 bytes 0 bytes (0%)
pygments.css 4.69 KB 4.69 KB 0 bytes (0%)
searchtools.js 15.61 KB 15.61 KB 0 bytes (0%)
underscore-[version].js 34.34 KB 34.34 KB 0 bytes (0%)
underscore.js 11.86 KB 11.86 KB 0 bytes (0%)
contract_addresses.html 16.86 KB 16.8 KB -58 bytes (0%)
contract_artifacts.html 8.24 KB 8.24 KB 0 bytes (0%)
json_schemas.html 12.56 KB 12.55 KB -12 bytes (0%)
order_utils.html 46.86 KB 46.85 KB -6 bytes (0%)
erc20_token.html 93.31 KB 93.31 KB 0 bytes (0%)
exchange.html 678.51 KB 678.51 KB 0 bytes (0%)
tx_params.html 9.41 KB 9.41 KB 0 bytes (0%)
local_message_signer.html 15.07 KB 15.07 KB 0 bytes (0%)
asset_data_utils.html 22.65 KB 22.65 KB 0 bytes (0%)
default_api.html 118.3 KB 118.19 KB -112 bytes (0%)
asset_proxy_owner.html 350.44 KB 350.44 KB 0 bytes (0%)
coordinator.html 133.77 KB 133.77 KB 0 bytes (0%)
coordinator_registry.html 39.72 KB 39.72 KB 0 bytes (0%)
dutch_auction.html 59.6 KB 59.6 KB 0 bytes (0%)
erc20_proxy.html 111 KB 111 KB 0 bytes (0%)
erc721_proxy.html 111.12 KB 111.12 KB 0 bytes (0%)
erc721_token.html 148.29 KB 148.29 KB 0 bytes (0%)
eth_balance_checker.html 24.65 KB 24.65 KB 0 bytes (0%)
forwarder.html 110.46 KB 110.46 KB 0 bytes (0%)
i_asset_proxy.html 39.32 KB 39.32 KB 0 bytes (0%)
i_validator.html 30.37 KB 30.37 KB 0 bytes (0%)
i_wallet.html 27.63 KB 27.63 KB 0 bytes (0%)
multi_asset_proxy.html 148.59 KB 148.59 KB 0 bytes (0%)
order_validator.html 120.52 KB 120.52 KB 0 bytes (0%)
weth9.html 133.98 KB 133.98 KB 0 bytes (0%)
zrx_token.html 111.93 KB 111.93 KB 0 bytes (0%)
dev_utils.html 525.67 KB 525.67 KB 0 bytes (0%)
types.html 8.68 KB 8.68 KB 0 bytes (0%)
erc1155_mintable.html 288.23 KB 288.23 KB 0 bytes (0%)
erc1155_proxy.html 129.7 KB 129.7 KB 0 bytes (0%)
static_call_proxy.html 39.44 KB 39.44 KB 0 bytes (0%)

@feuGeneA feuGeneA marked this pull request as ready for review November 4, 2019 23:00
@coveralls
Copy link

coveralls commented Nov 4, 2019

Coverage Status

Coverage remained the same at 75.286% when pulling d9a409c on chain-id-not-network-id into e61f23d on development.

Copy link
Contributor

@albrow albrow left a comment

Choose a reason for hiding this comment

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

Changes to the contract-addresses package look good to me. Can you please add an entry to the CHANGELOG? I think you need to do this for a few other packages as well.

@feuGeneA feuGeneA mentioned this pull request Nov 4, 2019
10 tasks
};
const urlWithQuery = `${url}?assetDataA=${assetData}&networkdId=42&page=3&perPage=50`;
const urlWithQuery = `${url}?assetDataA=${assetData}&chainId=42&page=3&perPage=50`;
Copy link
Contributor

Choose a reason for hiding this comment

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

@dekz can you change the 0x API SRA endpoint to use chainId instead of networkId? We also need to update to SRA V3 spec with this change.

@@ -138,15 +139,16 @@ describe.skip('CoordinatorWrapper', () => {
},
},
NETWORK_ID_TO_CONTRACT_ADDRESSES: {
[config.networkId]: contractAddresses,
// TODO: change to CHAIN_ID_TO_CONTRACT_ADDRESSES when @0x/coordinator-server is ready
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you open up an issue for this so we can track it?

Copy link
Member

Choose a reason for hiding this comment

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

@hysz would be good to get this on your radar

@feuGeneA feuGeneA requested a review from albrow November 6, 2019 00:15
@feuGeneA feuGeneA changed the base branch from feat/3.0/python to development November 6, 2019 04:05
@feuGeneA feuGeneA force-pushed the chain-id-not-network-id branch from 72c7ce5 to f92faaf Compare November 6, 2019 05:05
@feuGeneA feuGeneA force-pushed the chain-id-not-network-id branch from f92faaf to d9a409c Compare November 6, 2019 05:40
@feuGeneA feuGeneA merged commit f51c80a into development Nov 6, 2019
dorothy-zbornak pushed a commit that referenced this pull request Feb 27, 2020
* abi-gen/test: recompile contract fixtures for 3.0

It seems this hadn't been done since the merge with the 3.0 branch.

* Sync `monorepo$ yarn test` exclusions to CI config

* sra-spec: correct typo

* contract-wrappers: TODO after coord.-server update

* utils: fix typo in comment

* Refactor networkId to chainId everywhere

* Update CHANGELOGs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants