BiomapperLogLib
A utility library for the BiomapperLog
contract.
Functions
isUnique
Determines the uniqueness status of a given address in the current biomapper generation.
The alternative way of using the Biomapper
contract.
function isUnique(IBiomapperLogRead biomapperLog, address who) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
biomapperLog | IBiomapperLogRead | The BiomapperLog contract. |
who | address | The address to check for uniqueness. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | A boolean value indicating whether the address is biomapped (true) or not (false). |
countBiomappedBlocks
Counts the number of blocks a user has been biomapped for.
function countBiomappedBlocks(IBiomapperLogRead biomapperLog, address who, uint256 fromBlock)
public
view
returns (uint256 blocks);
Parameters
Name | Type | Description |
---|---|---|
biomapperLog | IBiomapperLogRead | The BiomapperLog contract. |
who | address | The address to count. |
fromBlock | uint256 | The starting block number. |
Returns
Name | Type | Description |
---|---|---|
blocks | uint256 | The number of blocks the user has been biomapped for. |
firstBiomappedGeneration
Finds the first generation a user was biomapped in.
function firstBiomappedGeneration(IBiomapperLogRead biomapperLog, address who) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
biomapperLog | IBiomapperLogRead | The BiomapperLog contract. |
who | address | The address to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number of the first biomapping for the user, or 0 if never biomapped. |
firstSequentialBiomappedGeneration
Finds the block number of the oldest sequential biomapping for a user.
function firstSequentialBiomappedGeneration(IBiomapperLogRead biomapperLog, address who)
external
view
returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
biomapperLog | IBiomapperLogRead | The BiomapperLog contract. |
who | address | The address of the user to check. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number of the oldest sequential biomapping for the user, or 0 if not biomapped in the current generation. |