Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • collects user defined types & tagged outputs for a given set of compilations, returning both the definition nodes and (for the types) the type objects

    "Tagged outputs" means user-defined things that are output by a contract (not input to a contract), and which are distinguished by (potentially ambiguous) selectors. So, events and custom errors are tagged outputs. Function arguments are not tagged outputs (they're not outputs). Return values are not tagged outputs (they don't have a selector). Built-in errors (Error(string) and Panic(uint))... OK I guess those could be considered tagged outputs, but we're only looking at user-defined ones here.

    Parameters

    Returns { definitions: {}; types: TypesById; typesByCompilation: TypesByCompilationAndId }

  • findCompilationAndContract(compilations: Compilation[], artifact: ContractObject): CompilationAndContract
  • Given a list of compilations, and an artifact appearing in one of those compilations, finds the compilation and the corresponding contract object (these may be undefined if they can't be found)

    Parameters

    Returns CompilationAndContract

  • findRepeatCompilationIds(compilations: Compilation[]): Set<string>
  • shimArtifacts(artifacts: (ContractObject | CompiledContract)[], files?: string[], shimmedCompilationId?: string): Compilation[]
  • wrapper around shimContracts that just returns the result in a one-element array (keeping the old name shimArtifacts for compatibility)

    Parameters

    • artifacts: (ContractObject | CompiledContract)[]
    • Optional files: string[]
    • shimmedCompilationId: string = "shimmedcompilation"

    Returns Compilation[]

  • shimCompilation(inputCompilation: Compilation, shimmedCompilationId?: string): Compilation
  • shimCompilations(inputCompilations: Compilation[], shimmedCompilationIdPrefix?: string): Compilation[]
  • shimContracts(artifacts: (ContractObject | CompiledContract)[], options?: CompilationOptions): Compilation
  • shims a bunch of contracts ("artifacts", though not necessarily) to a compilation. usually used via one of the above functions. Note: if you pass in options.sources, options.files will be ignored. Note: if you pass in options.sources, sources will not have compiler set unless you also pass in options.compiler; in this case you should set that up separately, as in shimCompilation().

    Parameters

    • artifacts: (ContractObject | CompiledContract)[]
    • options: CompilationOptions = {}

    Returns Compilation

  • convert Vyper source maps to solidity ones (note we won't bother handling the case where the compressed version doesn't exist; that will have to wait for a later version)

    Parameters

    Returns string

Generated using TypeDoc