CrestFi
  • 🫐CrestFi
  • 🚀Getting Started
    • ☃️How to get started?
    • 🤑Benefits of Using CrestFi
    • 💵Deposit
    • ⏳Start Streaming
    • 💰Withdraw Funds
  • 🔒Safe
    • 🗝️Create Safe
    • 💵Deposit in Safe
    • 💸Sending a Transaction
    • ⚧Signing a Transaction
  • CrestFi Evm
    • 📦CrestFi Evm Sdk
      • CrestFi Stream Client
        • Creating Clients
        • Whitelisting Tokens
        • Deposit into Crest Wallet
        • Withdraw from Crest Wallet
        • Initiating a Stream
        • Pause/Resume/Cancel Stream
        • Updating a Stream
        • Withdraw Streamed Tokens
        • Getting Stream Details
      • CrestFi Bulk Client
        • Bulk Instant Transfer
      • CrestFi Multisig Stream
        • NFT
Powered by GitBook
On this page
Export as PDF
  1. CrestFi Evm
  2. CrestFi Evm Sdk
  3. CrestFi Stream Client

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.

PreviousCreating ClientsNextDeposit into Crest Wallet

Last updated 4 months ago

📦