ClubDeal Registry
Last updated
Last updated
The ClubDealRegistry contract is another crucial component of the MintDeals platform. It manages the registration, membership, and deal processing for clubs, integrating with a credit facility and credit manager to provide financial benefits to businesses.
createClub(address _paymentTokenAddress, uint256 _membershipFee, bool _sendToCreditFacility)
Creates a new club with specified membership fee and payment token.
Charges a club creation fee from the owner.
Registers the club owner with the Credit Manager.
updateClub(uint256 _clubId, uint256 _membershipFee, bool _active, bool _sendToCreditFacility)
Allows club owners to update club details such as membership fee, active status, and whether to send fees to the credit facility or directly to their own wallet.
addClubMember(uint256 _clubId, address _newMember, address _paymentTokenAddress)
Adds a new member to a club.
Processes membership fee payment, splitting it between the credit facility and the club owner.
isMember(uint256 _clubId, address _address)
Checks if an address is a member of a specific club.
createDeal(uint256 _clubId, uint256 _maxSupply, uint256 _expiryDate, string memory _metadataURI, uint256 _maxMintPerMember)
Allows club owners to create new deals with specified supply, expiry date, and minting limits.
mintDeal(uint256 _clubId, uint256 _dealId)
Enables club members to mint deal NFTs.
confirmRedemption(uint256 _clubId, uint256 _dealId, uint256 tokenId)
Allows club owners to confirm when a deal has been redeemed.
getClubCount()
Returns the total number of clubs created.
getClubMemberCount(uint256 _clubId)
Returns the number of members in a specific club.
getDealDetails(uint256 _clubId, uint256 _dealId)
Retrieves details of a specific deal.
getClubsForMember(address _user)
Returns all clubs a user is a member of.
swapViaCEX(address tokenIn, address tokenOut, address to)
Facilitates token swaps via a centralized exchange (CEX).
withdrawCollectedFees(address _tokenAddress, address to)
Allows admins to withdraw collected club creation fees.
Club Creation: Businesses can create clubs by paying a creation fee, setting membership fees, and choosing payment tokens.
Membership: Users can join clubs by paying the membership fee, which is split between the credit manager and the credit facility or club owner directly.
Deals: Club owners can create deals as NFTs, which members can mint and redeem.
Credit Facility Integration: The contract integrates with a credit facility, allowing a portion of membership fees to be used as collateral for business loans.
Admin Functions: The contract includes administrative functions for fee management and system updates.
By leveraging this contract, MintDeals creates a ecosystem where businesses can offer exclusive deals, build member communities, and access credit facilities, all within a decentralized framework.