Whitelisting Tokens

Streaming is only allowed for tokens that have been added to the whitelist within the CrestFi Core Contract. Use whitelistToken() method:

const tokenAddresses = ["tokenA", "tokenB"];
await crestfiClient.grantWhitelisterRole(sender.address);
await crestfiClient.whitelistToken([tokenAddress]);

Note: Only user who has whitlisterRole can whitelist a token. To grant whitelister role, use the grantWhitelisterRole():

//only contract owner can grant whitelister role
const crestfiClientOwner = new CrestFiStreamClient(contractOwner);
await crestfiClientOwner.grantWhitelisterRole(whitelisterAddress);

To whitelist your token on the existing CrestFi protocol, please reach out directly to the administrator.

Last updated