The userPowerGrants
function in the MiniByte
contract retrieves a list of power grants associated with a specified user address within a defined range. It checks for valid input parameters and returns an array of PowerGrant
structs, which include details about each grant.
_address
(address
): The address of the user whose power grants are being queried.start
(uint256
): The starting index for the range of power grants to retrieve.end
(uint256
): The ending index for the range of power grants to retrieve.PowerGrant[]
): An array of PowerGrant
structs, each containing:
power
(uint256
): The power associated with the grant.startTime
(uint256
): The start time of the grant.granttype
(uint256
): The type of the grant.referredUser
(address
): The address of the user who referred this grant.