github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/types/solc_v5/index.d.ts (about)

     1  declare module 'solc_v5' {
     2    export type SolidityFunction = {
     3      type: 'function' | 'constructor' | 'fallback';
     4      name: string;
     5      inputs: Array<FunctionInput>;
     6      outputs?: Array<FunctionOutput>;
     7      stateMutability?: 'pure' | 'view' | 'nonpayable' | 'payable';
     8      payable?: boolean;
     9      constant?: boolean;
    10    };
    11  
    12    export type Event = {
    13      type: 'event';
    14      name: string;
    15      inputs: Array<EventInput>;
    16      anonymous: boolean;
    17    };
    18  
    19    export type FunctionInput = {
    20      name: string;
    21      type: string;
    22      components?: FunctionInput[];
    23      internalType?: string;
    24    };
    25  
    26    export type FunctionOutput = FunctionInput;
    27    export type EventInput = FunctionInput & { indexed?: boolean };
    28  
    29    type Bytecode = {
    30      linkReferences: any;
    31      object: string;
    32      opcodes: string;
    33      sourceMap: string;
    34    };
    35  
    36    type Contract = {
    37      assembly: any;
    38      evm: {
    39        bytecode: Bytecode;
    40        deployedBytecode: Bytecode;
    41      };
    42      functionHashes: any;
    43      gasEstimates: any;
    44      abi: (SolidityFunction | Event)[];
    45      opcodes: string;
    46      runtimeBytecode: string;
    47      srcmap: string;
    48      srcmapRuntime: string;
    49    };
    50  
    51    type Source = {
    52      AST: any;
    53    };
    54  
    55    export type InputDescription = {
    56      language: string;
    57      sources?: Record<string, { content: string }>;
    58      settings?: {
    59        outputSelection: Record<string, Record<string, Array<string>>>;
    60      };
    61    };
    62  
    63    type Error = {
    64      sourceLocation?: {
    65        file: string;
    66        start: number;
    67        end: number;
    68      };
    69      type: string;
    70      component: string;
    71      severity: 'error' | 'warning';
    72      message: string;
    73      formattedMessage?: string;
    74    };
    75  
    76    export type OutputDescription = {
    77      contracts: Record<string, Record<string, Contract>>;
    78      errors?: Array<Error>;
    79      sourceList: Array<string>;
    80      sources: Record<string, Source>;
    81    };
    82  
    83    export type ResolvedImport = {
    84      contents: string;
    85    };
    86  
    87    export type CompilerOptions = {
    88      import: (path: string) => ResolvedImport;
    89    };
    90  
    91    export function compile(input: string, opts?: CompilerOptions): string;
    92  }