From dbe9f619821f60cbf0c71f02cdb309caf4d39f71 Mon Sep 17 00:00:00 2001 From: Eduardo Melo Date: Tue, 20 Aug 2024 11:18:29 -0300 Subject: [PATCH 1/2] feat: Deploy nft marketplace Arbitrum one --- .openzeppelin/arbitrum-one.json | 400 ++++++++++++++++++++++++++++++++ addresses/arbitrum/index.json | 20 ++ addresses/index.ts | 2 + hardhat.config.ts | 8 + 4 files changed, 430 insertions(+) create mode 100644 .openzeppelin/arbitrum-one.json create mode 100644 addresses/arbitrum/index.json diff --git a/.openzeppelin/arbitrum-one.json b/.openzeppelin/arbitrum-one.json new file mode 100644 index 0000000..e587646 --- /dev/null +++ b/.openzeppelin/arbitrum-one.json @@ -0,0 +1,400 @@ +{ + "manifestVersion": "3.2", + "proxies": [ + { + "address": "0x55DaC2D38817686fb5e6Dbd4393f2dAFB2e298F5", + "txHash": "0xfec1602c2410f402d5468745e9c31a82afffdaaaf42515536d8e9d39fb21ca6b", + "kind": "transparent" + }, + { + "address": "0x5E053177c73636d4378cfB4D095cFb374eBb3Da6", + "txHash": "0xd1f37dc29d3aaae92e69b1831bddc30de651360fc89a2751687930b5ef17cb4d", + "kind": "transparent" + }, + { + "address": "0xC3154ccAC181eb9d71ccd53f29F425BDdD52d983", + "txHash": "0xe33ff15167443591b86ade35419c0e11e01ea205c9859a7b5e54bac82842fce1", + "kind": "transparent" + } + ], + "impls": { + "03dbc49f2e99c8cb01616bbbd98922ee948f4f75585d7d68dc522bfc063ef00b": { + "address": "0x75EAcd67D71Aba6039bcC863E14dCe1f5263D93C", + "txHash": "0xef539ae5e45bc6ce04ec9fee57e0be3e5fc55fb3bf750cd146d3ec273d7e7f62", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "defaultSftRolesRegistry", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "OriumMarketplaceRoyalties", + "src": "contracts/OriumMarketplaceRoyalties.sol:26" + }, + { + "label": "defaultNftRolesRegistry", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "OriumMarketplaceRoyalties", + "src": "contracts/OriumMarketplaceRoyalties.sol:29" + }, + { + "label": "tokenAddressToRolesRegistry", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_address)", + "contract": "OriumMarketplaceRoyalties", + "src": "contracts/OriumMarketplaceRoyalties.sol:32" + }, + { + "label": "maxDuration", + "offset": 0, + "slot": "104", + "type": "t_uint64", + "contract": "OriumMarketplaceRoyalties", + "src": "contracts/OriumMarketplaceRoyalties.sol:35" + }, + { + "label": "feeInfo", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_address,t_struct(FeeInfo)8931_storage)", + "contract": "OriumMarketplaceRoyalties", + "src": "contracts/OriumMarketplaceRoyalties.sol:38" + }, + { + "label": "tokenAddressToRoyaltyInfo", + "offset": 0, + "slot": "106", + "type": "t_mapping(t_address,t_struct(RoyaltyInfo)8938_storage)", + "contract": "OriumMarketplaceRoyalties", + "src": "contracts/OriumMarketplaceRoyalties.sol:41" + }, + { + "label": "isTrustedFeeTokenAddressForToken", + "offset": 0, + "slot": "107", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "OriumMarketplaceRoyalties", + "src": "contracts/OriumMarketplaceRoyalties.sol:44" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(FeeInfo)8931_storage)": { + "label": "mapping(address => struct IOriumMarketplaceRoyalties.FeeInfo)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(RoyaltyInfo)8938_storage)": { + "label": "mapping(address => struct IOriumMarketplaceRoyalties.RoyaltyInfo)", + "numberOfBytes": "32" + }, + "t_struct(FeeInfo)8931_storage": { + "label": "struct IOriumMarketplaceRoyalties.FeeInfo", + "members": [ + { + "label": "feePercentageInWei", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "isCustomFee", + "type": "t_bool", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoyaltyInfo)8938_storage": { + "label": "struct IOriumMarketplaceRoyalties.RoyaltyInfo", + "members": [ + { + "label": "creator", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "royaltyPercentageInWei", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "treasury", + "type": "t_address", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "7f56eb68a57c6cdb264d10d1bcb5d65e89e0e0796d549ea8b42ba3b03b12847c": { + "address": "0xAb8E668acD4FEF935D5DfD869410bf8704688a53", + "txHash": "0x2240a43b9ad8154822511c20cc7334c5f284e42e5e204076c2d86ae366f48340", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "_paused", + "offset": 0, + "slot": "101", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "oriumMarketplaceRoyalties", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "NftRentalMarketplace", + "src": "contracts/NftRentalMarketplace.sol:23" + }, + { + "label": "isCreated", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "NftRentalMarketplace", + "src": "contracts/NftRentalMarketplace.sol:26" + }, + { + "label": "nonceDeadline", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint64))", + "contract": "NftRentalMarketplace", + "src": "contracts/NftRentalMarketplace.sol:29" + }, + { + "label": "roleDeadline", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_bytes32,t_mapping(t_address,t_mapping(t_uint256,t_uint64)))", + "contract": "NftRentalMarketplace", + "src": "contracts/NftRentalMarketplace.sol:32" + }, + { + "label": "rentals", + "offset": 0, + "slot": "155", + "type": "t_mapping(t_bytes32,t_struct(Rental)3858_storage)", + "contract": "NftRentalMarketplace", + "src": "contracts/NftRentalMarketplace.sol:35" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint64))": { + "label": "mapping(address => mapping(uint256 => uint64))", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_mapping(t_address,t_mapping(t_uint256,t_uint64)))": { + "label": "mapping(bytes32 => mapping(address => mapping(uint256 => uint64)))", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Rental)3858_storage)": { + "label": "mapping(bytes32 => struct Rental)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint64)": { + "label": "mapping(uint256 => uint64)", + "numberOfBytes": "32" + }, + "t_struct(Rental)3858_storage": { + "label": "struct Rental", + "members": [ + { + "label": "borrower", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "expirationDate", + "type": "t_uint64", + "offset": 20, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/addresses/arbitrum/index.json b/addresses/arbitrum/index.json new file mode 100644 index 0000000..0bf5493 --- /dev/null +++ b/addresses/arbitrum/index.json @@ -0,0 +1,20 @@ +{ + "KMSDeployer": { + "address": "0x04c8c6c56dab836f8bd62cb6884371507e706806" + }, + "OriumMarketplaceRoyalties": { + "address": "0x5E053177c73636d4378cfB4D095cFb374eBb3Da6", + "operator": "0x04c8c6c56dab836f8bd62cb6884371507e706806", + "implementation": "0x75EAcd67D71Aba6039bcC863E14dCe1f5263D93C", + "proxyAdmin": "0x1088a4fA9c6eb2D890AC94d006C70c43841Cff9b" + }, + "NftRentalMarketplace": { + "address": "0xC3154ccAC181eb9d71ccd53f29F425BDdD52d983", + "operator": "0x04c8c6c56dab836f8bd62cb6884371507e706806", + "implementation": "0xAb8E668acD4FEF935D5DfD869410bf8704688a53", + "proxyAdmin": "0x093b4Cb64E80560B0aA8d754cfc170EEEb6eAa5B", + "libraries": { + "LibNftRentalMarketplace": "0xF5D38eF4aFB1520514ECCC258F89EAC4898c83dF" + } + } +} \ No newline at end of file diff --git a/addresses/index.ts b/addresses/index.ts index 09829e8..b43ce69 100644 --- a/addresses/index.ts +++ b/addresses/index.ts @@ -2,12 +2,14 @@ import moonbeam from './moonbeam/index.json' import polygon from './polygon/index.json' import cronosTestnet from './cronosTestnet/index.json' import cronos from './cronos/index.json' +import arbitrum from './arbitrum/index.json' const config = { moonbeam, polygon, cronosTestnet, cronos, + arbitrum, } export default config diff --git a/hardhat.config.ts b/hardhat.config.ts index 2384386..4a965d7 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -22,6 +22,8 @@ const { MOONSCAN_API_KEY, CRONOS_TESTNET_PROVIDER_URL, CRONOS_PROVIDER_URL, + ARBITRUM_ONE_URL, + ARBITRUM_API_KEY, } = process.env const BASE_CONFIG = { @@ -39,6 +41,7 @@ const BASE_CONFIG = { cronosTestnet: CRONOSSCAN_API_KEY, cronos: CRONOSSCAN_API_KEY, moonbeam: MOONSCAN_API_KEY, + arbitrumOne: ARBITRUM_API_KEY, }, customChains: [ { @@ -113,6 +116,11 @@ const PROD_CONFIG = { url: MOONBEAM_PROVIDER_URL, accounts: [DEV_PRIVATE_KEY], }, + arbitrum: { + chainId: 42161, + url: ARBITRUM_ONE_URL, + accounts: [DEV_PRIVATE_KEY], + }, }, defender: { apiKey: DEFENDER_TEAM_API_KEY, From c3ee0233b2031a7f507dc1079394c31aa3e01731 Mon Sep 17 00:00:00 2001 From: Eduardo Melo Date: Tue, 20 Aug 2024 12:43:30 -0300 Subject: [PATCH 2/2] feat: adding ERC7432ImmutableRegitry to the addresses arbitrum --- addresses/arbitrum/index.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addresses/arbitrum/index.json b/addresses/arbitrum/index.json index 0bf5493..7991d8d 100644 --- a/addresses/arbitrum/index.json +++ b/addresses/arbitrum/index.json @@ -2,6 +2,9 @@ "KMSDeployer": { "address": "0x04c8c6c56dab836f8bd62cb6884371507e706806" }, + "ERC7432ImmutableRegistry": { + "address": "0x48c769f6a8de57d824f0e7330d7A27dee53a43cD" + }, "OriumMarketplaceRoyalties": { "address": "0x5E053177c73636d4378cfB4D095cFb374eBb3Da6", "operator": "0x04c8c6c56dab836f8bd62cb6884371507e706806", @@ -16,5 +19,6 @@ "libraries": { "LibNftRentalMarketplace": "0xF5D38eF4aFB1520514ECCC258F89EAC4898c83dF" } + } } \ No newline at end of file