IPClaim

Inherits: AccessControl, Pausable, Whitelist, VaultWhitelistAdmin, UUPSUpgradeable

State Variables

claimedIP

mapping(address => uint256) public claimedIP;

ipToken

Address(0) to claim native IP, otherwise ERC20

address public ipToken;

startTime

uint256 public startTime;

endTime

uint256 public endTime;

Functions

constructor

Note: oz-upgrades-unsafe-allow: constructor

initialize

depositIP

claim

Can only claim once, even if merkle tree updates a user's amount

Parameters

Name
Type
Description

_proof

bytes32[]

Merkle proof for the user

_amount

uint256

The whole amount of $IP the user is entitled to claim

pause

unpause

setEndTime

setIPToken

Admin can change token to be claimed at any time without any checks - made on purpose

If address(0) is set, it means ETH/IP is being claimed

setStartTime

withdrawAnyToken

*Admin can withdraw any token, at any time, including the IP token, without any checks

  • made on purpose*

merkleRoot

_authorizeUpgrade

_transfer

Events

Claimed

EndTimeSet

IPDeposited

IPTokenSet

StartTimeSet

Errors

IPClaim__Ended

IPClaim__EndTimeBeforeStartTime

IPClaim__NotStarted

IPClaim__NotWhitelisted

IPClaim__StartTimeAfterEndTime

IPClaim__TransferFailed

IPClaim__WholeAmountClaimed

IPClaim__ZeroAddress

IPClaim__ZeroAmount