···163163164164## 9. Reference Implementation
165165166166-Deployed on Sepolia testnet: [`0xE75B156D97cd47a09939837411b0D9D7b64c3CF2`](https://sepolia.etherscan.io/address/0xE75B156D97cd47a09939837411b0D9D7b64c3CF2)
166166+Deployed on Sepolia testnet: [`0xfca809F35369b6A5F47f52226893Ae1B55eE281b`](https://sepolia.etherscan.io/address/0xfca809F35369b6A5F47f52226893Ae1B55eE281b)
167167168168**Contract functions (`CowRegistry.sol`):**
169169- `calculateCowHash(controller, wrappedDID)` — derive the registry key for a did:cow ID
+1-1
src/CowRegistry.sol
···5858 Cow storage cow = cows[cowHash];
5959 if (cow.deactivated) revert AlreadyDeactivated();
6060 if (!cow.initialized) {
6161+ if (bytes(_wrappedDID).length == 0) revert EmptyWrappedDID();
6162 cow.initialized = true;
6263 cow.controller = _controller;
6364 cow.wrappedDID = _wrappedDID;
···122123 /// @param _controller The initial controller address.
123124 /// @param _wrappedDID The initial wrapped DID, without the leading "did:" prefix.
124125 function initializeCow(address _controller, string memory _wrappedDID) external {
125125- if (bytes(_wrappedDID).length == 0) revert EmptyWrappedDID();
126126 _ensureCowInitialized(_controller, _wrappedDID);
127127 }
128128