Helpers
Getting the Pool Identifier
Typically each pool has a unique poolId. The following method retrieves the currently selected pool ID:
async poolId(): Promise<number>Returns
Promise returns number: pool identifier
Example
console.log(`Working on the pool with ID: ${await zkClient.poolId()}`);
// output: Working on the pool with ID: 0Get the Network (Chain) Name
networkName(): stringReturns
Name of the current chain (e.g. polygon, sepolia etc). The name is retrieved locally from the integrated hard-coded mapping. The default value for unknown chains is unknown-chain.
Example
console.log(`Working on ${zkClient.networkName()} chain`);
// output: Working on polygon chainGet Token Seller Contract
async tokenSellerContract(): Promise<string>Returns
Promise returns the tokenSeller contract address.
Example
console.log(`${await zkClient.tokenSellerContract()}`);
// output: 0x1b9d7af7793df23782b43af2566cc614745c32cf Last updated
Was this helpful?