RafflFactory
knows
how to initialize the Raffl
.
prices
information.
Name | Type | Description |
---|---|---|
entryToken | address | The address of the ERC-20 token as entry. If address zero, entry is the network token |
entryPrice | uint256 | The value of each entry for the raffle. |
minEntries | uint256 | The minimum number of entries to consider make the draw. |
deadline | uint256 | The block timestamp until the raffle will receive entries and that will perform the draw if criteria is met. |
creator | address | The address of the raffle creator |
prizes | Prize[] | The prizes that will be held by this contract. |
tokenGates | TokenGate[] | The token gating that will be imposed to users. |
extraRecipient | ExtraRecipient | The extra recipient that will share the rewards (optional). |
GameStatus
as DrawStarted
and emits event
DeadlineSuccessCriteria
Access control: factory
is the only allowed to called this method
GameStatus
as FailedDraw
and emits event
DeadlineFailedCriteria
Access control: factory
is the only allowed to called this method
Name | Type | Description |
---|---|---|
quantity | uint256 | The quantity of entries to purchase. Requirements: - If entry is paid with network tokens, the required amount of network tokens. - If entry is paid with ERC-20, the contract must be approved to spend ERC-20 tokens. - If entry is free, no payment is required. Emits EntriesBought event |
entryPrice
was zero
Name | Type | Description |
---|---|---|
user | address | The address of the user whose entries will be refunded. |
prizes
to the provably fair and verifiable entrant, sets the GameStatus
as
SuccessDraw
and emits event DrawSuccess
Access control: factory
is the only allowed to called this method through the Chainlink VRF Coordinator
Name | Type | Description |
---|---|---|
user | address | The address of the user who purchased the entries. |
entriesBought | uint256 | The number of entries bought. |
value | uint256 | The value of the entries bought. |
Name | Type | Description |
---|---|---|
user | address | The address of the user who got the refund. |
entriesRefunded | uint256 | The number of entries refunded. |
value | uint256 | The value of the entries refunded. |
Name | Type | Description |
---|---|---|
requestId | uint256 | The indexed ID of the draw request. |
winnerEntry | uint256 | The entry that won the draw. |
user | address | The address of the winner. |
entries | uint256 | The entries the winner had. |
Name | Type | Description |
---|---|---|
requestId | uint256 | The indexed ID of the deadline request. |
entries | uint256 | The number of entries at the time of the deadline. |
minEntries | uint256 | The minimum number of entries required for success. |
Name | Type | Description |
---|---|---|
entries | uint256 | The number of entries at the time of the deadline. |
minEntries | uint256 | The minimum number of entries required for success. |
asset
represents the address of the asset considered as a prize
assetType
defines the type of asset
value
represents the value of the prize. If asset is an ERC20, it’s the amount. If asset is an ERC721,
it’s the tokenId.
token
represents the address of the token gating asset
amount
represents the minimum value of the token gating
recipient
represents the address of the extra recipient of the pooled funds
feePercentage
is the percentage of the pooled funds (after fees) that will be shared to the extra
recipient