ITokenQuote
ITokenQuote
CallerIsNotMetahub
error CallerIsNotMetahub()
Thrown when the message sender is not Metahub.
TokenQuoteExpired
error TokenQuoteExpired()
Thrown when trying to work with expired token quote.
InvalidTokenQuoteSigner
error InvalidTokenQuoteSigner()
Thrown when trying to work with token quote signed by entity missing quote signing role.
TokenQuoteListingIdMismatch
error TokenQuoteListingIdMismatch()
Thrown when token quote listing id does not equal one provided from renting params.
TokenQuoteRenterMismatch
error TokenQuoteRenterMismatch()
Thrown when token quote renter address does not equal one provided from renting params.
TokenQuoteWarperMismatch
error TokenQuoteWarperMismatch()
Thrown when token quote warper address does not equal one provided from renting params.
PaymentTokenData
struct PaymentTokenData {
address paymentToken;
uint256 paymentTokenQuote;
}
TokenQuote
struct TokenQuote {
uint256 listingId;
address renter;
address warperAddress;
address paymentToken;
uint256 paymentTokenQuote;
uint256 nonce;
uint32 deadline;
}
useTokenQuote
function useTokenQuote(struct Rentings.Params rentingParams, struct Rentings.RentalFees baseTokenFees, bytes tokenQuote, bytes tokenQuoteSignature) external returns (struct Rentings.RentalFees paymentTokenFees, struct ITokenQuote.PaymentTokenData paymentTokenData)
Using and verification of the price quote for universe-specific token in relation to base token.
Name | Type | Description |
---|---|---|
rentingParams | struct Rentings.Params | Renting params. |
baseTokenFees | struct Rentings.RentalFees | Base fees in equivalent of base token. |
tokenQuote | bytes | Encoded token quote. |
tokenQuoteSignature | bytes | Token Quote ECDSA signature ABI encoded (v,r,s)(uint8, bytes32, bytes32). |
Name | Type | Description |
---|---|---|
paymentTokenFees | struct Rentings.RentalFees | Payment token fees calculated in accordance with payment token quote. |
paymentTokenData | struct ITokenQuote.PaymentTokenData | Payment token data. |
getTokenQuoteNonces
function getTokenQuoteNonces(address renter) external view returns (uint256)
Getting the nonce for token quote. This 'nonce' should be included in the signature of TokenQuote
Name | Type | Description |
---|---|---|
renter | address | Address of the renter. |
getChainId
function getChainId() external view returns (uint256)
Getting the Chain ID
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external view returns (bytes32)
Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.