Eesee
Eesee
lots
An array of all existing lots.
ESE
ESE token this contract uses.
staking
Eesee staking contract. Tracks volume for this contract.
random
Contract that provides random.
feeSplitter
Address the {fee}s are sent to.
nonceUsed
True if lot nonce has already been used.
minDuration
Min and max durations for a lot.
maxDuration
RETURN_INTERVAL
In case random request fails to get delivered 24 hours after the lot was closed, unlock Reclaim functions.
fee
Fee that is collected to {feeSplitter} from each fulfilled lot. [10000 == 100%]
createLotsAndBuyTickets
Creates lots and buys tickets in them. Emits {CreateLot} for each lot created and {BuyTicket} event for each ticket bought. Note: Because of how nonPayable check in buyTickets works, users can create Native type lots with this function only by calling it with multicall.
Parameters
assets
struct Asset[]
- Assets to list. Note: The sender must have them approved for this contract.
params
struct IEesee.LotParams[]
- Parameters for lots.
expectedFee
uint32
- Expected fee for this lot to avoid race condition with {changeFee}.
amounts
uint32[]
- Amounts of tickets to buy in each lot.
recipient
address
- Recipient of tickets.
permit
bytes
- Abi-encoded ESE permit data containing approveAmount, deadline, v, r and s. Set to empty bytes to skip permit.
Return Values
IDs
uint256[]
- IDs of created lots.
tokensSpent
uint96
- ESE tokens spent.
receiveAssets
Receive assets the sender won from lots. Emits {ReceiveAsset} event for each of the asset received.
Parameters
IDs
uint256[]
- IDs of lots to claim assets in.
recipient
address
- Address to send Assets to.
Return Values
assets
struct Asset[]
- Assets received.
receiveTokens
Receive ESE the sender has earned from lots. Emits {ReceiveTokens} event for each of the claimed lot. Note: If the lot has expired, it takes 24 hours before {reclaimTokens} becomes available. If a random number is received in this timeframe, a winner is chosen and {receiveTokens} becomes avaliable for the winner to be called instead. In such case, a winner wins all collected ESE tokens instead of asset.
Parameters
IDs
uint256[]
- IDs of lots to claim tokens in.
recipient
address
- Address to send tokens to.
Return Values
amount
uint96
- ESE received.
reclaimAssets
Reclaim assets from expired lots. Emits {ReclaimAsset} event for each lot ID.
Parameters
IDs
uint256[]
- IDs of lots to reclaim assets in.
recipient
address
- Address to send assets to.
Return Values
assets
struct Asset[]
- Assets reclaimed.
reclaimTokens
Reclaim ESE from expired lots. Emits {ReclaimTokens} event for each lot ID.
Parameters
IDs
uint256[]
- IDs of lots to reclaim tokens in.
recipient
address
- Address to send tokens to.
Return Values
amount
uint96
- ESE received.
Note: This function will only be available after 24 hours after the lot has ended/expired and if no random number was received in this 24 hour timeframe.
callExternal
Call any external contract function. Is intended to be used with multicall.
Parameters
to
address
- Address to call.
data
bytes
- Data to call {to} with.
Return Values
[0]
bytes
bytes - Return data received from a call.
changeMinDuration
Changes minDuration. Emits {ChangeMinDuration} event.
Parameters
_minDuration
uint64
- New minDuration.
Note: This function can only be called by ADMIN_ROLE.
changeMaxDuration
Changes maxDuration. Emits {ChangeMaxDuration} event.
Parameters
_maxDuration
uint64
- New maxDuration.
Note: This function can only be called by ADMIN_ROLE.
changeFee
Changes fee. Emits {ChangeFee} event.
Parameters
_fee
uint32
- New fee.
Note: This function can only be called by ADMIN_ROLE.
changeFeeSplitter
Changes feeSplitter. Emits {ChangeFeeSplitter} event.
Parameters
_feeSplitter
address
- New fee.
Note: This function can only be called by ADMIN_ROLE.
getLotsLength
Get length of the lots array.
Return Values
length
uint256
- Length of the lots array.
getLotTicketHolder
Get the holder of the specified ticket in lot.
Parameters
ID
uint256
- ID of the lot.
ticket
uint32
- Ticket index.
Return Values
[0]
address
address - Ticket holder.
getLotTicketsHeldByAddress
Get amount of tickets held by address in a lot.
Parameters
ID
uint256
- ID of the lot.
_address
address
- Holder address.
Return Values
[0]
uint32
uint32 - Tickets held by {_address}.
getLotBonusTicketsHeldByAddress
Get amount of bonus tickets held by address in a lot.
Parameters
ID
uint256
- ID of the lot.
_address
address
- Holder address.
Return Values
[0]
uint32
uint32 - Tickets held by {_address}.
getBuyTicketsRecipient
Get the recipient of tickets in specified {transaction}.
Parameters
ID
uint256
- ID of the lot.
transaction
uint32
- Index of the transaction in a lot.
Return Values
[0]
address
address - The sender of the tickets in {transaction}.
createLots
Creates lots with assets from sender's balance. Emits {CreateLot} events for each created lot.
Parameters
assets
struct Asset[]
- Assets to list. Note: The sender must have them approved for this contract.
params
struct IEesee.LotParams[]
expectedFee
uint32
- Expected fee for this lot to avoid race condition with {changeFee}.
Return Values
IDs
uint256[]
- IDs of lots created.
buyTickets
Buys tickets to participate in a lot. Emits {BuyTicket} event for each ticket bought.
Parameters
IDs
uint256[]
- IDs of lots to buy tickets for.
amounts
uint32[]
- Amounts of tickets to buy in each lot.
recipient
address
- Recipient of tickets.
permit
bytes
- Abi-encoded ESE permit data containing approveAmount, deadline, v, r and s. Set to empty bytes to skip permit.
Return Values
tokensSpent
uint96
- ESE tokens spent.
Inherited from EeseeRoleHandler
Inherited from MulticallPayable
multicall
Allows calling multiple contract functions in a single call:
Parameters
data
bytes[]
- ABI-encoded data describing the call.
Inherited from EIP712
eip712Domain
_See {EIP-5267}.
Available since v4.9._
Inherited from IERC5267
EIP712DomainChanged
MAY be emitted to signal that the domain could have changed.
Inherited from ERC1155Holder
onERC1155Received
onERC1155BatchReceived
Inherited from ERC1155Receiver
supportsInterface
See {IERC165-supportsInterface}.
Inherited from ERC721Holder
onERC721Received
_See {IERC721Receiver-onERC721Received}.
Always returns IERC721Receiver.onERC721Received.selector
._
Inherited from ERC2771Context
isTrustedForwarder
Inherited from IEesee
lots
ESE
staking
random
minDuration
maxDuration
fee
feeSplitter
nonceUsed
RETURN_INTERVAL
CreateLot
ConsumeNonce
BuyTickets
AddVolumeReverted
ReceiveAsset
ReceiveTokens
ReclaimAsset
ReclaimTokens
CollectRoyalty
CollectFee
ChangeMinDuration
ChangeMaxDuration
ChangeFee
ChangeFeeSplitter
Last updated