Skip to main content
Read prior context on user scores in Neynar User Quality Score
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.

Contract

  • 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.

Interface

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.

Sample use

A simple example of a HelloWorld contract:

Future

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.

Further reading

Sybil resistance using Neynar user quality score

Addresses ↔ Farcaster FIDs onchain