Skip to content

Commit

Permalink
feat!: Post audit (#52)
Browse files Browse the repository at this point in the history
* feat: Store pricePerDayLength in a separate variable to reduce gas (#35)

* feat: Use chained init functions of meta and nonce verifiable contracts (#34)

* feat: Use chained init functions of meta and nonce verifiable contracts

* chore: Update commons version

* chore: Test name and version hash init

* feat: Reentrancy Guard (#36)

* feat: Protect functions with reentrancy guard

* chore: Test Reentrancy though claim

* chore: ReentrantERC721 to tests reentrancies

* feat: Move nonReentrant modifiers

* chore: Add nonReentrant tests

* feat: New var for min max days (#42)

* chore: Remove unnecessary test vars (#41)

* chore: Test revert when arrays are signed in a different order that p… (#40)

chore: Test revert when arrays are signed in a different order that provided

* feat: Rename set operator (#37)

* feat: Rename setOperator

* feat: Rename event and add test

* feat: Use separate nonce contracts (#38)

* feat: Set many land update operator (#39)

* feat: Set many land update operators

* chore: Add tests

* chore: Add more tests

* chore: Remove only

* chore: Update comment

* feat: Provide multiple options to set maly land update operator

* Update contracts/Rentals.sol

Co-authored-by: Ignacio Mazzara <nachomazzara@gmail.com>

* chore: Add test accepting empty arrays in set many land operators

* feat!: Remove UpdateOperatorUpdated event

* chore: Test events emited from set many land update operator

* chore: Test update operator event in estate contract

Co-authored-by: Ignacio Mazzara <nachomazzara@gmail.com>

* feat: Claim multiple assets with a single trx (#45)

* feat: Claim multiple assets with a single trx

* chore: Test claiming multiple items

* chore: More testtsssss

* chore: Add test to check reverts when claiming invalid assets

* chore: Add solhint (#44)

chore: Lint

* feat: Indexed events (#47)

* feat: Max fee const (#48)

* chore: Fix typos (#49)

* feat: Optimize handle token transfer (#46)

* feat: Optimize handle token transfer

* chore: Rename var

* feat: Set update operator of many assets (#50)

* feat: Set update operator function now allows updating the operator of multiple assets

* chore: Update comment

* chore: Lint

* chore: Text

* chore: Add tests

* feat: Move signature verification (#51)

* feat: Move signature verification

* fix: Test

* feat: Allow expiration == block.timestamp (#54)

* feat: Simplify ownerOf check in _rent function (#55)

* chore: Test rental days overflow (#56)

* chore: Test rental days overflow on acceptListing

* chore: Add test for acceptOffer and onERC721Received

* feat: Private state vars (#53)

feat!: Make public vars private and add getters

* feat: Add max rental days const (#57)

* feat: Add max rental days const and verify that rental days does not exceed it on rentals

* chore: Test rentals day limit on acceptListing

* chore: Test in acceptOffer

* chore: Test onERC721Received

* chore: Add comments

* chore: Fix comments

* chore: Remove now useless tests

* feat: Remove set token function (#58)

* chore: Rename revert message (#60)

* feat: Pausable (#59)

* feat: Add pause functionallity

* chore: Add pausable tests

* feat: Remove whenNotPaused from setUpdateOperator funcs

* Revert "feat: Remove whenNotPaused from setUpdateOperator funcs"

This reverts commit ca28150.

* chore: Various minor last minute changes (#61)

* feat: Memory instead of calldata for acceptListing and acceptOffer (#62)

* feat: Use memory instead of calldata

* chore: Update comment

* feat: Update common contracts and oz libs (#73)

* feat: Remove static calls (#64)

* feat: Remove owner of staticcall

* feat: Remove supports interface fingerprint

* feat: Remove verify fingerprint staticcall

* feat: Implement _disableInitializers in constructor (#74)

* feat: Use _disableInitializers in constructor

* feat: Add RentalsProxy for testing purposes

* feat: Add proxy in tests

* chore: Automine true in afterEach

* fix: Tests

* chore: Add test to check that the implementation cannot be initialized

* chore: Add comment

* chore: Update test

* feat: Update commons + Uses IndexVerifiables (#76)

* feat: Update lib

* feat: Rename Nonce to Index

* feat: Rename signature nonces to indexes

* feat: Rename accept listing index to conditionalIndex

* chore: Rename variable name from test abi

* chore: Comment

* feat: Update commons with official version

Co-authored-by: Ignacio Mazzara <nachomazzara@gmail.com>
  • Loading branch information
fzavalia and nachomazzara committed Sep 23, 2022
1 parent 9f92af7 commit ab00ac8
Show file tree
Hide file tree
Showing 16 changed files with 7,348 additions and 4,455 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/compile-test.yaml
Expand Up @@ -5,10 +5,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npx hardhat compile
- run: npx hardhat test
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm run lint
- run: npm run compile
- run: npm run test
6 changes: 6 additions & 0 deletions .solhint.json
@@ -0,0 +1,6 @@
{
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}
512 changes: 305 additions & 207 deletions contracts/Rentals.sol

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion contracts/interfaces/IERC721Rentable.sol
Expand Up @@ -6,11 +6,18 @@ import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/// @notice Extended ERC721 interface with methods required by the Rentals contract.
interface IERC721Rentable is IERC721 {
/// @dev Updates the operator of the asset.
/// @dev Updates the operator of the asset.
/// The idea of this role is mostly of a content operator, a role capable of modifying the content of the asset.
/// It is not the same as the one defined in the ERC721 standard, which can manipulate the asset in itself.
function setUpdateOperator(uint256, address) external;

/// @dev Updates the update operator of many DCL LANDs simultaneously inside an Estate.
function setManyLandUpdateOperator(
uint256 _tokenId,
uint256[] memory _landTokenIds,
address _operator
) external;

/// @dev Checks that the provided fingerprint matches the fingerprint of the composable asset.
function verifyFingerprint(uint256, bytes memory) external view returns (bool);
}

0 comments on commit ab00ac8

Please sign in to comment.