Skip to content

Commit ab46879

Browse files
committed
remove ERC2981 revert case
1 parent e1c0b3c commit ab46879

File tree

7 files changed

+1
-37
lines changed

7 files changed

+1
-37
lines changed

abi/ERC2981.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[
2-
{
3-
"inputs": [],
4-
"name": "ERC2981Internal__RoyaltyExceedsMax",
5-
"type": "error"
6-
},
72
{
83
"inputs": [
94
{

abi/ERC2981Internal.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

abi/IERC2981.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[
2-
{
3-
"inputs": [],
4-
"name": "ERC2981Internal__RoyaltyExceedsMax",
5-
"type": "error"
6-
},
72
{
83
"inputs": [
94
{

abi/IERC2981Internal.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

contracts/interfaces/IERC2981Internal.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ pragma solidity ^0.8.8;
66
* @title ERC2981 interface
77
*/
88
interface IERC2981Internal {
9-
error ERC2981Internal__RoyaltyExceedsMax();
9+
1010
}

contracts/token/common/ERC2981/ERC2981Internal.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ abstract contract ERC2981Internal is IERC2981Internal {
2323
returns (address royaltyReceiver, uint256 royalty)
2424
{
2525
uint256 royaltyBPS = _getRoyaltyBPS(tokenId);
26-
if (royaltyBPS > 10000) revert ERC2981Internal__RoyaltyExceedsMax();
2726

2827
// intermediate multiplication overflow is theoretically possible here, but
2928
// not an issue in practice because of practical constraints of salePrice

spec/token/common/ERC2981.behavior.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@ export function describeBehaviorOfERC2981(
3434
);
3535

3636
describe('#royaltyInfo()', () => {
37-
describe('reverts if', () => {
38-
it('royalty exceeds maximum', async function () {
39-
await expect(
40-
instance.royaltyInfo(tokenIdThree, ethers.constants.One),
41-
).to.be.revertedWithCustomError(
42-
instance,
43-
'ERC2981Internal__RoyaltyExceedsMax',
44-
);
45-
});
46-
});
47-
4837
it('returns 0 if salePrice is 0', async function () {
4938
const [, royaltyAmount] = await instance.royaltyInfo(
5039
0,

0 commit comments

Comments
 (0)