RHEA Dex Referral Setup

Command-Line Interface Referral Integration Guide

Command-line interface usage for referral setup on:

  • REF_EX

  • REF_DCL

The following guide will help you register, verify, and check referral-related data via CLI.

We will use:

  • $REF_EX for the REF_EX contract account

  • $REF_DCL for the REF_DCL contract account

  • $USER_ID for the user account

  • $REFERRAL_ID for the referral account or referral identifier

  • $POOL_TOKEN_ID for the pool MFT token ID

REF_EX

Command-line interface usage for referral setup on REF_EX. For a referral to work on REF_EX, the referral must first be registered in the contract. After that, the referral account must also register the corresponding pool MFT.

Referrals

To view the current list of registered referrals:

near view $REF_EX list_referrals

Register

If the referral has not been added yet, please reach out to RHEA Finance to submit an application.

MFT Status

After the referral is registered, the corresponding pool MFT must also be registered for the referral account.

To check whether the MFT has already been registered:

MFT Register

If the MFT has not been registered yet, the referral account must register it manually:

This step should be completed by the referral account owner.

Check Balance

To query the MFT balance for the referral account:

Flow

A typical REF_EX referral setup flow is:

  1. ​Check whether the referral already exists

  2. ​Register the referral if needed

  3. ​Check whether the related pool MFT is registered

  4. ​Register the pool MFT if needed

  5. ​Query the referral MFT balance

REF_DCL

Command-line interface usage for referral setup on REF_DCL.

For a referral to work on REF_DCL, the referral account must first be added to the whitelist. Once it is valid, the referral can be included in swap calls and its internal asset balance can be checked later.

Whitelist

To view the current referral whitelist:

Validate

To check whether a referral account is already approved:

Register

If the referral has not been added yet, please reach out to RHEA Finance to submit an application.​

Result

Upon completion of registration, enter the parameters as shown below.

Check Balance

To view the internal asset balance for a referral account

Flow

A typical REF_DCL referral setup flow is:

  1. ​Query the current whitelist

  2. ​Check whether the referral account is valid

  3. ​Register the referral if needed

  4. ​Include the referral_id in the swap call

  5. ​Query the referral account’s internal assets

Last updated

Was this helpful?