Skip to content

Commit

Permalink
ON-479: PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lima committed Sep 28, 2023
1 parent 66c3b16 commit ee6e730
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
30 changes: 15 additions & 15 deletions contracts/OriumMarketplace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ contract OriumMarketplace is Initializable, OwnableUpgradeable, PausableUpgradea
);
/**
* @param nonce The nonce of the rental offer
* @param lender The address of the user lending the NFT
* @param borrower The address of the user renting the NFT
* @param tokenAddress The address of the contract of the NFT to rent
* @param tokenId The tokenId of the NFT to rent
* @param lender The address of the user lending the NFT
* @param borrower The address of the user renting the NFT
* @param feeTokenAddress The address of the ERC20 token for rental fees
* @param feeAmountPerSecond The amount of fee per second
* @param deadline The deadline until when the rental offer is valid
Expand All @@ -109,10 +109,10 @@ contract OriumMarketplace is Initializable, OwnableUpgradeable, PausableUpgradea
*/
event RentalOfferCreated(
uint256 indexed nonce,
address indexed lender,
address indexed tokenAddress,
uint256 indexed tokenId,
address lender,
address borrower,
address tokenAddress,
uint256 tokenId,
address feeTokenAddress,
uint256 feeAmountPerSecond,
uint256 deadline,
Expand All @@ -122,18 +122,18 @@ contract OriumMarketplace is Initializable, OwnableUpgradeable, PausableUpgradea

/**
* @param nonce The nonce of the rental offer
* @param lender The address of the lender
* @param borrower The address of the borrower
* @param tokenAddress The address of the contract of the NFT rented
* @param tokenId The tokenId of the rented NFT
* @param lender The address of the lender
* @param borrower The address of the borrower
* @param expirationDate The expiration date of the rental
*/
event RentalStarted(
uint256 indexed nonce,
address indexed lender,
address indexed borrower,
address tokenAddress,
uint256 tokenId,
address indexed tokenAddress,
uint256 indexed tokenId,
address lender,
address borrower,
uint64 expirationDate
);

Expand Down Expand Up @@ -198,10 +198,10 @@ contract OriumMarketplace is Initializable, OwnableUpgradeable, PausableUpgradea

emit RentalOfferCreated(
_offer.nonce,
_offer.lender,
_offer.borrower,
_offer.tokenAddress,
_offer.tokenId,
_offer.lender,
_offer.borrower,
_offer.feeTokenAddress,
_offer.feeAmountPerSecond,
_offer.deadline,
Expand Down Expand Up @@ -251,10 +251,10 @@ contract OriumMarketplace is Initializable, OwnableUpgradeable, PausableUpgradea

emit RentalStarted(
_offer.nonce,
_offer.lender,
msg.sender,
_offer.tokenAddress,
_offer.tokenId,
_offer.lender,
msg.sender,
_expirationDate
);
}
Expand Down
14 changes: 7 additions & 7 deletions test/OriumMarketplace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ describe('OriumMarketplace', () => {
rentalExpirationDate = blockTimestamp + duration
})
describe('Create Rental Offer', async () => {
it('Should create a rental offer for ERC721', async () => {
it('Should create a rental offer', async () => {
await expect(marketplace.connect(lender).createRentalOffer(rentalOffer))
.to.emit(marketplace, 'RentalOfferCreated')
.withArgs(
rentalOffer.nonce,
rentalOffer.lender,
rentalOffer.borrower,
rentalOffer.tokenAddress,
rentalOffer.tokenId,
rentalOffer.lender,
rentalOffer.borrower,
rentalOffer.feeTokenAddress,
rentalOffer.feeAmountPerSecond,
rentalOffer.deadline,
Expand Down Expand Up @@ -137,10 +137,10 @@ describe('OriumMarketplace', () => {
.to.emit(marketplace, 'RentalStarted')
.withArgs(
rentalOffer.nonce,
rentalOffer.lender,
rentalOffer.borrower,
rentalOffer.tokenAddress,
rentalOffer.tokenId,
rentalOffer.lender,
rentalOffer.borrower,
expirationDate,
)
})
Expand Down Expand Up @@ -185,10 +185,10 @@ describe('OriumMarketplace', () => {
.to.emit(marketplace, 'RentalStarted')
.withArgs(
rentalOffer.nonce,
rentalOffer.lender,
notOperator.address,
rentalOffer.tokenAddress,
rentalOffer.tokenId,
rentalOffer.lender,
notOperator.address,
blockTimestamp + duration + 1,
)
})
Expand Down

0 comments on commit ee6e730

Please sign in to comment.