Skip to content

getContracts

The getContracts function fetches the addresses of the contracts used by SolverNet, that need to be provided for some interactions.

Usage

import { getContracts } from '@omni-network/core'

import { getContracts } from '@omni-network/core'
 
const contracts = await getContracts();

Parameters

PropTypeRequiredDescription
environment`Environmentstring`No

Return

getContracts returns the Promise of an OmniContracts object

OmniContracts

type OmniContracts = {
  inbox: Address
  outbox: Address
}

Example

Get testnet contract addresses

const contracts = await getContracts('testnet')