BridgedBiomapperLib
A utility library for the BridgedBiomapper
contract.
Functions
isUniqueInLastKnownGeneration
Determines the uniqueness status of a given address in the last known biomapper generation.
This call does not guarantee uniqueness across generations, meaning the same person can pass this check more than once (perform a Sybil-attack): with same biometrics but different account after each generation change. Ensure you are fully understand the implications of generations and the security guarantees they provide, and consider explicitly scoping your uniqueness check by a particular generation.
function isUniqueInLastKnownGeneration(IBridgedBiomapperRead bridgedBiomapperRead, address who)
external
view
returns (bool);
Parameters
Name | Type | Description |
---|---|---|
bridgedBiomapperRead | IBridgedBiomapperRead | The bridgedBiomapperRead 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(IBridgedBiomapperRead bridgedBiomapperRead, address who, uint256 fromBlock)
public
view
returns (uint256 blocks);
Parameters
Name | Type | Description |
---|---|---|
bridgedBiomapperRead | IBridgedBiomapperRead | The IBridgedBiomapperRead 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(IBridgedBiomapperRead bridgedBiomapperRead, address who)
external
view
returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
bridgedBiomapperRead | IBridgedBiomapperRead | The IBridgedBiomapperRead 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. |