-
Notifications
You must be signed in to change notification settings - Fork 465
Change all instances of networkId
to chainId
#2313
Conversation
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.
|
There was a problem hiding this 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.
}; | ||
const urlWithQuery = `${url}?assetDataA=${assetData}&networkdId=42&page=3&perPage=50`; | ||
const urlWithQuery = `${url}?assetDataA=${assetData}&chainId=42&page=3&perPage=50`; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Thanks to @steveklebanoff for catching this. #2284 (review)
72c7ce5
to
f92faaf
Compare
f92faaf
to
d9a409c
Compare
* 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
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 importingContractNetworks
from@0x/types
, but that interface has been renamed toContractChains
. 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
Checklist: