hydration
subscan
Runtime Modules / Referrals
Spec Version:
Call Functions
Name
Lookup
Parameters
register_code4b001
link_code4b011
convert4b021
claim_rewards4b03-
set_reward_percentage4b043
Events
Name
Lookup
Attributes
CodeRegistered4b00["ReferralCode<CodeLength>","AccountId"]
CodeLinked4b01["AccountId","ReferralCode<CodeLength>","AccountId"]
Converted4b02["AssetAmount<AssetId>","AssetAmount<AssetId>"]
Claimed4b03["AccountId","Balance","Balance"]
AssetRewardsUpdated4b04["AssetId","Level","FeeDistribution"]
LevelUp4b05["AccountId","Level"]
Storage Functions
Name
Type
ReferralCodes{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["Vec<U8>"],"value":"AccountId","keys_id":248,"value_id":0}}
ReferralAccounts{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"Vec<U8>","keys_id":0,"value_id":248}}
LinkedAccounts{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"AccountId","keys_id":0,"value_id":0}}
ReferrerShares{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"U128","keys_id":0,"value_id":6}}
TraderShares{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"U128","keys_id":0,"value_id":6}}
TotalShares{"origin":"PlainType","plain_type":"U128","PlainTypeValue":6}
Referrer{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"Tuple:pallet_referrals:LevelU128","keys_id":0,"value_id":680}}
AssetRewards{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat","Blake2_128Concat"],"key_vec":["U32","pallet_referrals:Level"],"value":"pallet_referrals:FeeDistribution","keys_id":681,"value_id":250}}
PendingConversions{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"NULL","keys_id":4,"value_id":36}}
CounterForPendingConversions{"origin":"PlainType","plain_type":"U32","PlainTypeValue":4}
Constants
Name
Type
Value
RewardAssetU3200000000
PalletId[U8; 8]726566657272616c
RegistrationFeeTuple:U32U128AccountId0000000000e02367e8c9000000000000000000006d6f646c70792f74727372790000000000000000000000000000000000000000
CodeLengthU320a000000
MinCodeLengthU3204000000
SeedNativeAmountU12800a0724e180900000000000000000000
Error Types
Name
Docs
TooLongReferral code is too long.
TooShortReferral code is too short.
InvalidCharacterReferral code contains invalid character. Only alphanumeric characters are allowed.
AlreadyExistsReferral code already exists.
InvalidCodeProvided referral code is invalid. Either does not exist or is too long.
AlreadyLinkedAccount is already linked to another referral account.
ZeroAmountNothing in the referral pot account for the asset.
LinkNotAllowedLinking an account to the same referral account is not allowed.
IncorrectRewardCalculationCalculated rewards are more than the fee amount. This can happen if percentages are incorrectly set.
IncorrectRewardPercentageGiven referrer and trader percentages exceeds 100% percent.
AlreadyRegisteredThe account has already a code registered.
PriceNotFoundPrice for given asset pair not found.
ConversionMinTradingAmountNotReachedMinimum trading amount for conversion has not been reached.
ConversionZeroAmountReceivedZero amount received from conversion.