UNPKG

@ethereum-sourcify/compilers-types

Version:
93 lines (92 loc) 2.05 kB
import { Abi } from "abitype"; import { SolidityOutputError, SoliditySettings } from "./SolidityTypes"; import { VyperOutputError } from "./VyperTypes"; export interface LinkReferences { [filePath: string]: { [libraryName: string]: [ { length: number; start: number; } ]; }; } export interface MetadataSource { keccak256: string; content?: string; urls?: string[]; license?: string; } export interface MetadataSourceMap { [index: string]: MetadataSource; } export interface Devdoc { author?: string; details?: string; errors?: { [index: string]: { details?: string; }; }; events?: { [index: string]: { details?: string; params?: any; }; }; kind: "dev"; methods: { [index: string]: { details?: string; params?: any; returns?: any; }; }; stateVariables?: any; title?: string; version?: number; } export interface Userdoc { errors?: { [index: string]: { notice?: string; }[]; }; events?: { [index: string]: { notice?: string; }; }; kind: "user"; methods: { [index: string]: { notice: string; }; }; version?: number; } export type OutputError = SolidityOutputError | VyperOutputError; export interface MetadataOutput { abi: Abi; devdoc?: Devdoc; userdoc?: Userdoc; } export interface MetadataCompilerSettings extends Omit<SoliditySettings, "libraries" | "outputSelection"> { compilationTarget: { [sourceName: string]: string; }; libraries?: { [index: string]: string; }; } export interface Metadata { compiler: { keccak256?: string; version: string; }; language: string; output: MetadataOutput; settings: MetadataCompilerSettings; sources: MetadataSourceMap; version: number; }