TODO_TAGS_REVIEW
TODO_AP2_EXPORT_REVIEW

ERC-2981 Royalty Calculator

Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000) -- the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses -- from a caller-declared sale_price and royalty_fraction_bps, using BigInt arithmetic throughout so a sale_price beyond Number.MAX_SAFE_INTEGER never loses precision. Flags a bps value above 10000 (100%) as out of range (the value the reference implementation reverts on) while still reporting the raw recompute, and compares against an optional claimed_royalty_amount. Zero network calls: this tool never queries a contract's actual royaltyInfo() return value -- sale_price, royalty_fraction_bps, and receiver are all caller-declared. Cross-links 528-nft-metadata-validator and 521-cant-be-evil-nft-license-picker for adjacent NFT-standard surfaces (metadata shape, license terms) this tool does not cover. ERC-2981 royalty payment is a voluntary off-chain convention: this tool makes no claim that any marketplace will actually pay the computed amount.

Tool URL: https://ainumbers.co/chaingraph/art-608-erc2981-royalty-calculator.html

post/v1/tools/calculate_erc2981_royalty

Request

  • Base URL: https://ainumbers.co
  • URL: https://ainumbers.co/v1/tools/calculate_erc2981_royalty
  • Auth: none declared

Request body

claimed_royalty_amountunknown required
receiverstring required
royalty_fraction_bpsunknown required
sale_priceunknown required

Response

Successful tool execution result

claimed_royalty_amountstring
computed_royalty_amountstring
effective_royalty_pctstring
overall_determinationstring
receiverstring
royalty_fraction_bpsstring
sale_pricestring
scope_notestring

Changes

No recorded changes to this operation across all 1 revision of this API.