harsta
Version:
Harsta is a contract development tool based on Hardhat, designed to streamline the development, testing, and referencing of contracts, addresses, ABIs, and contract instances.
17 lines (13 loc) • 565 B
text/typescript
/* eslint-disable ts/ban-ts-comment */
import * as chains from '../chains'
import type { Chain } from '../types'
import { getter, proxy } from '../utils'
import { ALIAS_ENV, ALIAS_FIRST } from './constants'
const _p_chain = proxy<typeof chains[keyof typeof chains]>(chains[ALIAS_ENV!] || chains[ALIAS_FIRST])
export const chain = _p_chain.proxy
export const updateChain = _p_chain.update as unknown as (chain: Chain) => void
/**
* @deprecated please use `chain.addresses`
*/
// @ts-ignore
export const defaultAddresses = getter(() => _p_chain.proxy.addresses)