pragma solidity ^0.8.13; contract VerifiedCapabilityRegistry { mapping(bytes4 => address) public getAgent; event Registered(bytes4 indexed interfaceId, address indexed agent); function register(bytes4 interfaceId, address agent) external { // supportsInterface(bytes4) selector (bool ok, bytes memory data) = agent.staticcall( abi.encodeWithSelector(0x01ffc9a7, interfaceId) ); require(ok && data.length == 32 && data[31] == 0x01); getAgent[interfaceId] = agent; emit Registered(interfaceId, agent); } }