Cleanup migrations and contracts package. Make contracts private again.
This commit is contained in:
parent
141121004c
commit
17c6661e2d
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@0xproject/contracts",
|
"private": true,
|
||||||
"version": "2.1.48",
|
"name": "contracts",
|
||||||
|
"version": "2.1.49",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export * from './artifacts';
|
|
||||||
import * as wrappers from './wrappers';
|
|
||||||
export { wrappers };
|
|
@ -31,8 +31,9 @@
|
|||||||
"yargs": "^10.0.3"
|
"yargs": "^10.0.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/contracts": "^2.1.48",
|
"@0xproject/abi-gen-wrappers": "^1.0.0",
|
||||||
"@0xproject/base-contract": "^3.0.1",
|
"@0xproject/base-contract": "^3.0.1",
|
||||||
|
"@0xproject/contract-artifacts": "^1.0.0",
|
||||||
"@0xproject/order-utils": "^1.0.7",
|
"@0xproject/order-utils": "^1.0.7",
|
||||||
"@0xproject/sol-compiler": "^1.1.7",
|
"@0xproject/sol-compiler": "^1.1.7",
|
||||||
"@0xproject/subproviders": "^2.0.7",
|
"@0xproject/subproviders": "^2.0.7",
|
||||||
|
6
packages/migrations/src/globals.d.ts
vendored
6
packages/migrations/src/globals.d.ts
vendored
@ -1,6 +0,0 @@
|
|||||||
declare module '*.json' {
|
|
||||||
const json: any;
|
|
||||||
/* tslint:disable */
|
|
||||||
export default json;
|
|
||||||
/* tslint:enable */
|
|
||||||
}
|
|
@ -1,4 +1,5 @@
|
|||||||
import { artifacts, wrappers } from '@0xproject/contracts';
|
import * as wrappers from '@0xproject/abi-gen-wrappers';
|
||||||
|
import * as artifacts from '@0xproject/contract-artifacts';
|
||||||
import { assetDataUtils } from '@0xproject/order-utils';
|
import { assetDataUtils } from '@0xproject/order-utils';
|
||||||
import { ContractAddresses } from '@0xproject/types';
|
import { ContractAddresses } from '@0xproject/types';
|
||||||
import { BigNumber } from '@0xproject/utils';
|
import { BigNumber } from '@0xproject/utils';
|
||||||
@ -29,7 +30,7 @@ let _cachedContractAddresses: ContractAddresses | undefined;
|
|||||||
* @param provider Web3 provider instance.
|
* @param provider Web3 provider instance.
|
||||||
* @param txDefaults Default transaction values to use when deploying contracts.
|
* @param txDefaults Default transaction values to use when deploying contracts.
|
||||||
*/
|
*/
|
||||||
export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<MigrationsResult> {
|
export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<void> {
|
||||||
const web3Wrapper = new Web3Wrapper(provider);
|
const web3Wrapper = new Web3Wrapper(provider);
|
||||||
|
|
||||||
// Proxies
|
// Proxies
|
||||||
@ -60,7 +61,6 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial
|
|||||||
artifacts.Exchange,
|
artifacts.Exchange,
|
||||||
provider,
|
provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
zrxAssetData,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Multisigs
|
// Multisigs
|
||||||
@ -165,9 +165,13 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial
|
|||||||
orderValidator,
|
orderValidator,
|
||||||
};
|
};
|
||||||
_cachedMigrationsResult = migrationsResult;
|
_cachedMigrationsResult = migrationsResult;
|
||||||
return migrationsResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the addresses of all contracts that were deployed during migrations.
|
||||||
|
* Throws if migrations have not been run yet.
|
||||||
|
* @returns Addresses of all contracts that were deployed.
|
||||||
|
*/
|
||||||
export function getContractAddresses(): ContractAddresses {
|
export function getContractAddresses(): ContractAddresses {
|
||||||
if (!_.isUndefined(_cachedContractAddresses)) {
|
if (!_.isUndefined(_cachedContractAddresses)) {
|
||||||
return _cachedContractAddresses;
|
return _cachedContractAddresses;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user