The MiniByte
contract is designed to manage user registrations, rewards, and check-ins within a decentralized application. It allows users to register with referral codes, check in daily to earn power, and claim rewards based on their accumulated power grants. The contract also includes owner-only functions for managing various parameters, such as check-in fees and reward rates.
User Registration and Management:
register
: Allows users to register using a referral code, validating the code and ensuring the inviter has not exceeded their referral limit. Emits a Registered
event.dailyCheckin
: Enables registered users to check in once per day, updating their power grants and total power. This function does not emit any events.claim
: Lets users claim rewards based on their power grants, ensuring they are registered and eligible. Emits a Claimed
event.Owner Management Functions:
setClaimStatus
: Allows the owner to update the claim status, emitting a ClaimStatusUpdated
event.setEndTime
: Lets the owner set a new end time for events, emitting an EndTimeUpdated
event.transferOwnership
and renounceOwnership
: Manage ownership of the contract, emitting OwnershipTransferred
events.rescueFunds
and rescueToken
: Allow the owner to withdraw Ether or tokens from the contract, respectively.Parameter Configuration:
setCheckInfees
, setCheckinPower
, setInviteepower
, setInviterpower
, setRewardGhRate
, and setRewardToken
: These functions allow the owner to configure various parameters related to check-in fees, power values, and reward tokens. None of these functions emit events.