⚠️
Important! We’ve moved to V3! This documentation is for V2 only and will be updated in May.
Developer Hub
🔮 For applications
Toolkit
Utils
setupContracts

Creates contracts object with ABI.

Usage

import { setupContracts } from '@azuro-org/toolkit'
 
const contracts = setupContracts({
  lp: '0x7043E4e1c4045424858ECBCED80989FeAfC11B36',
  core: '0xA40F8D69D412b79b49EAbdD5cf1b5706395bfCf7',
  relayer: '0x92a4e8Bc6B92a2e1ced411f41013B5FE6BE07613',
  azuroBet: '0x0DEE52b98ba8326DaD4C346a4F806Fd871360a00',
  cashout: '0xC6BB817a7f02874F360d135D880200A2E440207D',
})

Props

import { type Address } from 'viem'
 
{
  lp: Address
  core: Address
  relayer: Address
  azuroBet: Address
  cashout?: Address
}

Return Value

type Contracts = {
  lp: {
    address: Address
    abi: typeof lpAbi
  }
  core: {
    address: Address
    abi: typeof coreAbi
  }
  relayer: {
    address: Address
    abi: typeof relayerAbi
  }
  azuroBet: {
    address: Address
    abi: typeof azuroBetAbi
  },
  cashout?: {
    address: Address
    abi: typeof cashoutAbi
  }
}