Offers.sol
The deployed addresses for Offers.sol are:
Rinkeby: Mainnet:
IOffers.sol
Interface of the Offers.sol contract. Does not include restricted or optional functions. To view the full interface visit: link to interface on github.
Structs
struct Offer {
// offer creator
address creator;
// offer loan duration
uint32 duration;
// the expiration timestamp of the offer in a unix timestamp in seconds
uint32 expiration;
// is loan offer fixed terms or open for auction
bool fixedTerms;
// is offer for single NFT or for every NFT in a collection
bool floorTerm;
// whether or not this offer was made by a lender or a borrower
bool lenderOffer;
// offer NFT contract address
address nftContractAddress;
// offer NFT ID
uint256 nftId; // ignored if floorTerm is true
// offer asset type
address asset;
// offer loan amount
uint128 amount;
// offer interest rate per second. (Amount * InterestRate) / MAX-BPS / Duration
uint96 interestRatePerSecond;
}
Functions
getOfferHash(offer)
getOfferSigner(offer, signature) getOfferSignatureStatus(signature) withdrawOfferSignature(offer, signature) getOffer(nftContractAddress, nftId, offerHash, floorTerm) createOffer(offer) removeOffer(nftContractAddress, nftId, offerHash, floorTerm)
Events
NewOffer(creator, nftContractAddress, nftId, offer, offerHash)
OfferRemoved(creator, nftContractAddress, nftId, offer, offerHash) OfferSignatureUsed(nftContractAddress, nftId, offer, signature)
Details
getOfferHash(offer) -> bytes32
Returns the hash of an offer.
getOfferSigner(offer, signature) -> address
Returns the address of the signer of a signature.
getOfferSignatureStatus(signature) -> bool
Returns true if a given signature has been revoked otherwise false.
withdrawOfferSignature(offer, signature)
Withdraws a signature based offer and ensures it cannot be executed on-chain.
getOffer(nftContractAddress, nftId, offerHash, floorTerm) -> Offer
Returns an offer from the on-chain offer book.
createOffer(offer) -> bytes32
Returns the offerHash of the offer created.
Emits a NewOffer() event.
removeOffer(nftContractAddress, nftId, offerHash, floorTerm)
Removes an offer from the on-chain offer book, ensuring it cannot be executed.Emits an OfferRemoved() event.
Last updated