blob: c4af5ac87c8f276a2b7d74141d8371714a97c2ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
import { ContractAbi, Provider, TxData } from '@0xproject/types';
import * as solc from 'solc';
import * as Web3 from 'web3';
import * as yargs from 'yargs';
export enum AbiType {
Function = 'function',
Constructor = 'constructor',
Event = 'event',
Fallback = 'fallback',
}
export interface ContractArtifact extends ContractVersionData {
schemaVersion: '2.0.0';
contractName: string;
networks: ContractNetworks;
}
export interface ContractVersionData {
compiler: {
name: 'solc';
version: string;
settings: solc.CompilerSettings;
};
sources: {
[sourceName: string]: {
id: number;
};
};
sourceCodes: {
[sourceName: string]: string;
};
sourceTreeHashHex: string;
compilerOutput: solc.StandardContractOutput;
}
export interface ContractNetworks {
[networkId: number]: ContractNetworkData;
}
export interface ContractNetworkData {
address: string;
links: {
[linkName: string]: string;
};
constructorArgs: string;
}
export interface SolcErrors {
[key: string]: boolean;
}
export interface CliOptions extends yargs.Arguments {
artifactsDir: string;
contractsDir: string;
jsonrpcUrl: string;
networkId: number;
gasPrice: string;
account?: string;
contract?: string;
args?: string;
}
export interface CompilerOptions {
contractsDir?: string;
artifactsDir?: string;
compilerSettings?: solc.CompilerSettings;
contracts?: string[] | '*';
}
export interface BaseDeployerOptions {
artifactsDir: string;
networkId: number;
defaults: Partial<TxData>;
}
export interface ProviderDeployerOptions extends BaseDeployerOptions {
provider: Provider;
}
export interface UrlDeployerOptions extends BaseDeployerOptions {
jsonrpcUrl: string;
}
export type DeployerOptions = UrlDeployerOptions | ProviderDeployerOptions;
export interface ContractSourceData {
[contractName: string]: ContractSpecificSourceData;
}
export interface ContractSpecificSourceData {
solcVersionRange: string;
sourceHash: Buffer;
sourceTreeHash: Buffer;
}
export interface Token {
address?: string;
name: string;
symbol: string;
decimals: number;
ipfsHash: string;
swarmHash: string;
}
export type DoneCallback = (err?: Error) => void;
|