Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Context

Context is the configuration object passed around every function in the SDK. It contains basic information on how to access the various services that the SDK aggregates.

Context should not be instantiated by users, as it's managed by Yearn.context.

Hierarchy

  • Context

Implements

Index

Constructors

Properties

events: EventEmitter

For internal events only.

PROVIDER: string = "refresh:provider"

Accessors

  • get addresses(): AddressesOverride
  • set addresses(addresses: AddressesOverride): void
  • get cache(): CacheConfiguration
  • get etherscan(): string
  • get isDevelopment(): boolean
  • get partnerId(): undefined | string
  • get provider(): ReadWriteProvider
  • get simulation(): SimulationConfiguration
  • get subgraph(): undefined | SubgraphConfiguration
  • get zapper(): string

Methods

  • setProvider(provider?: JsonRpcProvider | ReadWriteProvider): void
  • Change providers during executions for all services that require on-chain interaction.

    Parameters

    • Optional provider: JsonRpcProvider | ReadWriteProvider

      new provider(s)

    Returns void

Generated using TypeDoc