ReferralStorage
State Variables
STORAGE_SLOT
bytes32 internal constant STORAGE_SLOT = keccak256("premia.contracts.storage.Referral");
Functions
layout
function layout() internal pure returns (Layout storage l);
toTokenDecimals
Adjust decimals of value
with 18 decimals to match the token
decimals
function toTokenDecimals(address token, UD60x18 value) internal view returns (uint256);
Structs
Layout
struct Layout {
UD60x18[] primaryRebatePercents;
UD60x18 secondaryRebatePercent;
mapping(address user => IReferral.RebateTier tier) rebateTiers;
mapping(address user => address referrer) referrals;
mapping(address user => mapping(address token => uint256 amount)) rebates;
mapping(address user => EnumerableSet.AddressSet tokens) rebateTokens;
}