Messages
Weenit messages description
The messages used by Weenit are as follows:
EIP-712 Domain
To optimize transaction costs, messages are not stored on the EVM but hashes of these messages are stored. The protocol uses the EIP-712 definition for structuring messages and hashing its data (see EIP-712).
The EIP-712 domain follows the Deelit protocol schema: see EIP712Domain.
Lottery
struct Lottery {
address from_address;
bytes32 product_hash;
uint256 nb_tickets;
uint256 ticket_price;
address token_address;
LibFee.Fee fee;
LibFee.Fee protocol_fee;
uint256 expiration_time;
}
The address of the lottery creator.
The hash of the product related to the lottery. see Product.
The number of tickets available for the lottery.
The price of a ticket.
The address of the token used for the lottery.
The fee of the lottery. see Fee.
The fee of the protocol. see Fee.
The expiration timestamp of the lottery.
Fee
struct Fee {
address recipient;
uint48 amount_bp;
}
The address of the fee recipient.
The percentage of the payment to be paid as fee by the payer. (eg. 1000 = 10%)
Transaction
struct Transaction {
Offer offer;
Payment payment;
}
The offer associated with the transaction. see Offer.
The payment associated with the transaction. see Payment.