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

Commit

Permalink
Change all instances of networkId to chainId (#2313)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
feuGeneA authored Nov 6, 2019
1 parent e61f23d commit f51c80a
Show file tree
Hide file tree
Showing 100 changed files with 2,938 additions and 2,810 deletions.
10 changes: 9 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ jobs:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0x/contracts-multisig @0x/contracts-utils @0x/contracts-exchange-libs @0x/contracts-erc20 @0x/contracts-erc721 @0x/contracts-erc1155 @0x/contracts-asset-proxy @0x/contracts-exchange-forwarder @0x/contracts-tests @0x/contracts-staking @0x/contracts-coordinator
# TODO(dorothy-zbornak): Re-enable after updating this package for 3.0.
# TODO(dorothy-zbornak): Re-enable after updating this package for
# 3.0. At that time, also remove exclusion from monorepo
# package.json's test script.
# - run: yarn wsrun test:circleci @0x/contracts-extensions
test-publish:
resource_class: medium+
Expand Down Expand Up @@ -116,6 +118,9 @@ jobs:
- run: yarn wsrun test:circleci @0x/abi-gen
# TODO (xianny): Needs to be updated for 3.0
# - run: yarn wsrun test:circleci @0x/asset-buyer
# TODO: Needs to be updated for 3.0. At that time, also remove
# exclusion from monorepo package.json's test script.
# - run: yarn wsrun test:circleci @0x/asset-swapper
- run: yarn wsrun test:circleci @0x/contract-artifacts
- run: yarn wsrun test:circleci @0x/assert
- run: yarn wsrun test:circleci @0x/base-contract
Expand All @@ -125,6 +130,9 @@ jobs:
- run: yarn wsrun test:circleci @0x/dev-utils
- run: yarn wsrun test:circleci @0x/json-schemas
- run: yarn wsrun test:circleci @0x/order-utils
# TODO: Needs to be updated for 3.0. At that time, also remove
# exclusion from monorepo package.json's test script.
# - run: yarn wsrun test:circleci @0x/orderbook
- run: yarn wsrun test:circleci @0x/sol-compiler
- run: yarn wsrun test:circleci @0x/sol-tracing-utils
- run: yarn wsrun test:circleci @0x/sol-doc
Expand Down
1 change: 0 additions & 1 deletion contracts/test-utils/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const MAX_UINT256 = new BigNumber(2).pow(256).minus(1);
export const constants = {
BASE_16: 16,
INVALID_OPCODE: 'invalid opcode',
TESTRPC_NETWORK_ID: 50,
TESTRPC_CHAIN_ID: 1337,
// Note(albrow): In practice V8 and most other engines limit the minimum
// interval for setInterval to 10ms. We still set it to 0 here in order to
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"contracts:watch": "wsrun watch $PKG --parallel --exclude-missing",
"remove_node_modules": "lerna clean --yes; rm -rf node_modules",
"rebuild": "run-s clean build",
"test": "wsrun test $PKG --fast-exit --serial --exclude-missing",
"test": "wsrun test $PKG --fast-exit --serial --exclude-missing --exclude @0x/asset-swapper --exclude @0x/orderbook --exclude @0x/contracts-extensions",
"test:contracts": "wsrun test -p ${npm_package_config_contractsPackages} -c --fast-exit --serial --exclude-missing",
"generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate.js",
"upload_md_docs": "aws s3 rm --recursive s3://docs-markdown; wsrun s3:sync_md_docs --exclude-missing",
Expand Down
9 changes: 9 additions & 0 deletions packages/0x.js/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "8.0.0-beta.0",
"changes": [
{
"note": "Exported intefaces changed: from getContractAddressesForNetworkOrThrow to getContractAddressesForChainOrThrow, from NetworkId to ChainId, from ContractNetworks to ContractChains, and from ContractNetworkData to ContractChainData.",
"pr": 2313
}
]
},
{
"version": "7.1.0-beta.0",
"changes": [
Expand Down
6 changes: 3 additions & 3 deletions packages/0x.js/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { getContractAddressesForNetworkOrThrow, NetworkId, ContractAddresses } from '@0x/contract-addresses';
export { getContractAddressesForChainOrThrow, ChainId, ContractAddresses } from '@0x/contract-addresses';

export {
assetDataUtils,
Expand Down Expand Up @@ -124,11 +124,11 @@ export {
BlockParam,
CompilerOpts,
StandardContractOutput,
ContractNetworks,
ContractChains,
TxDataPayable,
BlockParamLiteral,
CompilerSettings,
ContractNetworkData,
ContractChainData,
DevdocOutput,
EvmOutput,
CompilerSettingsMetadata,
Expand Down
4 changes: 4 additions & 0 deletions packages/abi-gen/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
{
"note": "In Python wrappers, fix bug with casting some bytes objects using bytes.fromhex()",
"pr": 2284
},
{
"note": "Command-line argument network-id has changed to chain-id",
"pr": 2313
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions packages/abi-gen/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { utils } from './utils';
const ABI_TYPE_CONSTRUCTOR = 'constructor';
const ABI_TYPE_METHOD = 'function';
const ABI_TYPE_EVENT = 'event';
const DEFAULT_NETWORK_ID = 50;
const DEFAULT_CHAIN_ID = 1337;
const DEFAULT_BACKEND = 'web3';

const args = yargs
Expand Down Expand Up @@ -65,10 +65,10 @@ const args = yargs
choices: [ContractsBackend.Web3, ContractsBackend.Ethers],
default: DEFAULT_BACKEND,
})
.option('network-id', {
describe: 'ID of the network where contract ABIs are nested in artifacts',
.option('chain-id', {
describe: 'ID of the chain where contract ABIs are nested in artifacts',
type: 'number',
default: DEFAULT_NETWORK_ID,
default: DEFAULT_CHAIN_ID,
})
.option('language', {
describe: 'Language of output file to generate',
Expand Down
Loading

0 comments on commit f51c80a

Please sign in to comment.