diff --git a/src/contracts/abi.rs b/src/contracts/abi.rs index 234a2582..d7f55a35 100644 --- a/src/contracts/abi.rs +++ b/src/contracts/abi.rs @@ -39,6 +39,7 @@ abigen!( function deleteIdentities(uint256[8] calldata deletionProof, bytes calldata packedDeletionIndices, uint256 preRoot, uint256 postRoot) public virtual function latestRoot() public view virtual returns (uint256 root) function owner() public view virtual returns (address) + function identityOperator() public view virtual returns (address) function queryRoot(uint256 root) public view virtual returns (RootInfo memory) function getRootHistoryExpiry() external view returns (uint256) ]"#, diff --git a/src/contracts/mod.rs b/src/contracts/mod.rs index 3df8819a..774b64c4 100644 --- a/src/contracts/mod.rs +++ b/src/contracts/mod.rs @@ -102,14 +102,15 @@ impl IdentityManager { ethereum.provider().clone(), ); - let owner = abi.owner().call().await?; - if owner != ethereum.address() { - error!(?owner, signer = ?ethereum.address(), "Signer is not the owner of the identity manager contract."); + let operator = abi.identity_operator().call().await?; + if operator != ethereum.address() { + error!(?operator, signer = ?ethereum.address(), "Signer is not the identity operator of the identity manager contract."); panic!("Cannot currently continue in read-only mode.") } + info!( ?address, - ?owner, + ?operator, "Connected to the WorldID Identity Manager" );