diff --git a/.openzeppelin/unknown-8453.json b/.openzeppelin/unknown-8453.json new file mode 100644 index 00000000..089cd220 --- /dev/null +++ b/.openzeppelin/unknown-8453.json @@ -0,0 +1,656 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x5e5b7D871efDE8224390a334045e1dcb7daAf4E2", + "txHash": "0x146843176ab7bb7a7c6f63ad3044de958d084027e0d6127506cb57e64b32fca3" + }, + "proxies": [ + { + "address": "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e", + "txHash": "0x88534ded3a0297e1b24dde42deb3d77247b5a476792644ae32ea8035e95b0c55", + "kind": "transparent" + }, + { + "address": "0xC3A195EEa198e74D67671732E1B8F8A23781D735", + "txHash": "0x2cafc2d9dee4b033ba4bc08349a70af5d932e2cc05eab7f8cd0a52b893284086", + "kind": "transparent" + }, + { + "address": "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + "txHash": "0xc23d4bb964b72f45eccaa1b9a6c079d97fe6afa23a3c9e7209ecac04bd82a184", + "kind": "transparent" + }, + { + "address": "0x74c3665540FC8B92Dd06a7e56a51eCa038C18180", + "txHash": "0x84ad3ca411bcad053e37648dfc9020135d06496963cca2575b4d3fc9ff04c0e2", + "kind": "transparent" + }, + { + "address": "0x7ac74Be34b1A27E48a2525259719F877a57B2Aa4", + "txHash": "0x7309fcc22f672172388f4273c8ac833bb65a1d9bc0f3dcaf28b09aa8468b7214", + "kind": "transparent" + }, + { + "address": "0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab", + "txHash": "0x95b14b125adfdac459bfd86f527d77fe7b3a4e8b4392092668e567cf86779e3f", + "kind": "transparent" + }, + { + "address": "0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918", + "txHash": "0x76beeb732482d53b2b739cb5017734aefb2b50c870d4dd72e09c24ca4bddec1c", + "kind": "transparent" + } + ], + "impls": { + "d6cad864bee7d4183f11eb60bc8562f63cd064dd64ceb0cd5eb28937afefa981": { + "address": "0x5C5E2D94b107C7691B08E43169fDe76EAAB6D48b", + "txHash": "0x8aaea4b7fafc4774b4e4263d34a9fe4c962c1d106d2f364292fbf190934a3daa", + "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: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:36" + }, + { + "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": "programContract", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "ProgramFactory", + "src": "contracts/program/ProgramFactory.sol:12" + } + ], + "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_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "85fb214ebcdd584f44a6a82b623ca8dffe10d1c30090a42c2e97c3c604622e01": { + "address": "0x3D77E65aEA55C0e07Cb018aB4Dc22D38cAD75921", + "txHash": "0xa6b5edbebc88c7340c4517bc01cdcbea1f85c68ee0fd0120e3695e4dc590fbbc", + "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: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:36" + }, + { + "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": "votingContract", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "QuadraticFundingVotingStrategyFactory", + "src": "contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.sol:13" + }, + { + "label": "nonce", + "offset": 0, + "slot": "102", + "type": "t_uint256", + "contract": "QuadraticFundingVotingStrategyFactory", + "src": "contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.sol:15" + } + ], + "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_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "a36cf49fd516c08806a27c0b932fd0ea57d0980e0d2acc596776c2292d83a9cf": { + "address": "0x2AFA4bE0f2468347A2F086c2167630fb1E58b725", + "txHash": "0x985067d6b266fb94b9830f51f9b011f085f8d37c535d7f2d7939a0fcde2a2299", + "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: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:36" + }, + { + "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": "payoutImplementation", + "offset": 0, + "slot": "101", + "type": "t_address_payable", + "contract": "MerklePayoutStrategyFactory", + "src": "contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.sol:15" + }, + { + "label": "nonce", + "offset": 0, + "slot": "102", + "type": "t_uint256", + "contract": "MerklePayoutStrategyFactory", + "src": "contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.sol:17" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "label": "address payable", + "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_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "777deeff9d03cd6e376d1feca8a0c01b6bf75339df9cacbb788c98f548a864e6": { + "address": "0xD0e19DBF9b896199F35Df255A1bf8dB3C787531c", + "txHash": "0xa2e9e8bfe15d32c0d9afdf1f45c10a3207daf003af34d2fdcab11628299b9661", + "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: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:36" + }, + { + "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": "protocolTreasury", + "offset": 0, + "slot": "101", + "type": "t_address_payable", + "contract": "AlloSettings", + "src": "contracts/settings/AlloSettings.sol:16" + }, + { + "label": "protocolFeePercentage", + "offset": 20, + "slot": "101", + "type": "t_uint24", + "contract": "AlloSettings", + "src": "contracts/settings/AlloSettings.sol:20" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "label": "address payable", + "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_uint24": { + "label": "uint24", + "numberOfBytes": "3" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "96865c174eef7f8315380a3ef530172be2dda3472c66e8976749ea6c77eaa870": { + "address": "0xF2a07728107B04266015E67b1468cA0a536956C8", + "txHash": "0x142bfd3b447cf900ceee065b4c7bacceb4dac85bfeb8434aff21a8e1f4466aff", + "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: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:36" + }, + { + "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": "roundImplementation", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:30" + }, + { + "label": "alloSettings", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:33" + }, + { + "label": "nonce", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "RoundFactory", + "src": "contracts/round/RoundFactory.sol:36" + } + ], + "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_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "094d8f3a0bf92c7d9dd1bcf3e1993ce604a860205623927e1b22ede5fe9c4c4c": { + "address": "0xeAe0848c2A2395569cAaf3598cfc06B81b9b92D7", + "txHash": "0x807c8b310440ec1e415d9f8a4351fbdf5c749ae7e0504ccde338a72f48d5c26e", + "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:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "projectsCount", + "offset": 0, + "slot": "1", + "type": "t_uint256", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:43" + }, + { + "label": "projects", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(Project)12488_storage)", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:46" + }, + { + "label": "projectsOwners", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_struct(OwnerList)12495_storage)", + "contract": "ProjectRegistry", + "src": "contracts/projectRegistry/ProjectRegistry.sol:49" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "label": "mapping(address => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(OwnerList)12495_storage)": { + "label": "mapping(uint256 => struct ProjectRegistry.OwnerList)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Project)12488_storage)": { + "label": "mapping(uint256 => struct ProjectRegistry.Project)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(MetaPtr)14488_storage": { + "label": "struct MetaPtr", + "members": [ + { + "label": "protocol", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "pointer", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(OwnerList)12495_storage": { + "label": "struct ProjectRegistry.OwnerList", + "members": [ + { + "label": "count", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "list", + "type": "t_mapping(t_address,t_address)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Project)12488_storage": { + "label": "struct ProjectRegistry.Project", + "members": [ + { + "label": "id", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "metadata", + "type": "t_struct(MetaPtr)14488_storage", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + } + } +} diff --git a/docs/CHAINS.md b/docs/CHAINS.md index 0c39633a..b7b0c835 100644 --- a/docs/CHAINS.md +++ b/docs/CHAINS.md @@ -346,4 +346,22 @@ These are contracts that are created/deployed once for goerli | RoundFactory | 0xF631C72e0C5837b794911DDaf167861d1A3eDBf5 | | RoundImplementation | 0x9569470C409E96d20435e277e30b94828DC4656d | | ProjectRegistry | 0x1593FAA41134544354a1509566DDf8D6596e7348 | -| DummyVotingStrategy | 0x590638033E8DeE4028244326c1ecA251c8022346 | \ No newline at end of file +| DummyVotingStrategy | 0x590638033E8DeE4028244326c1ecA251c8022346 | + +## Base Mainnet + +| Contract | Address | +|---------------------------------------|--------------------------------------------| +| ProgramFactory | 0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e | +| ProgramImplementation | 0x424C5C175fbd46CA0b27866044A5B956c6AbEe0D | +| QuadraticFundingVotingStrategyFactory | 0xC3A195EEa198e74D67671732E1B8F8A23781D735 | +| QFVotingStrategyImplementation | 0x545B282A50EaeA01A619914d44105437036CbB36 | +| MerklePayoutStrategyFactory | 0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143 | +| MerklePayouStrategyImplementation | 0x04b194b14532070F5cc8D3A760c9a0957D85ad5B | +| DirectPayoutStrategyFactory | 0x74c3665540FC8B92Dd06a7e56a51eCa038C18180 | +| DirectPayoutStrategyImplementation | 0x8AdFcF226dfb2fA73788Ad711C958Ba251369cb3 | +| AlloSettings | 0x7ac74Be34b1A27E48a2525259719F877a57B2Aa4 | +| RoundFactory | 0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab | +| RoundImplementation | 0x8eC471f30cA797FD52F9D37A47Be2517a7BD6912 | +| ProjectRegistry | 0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918 | +| DummyVotingStrategy | 0x73AB205af1476Dc22104A6B8b3d4c273B58C6E27 | \ No newline at end of file diff --git a/docs/DEPLOY_STEPS.md b/docs/DEPLOY_STEPS.md index 0f9094ae..d3b378d1 100644 --- a/docs/DEPLOY_STEPS.md +++ b/docs/DEPLOY_STEPS.md @@ -16,6 +16,7 @@ All the deploy scripts will expect network param to know which network the contr | `polygon` | | `zksync-mainnet` | | `zksync-testnet` | +| `base` | ### Project Registry diff --git a/docs/contracts/elin/contracts-upgradeable/access/OwnableUpgradeable.md b/docs/contracts/elin/contracts-upgradeable/access/OwnableUpgradeable.md index d2db6912..da826d20 100644 --- a/docs/contracts/elin/contracts-upgradeable/access/OwnableUpgradeable.md +++ b/docs/contracts/elin/contracts-upgradeable/access/OwnableUpgradeable.md @@ -35,7 +35,7 @@ function renounceOwnership() external nonpayable -*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.* +*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.* ### transferOwnership diff --git a/docs/contracts/elin/contracts-upgradeable/proxy/utils/Initializable.md b/docs/contracts/elin/contracts-upgradeable/proxy/utils/Initializable.md index 0421ee00..ce0c9698 100644 --- a/docs/contracts/elin/contracts-upgradeable/proxy/utils/Initializable.md +++ b/docs/contracts/elin/contracts-upgradeable/proxy/utils/Initializable.md @@ -6,7 +6,7 @@ -*This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. The initialization functions use a version number. Once a version number is used, it is consumed and cannot be reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in case an upgrade adds a module that needs to be initialized. For example: [.hljs-theme-light.nopadding] ``` contract MyToken is ERC20Upgradeable { function initialize() initializer public { __ERC20_init("MyToken", "MTK"); } } contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { function initializeV2() reinitializer(2) public { __ERC20Permit_init("MyToken"); } } ``` TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. [CAUTION] ==== Avoid leaving a contract uninitialized. An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: [.hljs-theme-light.nopadding] ```* +*This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. The initialization functions use a version number. Once a version number is used, it is consumed and cannot be reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in case an upgrade adds a module that needs to be initialized. For example: [.hljs-theme-light.nopadding] ```solidity contract MyToken is ERC20Upgradeable { function initialize() initializer public { __ERC20_init("MyToken", "MTK"); } } contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { function initializeV2() reinitializer(2) public { __ERC20Permit_init("MyToken"); } } ``` TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. [CAUTION] ==== Avoid leaving a contract uninitialized. An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: [.hljs-theme-light.nopadding] ```* ## Events diff --git a/docs/contracts/elin/contracts/access/AccessControl.md b/docs/contracts/elin/contracts/access/AccessControl.md index 99a7f4ee..fbe58c29 100644 --- a/docs/contracts/elin/contracts/access/AccessControl.md +++ b/docs/contracts/elin/contracts/access/AccessControl.md @@ -6,7 +6,7 @@ -*Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ``` bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ``` function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it.* +*Contract module that allows children to implement role-based access control mechanisms. This is a lightweight version that doesn't allow enumerating role members except through off-chain means by accessing the contract event logs. Some applications may benefit from on-chain enumerability, for those cases see {AccessControlEnumerable}. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ```solidity bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ```solidity function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} to enforce additional security measures for this role.* ## Methods diff --git a/docs/contracts/elin/contracts/token/ERC20/ERC20.md b/docs/contracts/elin/contracts/token/ERC20/ERC20.md index 412b6809..15704f40 100644 --- a/docs/contracts/elin/contracts/token/ERC20/ERC20.md +++ b/docs/contracts/elin/contracts/token/ERC20/ERC20.md @@ -6,7 +6,7 @@ -*Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.* +*Implementation of the {IERC20} interface. This implementation is agnostic to the way tokens are created. This means that a supply mechanism has to be added in a derived contract using {_mint}. For a generic mechanism see {ERC20PresetMinterPauser}. TIP: For a detailed writeup see our guide https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How to implement supply mechanisms]. The default value of {decimals} is 18. To change this, you should override this function so it returns a different value. We have followed general OpenZeppelin Contracts guidelines: functions revert instead returning `false` on failure. This behavior is nonetheless conventional and does not conflict with the expectations of ERC20 applications. Additionally, an {Approval} event is emitted on calls to {transferFrom}. This allows applications to reconstruct the allowance for all accounts just by listening to said events. Other implementations of the EIP may not emit these events, as it isn't required by the specification. Finally, the non-standard {decreaseAllowance} and {increaseAllowance} functions have been added to mitigate the well-known issues around setting allowances. See {IERC20-approve}.* ## Methods @@ -86,7 +86,7 @@ function decimals() external view returns (uint8) -*Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.* +*Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.* #### Returns diff --git a/docs/contracts/elin/contracts/utils/math/SignedMath.md b/docs/contracts/elin/contracts/utils/math/SignedMath.md new file mode 100644 index 00000000..35f29531 --- /dev/null +++ b/docs/contracts/elin/contracts/utils/math/SignedMath.md @@ -0,0 +1,12 @@ +# SignedMath + + + + + + + +*Standard signed math utilities missing in the Solidity language.* + + + diff --git a/docs/contracts/elin/contracts/utils/structs/EnumerableSet.md b/docs/contracts/elin/contracts/utils/structs/EnumerableSet.md index 3fffb679..dda04089 100644 --- a/docs/contracts/elin/contracts/utils/structs/EnumerableSet.md +++ b/docs/contracts/elin/contracts/utils/structs/EnumerableSet.md @@ -6,7 +6,7 @@ -*Library for managing https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive types. Sets have the following properties: - Elements are added, removed, and checked for existence in constant time (O(1)). - Elements are enumerated in O(n). No guarantees are made on the ordering. ``` contract Example { // Add the library methods using EnumerableSet for EnumerableSet.AddressSet; // Declare a set state variable EnumerableSet.AddressSet private mySet; } ``` As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) and `uint256` (`UintSet`) are supported. [WARNING] ==== Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. ====* +*Library for managing https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive types. Sets have the following properties: - Elements are added, removed, and checked for existence in constant time (O(1)). - Elements are enumerated in O(n). No guarantees are made on the ordering. ```solidity contract Example { // Add the library methods using EnumerableSet for EnumerableSet.AddressSet; // Declare a set state variable EnumerableSet.AddressSet private mySet; } ``` As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) and `uint256` (`UintSet`) are supported. [WARNING] ==== Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. ====* diff --git a/docs/contracts/payoutStrategy/DirectPayoutStrategy/DirectPayoutStrategyFactory.md b/docs/contracts/payoutStrategy/DirectPayoutStrategy/DirectPayoutStrategyFactory.md index 875c3cf5..efd90c12 100644 --- a/docs/contracts/payoutStrategy/DirectPayoutStrategy/DirectPayoutStrategyFactory.md +++ b/docs/contracts/payoutStrategy/DirectPayoutStrategy/DirectPayoutStrategyFactory.md @@ -97,7 +97,7 @@ function renounceOwnership() external nonpayable -*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.* +*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.* ### transferOwnership diff --git a/docs/contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.md b/docs/contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.md index d4c583ee..3f6809e5 100644 --- a/docs/contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.md +++ b/docs/contracts/payoutStrategy/MerklePayoutStrategy/MerklePayoutStrategyFactory.md @@ -97,7 +97,7 @@ function renounceOwnership() external nonpayable -*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.* +*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.* ### transferOwnership diff --git a/docs/contracts/program/ProgramFactory.md b/docs/contracts/program/ProgramFactory.md index 0759c525..ff6c5cec 100644 --- a/docs/contracts/program/ProgramFactory.md +++ b/docs/contracts/program/ProgramFactory.md @@ -85,7 +85,7 @@ function renounceOwnership() external nonpayable -*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.* +*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.* ### transferOwnership diff --git a/docs/contracts/round/RoundFactory.md b/docs/contracts/round/RoundFactory.md index b17edde1..dfbe174c 100644 --- a/docs/contracts/round/RoundFactory.md +++ b/docs/contracts/round/RoundFactory.md @@ -120,7 +120,7 @@ function renounceOwnership() external nonpayable -*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.* +*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.* ### roundImplementation diff --git a/docs/contracts/settings/AlloSettings.md b/docs/contracts/settings/AlloSettings.md index 6b31127e..e701d6d7 100644 --- a/docs/contracts/settings/AlloSettings.md +++ b/docs/contracts/settings/AlloSettings.md @@ -114,7 +114,7 @@ function renounceOwnership() external nonpayable -*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.* +*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.* ### transferOwnership diff --git a/docs/contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.md b/docs/contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.md index 570cf244..db0a50d2 100644 --- a/docs/contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.md +++ b/docs/contracts/votingStrategy/QuadraticFundingStrategy/QuadraticFundingVotingStrategyFactory.md @@ -80,7 +80,7 @@ function renounceOwnership() external nonpayable -*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.* +*Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.* ### transferOwnership diff --git a/hardhat.config.ts b/hardhat.config.ts index d92d2d49..d06ab5ad 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -26,6 +26,7 @@ const chainIds = { "arbitrum-goerli": 421613, "fuji-testnet": 43113, polygon: 137, + base: 8453, // mainnet mainnet: 1, @@ -194,6 +195,10 @@ const config: HardhatUserConfig = { url: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, chainId: chainIds["mumbai"], }, + base: { + ...createMainnetConfig("base"), + url: `https://base-mainnet.g.alchemy.com/v2/${alchemyKey}`, + }, localhost: createTestnetConfig("localhost", "http://localhost:8545"), hardhat: { @@ -239,6 +244,8 @@ const config: HardhatUserConfig = { polygon: process.env.POLYGONSCAN_API_KEY, // @ts-ignore mumbai: process.env.POLYGONSCAN_API_KEY, + // @ts-ignore + base: process.env.BASESCAN_API_KEY }, customChains: [ { @@ -289,6 +296,14 @@ const config: HardhatUserConfig = { browserURL: "https://polygonscan.com/", }, }, + { + network: "base", + chainId: chainIds["base"], + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org/", + }, + } ], }, abiExporter: abiExporter, diff --git a/scripts/config/allo.config.ts b/scripts/config/allo.config.ts index 4d3ef6bb..ef1c08ee 100644 --- a/scripts/config/allo.config.ts +++ b/scripts/config/allo.config.ts @@ -78,5 +78,10 @@ export const AlloSettingsParams: DeployParams = { newProtocolFeePercentage: 0, newProtocolTreasury: "", }, + "base": { + alloSettingsContract: "0x7ac74Be34b1A27E48a2525259719F877a57B2Aa4", + newProtocolFeePercentage: 0, + newProtocolTreasury: "0x1fD06f088c720bA3b7a3634a8F021Fdd485DcA42", + }, }; diff --git a/scripts/config/payoutStrategy.config.ts b/scripts/config/payoutStrategy.config.ts index ce9380c2..47c13767 100644 --- a/scripts/config/payoutStrategy.config.ts +++ b/scripts/config/payoutStrategy.config.ts @@ -78,6 +78,11 @@ export const MerklePayoutParams: DeployParams = { implementation: "0x252E749Dca5bE43C5257577E6d37dB12419a1773", contract: "", }, + "base": { + factory: "0xF7c101A95Ea4cBD5DA0Ab9827D7B2C9857440143", + implementation: "0x04b194b14532070F5cc8D3A760c9a0957D85ad5B", + contract: "", + }, }; // TODO: Update this file any time a new dummy voting contract has been deployed @@ -157,4 +162,9 @@ export const DirectPayoutParams: DeployParams = { implementation: "0xB0c9320F2176bc69bf808FA9B5C816713dC6A44C", contract: "", }, + "base": { + factory: "0x74c3665540FC8B92Dd06a7e56a51eCa038C18180", + implementation: "0x8AdFcF226dfb2fA73788Ad711C958Ba251369cb3", + contract: "", + }, }; diff --git a/scripts/config/program.config.ts b/scripts/config/program.config.ts index 171ee0f2..36724ec5 100644 --- a/scripts/config/program.config.ts +++ b/scripts/config/program.config.ts @@ -78,4 +78,9 @@ export const programParams: DeployParams = { programImplementationContract: "0x08Bfe6ec7831d4bbd48873fCDc89Ef3d2d8c2C4E", programContract: "", }, + "base": { + programFactoryContract: "0xDF9BF58Aa1A1B73F0e214d79C652a7dd37a6074e", + programImplementationContract: "0x424C5C175fbd46CA0b27866044A5B956c6AbEe0D", + programContract: "", + } }; diff --git a/scripts/config/projectRegistry.config.ts b/scripts/config/projectRegistry.config.ts index 7e70d8c9..2041b6ba 100644 --- a/scripts/config/projectRegistry.config.ts +++ b/scripts/config/projectRegistry.config.ts @@ -48,5 +48,8 @@ export const projectRegistryParams: DeployParams = { "zksync-mainnet": { proxyContractAddress: "0x1593FAA41134544354a1509566DDf8D6596e7348", }, + "base": { + proxyContractAddress: "0xA78Daa89fE9C1eC66c5cB1c5833bC8C6Cb307918" + } }; diff --git a/scripts/config/round.config.ts b/scripts/config/round.config.ts index 0668f08b..36220894 100644 --- a/scripts/config/round.config.ts +++ b/scripts/config/round.config.ts @@ -80,4 +80,9 @@ export const roundParams: DeployParams = { roundImplementationContract: "0x9569470C409E96d20435e277e30b94828DC4656d", roundContract: "", }, + "base": { + roundFactoryContract: "0xc7722909fEBf7880E15e67d563E2736D9Bb9c1Ab", + roundImplementationContract: "0x8eC471f30cA797FD52F9D37A47Be2517a7BD6912", + roundContract: "", + }, }; diff --git a/scripts/config/votingStrategy.config.ts b/scripts/config/votingStrategy.config.ts index ffb9e796..11cd0198 100644 --- a/scripts/config/votingStrategy.config.ts +++ b/scripts/config/votingStrategy.config.ts @@ -78,6 +78,11 @@ export const QFVotingParams: DeployParams = { implementation: "0x20717A4fEf86705210911c59d08dB8B6D2C593eE", contract: "", }, + "base": { + factory: "0xC3A195EEa198e74D67671732E1B8F8A23781D735", + implementation: "0x545B282A50EaeA01A619914d44105437036CbB36", + contract: "", + }, }; // TODO: Update this file any time a new dummy voting contract has been deployed @@ -133,5 +138,8 @@ export const DummyVotingParams: Record = { "zksync-mainnet": { contract: "0x590638033E8DeE4028244326c1ecA251c8022346", }, + "base": { + contract: "0x73AB205af1476Dc22104A6B8b3d4c273B58C6E27" + } };