Update docs

This commit is contained in:
github-actions
2025-04-22 16:39:54 +00:00
parent 0dda004024
commit da7fd0d3e5
230 changed files with 11375 additions and 1714 deletions

View File

@ -77,7 +77,7 @@ describe('ERC20Wrapper', function () {
.withArgs(this.token, 0, initialSupply);
});
it('reverts when inssuficient balance', async function () {
it('reverts when insufficient balance', async function () {
await this.underlying.connect(this.holder).approve(this.token, ethers.MaxUint256);
await expect(this.token.connect(this.holder).depositFor(this.holder, ethers.MaxUint256))
@ -117,7 +117,7 @@ describe('ERC20Wrapper', function () {
await this.token.connect(this.holder).depositFor(this.holder, initialSupply);
});
it('reverts when inssuficient balance', async function () {
it('reverts when insufficient balance', async function () {
await expect(this.token.connect(this.holder).withdrawTo(this.holder, ethers.MaxInt256))
.to.be.revertedWithCustomError(this.token, 'ERC20InsufficientBalance')
.withArgs(this.holder, initialSupply, ethers.MaxInt256);

View File

@ -130,10 +130,10 @@ describe('ERC4626', function () {
expect(await this.vault.previewWithdraw(value)).to.equal(sharesForWithdraw);
});
// Donate newly minted tokens to the vault during the reentracy causes the share price to increase.
// Still, the deposit that trigger the reentracy is not affected and get the previewed price.
// Donate newly minted tokens to the vault during the reentrancy causes the share price to increase.
// Still, the deposit that trigger the reentrancy is not affected and get the previewed price.
// Further deposits will get a different price (getting fewer shares for the same value of assets)
it('share price change during reentracy does not affect deposit', async function () {
it('share price change during reentrancy does not affect deposit', async function () {
// Schedules a reentrancy from the token contract that mess up the share price
await this.token.scheduleReenter(
reenterType.Before,
@ -154,10 +154,10 @@ describe('ERC4626', function () {
expect(await this.vault.previewDeposit(value)).to.lt(sharesBefore);
});
// Burn some tokens from the vault during the reentracy causes the share price to drop.
// Still, the withdraw that trigger the reentracy is not affected and get the previewed price.
// Burn some tokens from the vault during the reentrancy causes the share price to drop.
// Still, the withdraw that trigger the reentrancy is not affected and get the previewed price.
// Further withdraw will get a different price (needing more shares for the same value of assets)
it('share price change during reentracy does not affect withdraw', async function () {
it('share price change during reentrancy does not affect withdraw', async function () {
await this.vault.connect(this.holder).deposit(value, this.holder);
await this.vault.connect(this.other).deposit(value, this.other);

View File

@ -60,12 +60,24 @@ describe('SafeERC20', function () {
.withArgs(this.token);
});
it('returns false on trySafeTransfer', async function () {
await expect(this.mock.$trySafeTransfer(this.token, this.receiver, 0n))
.to.emit(this.mock, 'return$trySafeTransfer')
.withArgs(false);
});
it('reverts on transferFrom', async function () {
await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n))
.to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation')
.withArgs(this.token);
});
it('returns false on trySafeTransferFrom', async function () {
await expect(this.mock.$trySafeTransferFrom(this.token, this.mock, this.receiver, 0n))
.to.emit(this.mock, 'return$trySafeTransferFrom')
.withArgs(false);
});
it('reverts on increaseAllowance', async function () {
// Call to 'token.allowance' does not return any data, resulting in a decoding error (revert without reason)
await expect(this.mock.$safeIncreaseAllowance(this.token, this.spender, 0n)).to.be.revertedWithoutReason();
@ -94,12 +106,24 @@ describe('SafeERC20', function () {
.withArgs(this.token);
});
it('returns false on trySafeTransfer', async function () {
await expect(this.mock.$trySafeTransfer(this.token, this.receiver, 0n))
.to.emit(this.mock, 'return$trySafeTransfer')
.withArgs(false);
});
it('reverts on transferFrom', async function () {
await expect(this.mock.$safeTransferFrom(this.token, this.mock, this.receiver, 0n))
.to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation')
.withArgs(this.token);
});
it('returns false on trySafeTransferFrom', async function () {
await expect(this.mock.$trySafeTransferFrom(this.token, this.mock, this.receiver, 0n))
.to.emit(this.mock, 'return$trySafeTransferFrom')
.withArgs(false);
});
it('reverts on increaseAllowance', async function () {
await expect(this.mock.$safeIncreaseAllowance(this.token, this.spender, 0n))
.to.be.revertedWithCustomError(this.mock, 'SafeERC20FailedOperation')
@ -357,11 +381,23 @@ function shouldOnlyRevertOnErrors() {
.withArgs(this.mock, this.receiver, 10n);
});
it('returns true on trySafeTransfer', async function () {
await expect(this.mock.$trySafeTransfer(this.token, this.receiver, 10n))
.to.emit(this.mock, 'return$trySafeTransfer')
.withArgs(true);
});
it("doesn't revert on transferFrom", async function () {
await expect(this.mock.$safeTransferFrom(this.token, this.owner, this.receiver, 10n))
.to.emit(this.token, 'Transfer')
.withArgs(this.owner, this.receiver, 10n);
});
it('returns true on trySafeTransferFrom', async function () {
await expect(this.mock.$trySafeTransferFrom(this.token, this.owner, this.receiver, 10n))
.to.emit(this.mock, 'return$trySafeTransferFrom')
.withArgs(true);
});
});
describe('approvals', function () {

View File

@ -0,0 +1,216 @@
const { ethers } = require('hardhat');
const { expect } = require('chai');
const { shouldSupportInterfaces } = require('../../utils/introspection/SupportsInterface.behavior');
function shouldBehaveLikeERC6909() {
const firstTokenId = 1n;
const secondTokenId = 2n;
const randomTokenId = 125523n;
const firstTokenSupply = 2000n;
const secondTokenSupply = 3000n;
const amount = 100n;
describe('like an ERC6909', function () {
describe('balanceOf', function () {
describe("when accounts don't own tokens", function () {
it('return zero', async function () {
await expect(this.token.balanceOf(this.holder, firstTokenId)).to.eventually.be.equal(0n);
await expect(this.token.balanceOf(this.holder, secondTokenId)).to.eventually.be.equal(0n);
await expect(this.token.balanceOf(this.other, randomTokenId)).to.eventually.be.equal(0n);
});
});
describe('when accounts own some tokens', function () {
beforeEach(async function () {
await this.token.$_mint(this.holder, firstTokenId, firstTokenSupply);
await this.token.$_mint(this.holder, secondTokenId, secondTokenSupply);
});
it('returns amount owned by the given address', async function () {
await expect(this.token.balanceOf(this.holder, firstTokenId)).to.eventually.be.equal(firstTokenSupply);
await expect(this.token.balanceOf(this.holder, secondTokenId)).to.eventually.be.equal(secondTokenSupply);
await expect(this.token.balanceOf(this.other, firstTokenId)).to.eventually.be.equal(0n);
});
});
});
describe('setOperator', function () {
it('emits an OperatorSet event and updated the value', async function () {
await expect(this.token.connect(this.holder).setOperator(this.operator, true))
.to.emit(this.token, 'OperatorSet')
.withArgs(this.holder, this.operator, true);
// operator for holder
await expect(this.token.isOperator(this.holder, this.operator)).to.eventually.be.true;
// not operator for other account
await expect(this.token.isOperator(this.other, this.operator)).to.eventually.be.false;
});
it('can unset the operator approval', async function () {
await this.token.connect(this.holder).setOperator(this.operator, true);
// before
await expect(this.token.isOperator(this.holder, this.operator)).to.eventually.be.true;
// unset
await expect(this.token.connect(this.holder).setOperator(this.operator, false))
.to.emit(this.token, 'OperatorSet')
.withArgs(this.holder, this.operator, false);
// after
await expect(this.token.isOperator(this.holder, this.operator)).to.eventually.be.false;
});
it('cannot set address(0) as an operator', async function () {
await expect(this.token.connect(this.holder).setOperator(ethers.ZeroAddress, true))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidSpender')
.withArgs(ethers.ZeroAddress);
});
});
describe('approve', function () {
it('emits an Approval event and updates allowance', async function () {
await expect(this.token.connect(this.holder).approve(this.operator, firstTokenId, firstTokenSupply))
.to.emit(this.token, 'Approval')
.withArgs(this.holder, this.operator, firstTokenId, firstTokenSupply);
// approved
await expect(this.token.allowance(this.holder, this.operator, firstTokenId)).to.eventually.be.equal(
firstTokenSupply,
);
// other account is not approved
await expect(this.token.allowance(this.other, this.operator, firstTokenId)).to.eventually.be.equal(0n);
});
it('can unset the approval', async function () {
await expect(this.token.connect(this.holder).approve(this.operator, firstTokenId, 0n))
.to.emit(this.token, 'Approval')
.withArgs(this.holder, this.operator, firstTokenId, 0n);
await expect(this.token.allowance(this.holder, this.operator, firstTokenId)).to.eventually.be.equal(0n);
});
it('cannot give allowance to address(0)', async function () {
await expect(this.token.connect(this.holder).approve(ethers.ZeroAddress, firstTokenId, firstTokenSupply))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidSpender')
.withArgs(ethers.ZeroAddress);
});
});
describe('transfer', function () {
beforeEach(async function () {
await this.token.$_mint(this.holder, firstTokenId, firstTokenSupply);
await this.token.$_mint(this.holder, secondTokenId, secondTokenSupply);
});
it('transfers to the zero address are blocked', async function () {
await expect(this.token.connect(this.holder).transfer(ethers.ZeroAddress, firstTokenId, firstTokenSupply))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidReceiver')
.withArgs(ethers.ZeroAddress);
});
it('reverts when insufficient balance', async function () {
await expect(this.token.connect(this.holder).transfer(this.recipient, firstTokenId, firstTokenSupply + 1n))
.to.be.revertedWithCustomError(this.token, 'ERC6909InsufficientBalance')
.withArgs(this.holder, firstTokenSupply, firstTokenSupply + 1n, firstTokenId);
});
it('emits event and transfers tokens', async function () {
await expect(this.token.connect(this.holder).transfer(this.recipient, firstTokenId, amount))
.to.emit(this.token, 'Transfer')
.withArgs(this.holder, this.holder, this.recipient, firstTokenId, amount);
await expect(this.token.balanceOf(this.holder, firstTokenId)).to.eventually.equal(firstTokenSupply - amount);
await expect(this.token.balanceOf(this.recipient, firstTokenId)).to.eventually.equal(amount);
});
});
describe('transferFrom', function () {
beforeEach(async function () {
await this.token.$_mint(this.holder, firstTokenId, firstTokenSupply);
await this.token.$_mint(this.holder, secondTokenId, secondTokenSupply);
});
it('transfer from self', async function () {
await expect(this.token.connect(this.holder).transferFrom(this.holder, this.recipient, firstTokenId, amount))
.to.emit(this.token, 'Transfer')
.withArgs(this.holder, this.holder, this.recipient, firstTokenId, amount);
await expect(this.token.balanceOf(this.holder, firstTokenId)).to.eventually.equal(firstTokenSupply - amount);
await expect(this.token.balanceOf(this.recipient, firstTokenId)).to.eventually.equal(amount);
});
describe('with approval', async function () {
beforeEach(async function () {
await this.token.connect(this.holder).approve(this.operator, firstTokenId, amount);
});
it('reverts when insufficient allowance', async function () {
await expect(
this.token.connect(this.operator).transferFrom(this.holder, this.recipient, firstTokenId, amount + 1n),
)
.to.be.revertedWithCustomError(this.token, 'ERC6909InsufficientAllowance')
.withArgs(this.operator, amount, amount + 1n, firstTokenId);
});
it('should emit transfer event and update approval (without an Approval event)', async function () {
await expect(
this.token.connect(this.operator).transferFrom(this.holder, this.recipient, firstTokenId, amount - 1n),
)
.to.emit(this.token, 'Transfer')
.withArgs(this.operator, this.holder, this.recipient, firstTokenId, amount - 1n)
.to.not.emit(this.token, 'Approval');
await expect(this.token.allowance(this.holder, this.operator, firstTokenId)).to.eventually.equal(1n);
});
it("shouldn't reduce allowance when infinite", async function () {
await this.token.connect(this.holder).approve(this.operator, firstTokenId, ethers.MaxUint256);
await this.token.connect(this.operator).transferFrom(this.holder, this.recipient, firstTokenId, amount);
await expect(this.token.allowance(this.holder, this.operator, firstTokenId)).to.eventually.equal(
ethers.MaxUint256,
);
});
});
});
describe('with operator approval', function () {
beforeEach(async function () {
await this.token.connect(this.holder).setOperator(this.operator, true);
await this.token.$_mint(this.holder, firstTokenId, firstTokenSupply);
});
it('operator can transfer', async function () {
await expect(this.token.connect(this.operator).transferFrom(this.holder, this.recipient, firstTokenId, amount))
.to.emit(this.token, 'Transfer')
.withArgs(this.operator, this.holder, this.recipient, firstTokenId, amount);
await expect(this.token.balanceOf(this.holder, firstTokenId)).to.eventually.equal(firstTokenSupply - amount);
await expect(this.token.balanceOf(this.recipient, firstTokenId)).to.eventually.equal(amount);
});
it('operator transfer does not reduce allowance', async function () {
// Also give allowance
await this.token.connect(this.holder).approve(this.operator, firstTokenId, firstTokenSupply);
await expect(this.token.connect(this.operator).transferFrom(this.holder, this.recipient, firstTokenId, amount))
.to.emit(this.token, 'Transfer')
.withArgs(this.operator, this.holder, this.recipient, firstTokenId, amount);
await expect(this.token.allowance(this.holder, this.operator, firstTokenId)).to.eventually.equal(
firstTokenSupply,
);
});
});
shouldSupportInterfaces(['ERC6909']);
});
}
module.exports = {
shouldBehaveLikeERC6909,
};

View File

@ -0,0 +1,104 @@
const { ethers } = require('hardhat');
const { expect } = require('chai');
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
const { shouldBehaveLikeERC6909 } = require('./ERC6909.behavior');
async function fixture() {
const [holder, operator, recipient, other] = await ethers.getSigners();
const token = await ethers.deployContract('$ERC6909');
return { token, holder, operator, recipient, other };
}
describe('ERC6909', function () {
beforeEach(async function () {
Object.assign(this, await loadFixture(fixture));
});
shouldBehaveLikeERC6909();
describe('internal functions', function () {
const tokenId = 1990n;
const mintValue = 9001n;
const burnValue = 3000n;
describe('_mint', function () {
it('reverts with a zero destination address', async function () {
await expect(this.token.$_mint(ethers.ZeroAddress, tokenId, mintValue))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidReceiver')
.withArgs(ethers.ZeroAddress);
});
describe('with minted tokens', function () {
beforeEach(async function () {
this.tx = await this.token.connect(this.operator).$_mint(this.holder, tokenId, mintValue);
});
it('emits a Transfer event from 0 address', async function () {
await expect(this.tx)
.to.emit(this.token, 'Transfer')
.withArgs(this.operator, ethers.ZeroAddress, this.holder, tokenId, mintValue);
});
it('credits the minted token value', async function () {
await expect(this.token.balanceOf(this.holder, tokenId)).to.eventually.be.equal(mintValue);
});
});
});
describe('_transfer', function () {
it('reverts when transferring from the zero address', async function () {
await expect(this.token.$_transfer(ethers.ZeroAddress, this.holder, 1n, 1n))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidSender')
.withArgs(ethers.ZeroAddress);
});
it('reverts when transferring to the zero address', async function () {
await expect(this.token.$_transfer(this.holder, ethers.ZeroAddress, 1n, 1n))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidReceiver')
.withArgs(ethers.ZeroAddress);
});
});
describe('_burn', function () {
it('reverts with a zero from address', async function () {
await expect(this.token.$_burn(ethers.ZeroAddress, tokenId, burnValue))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidSender')
.withArgs(ethers.ZeroAddress);
});
describe('with burned tokens', function () {
beforeEach(async function () {
await this.token.connect(this.operator).$_mint(this.holder, tokenId, mintValue);
this.tx = await this.token.connect(this.operator).$_burn(this.holder, tokenId, burnValue);
});
it('emits a Transfer event to 0 address', async function () {
await expect(this.tx)
.to.emit(this.token, 'Transfer')
.withArgs(this.operator, this.holder, ethers.ZeroAddress, tokenId, burnValue);
});
it('debits the burned token value', async function () {
await expect(this.token.balanceOf(this.holder, tokenId)).to.eventually.be.equal(mintValue - burnValue);
});
});
});
describe('_approve', function () {
it('reverts when the owner is the zero address', async function () {
await expect(this.token.$_approve(ethers.ZeroAddress, this.recipient, 1n, 1n))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidApprover')
.withArgs(ethers.ZeroAddress);
});
});
describe('_setOperator', function () {
it('reverts when the owner is the zero address', async function () {
await expect(this.token.$_setOperator(ethers.ZeroAddress, this.operator, true))
.to.be.revertedWithCustomError(this.token, 'ERC6909InvalidApprover')
.withArgs(ethers.ZeroAddress);
});
});
});
});

View File

@ -0,0 +1,49 @@
const { ethers } = require('hardhat');
const { expect } = require('chai');
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
async function fixture() {
const token = await ethers.deployContract('$ERC6909ContentURI');
return { token };
}
describe('ERC6909ContentURI', function () {
beforeEach(async function () {
Object.assign(this, await loadFixture(fixture));
});
describe('contractURI', function () {
it('is empty string by default', async function () {
await expect(this.token.contractURI()).to.eventually.equal('');
});
it('is settable by internal setter', async function () {
await this.token.$_setContractURI('https://example.com');
await expect(this.token.contractURI()).to.eventually.equal('https://example.com');
});
it('emits an event when set', async function () {
await expect(this.token.$_setContractURI('https://example.com')).to.emit(this.token, 'ContractURIUpdated');
});
});
describe('tokenURI', function () {
it('is empty string by default', async function () {
await expect(this.token.tokenURI(1n)).to.eventually.equal('');
});
it('can be set by dedicated setter', async function () {
await this.token.$_setTokenURI(1n, 'https://example.com/1');
await expect(this.token.tokenURI(1n)).to.eventually.equal('https://example.com/1');
// Only set for the specified token ID
await expect(this.token.tokenURI(2n)).to.eventually.equal('');
});
it('emits an event when set', async function () {
await expect(this.token.$_setTokenURI(1n, 'https://example.com/1'))
.to.emit(this.token, 'URI')
.withArgs('https://example.com/1', 1n);
});
});
});

View File

@ -0,0 +1,58 @@
const { ethers } = require('hardhat');
const { expect } = require('chai');
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
async function fixture() {
const token = await ethers.deployContract('$ERC6909Metadata');
return { token };
}
describe('ERC6909Metadata', function () {
beforeEach(async function () {
Object.assign(this, await loadFixture(fixture));
});
describe('name', function () {
it('is empty string be default', async function () {
await expect(this.token.name(1n)).to.eventually.equal('');
});
it('can be set by dedicated setter', async function () {
await expect(this.token.$_setName(1n, 'My Token'))
.to.emit(this.token, 'ERC6909NameUpdated')
.withArgs(1n, 'My Token');
await expect(this.token.name(1n)).to.eventually.equal('My Token');
// Only set for the specified token ID
await expect(this.token.name(2n)).to.eventually.equal('');
});
});
describe('symbol', function () {
it('is empty string be default', async function () {
await expect(this.token.symbol(1n)).to.eventually.equal('');
});
it('can be set by dedicated setter', async function () {
await expect(this.token.$_setSymbol(1n, 'MTK')).to.emit(this.token, 'ERC6909SymbolUpdated').withArgs(1n, 'MTK');
await expect(this.token.symbol(1n)).to.eventually.equal('MTK');
// Only set for the specified token ID
await expect(this.token.symbol(2n)).to.eventually.equal('');
});
});
describe('decimals', function () {
it('is 0 by default', async function () {
await expect(this.token.decimals(1n)).to.eventually.equal(0);
});
it('can be set by dedicated setter', async function () {
await expect(this.token.$_setDecimals(1n, 18)).to.emit(this.token, 'ERC6909DecimalsUpdated').withArgs(1n, 18);
await expect(this.token.decimals(1n)).to.eventually.equal(18);
// Only set for the specified token ID
await expect(this.token.decimals(2n)).to.eventually.equal(0);
});
});
});

View File

@ -0,0 +1,53 @@
const { ethers } = require('hardhat');
const { expect } = require('chai');
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
const { shouldBehaveLikeERC6909 } = require('../ERC6909.behavior');
async function fixture() {
const [holder, operator, recipient, other] = await ethers.getSigners();
const token = await ethers.deployContract('$ERC6909TokenSupply');
return { token, holder, operator, recipient, other };
}
describe('ERC6909TokenSupply', function () {
beforeEach(async function () {
Object.assign(this, await loadFixture(fixture));
});
shouldBehaveLikeERC6909();
describe('totalSupply', function () {
it('is zero before any mint', async function () {
await expect(this.token.totalSupply(1n)).to.eventually.be.equal(0n);
});
it('minting tokens increases the total supply', async function () {
await this.token.$_mint(this.holder, 1n, 17n);
await expect(this.token.totalSupply(1n)).to.eventually.be.equal(17n);
});
describe('with tokens minted', function () {
const supply = 1000n;
beforeEach(async function () {
await this.token.$_mint(this.holder, 1n, supply);
});
it('burning tokens decreases the total supply', async function () {
await this.token.$_burn(this.holder, 1n, 17n);
await expect(this.token.totalSupply(1n)).to.eventually.be.equal(supply - 17n);
});
it('supply unaffected by transfers', async function () {
await this.token.$_transfer(this.holder, this.recipient, 1n, 42n);
await expect(this.token.totalSupply(1n)).to.eventually.be.equal(supply);
});
it('supply unaffected by no-op', async function () {
await this.token.$_update(ethers.ZeroAddress, ethers.ZeroAddress, 1n, 42n);
await expect(this.token.totalSupply(1n)).to.eventually.be.equal(supply);
});
});
});
});

View File

@ -10,7 +10,6 @@ const firstTokenId = 5042n;
const secondTokenId = 79217n;
const nonExistentTokenId = 13n;
const fourthTokenId = 4n;
const baseURI = 'https://api.example.com/v1/';
const RECEIVER_MAGIC_VALUE = '0x150b7a02';
@ -936,31 +935,6 @@ function shouldBehaveLikeERC721Metadata(name, symbol) {
.to.be.revertedWithCustomError(this.token, 'ERC721NonexistentToken')
.withArgs(nonExistentTokenId);
});
describe('base URI', function () {
beforeEach(function () {
if (!this.token.interface.hasFunction('setBaseURI')) {
this.skip();
}
});
it('base URI can be set', async function () {
await this.token.setBaseURI(baseURI);
expect(await this.token.baseURI()).to.equal(baseURI);
});
it('base URI is added as a prefix to the token URI', async function () {
await this.token.setBaseURI(baseURI);
expect(await this.token.tokenURI(firstTokenId)).to.equal(baseURI + firstTokenId.toString());
});
it('token URI can be changed by changing the base URI', async function () {
await this.token.setBaseURI(baseURI);
const newBaseURI = 'https://api.example.com/v2/';
await this.token.setBaseURI(newBaseURI);
expect(await this.token.tokenURI(firstTokenId)).to.equal(newBaseURI + firstTokenId.toString());
});
});
});
});
}

View File

@ -217,14 +217,6 @@ describe('ERC721Consecutive', function () {
).to.be.revertedWithCustomError(factory, 'ERC721ForbiddenMint');
});
it('cannot use single minting during construction', async function () {
const factory = await ethers.getContractFactory('$ERC721ConsecutiveNoConstructorMintMock');
await expect(
ethers.deployContract('$ERC721ConsecutiveNoConstructorMintMock', [name, symbol]),
).to.be.revertedWithCustomError(factory, 'ERC721ForbiddenMint');
});
it('consecutive mint not compatible with enumerability', async function () {
const factory = await ethers.getContractFactory('$ERC721ConsecutiveEnumerableMock');