Problem
Writer dashboard always shows earnings as "–" (zero) even after multiple trades (18500 tokens bought/sold).
Root cause
getRoyaltyInfo(tokenAddress) on MCV2_Bond (0x5dfA75b0185efBaEF286E80B847ce84ff8a62C2d on Base Sepolia) reverts when called with the storyline token address (0x14262a4576b53d94ef1333b5604e7c99862c05ce).
Additionally, tokenBond() returns misaligned data — the ABI struct fields don't match the deployed contract:
reserveToken: 0x...01F4 (should be WETH, looks like a uint shifted into address slot)
royaltyRate: 1773653524 (way too high for bps, likely an address fragment)
royaltyBeneficiary: 0x4200...0006 (this is WETH, not the creator)
Impact
WriterTradingStats component silently catches the revert → shows "–" for earnings
ClaimRoyalties component likely also fails → no claim button appears
- Writers can never see or claim royalties
Investigation needed
- Verify the actual
tokenBond struct layout in the deployed MCV2_Bond contract (may need to check Etherscan ABI or Mint Club V2 source)
- Verify if
getRoyaltyInfo exists on this contract version or if the function name is different
- Update
mcv2BondAbi in lib/price.ts to match the actual contract
- Verify StoryFactory sets royalty beneficiary to the story creator during
createStoryline
Files likely affected
lib/price.ts — mcv2BondAbi definition
src/components/WriterTradingStats.tsx — royalty display
src/components/ClaimRoyalties.tsx — royalty claiming
- Possibly
lib/contracts/abi.ts — StoryFactory ABI if royalty params need to be set at creation
Reproduction
# This reverts:
cast call 0x5dfA75b0185efBaEF286E80B847ce84ff8a62C2d \
"getRoyaltyInfo(address)" \
0x14262a4576b53d94ef1333b5604e7c99862c05ce \
--rpc-url https://sepolia.base.org
Problem
Writer dashboard always shows earnings as "–" (zero) even after multiple trades (18500 tokens bought/sold).
Root cause
getRoyaltyInfo(tokenAddress)on MCV2_Bond (0x5dfA75b0185efBaEF286E80B847ce84ff8a62C2don Base Sepolia) reverts when called with the storyline token address (0x14262a4576b53d94ef1333b5604e7c99862c05ce).Additionally,
tokenBond()returns misaligned data — the ABI struct fields don't match the deployed contract:Impact
WriterTradingStatscomponent silently catches the revert → shows "–" for earningsClaimRoyaltiescomponent likely also fails → no claim button appearsInvestigation needed
tokenBondstruct layout in the deployed MCV2_Bond contract (may need to check Etherscan ABI or Mint Club V2 source)getRoyaltyInfoexists on this contract version or if the function name is differentmcv2BondAbiinlib/price.tsto match the actual contractcreateStorylineFiles likely affected
lib/price.ts—mcv2BondAbidefinitionsrc/components/WriterTradingStats.tsx— royalty displaysrc/components/ClaimRoyalties.tsx— royalty claiminglib/contracts/abi.ts— StoryFactory ABI if royalty params need to be set at creationReproduction