Fee Distributor Contract
The Fee Distributor manages the distribution of trading fees to NFT holders.
Addresses
| Network | Address |
|---|---|
| Base | 0x498bcfdbd724989fc37259faba75168c8f47080d |
| Ethereum | 0xdcfb59f2d41c58a1325b270c2f402c1884338d0d |
Functions
claim
Claim accumulated rewards for specific NFT token IDs.
solidity
function claim(
address token,
uint256[] calldata tokenIds
) external returns (uint256 amount)Parameters:
- •
token: The cc0strategy token address - •
tokenIds: Array of NFT token IDs to claim for
Returns:
- •
amount: Total WETH claimed
Requirements:
- •Caller must own the NFTs at time of claim
- •Token IDs must have unclaimed rewards
getClaimable
Check claimable amount for token IDs.
solidity
function getClaimable(
address token,
uint256[] calldata tokenIds
) external view returns (uint256 amount)Usage Example
javascript
const distributor = new ethers.Contract(
FEE_DISTRIBUTOR_ADDRESS,
FEE_DISTRIBUTOR_ABI,
signer
);
// Check claimable
const tokenIds = [1, 42, 100];
const claimable = await distributor.getClaimable(tokenAddress, tokenIds);
console.log(`Claimable: ${ethers.formatEther(claimable)} WETH`);
// Claim rewards
const tx = await distributor.claim(tokenAddress, tokenIds);
await tx.wait();Events
solidity
event RewardsClaimed(
address indexed token,
address indexed claimer,
uint256[] tokenIds,
uint256 amount
);
event RewardsReceived(
address indexed token,
uint256 amount
);