Zero Docs
Comment on page


The SDK acts as an interface for consumers to use the zFI smart contracts in their code without directly calling to them. Various functionality is made available.
The zFI SDK is instantiated by first calling to createInstance with a Config object. A config has the following properties
config: Config = { wildPoolAddress: string, lpTokenPoolAddress: string, factoryAddress: string, provider: ethers.providers.Provider }
Where the addresses provided are the given addresses from running the zFI deployment scripts of the contracts on mainnet. Afterwards, you will have an accessible object that is able to operate on both pools as well as the factory in a single instance.
Functions that are made available to you apply identically to either pool as they are based on the same contract, so they will only be referred to as "Pool Functions" here. There are also functions provided by the factory directly referred to as "Factory Functions"