Repository navigation
feat(sdk): developer-NFT read/claim actions + nonce coercion fix - #195
Merged
Merged
Conversation
Expose the on-chain developer-NFT reward flow: getDeveloperNft, getClaimableRewardsFromFees, getClaimableRewardsFromInflation, claimNft rewards/epochs. NFTMinter ABI + AddressManager-based address resolution. Mirrors existing action patterns; unit tests added. (Codex-generated; build + 90 tests green. Base is fix/callkey-wildcard-sentinel — rebase onto v2-dev before PR.)
getCurrentNonce returned the RPC's hex quantity string while the declared return type (and callers) expect a number. On the local-account signing path the raw string flows into viem's transaction serializer, which encodes the ASCII characters as the nonce bytes — producing an unmineable transaction and an infinite receipt wait. Affects any local-account consensus call (appeals, top-ups) on network backends.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
MuncleUscles
marked this pull request as ready for review
July 6, 2026 16:52
Member
Author
|
/run-e2e |
1 similar comment
Member
Author
|
/run-e2e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds SDK support for the developer NFT reward mechanism so libraries — and the tooling e2e suite — can read and claim developer rewards, plus a nonce-serialization fix uncovered while building it.
Developer NFT actions (
src/contracts/actions.ts,src/abi/nftMinter.ts)getDeveloperNft({ developer })→DeveloperNft | null(nftId,developer,claimableRewards,lastClaimedEpoch,ghosts)getClaimableRewardsFromFees({ nftId })→bigintgetClaimableRewardsFromInflation({ nftId, numberOfEpochsToClaim })→bigintclaimNftRewards({ nftId })/claimNftEpochs({ nftId, numberOfEpochsToClaim })Verified end-to-end against a live dev-env stack — the developer-NFT accuracy e2e (
055_developer_nft_rewards) reconciles these views to the wei against on-chain fee events and the epoch inflation formula.Nonce fix (
src/accounts/actions.ts)getCurrentNoncereturned the RPC's hex quantity string while the declared return type (and callers) expect anumber. On the local-account signing path the raw string flowed into viem's transaction serializer, which encoded the ASCII characters as the nonce bytes — producing an unmineable transaction and an infinite receipt wait. This bit any local-account consensus call (appeals, top-ups) on network backends; the fix coerces toNumber.Tests
npm test(typecheck + vitest): 89 passing. Build clean.