From 4b64d8c3aad3e1fa3d807941e70f2901941c2501 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Nov 2018 23:06:46 +0000 Subject: Allow a `SimpleContractArtifact` to be passed into `deployFrom0xArtifactAsync` --- packages/types/src/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'packages/types') diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 3c9b6bbc5..fd40f361a 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,7 +1,7 @@ // tslint:disable:max-file-line-count import { BigNumber } from 'bignumber.js'; -import { ContractAbi } from 'ethereum-types'; +import { ContractAbi, ContractNetworks, StandardContractOutput } from 'ethereum-types'; // HACK: Rather then extending from OrderWithoutExchangeAddress // we don't, because our docs don't expand inherited types, and it's unnecessarily @@ -626,3 +626,10 @@ export interface EIP712TypedData { export interface Stats { orderCount: number; } + +export interface SimpleContractArtifact { + schemaVersion: string; + contractName: string; + compilerOutput: StandardContractOutput; + networks: ContractNetworks; +} -- cgit v1.2.3 From 895281989c4c896d4494e829ae3a2403305016b6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Nov 2018 23:43:05 +0000 Subject: Fix `SimpleContractArtifact` type --- packages/types/src/index.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'packages/types') diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index fd40f361a..9372bfafa 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,7 +1,7 @@ // tslint:disable:max-file-line-count import { BigNumber } from 'bignumber.js'; -import { ContractAbi, ContractNetworks, StandardContractOutput } from 'ethereum-types'; +import { ContractAbi, ContractNetworks, DevdocOutput } from 'ethereum-types'; // HACK: Rather then extending from OrderWithoutExchangeAddress // we don't, because our docs don't expand inherited types, and it's unnecessarily @@ -630,6 +630,20 @@ export interface Stats { export interface SimpleContractArtifact { schemaVersion: string; contractName: string; - compilerOutput: StandardContractOutput; + compilerOutput: SimpleStandardContractOutput; networks: ContractNetworks; } + +export interface SimpleStandardContractOutput { + abi: ContractAbi; + evm: SimpleEvmOutput; + devdoc?: DevdocOutput; +} + +export interface SimpleEvmOutput { + bytecode: SimpleEvmBytecodeOutput; +} + +export interface SimpleEvmBytecodeOutput { + object: string; +} -- cgit v1.2.3 From 0244d04a55ede1a2ccde4b94ab340fd82c5ded3e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 00:11:25 +0000 Subject: Fix prettier --- packages/types/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/types') diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 9372bfafa..1a86f45e6 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -641,7 +641,7 @@ export interface SimpleStandardContractOutput { } export interface SimpleEvmOutput { - bytecode: SimpleEvmBytecodeOutput; + bytecode: SimpleEvmBytecodeOutput; } export interface SimpleEvmBytecodeOutput { -- cgit v1.2.3 From 2821bac3a3199fd9d4b99b97cdc69376ca8bff58 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 10:44:20 +0000 Subject: Add additional CHANGELOG to types package --- packages/types/CHANGELOG.json | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/types') diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index 6d9f83c57..ecab7e9d6 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -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", "changes": [ -- cgit v1.2.3