Getting Started
Just add few lines of code to your smart contract to access Farcaster data.
Access Farcaster Data
Example code to import the Faracle interface.
Just import the Faracle interface.
YourContract.sol
1// Import the Faracle interface
2import "./IFaracle.sol";
3
4contract PopularMint {
5
6 IFaracle public faracle = IFaracle(0x687d65ce04abbca3dac57cda6c358e497bfd320e);
7
8 constructor() {}
9
10 function mintIfPopular() public {
11 IFaracle.FarUserData memory user = faracle.getUser(msg.sender);
12 require(user.followersCount > 9999, "Not popular enough to mint!");
13 // Proceed with minting logic
14 }
15
16}