User scores are particularly useful if anonymous addresses are interacting with your contract and you want to restrict interaction to high quality addresses. Neynar already supports user quality scores offchain (read more in Neynar User Quality Score), this brings them onchain and makes it available to smart contracts. Now, on the Base Mainnet and Sepolia testnet, smart contracts can query the fid linked to any ETH address and the quality score for that FID.
Read the Proxy Contract on the Base Explorer (link). This is the upgradeable proxy contract you should use.
User score code on the Base Explorer (link). This is an upgradeable implementation contract. There is no state here. This is the code that the proxy contract is currently using.
// SPDX-License-Identifier: MITpragma solidity ^0.8.26;interface INeynarUserScoresReader { function getScore(address verifier) external view returns (uint24 score); function getScoreWithEvent(address verifier) external returns (uint24 score); function getScores(address[] calldata verifiers) external view returns (uint24[] memory scores); function getScore(uint256 fid) external view returns (uint24 score); function getScoreWithEvent(uint256 fid) external returns (uint24 score); function getScores(uint256[] calldata fids) external view returns (uint24[] memory scores);}
If the getScore call returns 0there is no user score for that address.If you can spare the gas and would like us to know that you are using our contract, please use getScoreWithEvent.
This experiment will see what we can unlock by bringing more Farcaster data on-chain. If you build something using this, please reach out. We want to hear what you’re building and see how we can make it easier.