PremiaAirdrip

Git Source

Inherits: IPremiaAirdrip, OwnableInternal, ReentrancyGuard

State Variables

PREMIA

premia token interface

IERC20 public constant PREMIA = IERC20(0x51fC0f6660482Ea73330E414eFd7808811a57Fa2);

TOTAL_ALLOCATION

total allocation of premia distributed over the vesting period

UD60x18 public constant TOTAL_ALLOCATION = UD60x18.wrap(2_000_000e18);

VESTING_DURATION

duration of time premia is distributed

uint256 public constant VESTING_DURATION = 365 days;

VESTING_START

uint256 public constant VESTING_START = 1723708800;

Functions

initialize

Initializes the airdrip contract by pulling $PREMIA tokens from msg.sender and setting state variables

function initialize(User[] memory users, bool initialized) external nonReentrant onlyOwner;

Parameters

NameTypeDescription
usersUser[]The users that will receive the premia tokens
initializedboolWhether the contract initialization is complete

claim

Claims the premia tokens for the user.

function claim() external nonReentrant;

_calculateClaimAmount

function _calculateClaimAmount(PremiaAirdripStorage.Layout storage l, address user, uint256 lastClaim)
    internal
    view
    returns (uint256);

previewTotalAllocationAmount

Returns the total allocation amount (throughout entire vesting period)

function previewTotalAllocationAmount(address user) external view returns (uint256);

Parameters

NameTypeDescription
useraddressThe user to check

Returns

NameTypeDescription
<none>uint256The total allocation amount

previewClaimableAmount

Returns the amount claimable since the last claim was made (or the vesting start)

function previewClaimableAmount(address user) external view returns (uint256);

Parameters

NameTypeDescription
useraddressThe user to check

Returns

NameTypeDescription
<none>uint256The claimable amount

previewClaimRemaining

Returns the remaining amount claimable (throughout entire vesting period)

function previewClaimRemaining(address user) external view returns (uint256);

Parameters

NameTypeDescription
useraddressThe user to check

Returns

NameTypeDescription
<none>uint256The remaining claimable amount

previewClaimedAmount

Returns the amount claimed

function previewClaimedAmount(address user) external view returns (uint256);

Parameters

NameTypeDescription
useraddressThe user to check

Returns

NameTypeDescription
<none>uint256The claimed amount

_previewTotalAllocationAmount

function _previewTotalAllocationAmount(PremiaAirdripStorage.Layout storage l, address user)
    internal
    view
    returns (UD60x18);

_previewClaimRemaining

function _previewClaimRemaining(PremiaAirdripStorage.Layout storage l, address user) internal view returns (uint256);