#address #controller #standard #query #specs #chain #referral

tw-referral

A standard referral controller that can query referral of specfic address and referral chains

3 releases

0.1.2 May 20, 2022
0.1.1 Apr 3, 2022
0.1.0 Apr 3, 2022

#58 in #specs

Apache-2.0

15KB
312 lines

SingleSidedReferral

Referral controller with standard specs,

  • set_ref
    • Set referral of a specific address.
  • ref_chains
    • Get a referral chain of a specific address. Default depth is 3.
  • ref_of
    • Get a referrer of a specific address.
  • has_ref
    • Get a boolean that state a specific address has a referrer or not.

IndexedReferral

Referral controller extended with referred address indexer, i.e. specific address can query list of addresses that address have referred.

  • all_referred_of
    • Get all referral of a specific address.

Dependencies

~3–4.5MB
~100K SLoC