IShareXAirdrop
Title: IShareXAirdrop
Interface for the ShareX token airdrop contract
Functions
setAllocation
Set allocation for a single address
function setAllocation(address account, uint256 amount) external;
Parameters
| Name | Type | Description |
|---|---|---|
account | address | The address to set allocation for |
amount | uint256 | The amount of SHARE tokens allocated |
setAllocations
Set allocations for multiple addresses in batch
function setAllocations(address[] calldata accounts, uint256[] calldata amounts) external;
Parameters
| Name | Type | Description |
|---|---|---|
accounts | address[] | Array of addresses |
amounts | uint256[] | Array of allocation amounts |
setAirdropTime
Set the airdrop time window
function setAirdropTime(uint64 startTime_, uint64 endTime_) external;
Parameters
| Name | Type | Description |
|---|---|---|
startTime_ | uint64 | Timestamp when claims start |
endTime_ | uint64 | Timestamp when claims end |
withdrawUnclaimedTokens
Withdraw unclaimed tokens after airdrop ends
function withdrawUnclaimedTokens(uint256 amount) external;
Parameters
| Name | Type | Description |
|---|---|---|
amount | uint256 | Amount of tokens to withdraw |
claim
Claim a specific amount of tokens
function claim(uint256 amount) external;
Parameters
| Name | Type | Description |
|---|---|---|
amount | uint256 | Amount of tokens to claim |
claimAll
Claim all available tokens
function claimAll() external;
getAllocation
Get allocation info for an address
function getAllocation(address account) external view returns (AllocationInfo memory info);
Parameters
| Name | Type | Description |
|---|---|---|
account | address | The address to query |
Returns
| Name | Type | Description |
|---|---|---|
info | AllocationInfo | AllocationInfo struct with allocated and claimed amounts |
getClaimableAmount
Get claimable amount for an address
function getClaimableAmount(address account) external view returns (uint256 claimable);
Parameters
| Name | Type | Description |
|---|---|---|
account | address | The address to query |
Returns
| Name | Type | Description |
|---|---|---|
claimable | uint256 | Amount that can be claimed |
getAirdropInfo
Get airdrop configuration and status
function getAirdropInfo() external view returns (AirdropInfo memory info);
Returns
| Name | Type | Description |
|---|---|---|
info | AirdropInfo | AirdropInfo struct with all details |
isClaimActive
Check if claim period is currently active
function isClaimActive() external view returns (bool active);
Returns
| Name | Type | Description |
|---|---|---|
active | bool | True if claims are allowed |
shareToken
Get the SHARE token address
function shareToken() external view returns (address token);
Returns
| Name | Type | Description |
|---|---|---|
token | address | The token address |
startTime
Get the claim start time
function startTime() external view returns (uint64 startTime);
Returns
| Name | Type | Description |
|---|---|---|
startTime | uint64 | The start timestamp |
endTime
Get the claim end time
function endTime() external view returns (uint64 endTime);
Returns
| Name | Type | Description |
|---|---|---|
endTime | uint64 | The end timestamp |
totalAllocated
Get total allocated amount
function totalAllocated() external view returns (uint256 total);
Returns
| Name | Type | Description |
|---|---|---|
total | uint256 | The total allocated |
totalClaimed
Get total claimed amount
function totalClaimed() external view returns (uint256 total);
Returns
| Name | Type | Description |
|---|---|---|
total | uint256 | The total claimed |
Structs
AllocationInfo
Allocation information for a user
struct AllocationInfo {
uint128 allocated; // Total amount allocated to user
uint128 claimed; // Amount already claimed
}
AirdropInfo
Airdrop configuration and status
struct AirdropInfo {
address token; // SHARE token address
uint64 startTime; // Claim start timestamp
uint64 endTime; // Claim end timestamp
uint256 totalAllocated; // Total tokens allocated
uint256 totalClaimed; // Total tokens claimed
}