This package contains ABIs, typechain artifacts and addresses for smart contracts on Flare networks Flare, Songbird, Coston and Coston2.
Enjoy
This library exposes the following names at top level:
nameToAbi(name:string, network: string): any
andinterfaceToAbi(name: string, network: string): any
- return abi an array of objects. Name is the name of contract/interface and network can be one of coston, coston2, songbird and flare.nameToAddress(name: string, provider: ethers.JsonRpcApiProvider): Promise<string>
andnamesToAddresses(names: string[], provider: ethers.JsonRpcApiProvider): Promise<string[]>
. Provider is used to get contract address(es). They are read from FlareContractRegistryLibrary on chain.FlareContractRegistryAddress
- hardcoded address constant, the same for all chains and should never change.coston
,coston2
,flare
andsongbird
- namespaces with 4 exports:products
- an object exposing contracts through.ContractName
syntax. They have fieldsname
,interface
- interface's name andabi
, and methodgetAddress(provider: JsonRpcProvider): Promise<string>
.interfaceAbis
- a class allowing access to abis using.InterfaceName
syntax. Interface names are usually contract names prefixed with capital letterI
.nameToAbi(name: string): any
andinterfaceToAbi(name: string): any
- the same as top level functions, with omitted network argument
Additionally typechain artifacts are stored in artifacts/contracts
folders for every chain.