Name | Lookup | Parameters | |
|---|---|---|---|
| register_code | 4b00 | 1 | |
| link_code | 4b01 | 1 | |
| convert | 4b02 | 1 | |
| claim_rewards | 4b03 | - | |
| set_reward_percentage | 4b04 | 3 |
Name | Lookup | Attributes | |
|---|---|---|---|
| CodeRegistered | 4b00 | ["ReferralCode<CodeLength>","AccountId"] | |
| CodeLinked | 4b01 | ["AccountId","ReferralCode<CodeLength>","AccountId"] | |
| Converted | 4b02 | ["AssetAmount<AssetId>","AssetAmount<AssetId>"] | |
| Claimed | 4b03 | ["AccountId","Balance","Balance"] | |
| AssetRewardsUpdated | 4b04 | ["AssetId","Level","FeeDistribution"] | |
| LevelUp | 4b05 | ["AccountId","Level"] |
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} |
Name | Type | Value | |
|---|---|---|---|
| RewardAsset | U32 | 00000000 | |
| PalletId | [U8; 8] | 726566657272616c | |
| RegistrationFee | Tuple:U32U128AccountId | 0000000000e02367e8c9000000000000000000006d6f646c70792f74727372790000000000000000000000000000000000000000 | |
| CodeLength | U32 | 0a000000 | |
| MinCodeLength | U32 | 04000000 | |
| SeedNativeAmount | U128 | 00a0724e180900000000000000000000 |
Name | Docs |
|---|---|
| TooLong | Referral code is too long. |
| TooShort | Referral code is too short. |
| InvalidCharacter | Referral code contains invalid character. Only alphanumeric characters are allowed. |
| AlreadyExists | Referral code already exists. |
| InvalidCode | Provided referral code is invalid. Either does not exist or is too long. |
| AlreadyLinked | Account is already linked to another referral account. |
| ZeroAmount | Nothing in the referral pot account for the asset. |
| LinkNotAllowed | Linking an account to the same referral account is not allowed. |
| IncorrectRewardCalculation | Calculated rewards are more than the fee amount. This can happen if percentages are incorrectly set. |
| IncorrectRewardPercentage | Given referrer and trader percentages exceeds 100% percent. |
| AlreadyRegistered | The account has already a code registered. |
| PriceNotFound | Price for given asset pair not found. |
| ConversionMinTradingAmountNotReached | Minimum trading amount for conversion has not been reached. |
| ConversionZeroAmountReceived | Zero amount received from conversion. |