Skip to content

Commit 7c74ef6

Browse files
committed
fix: home chain
1 parent c9a38e7 commit 7c74ef6

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

products/proof-of-humanity/proof-of-humaity-2.0-integrations-guide.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,29 @@ Gnosis CrossChain proxy contract: [0x16044E1063C08670f8653055A786b7CC2034d2b0](h
3737

3838
### On-chain verification:
3939

40-
For verifying if an account is registered in PoHv2, it is necessary to call the `isHuman(address)` function on the cross-chain contract deployed on the target chain. The result is a boolean which, in case of being true, will confirm that the current chain is the **home chain**.
40+
For verifying if an account is registered in PoHv2, it is necessary to call the `isHuman(address)` function on the cross-chain contract deployed on the target chain. The result is a boolean.
41+
42+
In addition, for verifying if the target chain is the **home chain** it is necessary to call the following functions on the same cross-chain contract's instance:
43+
44+
- call the `humanityOf` function to obtain the _bytes20 humanity id_
45+
- call the `humanityData` function with the obtained humanity id to observe the resulting parameters:
46+
47+
#### humanityData(bytes20)
48+
49+
Additional information about the registered humanity and its interaction with cross-chain functionalities.
50+
51+
Parameters:
52+
53+
- humanityId(bytes20): the humanity to consult
54+
55+
Returns
56+
57+
- owner(address): the account corresponding to this humanity
58+
- expirationTime(uint40): time in seconds when this humanity registry expires
59+
- lastTransferTime(uint40): time in seconds when this humanity identity has been transferred from the foreign chain
60+
- isHomeChain(bool): whether the humanity identity is registered in the main PoHv2 contract instance deployed on this chain
61+
62+
The results can be interpreted as follows:
63+
64+
- If the outcome has no record for this account, it means that the account was originally registered on the target chain and thus, it is the **home chain**.
65+
- If the outcome triggers the `isHomeChain` parameter as true, the `expirationTime` has not been reached, and `owner` corresponds to this PoHv2 account, then the account's **home chain** is the target chain.

0 commit comments

Comments
 (0)