Class NetworkService

Hierarchy

Index

Constructors

constructor

Properties

chainId$

chainId$: Observable<number>

defaultNetwork

defaultNetwork: Network

externalContractAddresses

externalContractAddresses: Map<string, {}> = new Map<string, { [key: number]: string }>()

network$

network$: ObjectSubject<Network, "name" | "chainId"> = new ObjectSubject<Network>(null)

supportedNetworks

supportedNetworks: Network[]

Accessors

chainId

  • get chainId(): number
  • Returns number

network

Methods

destroy

  • destroy(): void

getExternalContractAddress

  • getExternalContractAddress(contractName: string): string
  • Parameters

    • contractName: string

    Returns string

getInternalContractAddress

  • getInternalContractAddress(contractName: ContractNames): string
  • Parameters

    • contractName: ContractNames

    Returns string

init

isNetworkNameSupported

  • isNetworkNameSupported(networkName: string): boolean
  • Parameters

    • networkName: string

    Returns boolean

setExternalContractAddresses

  • setExternalContractAddresses(contractName: string, addresses: ContractAddresses): void

switchNetwork

useDefaultNetwork

  • useDefaultNetwork(): void
  • Returns void