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

Upgrade Market contract to put swap behind allowlist role -- Mumbai and Polygon #727

Merged
merged 3 commits into from
Dec 2, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,366 changes: 1,363 additions & 3 deletions .openzeppelin/polygon-mumbai.json

Large diffs are not rendered by default.

366 changes: 366 additions & 0 deletions .openzeppelin/polygon.json
Original file line number Diff line number Diff line change
Expand Up @@ -10493,6 +10493,372 @@
}
}
}
},
"d8d85c958d818cf85eac16b4d4366cb5005565fdbfb643682d0b8026ec921038": {
"address": "0x59a35b5C5d66d5258296f1bdd7c40b486d4Dc601",
"txHash": "0xec535cef319e27411ca72aaf2c4b6365d6bb72df2713da3da22d3e802ab411a7",
"layout": {
"solcVersion": "0.8.17",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_paused",
"offset": 0,
"slot": "51",
"type": "t_bool",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
},
{
"label": "__gap",
"offset": 0,
"slot": "52",
"type": "t_array(t_uint256)49_storage",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC165Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41"
},
{
"label": "_roles",
"offset": 0,
"slot": "151",
"type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259"
},
{
"label": "_roleMembers",
"offset": 0,
"slot": "201",
"type": "t_mapping(t_bytes32,t_struct(AddressSet)7814_storage)",
"contract": "AccessControlEnumerableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "202",
"type": "t_array(t_uint256)49_storage",
"contract": "AccessControlEnumerableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol:76"
},
{
"label": "__gap",
"offset": 0,
"slot": "251",
"type": "t_array(t_uint256)50_storage",
"contract": "MulticallUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol:50"
},
{
"label": "_removal",
"offset": 0,
"slot": "301",
"type": "t_contract(Removal)15564",
"contract": "Market",
"src": "contracts/Market.sol:131"
},
{
"label": "_certificate",
"offset": 0,
"slot": "302",
"type": "t_contract(Certificate)9001",
"contract": "Market",
"src": "contracts/Market.sol:136"
},
{
"label": "_purchasingToken",
"offset": 0,
"slot": "303",
"type": "t_contract(IERC20WithPermit)9249",
"contract": "Market",
"src": "contracts/Market.sol:141"
},
{
"label": "_restrictedNORI",
"offset": 0,
"slot": "304",
"type": "t_contract(RestrictedNORI)18061",
"contract": "Market",
"src": "contracts/Market.sol:146"
},
{
"label": "_priceMultiple",
"offset": 0,
"slot": "305",
"type": "t_uint256",
"contract": "Market",
"src": "contracts/Market.sol:154"
},
{
"label": "_noriFeeWallet",
"offset": 0,
"slot": "306",
"type": "t_address",
"contract": "Market",
"src": "contracts/Market.sol:159"
},
{
"label": "_noriFeePercentage",
"offset": 0,
"slot": "307",
"type": "t_uint256",
"contract": "Market",
"src": "contracts/Market.sol:164"
},
{
"label": "_priorityRestrictedThreshold",
"offset": 0,
"slot": "308",
"type": "t_uint256",
"contract": "Market",
"src": "contracts/Market.sol:169"
},
{
"label": "_currentSupplierAddress",
"offset": 0,
"slot": "309",
"type": "t_address",
"contract": "Market",
"src": "contracts/Market.sol:174"
},
{
"label": "_suppliers",
"offset": 0,
"slot": "310",
"type": "t_mapping(t_address,t_struct(LinkedListNode)11119_storage)",
"contract": "Market",
"src": "contracts/Market.sol:179"
},
{
"label": "_listedSupply",
"offset": 0,
"slot": "311",
"type": "t_mapping(t_address,t_struct(RemovalsByYear)16113_storage)",
"contract": "Market",
"src": "contracts/Market.sol:185"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_bytes32)dyn_storage": {
"label": "bytes32[]",
"numberOfBytes": "32"
},
"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_contract(Certificate)9001": {
"label": "contract Certificate",
"numberOfBytes": "20"
},
"t_contract(IERC20WithPermit)9249": {
"label": "contract IERC20WithPermit",
"numberOfBytes": "20"
},
"t_contract(Removal)15564": {
"label": "contract Removal",
"numberOfBytes": "20"
},
"t_contract(RestrictedNORI)18061": {
"label": "contract RestrictedNORI",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_bool)": {
"label": "mapping(address => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_struct(LinkedListNode)11119_storage)": {
"label": "mapping(address => struct Market.LinkedListNode)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_struct(RemovalsByYear)16113_storage)": {
"label": "mapping(address => struct RemovalsByYear)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_struct(AddressSet)7814_storage)": {
"label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_struct(RoleData)179_storage)": {
"label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_uint256)": {
"label": "mapping(bytes32 => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_struct(UintSet)7971_storage)": {
"label": "mapping(uint256 => struct EnumerableSetUpgradeable.UintSet)",
"numberOfBytes": "32"
},
"t_struct(AddressSet)7814_storage": {
"label": "struct EnumerableSetUpgradeable.AddressSet",
"members": [
{
"label": "_inner",
"type": "t_struct(Set)7499_storage",
"offset": 0,
"slot": "0"
}
],
"numberOfBytes": "64"
},
"t_struct(LinkedListNode)11119_storage": {
"label": "struct Market.LinkedListNode",
"members": [
{
"label": "previous",
"type": "t_address",
"offset": 0,
"slot": "0"
},
{
"label": "next",
"type": "t_address",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_struct(RemovalsByYear)16113_storage": {
"label": "struct RemovalsByYear",
"members": [
{
"label": "yearToRemovals",
"type": "t_mapping(t_uint256,t_struct(UintSet)7971_storage)",
"offset": 0,
"slot": "0"
},
{
"label": "earliestYear",
"type": "t_uint256",
"offset": 0,
"slot": "1"
},
{
"label": "latestYear",
"type": "t_uint256",
"offset": 0,
"slot": "2"
}
],
"numberOfBytes": "96"
},
"t_struct(RoleData)179_storage": {
"label": "struct AccessControlUpgradeable.RoleData",
"members": [
{
"label": "members",
"type": "t_mapping(t_address,t_bool)",
"offset": 0,
"slot": "0"
},
{
"label": "adminRole",
"type": "t_bytes32",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_struct(Set)7499_storage": {
"label": "struct EnumerableSetUpgradeable.Set",
"members": [
{
"label": "_values",
"type": "t_array(t_bytes32)dyn_storage",
"offset": 0,
"slot": "0"
},
{
"label": "_indexes",
"type": "t_mapping(t_bytes32,t_uint256)",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_struct(UintSet)7971_storage": {
"label": "struct EnumerableSetUpgradeable.UintSet",
"members": [
{
"label": "_inner",
"type": "t_struct(Set)7499_storage",
"offset": 0,
"slot": "0"
}
],
"numberOfBytes": "64"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion config/solidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const PRODUCTION_SOLC_CONFIG: SolcUserConfig = {
viaIR: true,
optimizer: {
enabled: true,
runs: 1000,
runs: 800,
},
},
};
Expand Down
6 changes: 3 additions & 3 deletions deployments/mumbai/Certificate.json

Large diffs are not rendered by default.

Loading
Loading