Eesee

Eesee

lots

struct IEesee.Lot[] lots

An array of all existing lots.

ESE

contract IERC20 ESE

ESE token this contract uses.

staking

contract IEeseeStaking staking

Eesee staking contract. Tracks volume for this contract.

random

contract IEeseeRandom random

Contract that provides random.

feeSplitter

address feeSplitter

Address the {fee}s are sent to.

nonceUsed

mapping(address => mapping(uint256 => bool)) nonceUsed

True if lot nonce has already been used.

minDuration

uint64 minDuration

Min and max durations for a lot.

maxDuration

uint64 maxDuration

RETURN_INTERVAL

uint32 RETURN_INTERVAL

In case random request fails to get delivered 24 hours after the lot was closed, unlock Reclaim functions.

fee

uint32 fee

Fee that is collected to {feeSplitter} from each fulfilled lot. [10000 == 100%]

createLotsAndBuyTickets

function createLotsAndBuyTickets(struct Asset[] assets, struct IEesee.LotParams[] params, uint32 expectedFee, uint32[] amounts, address recipient, bytes permit) external payable returns (uint256[] IDs, uint96 tokensSpent)

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

Return Values

receiveAssets

function receiveAssets(uint256[] IDs, address recipient) external payable returns (struct Asset[] assets)

Receive assets the sender won from lots. Emits {ReceiveAsset} event for each of the asset received.

Parameters

Return Values

receiveTokens

function receiveTokens(uint256[] IDs, address recipient) external payable returns (uint96 amount)

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

Return Values

reclaimAssets

function reclaimAssets(uint256[] IDs, address recipient) external payable returns (struct Asset[] assets)

Reclaim assets from expired lots. Emits {ReclaimAsset} event for each lot ID.

Parameters

Return Values

reclaimTokens

function reclaimTokens(uint256[] IDs, address recipient) external payable returns (uint96 amount)

Reclaim ESE from expired lots. Emits {ReclaimTokens} event for each lot ID.

Parameters

Return Values

callExternal

function callExternal(address to, bytes data) external payable returns (bytes)

Call any external contract function. Is intended to be used with multicall.

Parameters

Return Values

changeMinDuration

function changeMinDuration(uint64 _minDuration) external

Changes minDuration. Emits {ChangeMinDuration} event.

Parameters

changeMaxDuration

function changeMaxDuration(uint64 _maxDuration) external

Changes maxDuration. Emits {ChangeMaxDuration} event.

Parameters

changeFee

function changeFee(uint32 _fee) external

Changes fee. Emits {ChangeFee} event.

Parameters

changeFeeSplitter

function changeFeeSplitter(address _feeSplitter) external

Changes feeSplitter. Emits {ChangeFeeSplitter} event.

Parameters

getLotsLength

function getLotsLength() external view returns (uint256 length)

Get length of the lots array.

Return Values

getLotTicketHolder

function getLotTicketHolder(uint256 ID, uint32 ticket) external view returns (address)

Get the holder of the specified ticket in lot.

Parameters

Return Values

getLotTicketsHeldByAddress

function getLotTicketsHeldByAddress(uint256 ID, address _address) external view returns (uint32)

Get amount of tickets held by address in a lot.

Parameters

Return Values

getLotBonusTicketsHeldByAddress

function getLotBonusTicketsHeldByAddress(uint256 ID, address _address) external view returns (uint32)

Get amount of bonus tickets held by address in a lot.

Parameters

Return Values

getBuyTicketsRecipient

function getBuyTicketsRecipient(uint256 ID, uint32 transaction) external view returns (address)

Get the recipient of tickets in specified {transaction}.

Parameters

Return Values

createLots

function createLots(struct Asset[] assets, struct IEesee.LotParams[] params, uint32 expectedFee) public payable returns (uint256[] IDs)

Creates lots with assets from sender's balance. Emits {CreateLot} events for each created lot.

Parameters

Return Values

