ERC-2981 Contract

Royalty

NFT ์‹œ์žฅ์—์„œ๋Š” Royalty ๋ผ๋Š” ๊ฐœ๋…์ด ์žˆ๋‹ค.

์‰ฝ๊ฒŒ ์„ค๋ช…ํ•˜๋ฉด, ๋‚ด๊ฐ€ ๋งŒ๋“  NFT(๋‚˜์˜ ์ฐฝ์ž‘๋ฌผ)์— ๋Œ€ํ•ด์„œ, ๋ชจ๋“  2์ฐจํŒ๋งค๊ฐ€ ์ผ์–ด๋‚˜๋Š” ๊ฒฝ์šฐ ์› ์ฐฝ์ž‘์ž(๋‚˜)์—๊ฒŒ ์ผ์ • ๊ธˆ์•ก์„ ์ง€๋ถˆํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

์ €์ž‘๊ถŒ๋ฃŒ๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ์ดํ•ด๊ฐ€ ์‰ฝ๋‹ค.

๊ธฐ์กด NFT๋ฅผ ๋ฐœํ–‰ํ•˜๊ธฐ ์œ„ํ•ด์„œ ์ˆ˜๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด ERC-721 ์ปจํŠธ๋ž™ํŠธ๋ฅผ ๋ฐฐํฌํ•ด ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ, Royalty ์‹œ์Šคํ…œ์„ ๊ตฌํ˜„ํ•œ ๊ฒƒ์€ ๊ฐ ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค๋‚˜ ํ”„๋กœ์ ํŠธ ๋ณ„๋กœ ๋‹ฌ๋ž๋‹ค.

๊ทธ ํ‘œ์ค€์„ ์ •๋ฆฝํ•œ ๊ฒƒ์ด ๋ฐ”๋กœ ERC-2981 ์ปจํŠธ๋ž™ํŠธ์ด๋‹ค.

Royalty Info

/// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice
    function royaltyInfo(
        uint256 _tokenId,
        uint256 _salePrice
    ) external view returns (
        address receiver,
        uint256 royaltyAmount
    );

EIP ๋ฌธ์„œ์—์„œ ์‚ดํŽด๋ณด๋ฉด, ์œ„์™€ ๊ฐ™์ด Royalty Info๋ฅผ ์กฐํšŒํ•˜๋Š” ํ•จ์ˆ˜๊ฐ€ ์žˆ๋‹ค.

receiver๊ฐ€ ์› ์ฐฝ์ž‘์ž๊ฐ€ ๋  ๊ฒƒ์ด๊ณ , royaltyAmount๋Š” salePrice๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ณ„์‚ฐ๋œ ๊ฐ€๊ฒฉ์„ ๋ฆฌํ„ดํ•˜๊ฒŒ ๋  ๊ฒƒ์ด๋‹ค.

Last updated