WorldIDRouterImplV1

World Chain

0x17b354dd2595411ff79041f930e491a4df39a278

Proxy implementation: 0x4055b6d4018e92e4d000865e61e87b57a4e5ab49

Solidity v0.8.21+commit.d9974bed

🤖
Query this contract from your AI
Reference: 0x17b354dd2595411ff79041f930e491a4df39a278
Sample prompt: "Tell me the current state of world/0x17b354dd2595411ff79041f930e491a4df39a278"
No AI wired up yet? → mcp.smarts.md
World Chain is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
6
Write Functions
9
Events
10

Read Functions

groupCount() view

Gets the number of groups in the routing table.

Returns

Name Type Description
count uint256 count The number of groups in the table.
owner() view
dev: Returns the address of the current owner.

Returns

Name Type Description
address
pendingOwner() view
dev: Returns the address of the pending owner.

Returns

Name Type Description
address
proxiableUUID() view
dev: Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.

Returns

Name Type Description
bytes32
renounceOwnership() view

Ensures that ownership of WorldID implementations cannot be renounced.

dev: This function is marked as `onlyOwner` to maintain the access restriction from the base contract.
routeFor(groupNumber: uint256) view

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

acceptOwnership() nonpayable
dev: The new owner accepts the ownership transfer.
addGroup(groupIdentityManager: address) nonpayable

Adds a group to the router.

dev: While it reverts if the group identifier is not sequential, this is due to the fact that group identifiers are allocated externally. As a result, they cannot just be allocated by 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.
disableGroup(groupId: uint256) nonpayable

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.
initialize(initialGroupIdentityManager: address) nonpayable

Initializes the contract.

dev: This function is explicitly not virtual as it does not make sense to override even when upgrading. Create a separate initializer function instead.

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.
transferOwnership(newOwner: address) nonpayable
dev: Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.

Parameters

Name Type Description
newOwner address
updateGroup(groupId: uint256, newTargetAddress: address) nonpayable

Updates the target address for a group in the router.

dev: It is perfectly valid to update a group with a target address of 0 in order to disable it.

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.
upgradeTo(newImplementation: address) nonpayable
dev: Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

Name Type Description
newImplementation address
upgradeToAndCall(newImplementation: address, data: bytes) payable
dev: Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

Name Type Description
newImplementation address
data bytes
verifyProof(root: uint256, groupId: uint256, signalHash: uint256, nullifierHash: uint256, externalNullifierHash: uint256, proof: uint256[8]) nonpayable

Verifies a WorldID zero knowledge proof.

dev: Note that a double-signaling check is not included here, and should be carried by the caller.

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

AdminChanged(previousAdmin: address, newAdmin: address)
Name Type Indexed Description
previousAdmin address
newAdmin address
BeaconUpgraded(beacon: address)
Name Type Indexed Description
beacon address
GroupAdded(groupId: uint256, identityManager: 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.
GroupDisabled(groupId: uint256)

Emitted when a group is disabled in the router.

Name Type Indexed Description
groupId uint256 The identifier of the group that has been disabled.
GroupIdentityManagerRouterImplInitialized(initialGroupIdentityManager: address)

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
GroupUpdated(groupId: uint256, oldIdentityManager: address, newIdentityManager: address)

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.
Initialized(version: uint8)
Name Type Indexed Description
version uint8
OwnershipTransferStarted(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
Upgraded(implementation: address)
Name Type Indexed Description
implementation address