aboutsummaryrefslogtreecommitdiffstats
path: root/packages/ethereum-types/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/ethereum-types/src/index.ts')
-rw-r--r--packages/ethereum-types/src/index.ts62
1 files changed, 62 insertions, 0 deletions
diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts
index a3ff2fddb..a92dbdd1b 100644
--- a/packages/ethereum-types/src/index.ts
+++ b/packages/ethereum-types/src/index.ts
@@ -325,9 +325,57 @@ export interface ContractNetworkData {
constructorArgs: string;
}
+export type ParamDescription = string;
+
export interface StandardContractOutput {
abi: ContractAbi;
evm: EvmOutput;
+ devdoc?: DevdocOutput;
+}
+
+export interface StandardOutput {
+ errors: SolcError[];
+ sources: {
+ [fileName: string]: {
+ id: number;
+ ast?: object;
+ legacyAST?: object;
+ };
+ };
+ contracts: {
+ [fileName: string]: {
+ [contractName: string]: StandardContractOutput;
+ };
+ };
+}
+
+export type ErrorType =
+ | 'JSONError'
+ | 'IOError'
+ | 'ParserError'
+ | 'DocstringParsingError'
+ | 'SyntaxError'
+ | 'DeclarationError'
+ | 'TypeError'
+ | 'UnimplementedFeatureError'
+ | 'InternalCompilerError'
+ | 'Exception'
+ | 'CompilerError'
+ | 'FatalError'
+ | 'Warning';
+export type ErrorSeverity = 'error' | 'warning';
+
+export interface SolcError {
+ sourceLocation?: {
+ file: string;
+ start: number;
+ end: number;
+ };
+ type: ErrorType;
+ component: 'general' | 'ewasm';
+ severity: ErrorSeverity;
+ message: string;
+ formattedMessage?: string;
}
export interface EvmOutput {
@@ -340,6 +388,20 @@ export interface EvmBytecodeOutput {
sourceMap: string;
}
+export interface DevdocOutput {
+ title: string;
+ author: string;
+ methods: {
+ [signature: string]: {
+ details: string;
+ params: {
+ [name: string]: ParamDescription;
+ };
+ return?: string;
+ };
+ };
+}
+
export interface ContractVersionData {
compiler: CompilerOpts;
sources: {