IPremiaAirdrip

Git Source

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;

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;

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

Events

Initialized

event Initialized(bool initialized, UD60x18 premiaPerInfluence, UD60x18 totalInfluence);

Claimed

event Claimed(address indexed user, uint256 amount, uint256 totalClaimed, uint256 totalRemaining);

Errors

PremiaAirdrip__ArrayEmpty

error PremiaAirdrip__ArrayEmpty();

PremiaAirdrip__Initialized

error PremiaAirdrip__Initialized();

PremiaAirdrip__InvalidUser

error PremiaAirdrip__InvalidUser(address user, UD60x18 influence);

PremiaAirdrip__NotClaimable

error PremiaAirdrip__NotClaimable(uint256 lastClaim, uint256 blockTimestamp);

PremiaAirdrip__NotInitialized

error PremiaAirdrip__NotInitialized();

PremiaAirdrip__NotVested

error PremiaAirdrip__NotVested(uint256 vestingStart, uint256 blockTimestamp);

PremiaAirdrip__UserAlreadyExists

error PremiaAirdrip__UserAlreadyExists(address user);

PremiaAirdrip__ZeroAmountClaimable

error PremiaAirdrip__ZeroAmountClaimable();

Structs

User

struct User {
    address addr;
    UD60x18 influence;
}