Skip to content

feat: add nft royalty info#536

Closed
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/nft-royalties-472
Closed

feat: add nft royalty info#536
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/nft-royalties-472

Conversation

@dangelo352

Copy link
Copy Markdown

Fixes #472

Summary

  • add admin-configurable NFT royalty recipient and basis-point rate capped at 10%
  • add royalty_info(token_id, sale_price) returning EIP-2981-style recipient and floor-rounded amount
  • backfill royalty storage during migration and document the marketplace settlement hook

Tests

  • CARGO_TARGET_DIR=/tmp/commitlabs-nft-royalties-target cargo test -p commitment_nft royalty -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-nft-royalties-target cargo test -p commitment_nft mint -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-nft-royalties-target cargo test -p commitment_nft transfer -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-nft-royalties-target cargo test -p commitment_nft balance -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-nft-royalties-target cargo test -p commitment_nft -- --nocapture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add per-asset withdrawable royalties to commitment_nft::transfer (EIP-2981 style)

2 participants