IBridgedBiomapperRead
View bridged historical biomapping state for a given account,
and overall generation changes.
A bridging tx is a transaction included in a block at the bridged chain that imports data from Humanode chain.
Bridging tx point corresponds to a number of the block at the bridged chain in which a bridging tx is included.
A bridging tx contains a set of generations and potentially biomappings at Humanode chain.
The generations set can contain up to one generation that is "being bridged" and zero or more historical generations.
A historical generation is a generation that is included in the bridging tx while not being the latest generation at Humanode chain.
A historical generation does not create corresponding GenerationBridgingTxPoint
or BiomappingBridgingTxPoint
,
however it does create the Generation
and (if needed) Biomapping
.
Interface for the BridgedBiomapper
contract.
Functions
generationsHead
Returns the block number at Humanode chain in which the current generation began.
function generationsHead() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the current generation began, 0 if no generations initialized. |
generationsTail
Returns the block number at Humanode chain in which the oldest generation began.
function generationsTail() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the oldest generation began, 0 if no generations initialized. |
generationsListItem
Returns the generation struct for a given generation pointer.
function generationsListItem(uint256 ptr) external view returns (Generation memory);
Parameters
Name | Type | Description |
---|---|---|
ptr | uint256 | The pointer of the requested generation. |
Returns
Name | Type | Description |
---|---|---|
<none> | Generation | The Generation structure. |
generationsBridgingTxPointsHead
Returns the block number at bridged chain in which the current generation was bridged.
function generationsBridgingTxPointsHead() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the current generation bridged, 0 if no generations bridged. |
generationsBridgingTxPointsTail
Returns the block number at bridged chain in which the oldest generation was bridged.
function generationsBridgingTxPointsTail() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the oldest generation bridged, 0 if no generations bridged. |
generationsBridgingTxPointsListItem
Returns the generation bridging tx point struct for a given pointer.
function generationsBridgingTxPointsListItem(uint256 ptr) external view returns (GenerationBridgingTxPoint memory);
Parameters
Name | Type | Description |
---|---|---|
ptr | uint256 | The pointer of the requested bridging tx point. |
Returns
Name | Type | Description |
---|---|---|
<none> | GenerationBridgingTxPoint | The GenerationBridgingTxPoint structure. |
biomappingsHead
Returns the most recent biomapping pointer for a given account address.
function biomappingsHead(address account) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the most recent biomap occurred, or 0 if the account was never bridged. |
biomappingsTail
Returns the oldest biomapping pointer for a given account address.
function biomappingsTail(address account) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the oldest biomap occurred, or 0 if the account was never bridged. |
biomappingsListItem
Returns the Biomapping struct for a given biomapping pointer and account address.
function biomappingsListItem(address account, uint256 ptr) external view returns (Biomapping memory);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
ptr | uint256 | The biomapping pointer of the requested biomapping. |
Returns
Name | Type | Description |
---|---|---|
<none> | Biomapping | The Biomapping structure. |
biomappingsBridgingTxPointsHead
Returns the most recent biomapping bridging tx point for a given account address.
function biomappingsBridgingTxPointsHead(address account) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the most recent biomap was bridged, or 0 if the account was never bridged. |
biomappingsBridgingTxPointsTail
Returns the oldest biomapping bridging tx point for a given account address.
function biomappingsBridgingTxPointsTail(address account) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the oldest biomap was bridged, or 0 if the account was never bridged. |
biomappingsBridgingTxPointsListItem
Returns the BiomappingBridgingTxPoint struct for a given pointer and account address.
function biomappingsBridgingTxPointsListItem(address account, uint256 ptr)
external
view
returns (BiomappingBridgingTxPoint memory);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
ptr | uint256 | The pointer of the requested bridging tx point. |
Returns
Name | Type | Description |
---|---|---|
<none> | BiomappingBridgingTxPoint | The BiomappingBridgingTxPoint structure. |
lookupBiomappingPtr
Returns the biomapping pointer for a given account address and generation pointer.
Returns non-zero if the account is known to be biomapped in a given generation.
function lookupBiomappingPtr(address account, uint256 generationPtr) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
generationPtr | uint256 | The pointer of the requested generation. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the requested user was biomapped in the requested generation, or 0 if there was no biomapping. Note: can return zero if biomapped at Humanode chain but the information about it is not bridged yet. |
lookupBiomappingBridgedTxPointPtr
Returns the BiomappingBridgingTxPoint ptr for a given account address and generation bridged tx point.
Returns non-zero if the account biomapping was bridged in a given generation.
function lookupBiomappingBridgedTxPointPtr(address account, uint256 generationBridgedTxPointPtr)
external
view
returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address of the requested account. |
generationBridgedTxPointPtr | uint256 | The pointer of the requested generation. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The block number in which the requested user was biomapped in the requested generation, or 0 if there was no biomapping. Note: there is a possibility that the biomapping was bridged as part of a bridge tx where the generation it belonged to is a historical generation, in which case the Biomapping will exist, but the BiomappingBridgedTxPoint will be absent. |
Structs
Generation
Describes a generation on Humanode chain.
*Stored in a map where key is a block number at Humanode chain.
Allows navigating through generations via prevPtr
and nextPtr
.
Allows locating GenerationBridgingTxPoint
via generationBridgingTxPointPtr
.
A new key is populated by the bridging tx for the generation being bridged and
for each historical generations that occurred prior to the generation being bridged
if the corresponding Generation
is not present at the bridged chain.
For historical generations generationBridgingTxPointPtr
will be zero.
Fields
Name | Type | Description |
---|---|---|
generationBridgingTxPointPtr | uint256 | The block number at the bridged chain when this generation was ported from Humanode chain to this chain. Zero if this generation was bridged as a non-target generation (historical) in the bridging tx. |
prevPtr | uint256 | The block number at Humanode chain that points to the previous generation. Zero if this generation is the oldest generation at Humanode chain. |
nextPtr | uint256 | The block number at Humanode chain that points to the next generation. Zero if this generation is the newest known (bridged) generation at Humanode chain. |
struct Generation {
uint256 generationBridgingTxPointPtr;
uint256 prevPtr;
uint256 nextPtr;
}
GenerationBridgingTxPoint
Describes a point in time (block number at the bridged chain) when a generation was bridged from Humanode chain.
*Stored in a map where key is a block number at the bridged chain.
Allows navigating through generation bridging tx points via prevPtr
and nextPtr
.
Allows locating Generation
via generationPtr
.
A new key is populated by the bridging tx when it is determined that the
Generation
being bridged (i.e. non-historical) is not present at the bridged chain.
Fields
Name | Type | Description |
---|---|---|
generationPtr | uint256 | The block number at Humanode chain corresponding to when the generation was initialized. Never zero. |
prevPtr | uint256 | The block number at the bridged chain that points to the previous generation bridging tx point. Zero if this generation bridging tx point is the oldest point at the bridged chain. |
nextPtr | uint256 | The block number at the bridged chain that points to the next generation bridging tx point. Zero if this generation bridging tx point is the newest point at the bridged chain. |
struct GenerationBridgingTxPoint {
uint256 generationPtr;
uint256 prevPtr;
uint256 nextPtr;
}
Biomapping
Describes a biomapping on Humanode chain.
*Stored in a double map where the keys are an account and a block number at Humanode chain.
Allows navigating through biomappings within a given account via prevPtr
and nextPtr
.
Allows locating Generation
via generationPtr
.
Allows locating BiomappingBridgingTxPoint
via biomappingBridgingTxPointPtr
.
A new key is populated by the bridging tx for the generation being bridged and
for each historical generations that occurred prior to the generation being bridged
if the bridging tx indicates that the account in the bridging tx has the biomapping in a given generation
and the corresponding Biomapping
is not present at the bridged chain.
Fields
Name | Type | Description |
---|---|---|
generationPtr | uint256 | The block number at Humanode chain that corresponds to generation in which biomapping has occurred. Never zero. |
biomappingBridgingTxPointPtr | uint256 | The block number at the bridged chain when biomapping was ported from Humanode chain to this chain. Zero if this biomapping corresponds to a generation than was bridged as a non-target generation (historical) in the bridging tx. |
prevPtr | uint256 | The block number at Humanode chain that points to the previous biomapping for the corresponding account. Zero if this biomapping is the oldest biomapping for the corresponding account at Humanode chain. |
nextPtr | uint256 | The block number at Humanode chain that points to the next biomapping for the corresponding account. Zero if this biomapping is the newest known (bridged) biomapping for the corresponding account at Humanode chain. |
struct Biomapping {
uint256 generationPtr;
uint256 biomappingBridgingTxPointPtr;
uint256 prevPtr;
uint256 nextPtr;
}
BiomappingBridgingTxPoint
Describes a point in time (block number at the bridged chain) when a biomapping was bridged from Humanode chain.
*Stored in a double map where the keys are an account and a block number at the bridged chain.
Allows navigating through biomapping bridging tx points within a given account via prevPtr
and nextPtr
.
Allows locating GenerationBridgingTxPoint
via generationBridgingTxPointPtr
.
Allows locating Biomapping
via biomappingPtr
.
A new key is populated by the bridging tx when a Biomapping
is present for a given account in a non-historical generation.
Fields
Name | Type | Description |
---|---|---|
generationBridgingTxPointPtr | uint256 | The block number at the bridged chain that corresponds to generation bridging tx point when this biomapping was bridged. Never zero. |
biomappingPtr | uint256 | The block number at Humanode chain corresponding to when the biomap happened. Never zero. |
prevPtr | uint256 | The block number at the bridged chain that points to the previous biomapping bridging tx point. Zero if this biomapping bridging tx point is the oldest point at the bridged chain. |
nextPtr | uint256 | The block number at the bridged chain that points to the next biomapping bridging tx point. Zero if this biomapping bridging tx point is the newest point at the bridged chain. |
struct BiomappingBridgingTxPoint {
uint256 generationBridgingTxPointPtr;
uint256 biomappingPtr;
uint256 prevPtr;
uint256 nextPtr;
}