WorldIDRouterImplV1
World Chain0x17b354dd2595411ff79041f930e491a4df39a278
Proxy implementation: 0x4055b6d4018e92e4d000865e61e87b57a4e5ab49
Solidity v0.8.21+commit.d9974bed
Overview
Read Functions
Gets the number of groups in the routing table.
Returns
| Name | Type | Description |
|---|---|---|
| count | uint256 | count The number of groups in the table. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 |
Ensures that ownership of WorldID implementations cannot be renounced.
Gets the route for the provided group number.
Parameters
| Name | Type | Description |
|---|---|---|
| groupNumber | uint256 | The number of the group to get the route for. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | target The target address for the group number. |
Write Functions
Adds a group to the router.
Parameters
| Name | Type | Description |
|---|---|---|
| groupIdentityManager | address | The address of the identity manager instance to be used for the group. If this is set to the null address the group is disabled. |
Disables the target group in the router.
Parameters
| Name | Type | Description |
|---|---|---|
| groupId | uint256 | The identifier for the group to be disabled. |
Returns
| Name | Type | Description |
|---|---|---|
| oldTarget | address | oldTarget The old target address for the group. |
Initializes the contract.
Parameters
| Name | Type | Description |
|---|---|---|
| initialGroupIdentityManager | address | The address of the identity manager to be used for the initial group (group ID 0) when instantiating the router. |
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address |
Updates the target address for a group in the router.
Parameters
| Name | Type | Description |
|---|---|---|
| groupId | uint256 | The identitifier for the group to have its target address updated. |
| newTargetAddress | address | The new target address for the group in routing. If this is set to the null address the group will be disabled. |
Returns
| Name | Type | Description |
|---|---|---|
| oldTarget | address | oldTarget The old target address for the group. |
Parameters
| Name | Type | Description |
|---|---|---|
| newImplementation | address |
Parameters
| Name | Type | Description |
|---|---|---|
| newImplementation | address | |
| data | bytes |
Verifies a WorldID zero knowledge proof.
Parameters
| Name | Type | Description |
|---|---|---|
| root | uint256 | The of the Merkle tree |
| groupId | uint256 | The group identifier for the group to verify a proof for. |
| signalHash | uint256 | A keccak256 hash of the Semaphore signal |
| nullifierHash | uint256 | The nullifier hash |
| externalNullifierHash | uint256 | A keccak256 hash of the external nullifier |
| proof | uint256[8] | The zero-knowledge proof |
Events
| Name | Type | Indexed | Description |
|---|---|---|---|
| previousAdmin | address | ||
| newAdmin | address |
| Name | Type | Indexed | Description |
|---|---|---|---|
| beacon | address | ✓ |
Emitted when a group is added to the router.
| Name | Type | Indexed | Description |
|---|---|---|---|
| groupId | uint256 | ✓ | The identifier for the group. |
| identityManager | address | ✓ | The address of the identity manager associated with the group. |
Emitted when a group is disabled in the router.
| Name | Type | Indexed | Description |
|---|---|---|---|
| groupId | uint256 | ✓ | The identifier of the group that has been disabled. |
Emitted when a group is enabled in the router.
| Name | Type | Indexed | Description |
|---|---|---|---|
| initialGroupIdentityManager | address | The address of the identity manager to be used for the first group |
Emitted when a group is updated in the router.
| Name | Type | Indexed | Description |
|---|---|---|---|
| groupId | uint256 | ✓ | The identitfier for the group. |
| oldIdentityManager | address | ✓ | The address of the previous identity manager associated with the group. |
| newIdentityManager | address | ✓ | The address of the new identity manager associated with the group. |
| Name | Type | Indexed | Description |
|---|---|---|---|
| version | uint8 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| implementation | address | ✓ |