-
Notifications
You must be signed in to change notification settings - Fork 1
/
TablelandRigs.sol
728 lines (642 loc) · 22.9 KB
/
TablelandRigs.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
// SPDX-License-Identifier: Unlicense
pragma solidity >=0.8.10 <0.9.0;
import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import "erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "./utils/URITemplate.sol";
import "./ITablelandRigs.sol";
import "./ITablelandRigPilots.sol";
import "./interfaces/IERC4906.sol";
import "./interfaces/IDelegationRegistry.sol";
/**
* @dev Implementation of {ITablelandRigs}.
*/
contract TablelandRigs is
ITablelandRigs,
URITemplate,
ERC721AUpgradeable,
ERC721AQueryableUpgradeable,
IERC4906,
OwnableUpgradeable,
PausableUpgradeable,
ReentrancyGuardUpgradeable,
ERC2981Upgradeable,
UUPSUpgradeable
{
// The maximum number of tokens that can be minted.
uint256 public maxSupply;
// The price of minting a token.
uint256 public mintPrice;
// The address receiving mint revenue.
address payable public beneficiary;
// The allowClaims merkletree root.
bytes32 public allowlistRoot;
// The waitClaims merkletree root.
bytes32 public waitlistRoot;
// Flag specifying whether or not claims.
MintPhase public mintPhase;
// URI for contract info.
string private _contractInfoURI;
// Pilots implementation.
ITablelandRigPilots private _pilots;
// Allow transfers while flying, only by token owner
bool private _allowTransferWhileFlying;
// Admin address
address private _admin;
// Delegate.cash registry address
IDelegationRegistry private constant _delegateCash =
IDelegationRegistry(0x00000000000076A84feF008CDAbe6409d2FE638B);
function initialize(
uint256 _maxSupply,
uint256 _mintPrice,
address payable _beneficiary,
address payable royaltyReceiver,
bytes32 _allowlistRoot,
bytes32 _waitlistRoot
) public initializerERC721A initializer {
__ERC721A_init("Tableland Rigs", "RIG");
__ERC721AQueryable_init();
__Ownable_init();
__Pausable_init();
__ReentrancyGuard_init();
__ERC2981_init();
__UUPSUpgradeable_init();
maxSupply = _maxSupply;
mintPrice = _mintPrice;
setBeneficiary(_beneficiary);
_setDefaultRoyalty(royaltyReceiver, 500);
allowlistRoot = _allowlistRoot;
waitlistRoot = _waitlistRoot;
mintPhase = MintPhase.CLOSED;
}
// =============================
// ITABLELANDRIGS
// =============================
/**
* @dev See {ITablelandRigs-mint}.
*/
function mint(uint256 quantity) external payable whenNotPaused {
bytes32[] memory proof;
_verifyMint(quantity, 0, 0, proof);
}
/**
* @dev See {ITablelandRigs-mint}.
*/
function mint(
uint256 quantity,
uint256 freeAllowance,
uint256 paidAllowance,
bytes32[] calldata proof
) external payable whenNotPaused {
_verifyMint(quantity, freeAllowance, paidAllowance, proof);
}
/**
* @dev Verifies mint against current mint phase.
*
* quantity - the number of Rigs to mint
* freeAllowance - the number of free Rigs allocated to `msg.sender`
* paidAllowance - the number of paid Rigs allocated to `msg.sender`
* proof - merkle proof proving `msg.sender` has said `freeAllowance` and `paidAllowance`
*
* Requirements:
*
* - `mintPhase` must not be `CLOSED`
* - quantity must not be zero
* - current supply must be less than `maxSupply`
* - if `mintPhase` is `ALLOWLIST` or `WAITLIST`, proof must be valid for `msg.sender`, `freeAllowance`, and `paidAllowance`
* - if `mintPhase` is `ALLOWLIST` or `WAITLIST`, `msg.sender` must have sufficient unused allowance
*/
function _verifyMint(
uint256 quantity,
uint256 freeAllowance,
uint256 paidAllowance,
bytes32[] memory proof
) private {
// Ensure mint phase is not closed
if (mintPhase == MintPhase.CLOSED) revert MintingClosed();
// Check quantity is non-zero
if (quantity == 0) revert ZeroQuantity();
// Check quantity doesn't exceed remaining quota
quantity = MathUpgradeable.min(quantity, maxSupply - totalSupply());
if (quantity == 0) revert SoldOut();
if (mintPhase == MintPhase.PUBLIC) {
_mint(quantity, quantity);
} else {
// Get merkletree root for mint phase
bytes32 root = mintPhase == MintPhase.ALLOWLIST
? allowlistRoot
: waitlistRoot;
// Verify proof against mint phase root
if (
!_verifyProof(
proof,
root,
_getLeaf(_msgSenderERC721A(), freeAllowance, paidAllowance)
)
) revert InvalidProof();
// Ensure allowance available
uint16 allowClaims;
uint16 waitClaims;
(allowClaims, waitClaims) = getClaimed(_msgSenderERC721A());
uint256 claimed = mintPhase == MintPhase.ALLOWLIST
? allowClaims
: waitClaims;
quantity = MathUpgradeable.min(
quantity,
freeAllowance + paidAllowance - claimed
);
if (
quantity == 0 ||
// Disallow claims from waitlist if already claimed on allowlist
(mintPhase == MintPhase.WAITLIST && allowClaims > 0)
) revert InsufficientAllowance();
// Get quantity that must be paid for
uint256 freeSurplus = freeAllowance > claimed
? freeAllowance - claimed
: 0;
uint256 costQuantity = quantity < freeSurplus
? 0
: quantity - freeSurplus;
// Update allowance claimed
claimed = claimed + quantity;
if (mintPhase == MintPhase.ALLOWLIST) allowClaims = uint16(claimed);
else waitClaims = uint16(claimed);
_setClaimed(_msgSenderERC721A(), allowClaims, waitClaims);
_mint(quantity, costQuantity);
// Sanity check for tests
assert(claimed <= freeAllowance + paidAllowance);
}
}
/**
* @dev Returns merkletree leaf node for given params.
*
* account - address for leaf
* freeAllowance - free allowance for leaf
* paidAllowance - paid allowance for leaf
*/
function _getLeaf(
address account,
uint256 freeAllowance,
uint256 paidAllowance
) private pure returns (bytes32) {
return
keccak256(abi.encodePacked(account, freeAllowance, paidAllowance));
}
/**
* @dev Verifies that `proof` is a valid path to `leaf` in `root`.
*
* proof - merkle proof proving `msg.sender` has said `freeAllowance` and `paidAllowance`
* root - merkletree root to verify against
* leaf - leaf node that must exist in `root` via `proof`
*/
function _verifyProof(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) private pure returns (bool) {
return MerkleProofUpgradeable.verify(proof, root, leaf);
}
/**
* @dev Mints Rigs and send revenue to `beneficiary`, refunding surplus to `msg.sender`.
*
* Borrows logic from https://github.com/divergencetech/ethier/blob/main/contracts/sales/Seller.sol.
*
* quantity - the number of Rigs to mint
* costQuantity - the number of Rigs that must be paid for
*
* Requirements:
*
* - `msg.value` must be greater than or equal to `costQuantity`
*/
function _mint(
uint256 quantity,
uint256 costQuantity
) private nonReentrant {
// Check sufficient value
uint256 cost = _cost(costQuantity);
if (msg.value < cost) revert InsufficientValue(cost);
// Mint effect and interaction
_safeMint(_msgSenderERC721A(), quantity);
// Handle funds
if (cost > 0) {
AddressUpgradeable.sendValue(beneficiary, cost);
emit Revenue(beneficiary, costQuantity, cost);
}
if (msg.value > cost) {
address payable reimburse = payable(_msgSenderERC721A());
uint256 refund = msg.value - cost;
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returnData) = reimburse.call{
value: refund
}("");
require(success, string(returnData));
emit Refund(reimburse, refund);
}
}
/**
* @dev Returns mint cost for `quantity`.
*
* quantity - number of Rigs to calculate cost for
*/
function _cost(uint256 quantity) private view returns (uint256) {
return quantity * mintPrice;
}
/**
* @dev See {ITablelandRigs-getClaimed}.
*/
function getClaimed(
address by
) public view returns (uint16 allowClaims, uint16 waitClaims) {
uint64 packed = _getAux(by);
allowClaims = uint16(packed);
waitClaims = uint16(packed >> 16);
}
/**
* @dev Sets allowlist and waitlist claims for `by` address.
*/
function _setClaimed(
address by,
uint16 allowClaims,
uint16 waitClaims
) private {
_setAux(by, (uint64(waitClaims) << 16) | uint64(allowClaims));
}
/**
* @dev See {ITablelandRigs-setMintPhase}.
*/
function setMintPhase(uint256 _mintPhase) external onlyOwner {
mintPhase = MintPhase(_mintPhase);
emit MintPhaseChanged(mintPhase);
}
/**
* @dev See {ITablelandRigs-setBeneficiary}.
*/
function setBeneficiary(address payable _beneficiary) public onlyOwner {
beneficiary = _beneficiary;
}
/**
* @dev See {ITablelandRigs-setURITemplate}.
*/
function setURITemplate(string[] memory uriTemplate) external onlyOwner {
_setURITemplate(uriTemplate);
}
/**
* @dev See {ITablelandRigs-contractURI}.
*/
function contractURI() public view returns (string memory) {
return _contractInfoURI;
}
/**
* @dev See {ITablelandRigs-setContractURI}.
*/
function setContractURI(string memory uri) external onlyOwner {
_contractInfoURI = uri;
}
/**
* @dev See {ITablelandRigs-setRoyaltyReceiver}.
*/
function setRoyaltyReceiver(address receiver) external onlyOwner {
_setDefaultRoyalty(receiver, 500);
}
/**
* @dev See {ITablelandRigs-admin}.
*/
function admin() public view returns (address) {
return _admin;
}
/**
* @dev See {ITablelandRigs-setAdmin}.
*/
function setAdmin(address adminAddress) external onlyOwner {
_admin = adminAddress;
}
/**
* @dev See {ITablelandRigs-pause}.
*/
function pause() external onlyOwner {
_pause();
}
/**
* @dev See {ITablelandRigs-unpause}.
*/
function unpause() external onlyOwner {
_unpause();
}
// =============================
// PARKING ADMIN LOGIC
// =============================
/**
* @dev Throws if called by any account other than parking admin.
*/
modifier onlyAdmin() {
_checkAdmin();
_;
}
/**
* @dev Throws if the sender is not the admin or if admin has not
* been initialized.
*/
function _checkAdmin() private view {
address adminAddress = admin();
require(
adminAddress != address(0) && adminAddress == _msgSender(),
"Caller is not the admin"
);
}
// =============================
// ITABLELANDRIGPILOTS
// =============================
/**
* @dev See {ITablelandRigs-initPilots}.
*/
function initPilots(address pilotsAddress) external onlyOwner {
_pilots = ITablelandRigPilots(pilotsAddress);
}
/**
* @dev See {ITablelandRigs-pilotSessionsTable}.
*/
function pilotSessionsTable() external view returns (string memory) {
return _pilots.pilotSessionsTable();
}
/**
* @dev See {ITablelandRigs-pilotInfo}.
*/
function pilotInfo(
uint256 tokenId
) public view returns (ITablelandRigPilots.PilotInfo memory) {
// Check the Rig `tokenId` exists
if (!_exists(tokenId)) revert OwnerQueryForNonexistentToken();
return _pilots.pilotInfo(tokenId);
}
/**
* @dev See {ITablelandRigs-pilotInfo}.
*/
function pilotInfo(
uint256[] calldata tokenIds
) external view returns (ITablelandRigPilots.PilotInfo[] memory) {
// For each token, call `pilotInfo`
ITablelandRigPilots.PilotInfo[]
memory allPilotInfo = new ITablelandRigPilots.PilotInfo[](
tokenIds.length
);
for (uint8 i = 0; i < tokenIds.length; i++) {
allPilotInfo[i] = pilotInfo(tokenIds[i]);
}
return allPilotInfo;
}
/**
* @notice Returns the token owner and the sender. Useful for authorization
* checks that take delegation into account.
*
* @dev If `msg.sender` is registered as a delegate for the address that owns
* the rig in the delegate.cash registry (= msg.sender is allowed to act
* on behalf of the owner), the owning address will be returned as sender.
*
* tokenId - the unique Rig token identifier
*/
function _getTokenOwnerAndSenderWithDelegationCheck(
uint256 tokenId
) private view returns (address tokenOwner, address sender) {
sender = _msgSenderERC721A();
tokenOwner = ownerOf(tokenId);
if (
_delegateCash.checkDelegateForToken(
sender,
tokenOwner,
address(this),
tokenId
)
) {
sender = tokenOwner;
}
}
/**
* @dev See {ITablelandRigs-trainRig}.
*/
function trainRig(uint256 tokenId) public whenNotPaused {
// Check the Rig `tokenId` exists
if (!_exists(tokenId)) revert OwnerQueryForNonexistentToken();
// Verify `msg.sender` is authorized to train the specified Rig
(
address tokenOwner,
address sender
) = _getTokenOwnerAndSenderWithDelegationCheck(tokenId);
if (tokenOwner != sender) revert ITablelandRigPilots.Unauthorized();
_pilots.trainRig(sender, tokenId);
emit MetadataUpdate(tokenId);
}
/**
* @dev See {ITablelandRigs-trainRig}.
*/
function trainRig(uint256[] calldata tokenIds) external whenNotPaused {
// Ensure the array is non-empty & only allow a batch to be an arbitrary max length of 255
// Clients should restrict this further to avoid gas exceeding limits
if (tokenIds.length == 0 || tokenIds.length > type(uint8).max)
revert ITablelandRigPilots.InvalidBatchPilotAction();
// For each token, call `trainRig`
for (uint8 i = 0; i < tokenIds.length; i++) {
trainRig(tokenIds[i]);
}
}
/**
* @dev See {ITablelandRigs-pilotRig}.
*/
function pilotRig(
uint256 tokenId,
address pilotAddr,
uint256 pilotId
) public whenNotPaused {
// Check the Rig `tokenId` exists
if (!_exists(tokenId)) revert OwnerQueryForNonexistentToken();
// Verify `msg.sender` is authorized to pilot the specified Rig
(
address tokenOwner,
address sender
) = _getTokenOwnerAndSenderWithDelegationCheck(tokenId);
if (tokenOwner != sender) revert ITablelandRigPilots.Unauthorized();
// If the supplied pilot address is `0x0`, then assume a trainer pilot
// (note: `pilotId` has no impact here). Otherwise, proceed with a
// custom pilot. The overloaded methods direct changes accordingly.
pilotAddr == address(0)
? _pilots.pilotRig(sender, tokenId)
: _pilots.pilotRig(sender, tokenId, pilotAddr, pilotId);
emit MetadataUpdate(tokenId);
}
/**
* @dev See {ITablelandRigs-pilotRig}.
*/
function pilotRig(
uint256[] calldata tokenIds,
address[] calldata pilotAddrs,
uint256[] calldata pilotIds
) external whenNotPaused {
// Ensure the arrays are non-empty
if (
tokenIds.length == 0 ||
pilotAddrs.length == 0 ||
pilotIds.length == 0
) revert ITablelandRigPilots.InvalidBatchPilotAction();
// Ensure there is a 1:1 relationship between Rig `tokenIds` and pilots
// Only allow a batch to be an arbitrary max length of 255
// Clients should restrict this further (e.g., <=5) to avoid gas exceeding limits
if (
tokenIds.length != pilotAddrs.length ||
tokenIds.length != pilotIds.length ||
tokenIds.length > type(uint8).max
) revert ITablelandRigPilots.InvalidBatchPilotAction();
// For each token, call `pilotRig`
for (uint8 i = 0; i < tokenIds.length; i++) {
pilotRig(tokenIds[i], pilotAddrs[i], pilotIds[i]);
}
}
/**
* @dev See {ITablelandRigs-parkRig}.
*/
function parkRig(uint256 tokenId) public whenNotPaused {
// Check the Rig `tokenId` exists
if (!_exists(tokenId)) revert OwnerQueryForNonexistentToken();
// Verify `msg.sender` is authorized to park the specified Rig
(
address tokenOwner,
address sender
) = _getTokenOwnerAndSenderWithDelegationCheck(tokenId);
if (tokenOwner != sender) revert ITablelandRigPilots.Unauthorized();
// Pass `false` to indicate a standard (non-force) park
_pilots.parkRig(tokenId, false);
emit MetadataUpdate(tokenId);
}
/**
* @dev See {ITablelandRigs-parkRig}.
*/
function parkRig(uint256[] calldata tokenIds) external whenNotPaused {
// Ensure the array is non-empty & only allow a batch to be an arbitrary max length of 255
// Clients should restrict this further to avoid gas exceeding limits
if (tokenIds.length == 0 || tokenIds.length > type(uint8).max)
revert ITablelandRigPilots.InvalidBatchPilotAction();
// For each token, call `parkRig`
for (uint8 i = 0; i < tokenIds.length; i++) {
parkRig(tokenIds[i]);
}
}
function _forceParkRigs(uint256[] calldata tokenIds) private {
// Ensure the array is non-empty & only allow a batch to be an arbitrary max length of 255
// Clients should restrict this further to avoid gas exceeding limits
if (tokenIds.length == 0 || tokenIds.length > type(uint8).max)
revert ITablelandRigPilots.InvalidBatchPilotAction();
// For each token, call `parkRig`
for (uint8 i = 0; i < tokenIds.length; i++) {
// Check the Rig `tokenId` exists
if (!_exists(tokenIds[i])) revert OwnerQueryForNonexistentToken();
// Pass `true` to indicate a force park
_pilots.parkRig(tokenIds[i], true);
emit MetadataUpdate(tokenIds[i]);
}
}
/**
* @dev See {ITablelandRigs-parkRigAsOwner}.
*/
function parkRigAsOwner(uint256[] calldata tokenIds) external onlyOwner {
_forceParkRigs(tokenIds);
}
/**
* @dev See {ITablelandRigs-parkRigAsAdmin}.
*/
function parkRigAsAdmin(uint256[] calldata tokenIds) external onlyAdmin {
_forceParkRigs(tokenIds);
}
// =============================
// ERC721A
// =============================
/**
* @dev See {ERC721A-_startTokenId}.
*/
function _startTokenId() internal pure override returns (uint256) {
return 1;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(
uint256 tokenId
)
public
view
override(ERC721AUpgradeable, IERC721AUpgradeable)
returns (string memory)
{
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
return _getTokenURI(_toString(tokenId));
}
/**
* @dev See {IERC721Metadata-safeTransferWhileFlying}.
*/
function safeTransferWhileFlying(
address from,
address to,
uint256 tokenId
) external {
// Verify `msg.sender` is the token owner (prevent transfers by approved address or operator)
if (ownerOf(tokenId) != _msgSenderERC721A())
revert ITablelandRigPilots.Unauthorized();
// Temporaritly set the transfer flag to allow a transfer to occur
_allowTransferWhileFlying = true;
safeTransferFrom(from, to, tokenId);
// Reset the transfer flag to block transfers
_allowTransferWhileFlying = false;
// Update the value of `owner` in the current pilot's session
_pilots.updateSessionOwner(tokenId, to);
}
/**
* @dev See {ERC721A-_beforeTokenTransfers}.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual override {
_requireNotPaused();
// Block transfers by approved operators while a Rig is being piloted, but allow transfers *only* by the owner
uint256 tokenId = startTokenId;
for (uint256 end = tokenId + quantity; tokenId < end; ++tokenId) {
// If the pilot's `startTime` is not zero, then the Rig is in-flight
if (
!(_pilots.pilotStartTime(tokenId) == 0 ||
_allowTransferWhileFlying == true)
) revert ITablelandRigPilots.InvalidPilotStatus();
}
super._beforeTokenTransfers(from, to, startTokenId, quantity);
}
// =============================
// IERC165
// =============================
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(
bytes4 interfaceId
)
public
view
override(ERC721AUpgradeable, IERC721AUpgradeable, ERC2981Upgradeable)
returns (bool)
{
return
ERC721AUpgradeable.supportsInterface(interfaceId) ||
ERC2981Upgradeable.supportsInterface(interfaceId) ||
interfaceId == bytes4(0x49064906); // See EIP-4096
}
// =============================
// UUPSUpgradeable
// =============================
/**
* @dev See {UUPSUpgradeable-_authorizeUpgrade}.
*/
function _authorizeUpgrade(address) internal view override onlyOwner {} // solhint-disable no-empty-blocks
}