Skip to content

Tier Registry

The Tier Registry allows Farcaster accounts to purchase or extend Farcaster Pro subscriptions.

Unlike other protocol contracts, the Tier Registry is deployed on Base Mainnet.

If you want to purchase a Pro subscription for a Farcaster account, use the Tier Registry.

Active Tiers

Tier IDDescriptionPayment TokenMin DaysPrice/day
1Farcaster ProUSDC30328767 wei USDC

Read

price

Get the total price in payment token (uint256) to purchase a tier subscription for a given number of days.

Param NametypeDescription
tieruint256The tier ID to calculate price for
forDaysuint256The number of days to calculate price for

tierInfo

Get information about a specific tier. Returns a TierInfo struct.

Param NametypeDescription
tieruint256The tier ID

TierInfo struct parameters:

Param NametypeDescription
minDaysuint256Minimum number of days required to purchase
maxDaysuint256Maximum number of days per purchase
vaultaddressPayment destination address
paymentTokenIERC20ERC20 payment token
tokenPricePerDayuint256Price per day in fundamental units of paymentToken
isActiveboolWhether tier is currently active

Write

purchaseTier

Purchase a subscription tier for a given fid. If the account already has an active subscription, purchasing will extend their total subscription time.

Param NametypeDescription
fiduint256The fid to credit the subscription to
tieruint256The tier ID to calculate price for
forDaysuint256The number of days to calculate price for

batchRent

Rent storage for multiple fids in one transaction. The caller must send enough ether to cover the total cost of all units. Like single-unit rental, extra ether is returned and units are valid for 1 year.

Param NametypeDescription
msg.valueweiTotal payment amount
fidsuint256[]Array of fids
forDaysuint256[]Array of unit quantities, corresponding to each fid in the fids array

batchPurchaseTier

Purchase a subscription tier for multiple fids in a single transaction. If an account already has an active subscription, purchasing will extend their total subscription time.

Param NametypeDescription
tieruint256The tier ID to calculate price for
fidsuint256[]Array of fids
forDaysuint256[]Array of days, corresponding to each fid in the fids array

Events

PurchasedTier

Emitted when a tier is purchased for a Farcaster account.

Param NametypeDescription
fiduint256 indexedFarcaster ID the tier was purchased for
tieruint256 indexedTier ID that was purchased
forDaysuint256Number of days of subscription purchased
payeraddress indexedCaller address that paid

Errors

ErrorSelectorDescription
InvalidDuration76166401The caller attempted to purchase an invalid number of days.
InvalidTiere1423617The caller attempted to purchase an invalid or inactive tier.
InvalidBatchInput0a514b99The caller provided mismatched arrays of fids and forDays.

Source

TierRegistry.sol