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
| Prop | Type | Required | Description |
|---|---|---|---|
environment | `Environment | string` | 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')