-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f115d1
commit e5c211d
Showing
4 changed files
with
4 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,14 @@ import { IOriumMarketplaceRoyalties } from './interfaces/IOriumMarketplaceRoyalt | |
import { OwnableUpgradeable } from '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; | ||
import { Initializable } from '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; | ||
import { PausableUpgradeable } from '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol'; | ||
import { ReentrancyGuardUpgradeable } from '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; | ||
import { LibNftRentalMarketplace, RentalOffer, Rental } from './libraries/LibNftRentalMarketplace.sol'; | ||
|
||
/** | ||
* @title Orium NFT Marketplace - Marketplace for renting NFTs | ||
* @dev This contract is used to manage NFTs rentals, powered by ERC-7432 Non-Fungible Token Roles | ||
* @author Orium Network Team - [email protected] | ||
*/ | ||
contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable { | ||
contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgradeable { | ||
/** ######### Global Variables ########### **/ | ||
|
||
/// @dev oriumMarketplaceRoyalties stores the collection royalties and fees | ||
|
@@ -99,14 +98,6 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr | |
transferOwnership(_owner); | ||
} | ||
|
||
/** | ||
* @notice Initializes the reentrancy guard for the new version. | ||
* @dev This function can only be called once, after the contract upgrade. | ||
*/ | ||
function initializeV2() external reinitializer(2) { | ||
__ReentrancyGuard_init(); | ||
} | ||
|
||
/** ============================ Rental Functions ================================== **/ | ||
|
||
/** ######### Setters ########### **/ | ||
|
@@ -158,7 +149,7 @@ contract NftRentalMarketplace is Initializable, OwnableUpgradeable, PausableUpgr | |
function acceptRentalOffer( | ||
RentalOffer calldata _offer, | ||
uint64 _duration | ||
) external payable whenNotPaused nonReentrant { | ||
) external payable whenNotPaused { | ||
bytes32 _offerHash = LibNftRentalMarketplace.hashRentalOffer(_offer); | ||
uint64 _expirationDate = uint64(block.timestamp + _duration); | ||
LibNftRentalMarketplace.validateAcceptRentalOfferParams( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ pragma solidity 0.8.9; | |
import { OwnableUpgradeable } from '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; | ||
import { Initializable } from '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; | ||
import { PausableUpgradeable } from '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol'; | ||
import { ReentrancyGuardUpgradeable } from '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; | ||
import { IERC1155 } from '@openzeppelin/contracts/token/ERC1155/IERC1155.sol'; | ||
import { IERC7589 } from './interfaces/IERC7589.sol'; | ||
import { IERC7589Legacy } from './interfaces/IERC7589Legacy.sol'; | ||
|
@@ -17,7 +16,7 @@ import { IOriumMarketplaceRoyalties } from './interfaces/IOriumMarketplaceRoyalt | |
* @dev This contract is used to manage SFTs rentals, powered by ERC-7589 Semi-Fungible Token Roles | ||
* @author Orium Network Team - [email protected] | ||
*/ | ||
contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable { | ||
contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgradeable { | ||
/** ######### Global Variables ########### **/ | ||
|
||
/// @dev oriumMarketplaceRoyalties stores the collection royalties and fees | ||
|
@@ -117,14 +116,6 @@ contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgra | |
transferOwnership(_owner); | ||
} | ||
|
||
/** | ||
* @notice Initializes the reentrancy guard for the new version. | ||
* @dev This function can only be called once, after the contract upgrade. | ||
*/ | ||
function initializeV2() external reinitializer(2) { | ||
__ReentrancyGuard_init(); | ||
} | ||
|
||
/** ============================ Rental Functions ================================== **/ | ||
|
||
/** ######### Setters ########### **/ | ||
|
@@ -179,7 +170,7 @@ contract OriumSftMarketplace is Initializable, OwnableUpgradeable, PausableUpgra | |
function acceptRentalOffer( | ||
RentalOffer calldata _offer, | ||
uint64 _duration | ||
) external payable whenNotPaused nonReentrant { | ||
) external payable whenNotPaused { | ||
bytes32 _offerHash = LibOriumSftMarketplace.hashRentalOffer(_offer); | ||
uint64 _expirationDate = uint64(block.timestamp + _duration); | ||
LibOriumSftMarketplace.validateAcceptRentalOffer( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters