Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use separate nonce contracts #38

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions contracts/Rentals.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

import "@dcl/common-contracts/meta-transactions/NativeMetaTransaction.sol";
import "@dcl/common-contracts/signatures/NonceVerifiable.sol";
import "@dcl/common-contracts/signatures/ContractNonceVerifiable.sol";
import "@dcl/common-contracts/signatures/SignerNonceVerifiable.sol";
import "@dcl/common-contracts/signatures/AssetNonceVerifiable.sol";

import "./interfaces/IERC721Rentable.sol";

contract Rentals is NonceVerifiable, NativeMetaTransaction, IERC721Receiver, ReentrancyGuardUpgradeable {
contract Rentals is
ContractNonceVerifiable,
SignerNonceVerifiable,
AssetNonceVerifiable,
NativeMetaTransaction,
IERC721Receiver,
ReentrancyGuardUpgradeable
{
/// @dev EIP712 type hashes for recovering the signer from a signature.
bytes32 private constant LISTING_TYPE_HASH =
keccak256(
Expand Down Expand Up @@ -130,7 +139,7 @@ contract Rentals is NonceVerifiable, NativeMetaTransaction, IERC721Receiver, Ree
) external initializer {
__ReentrancyGuard_init();
__NativeMetaTransaction_init("Rentals", "1");
__NonceVerifiable_init();
__ContractNonceVerifiable_init();
_setToken(_token);
_transferOwnership(_owner);
_setFeeCollector(_feeCollector);
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@dcl/common-contracts": "^1.0.1-20220803130338.commit-ef1ea53",
"@dcl/common-contracts": "^1.0.1-20220804205201.commit-93a3471",
"@nomiclabs/hardhat-ethers": "^2.0.4",
"@nomiclabs/hardhat-waffle": "^2.0.2",
"@openzeppelin/contracts": "^4.5.0",
Expand Down