Merge pull request #1298 from 0xProject/fix/artifact-type-error
Fix Artifact Interface Type Issue
This commit is contained in:
commit
a8803431b3
@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "1.1.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note":
|
||||||
|
"`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface",
|
||||||
|
"pr": 1298
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1542208198,
|
"timestamp": 1542208198,
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^1.0.16",
|
"@0x/abi-gen": "^1.0.16",
|
||||||
"@0x/tslint-config": "^1.0.10",
|
"@0x/tslint-config": "^1.0.10",
|
||||||
|
"@0x/types": "^1.2.1",
|
||||||
"@0x/utils": "^2.0.5",
|
"@0x/utils": "^2.0.5",
|
||||||
"@0x/web3-wrapper": "^3.1.4",
|
"@0x/web3-wrapper": "^3.1.4",
|
||||||
"ethereum-types": "^1.1.2",
|
"ethereum-types": "^1.1.2",
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -1800,7 +1801,7 @@ export class AssetProxyOwnerContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
_owners: string[],
|
_owners: string[],
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -968,7 +969,7 @@ export class DummyERC20TokenContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
_name: string,
|
_name: string,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -1264,7 +1265,7 @@ export class DummyERC721TokenContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
_name: string,
|
_name: string,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -601,7 +602,7 @@ export class ERC20ProxyContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<ERC20ProxyContract> {
|
): Promise<ERC20ProxyContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -508,7 +509,7 @@ export class ERC20TokenContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<ERC20TokenContract> {
|
): Promise<ERC20TokenContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -601,7 +602,7 @@ export class ERC721ProxyContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<ERC721ProxyContract> {
|
): Promise<ERC721ProxyContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -845,7 +846,7 @@ export class ERC721TokenContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<ERC721TokenContract> {
|
): Promise<ERC721TokenContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -3024,7 +3025,7 @@ export class ExchangeContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<ExchangeContract> {
|
): Promise<ExchangeContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -661,7 +662,7 @@ export class ForwarderContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
_exchange: string,
|
_exchange: string,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -60,7 +61,7 @@ export class IValidatorContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<IValidatorContract> {
|
): Promise<IValidatorContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -55,7 +56,7 @@ export class IWalletContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<IWalletContract> {
|
): Promise<IWalletContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -295,7 +296,7 @@ export class OrderValidatorContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
_exchange: string,
|
_exchange: string,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -787,7 +788,7 @@ export class WETH9Contract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<WETH9Contract> {
|
): Promise<WETH9Contract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -598,7 +599,7 @@ export class ZRXTokenContract extends BaseContract {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
): Promise<ZRXTokenContract> {
|
): Promise<ZRXTokenContract> {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
import { BaseContract } from '@0x/base-contract';
|
import { BaseContract } from '@0x/base-contract';
|
||||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
|
||||||
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
import { BigNumber, classUtils, logUtils } from '@0x/utils';
|
||||||
|
import { SimpleContractArtifact } from '@0x/types';
|
||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import * as ethers from 'ethers';
|
import * as ethers from 'ethers';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
@ -40,7 +41,7 @@ export class {{contractName}}Contract extends BaseContract {
|
|||||||
{{/this.constant}}
|
{{/this.constant}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
public static async deployFrom0xArtifactAsync(
|
public static async deployFrom0xArtifactAsync(
|
||||||
artifact: ContractArtifact,
|
artifact: ContractArtifact | SimpleContractArtifact,
|
||||||
provider: Provider,
|
provider: Provider,
|
||||||
txDefaults: Partial<TxData>,
|
txDefaults: Partial<TxData>,
|
||||||
{{> typed_params inputs=ctor.inputs}}
|
{{> typed_params inputs=ctor.inputs}}
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "1.3.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note":
|
||||||
|
"Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package",
|
||||||
|
"pr": 1298
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// tslint:disable:max-file-line-count
|
// tslint:disable:max-file-line-count
|
||||||
|
|
||||||
import { BigNumber } from 'bignumber.js';
|
import { BigNumber } from 'bignumber.js';
|
||||||
import { ContractAbi } from 'ethereum-types';
|
import { ContractAbi, ContractNetworks, DevdocOutput } from 'ethereum-types';
|
||||||
|
|
||||||
// HACK: Rather then extending from OrderWithoutExchangeAddress
|
// HACK: Rather then extending from OrderWithoutExchangeAddress
|
||||||
// we don't, because our docs don't expand inherited types, and it's unnecessarily
|
// we don't, because our docs don't expand inherited types, and it's unnecessarily
|
||||||
@ -626,3 +626,24 @@ export interface EIP712TypedData {
|
|||||||
export interface Stats {
|
export interface Stats {
|
||||||
orderCount: number;
|
orderCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SimpleContractArtifact {
|
||||||
|
schemaVersion: string;
|
||||||
|
contractName: string;
|
||||||
|
compilerOutput: SimpleStandardContractOutput;
|
||||||
|
networks: ContractNetworks;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SimpleStandardContractOutput {
|
||||||
|
abi: ContractAbi;
|
||||||
|
evm: SimpleEvmOutput;
|
||||||
|
devdoc?: DevdocOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SimpleEvmOutput {
|
||||||
|
bytecode: SimpleEvmBytecodeOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SimpleEvmBytecodeOutput {
|
||||||
|
object: string;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user