buyTickets

function buyTickets(uint256[] IDs, uint32[] amounts, address recipient, bytes permit) public payable returns (uint96 tokensSpent)

Buys tickets to participate in a lot. Emits {BuyTicket} event for each ticket bought.

Parameters

Return Values

Inherited from EeseeRoleHandler

Inherited from MulticallPayable

multicall

function multicall(bytes[] data) external payable returns (bytes[] results)

Allows calling multiple contract functions in a single call:

Parameters

Inherited from EIP712

eip712Domain

function eip712Domain() public view virtual returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)

_See {EIP-5267}.

Available since v4.9._

Inherited from IERC5267

EIP712DomainChanged

event EIP712DomainChanged()

MAY be emitted to signal that the domain could have changed.

Inherited from ERC1155Holder

onERC1155Received

function onERC1155Received(address, address, uint256, uint256, bytes) public virtual returns (bytes4)

onERC1155BatchReceived

function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) public virtual returns (bytes4)

Inherited from ERC1155Receiver

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)

See {IERC165-supportsInterface}.

Inherited from ERC721Holder

onERC721Received

function onERC721Received(address, address, uint256, bytes) public virtual returns (bytes4)

_See {IERC721Receiver-onERC721Received}.

Always returns IERC721Receiver.onERC721Received.selector._

Inherited from ERC2771Context

isTrustedForwarder

function isTrustedForwarder(address forwarder) public view virtual returns (bool)

Inherited from IEesee

lots

function lots(uint256) external view returns (uint32 totalTickets, uint32 bonusTickets, uint32 ticketsBought, uint96 ticketPrice, uint32 transactions, uint32 endTimestamp, uint32 fee, bool closed, bool buyout, bool assetClaimed, bool tokensClaimed, address owner, struct Asset asset)

ESE

function ESE() external view returns (contract IERC20)

staking

function staking() external view returns (contract IEeseeStaking)

random

function random() external view returns (contract IEeseeRandom)

minDuration

function minDuration() external view returns (uint64)

maxDuration

function maxDuration() external view returns (uint64)

fee

function fee() external view returns (uint32)

feeSplitter

function feeSplitter() external view returns (address)

nonceUsed

function nonceUsed(address, uint256) external view returns (bool)

RETURN_INTERVAL

function RETURN_INTERVAL() external view returns (uint32)

CreateLot

event CreateLot(uint256 ID, struct Asset asset, address signer, address owner, uint32 totalTickets, uint96 ticketPrice, uint32 endTimestamp)

ConsumeNonce

event ConsumeNonce(uint256 ID, address signer, uint256 nonce)

BuyTickets

event BuyTickets(uint256 ID, address recipient, uint32 lowerBound, uint32 ticketAmount, uint96 tokensSpent, uint32 bonusTickets)

AddVolumeReverted

event AddVolumeReverted(uint96 untrackedVolume, address recipient)

ReceiveAsset

event ReceiveAsset(uint256 ID, address winner, address recipient, struct Asset asset)

ReceiveTokens

event ReceiveTokens(uint256 ID, address claimer, address recipient, uint96 amount)

ReclaimAsset

event ReclaimAsset(uint256 ID, address owner, address recipient, struct Asset asset)

ReclaimTokens

event ReclaimTokens(uint256 ID, address claimer, address recipient, uint96 amount)

CollectRoyalty

event CollectRoyalty(address recipient, uint96 amount)

CollectFee

event CollectFee(address to, uint96 amount)

ChangeMinDuration

event ChangeMinDuration(uint64 previousMinDuration, uint64 newMinDuration)

ChangeMaxDuration

event ChangeMaxDuration(uint64 previousMaxDuration, uint64 newMaxDuration)

ChangeFee

event ChangeFee(uint32 previousFee, uint32 newFee)

ChangeFeeSplitter

event ChangeFeeSplitter(address previousFeeSplitter, address newFeeSplitter)

Last updated