UNPKG

viem

Version:

TypeScript Interface for Ethereum

15 lines (13 loc) 440 B
import type { Chain, ChainFormatters } from '../../types/chain.js' import type { Assign, Prettify } from '../../types/utils.js' export function defineChain< formatters extends ChainFormatters, const chain extends Chain<formatters>, >(chain: chain): Prettify<Assign<Chain<undefined>, chain>> { return { formatters: undefined, fees: undefined, serializers: undefined, ...chain, } as Assign<Chain<undefined>, chain> }