Ability to set starting token id for ERC721Consecutive (#4097)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
@ -11,13 +11,18 @@ import "../../token/ERC721/extensions/draft-ERC721Votes.sol";
|
||||
* @title ERC721ConsecutiveMock
|
||||
*/
|
||||
contract ERC721ConsecutiveMock is ERC721Consecutive, ERC721Pausable, ERC721Votes {
|
||||
uint96 private immutable _offset;
|
||||
|
||||
constructor(
|
||||
string memory name,
|
||||
string memory symbol,
|
||||
uint96 offset,
|
||||
address[] memory delegates,
|
||||
address[] memory receivers,
|
||||
uint96[] memory amounts
|
||||
) ERC721(name, symbol) EIP712(name, "1") {
|
||||
_offset = offset;
|
||||
|
||||
for (uint256 i = 0; i < delegates.length; ++i) {
|
||||
_delegate(delegates[i], delegates[i]);
|
||||
}
|
||||
@ -27,6 +32,10 @@ contract ERC721ConsecutiveMock is ERC721Consecutive, ERC721Pausable, ERC721Votes
|
||||
}
|
||||
}
|
||||
|
||||
function _firstConsecutiveId() internal view virtual override returns (uint96) {
|
||||
return _offset;
|
||||
}
|
||||
|
||||
function _ownerOf(uint256 tokenId) internal view virtual override(ERC721, ERC721Consecutive) returns (address) {
|
||||
return super._ownerOf(tokenId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user