-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor royalty #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Refactor royalty #440
Conversation
the royal fee calculation function is pretty important here. |
@@ -125,6 +126,10 @@ contract NonFungibleRegistryEnumerableUpgradeable is | |||
/// @dev The REGISTRAR_ROLE_ADMIN curates the address with REGISTRAR_ROLE permissions | |||
bytes32 public constant REGISTRAR_ROLE_ADMIN = keccak256("REGISTRAR_ROLE_ADMIN"); | |||
|
|||
|
|||
/// @notice used to calculate burn % in calculating royaltyAmount | |||
uint constant burnDenom = 10000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to uint256
@@ -273,7 +278,8 @@ contract NonFungibleRegistryEnumerableUpgradeable is | |||
|
|||
_createLabeledToken(to, label, registrationData, tokenId); | |||
|
|||
uint256 burnAmount = registrationFee * burnFee / 10000; | |||
uint256 burnAmount = calculateRoyalty(registrationFee); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the intended functionality; this function costs "registration token" (ie Hypertoken) to use, and isn't/shouldn't be related to the royalties at all.
@@ -443,12 +449,16 @@ contract NonFungibleRegistryEnumerableUpgradeable is | |||
} | |||
} | |||
|
|||
function calculateRoyalty(uint256 salePrice) internal view returns(uint256 amount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can change this to pure
No description provided.